@import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Inter:wght@400;500;600;700&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap);
body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-y: hidden;
}

.base-btn {
  font-size: 0.68rem;
  font-weight: 600;
  display: flex;
  border: none;
  outline: none;
  height: 30px;
  cursor: pointer;
  color: white;
  border-radius: 8px;
  margin-right: 10px;
  justify-content: center;
  align-items: center;
  padding: 12px 14px;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: rgba(0, 0, 0, 0.15) 2.4px 2.4px 3.2px;
}

.base-small-icon-btn {
  font-size: 12px;
  font-weight: 800;
  display: flex;
  border: none;
  outline: none;
  cursor: pointer;
  color: white;
  border-radius: 5px;
  justify-content: center;
  align-items: center;
  border: 1px solid #edf2fa;
  background: #edf2fa;
  height: 20px;
  width: 20px;
  margin-top: auto;
  margin-bottom: auto;
}
.ant-btn .prevnext-icon-btn {
  display: flex;
  gap: 4px;
  align-items: center;
}
.login-base-btn {
  font-size: 0.625rem;
  font-weight: 600;
  display: flex;
  border: none;
  outline: none;
  height: 25px;
  cursor: pointer;
  color: white;
  border-radius: 5px;
  justify-content: center;
  align-items: center;
  padding: 5px 10px 5px 10px;
  box-shadow: rgba(0, 0, 0, 0.15) 2.4px 2.4px 3.2px;
}
.small-refresh-btn {
  height: 17px;
  padding-top: 5px;
  padding-left: 1px;
}
.base-btn:hover:enabled {
  box-shadow:
    rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px,
    rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
  cursor: pointer;
}
.base-btn:disabled {
  opacity: 0.7;
  color: white;
}
.base-link-btn {
  font-size: 0.625rem;
  font-weight: 600;
  display: flex;
  border: none;
  outline: none;
  height: 10px;
  cursor: pointer;
  color: white;
  margin-right: 3px;
  justify-content: center;
  align-items: center;
  padding: 5px 3px 5px 0px;
}

.base-link-btn:hover:enabled {
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  cursor: pointer;
}
.base-link-btn:disabled {
  opacity: 0.7;
  color: white;
}

.base-btn-icon {
  font-size: 12px;
  font-weight: 800;
  display: flex;
  border: none;
  outline: none;
  cursor: pointer;
  color: white;
  border-radius: 5px;
  justify-content: center;
  align-items: center;
  border: 1px solid #edf2fa;
  background: #edf2fa;
  height: 15px;
  width: 15px;
  margin-top: auto;
  margin-bottom: auto;
  padding-top: 4px;
}

.base-btn-icon:hover:enabled {
  opacity: 0.8;
  cursor: pointer;
}
.base-btn-icon:disabled {
  opacity: 0.7;
  color: blue;
}
.link-btn-icon {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  border: none;
  outline: none;
  cursor: pointer;
  color: #0f3460;
  border-radius: 5px;
  justify-content: center;
  align-items: center;
  border: 1px solid #48cfcb;
  background: #48cfcb;
  margin-right: 2px;
}

.link-btn-icon:hover:enabled {
  opacity: 0.8;
  cursor: pointer;
}
.link-btn-icon:disabled {
  opacity: 0.7;
  color: blue;
}

.close-btn {
  background: linear-gradient(180deg, #e05c6d 0%, #d1495b 40%, #b83a4b 100%);
  border: 1px solid #d1495b;
}

.add-btn {
  background: #735d78;
  border: 1px solid #735d78;
}

.draft-btn {
  background: #bc6c25;
  border: 1px solid #bc6c25;
}

.submit-btn {
  background: linear-gradient(160deg, #59e777 0%, #25a845 50%, #0f6624 100%);
  border: 1px solid #30aa4d;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.35);
  transition: all 0.25s ease;
}

.edit-btn {
  background: #a84c7a;
  border: 1px solid #a84c7a;
}

.reopen-btn {
  background: #4a4e69;
  border: 1px solid #4a4e69;
}

.approve-btn {
  background: linear-gradient(135deg, #2aa394, #136f63);
  border: 1px solid #136f63;
}

.reject-btn {
  background: linear-gradient(135deg, #f2a085, #e07a5f);
  border: 1px solid #e07a5f;
}

.update-btn {
  background: linear-gradient(180deg, #5fa3ad 0%, #508991 50%, #3e6f75 100%);
  border: 1px solid #508991;
}

.any-btn {
  background: linear-gradient(135deg, #0f3460, #19549c);
  border: 1px solid #0f3460;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.refresh-btn {
  background: #ab8665;
  border: 1px solid #ab8665;
}
.link-btn {
  background: #fabc3f;
  border: 1px solid #fabc3f;
}
.next-btn {
  background: linear-gradient(135deg, #d65f1f, #e97029, #ff9a5c);
  border: 1px solid #d65f1f;
}
.previous-btn {
  background: linear-gradient(135deg, #0596a1, #07a8b5, #0fc2d1);
  border: 1px solid #0596a1;
}
.copy-btn {
  background: #c8c249;
  border: 1px solid #c8c249;
}
.version-btn {
  background: #814af7;
  border: 1px solid #814af7;
}
.nego-btn {
  background: #222c38;
  border: 1px solid #222c38;
}
.raise-nego-btn {
  background: #3e77be;
  border: 1px solid #3e77be;
}
.csp-btn {
  border: 1px solid #f47a00;
  background: #f6aa5e;
}

.req-history-btn {
  border: 1px solid #48336e;
  background: #48336e;
}

.icon-btn {
  font-size: 0.625rem;
  font-weight: 600;
  display: flex;
  border: none;
  outline: none;
  height: 25px;
  cursor: pointer;
  color: white;
  border-radius: 5px;
  margin-right: 10px;
  justify-content: center;
  align-items: center;
  padding: 5px 10px 5px 10px;
  background: linear-gradient(135deg, #0f3460, #19549c);
  border: 1px solid #0f3460;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.small-submit-btn {
  font-size: 0.625rem;
  font-weight: 600;
  display: flex;
  border: none;
  outline: none;
  height: 25px;
  cursor: pointer;
  color: white;
  border-radius: 5px;
  margin-right: 10px;
  justify-content: center;
  align-items: center;
  padding: 5px 10px 5px 10px;
  border: 1px solid #42ae54;
  background: linear-gradient(160deg, #59e777 0%, #25a845 50%, #0f6624 100%);
  border: 1px solid #30aa4d;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.35);
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.loading-screen {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-image: linear-gradient(
    to right top,
    #10335f,
    #284777,
    #3e5c8f,
    #5372a9,
    #6989c3,
    #5a9eda,
    #40b4ee,
    #00cafd,
    #00e0ef,
    #00f1c6,
    #8dfb8f,
    #eafb5f
  );
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
}

.custom-antd-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  margin-top: 4px;
}
.custom-antd-table .ant-table-column-title {
  display: block;
  min-width: 0;

  overflow: hidden;
}

.custom-antd-table
  .ant-table-wrapper
  .ant-table-container
  .ant-table-thead
  > tr
  > th.ant-table-cell {
  border: 1.5px solid #d9d9d9;
  border-bottom: 1.6px solid #cbd5e1;
  border-top: 0;
}

.custom-antd-table
  .ant-table-wrapper
  .ant-table-container
  .ant-table-thead
  > tr
  > th:first-child {
  border-left: 1px solid #d3d2d2;
}

.custom-antd-table
  .ant-table-wrapper
  .ant-table-container
  .ant-table-tbody
  > tr
  > td {
  border: 1px solid #e8edf2;
}

.custom-antd-table .ant-table-wrapper .ant-table-container {
  border: 1px solid #d6d6d6;
}
.custom-antd-table .ant-table-wrapper {
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  overflow: hidden !important;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 4px 12px rgba(0, 0, 0, 0.04);
}

/* ── Table base ────────────────────────────────────────────────── */
.custom-antd-table .ant-table {
  font-size: 13px;
  color: #1e293b;
  background: #ffffff;
}

/* ── Header ────────────────────────────────────────────────────── */
.custom-antd-table .ant-table-thead > tr > th {
  background: #f0f4f8 !important;
  color: #1e293b !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 8px 7px !important;
  border-bottom: 2px solid #cbd5e1;
  border-right: 1px solid #e8edf2;
  transition: background 0.15s;
  min-width: 0 !important;
  overflow: hidden !important;
}

.custom-antd-table .ant-table-thead > tr > th:last-child {
  border-right: none;
}

.custom-antd-table .ant-table-thead > tr > th:hover {
  background: #e4ecf5 !important;
}

.custom-antd-table .ant-table-thead > tr > th.ant-table-column-sort {
  background: #e0ecfb !important;
}

/* Sort icons */
.custom-antd-table .ant-table-column-sorter {
  color: #b0bec5;
}
.custom-antd-table .ant-table-column-sorter-up.active,
.custom-antd-table .ant-table-column-sorter-down.active {
  color: #2563eb;
}

.custom-antd-table .ant-table-title {
  padding: 4px 4px !important;
}

/* ── Body rows ─────────────────────────────────────────────────── */
.custom-antd-table .ant-table-tbody > tr > td {
  padding: 7px 14px !important;

  font-size: 12px !important;
  color: #1e293b !important;
  border-bottom: 1px solid #e8edf2 !important;
  border-right: 1px solid #e8edf2 !important;
  vertical-align: middle;
  transition: background 0.1s;
  line-height: 1.5;
}

.custom-antd-table .ant-table-tbody > tr > td:last-child {
  border-right: none;
}

/* Alternating rows */
.custom-antd-table .ant-table-tbody > tr:nth-child(odd) > td {
  background: #f8fafc !important;
}
.custom-antd-table .ant-table-tbody > tr:nth-child(even) > td {
  background: #ffffff !important;
}

/* Hover */
.custom-antd-table .ant-table-tbody > tr:hover > td {
  background: #eff6ff !important;
}

/* Selected */
.custom-antd-table .ant-table-tbody > tr.ant-table-row-selected > td {
  background: #dbeafe !important;
}

/* Last row — remove bottom border so card border shows clean */
.custom-antd-table .ant-table-tbody > tr:last-child > td {
  border-bottom: none !important;
}

/* ── Fixed / sticky columns ────────────────────────────────────── */
.custom-antd-table .ant-table-cell-fix-left,
.custom-antd-table .ant-table-cell-fix-right {
  background: inherit !important;
}

.custom-antd-table .ant-table-cell-fix-right::before {
  box-shadow: inset -4px 0 6px -3px rgba(0, 0, 0, 0.06) !important;
}

/* ── Resize handle ─────────────────────────────────────────────── */
.custom-antd-table .react-resizable {
  position: relative;
}

.custom-antd-table .react-resizable-handle {
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 4px;
  border-radius: 2px;
  cursor: col-resize;
  background: transparent;
  transition: background 0.15s;
  z-index: 1;
}

.custom-antd-table .react-resizable-handle:hover {
  background: #2563eb;
  opacity: 0.5;
}

/* ── Scrollbars (table body only) ──────────────────────────────── */
.custom-antd-table .ant-table-body::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.custom-antd-table .ant-table-body::-webkit-scrollbar-track {
  background: #f8fafc;
}

.custom-antd-table .ant-table-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.custom-antd-table .ant-table-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ── Expanded row ──────────────────────────────────────────────── */
.custom-antd-table .ant-table-expanded-row > td {
  background: #f0f7ff !important;
  padding: 16px 20px !important;
  border-bottom: 1px solid #e8edf2 !important;
}

.custom-antd-table .ant-table-row-expand-icon {
  border-radius: 6px !important;
  border-color: #cbd5e1 !important;
  color: #1e3a5f !important;
  transition: all 0.15s;
}

.custom-antd-table .ant-table-row-expand-icon:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.08) !important;
}

/* ── Pagination ────────────────────────────────────────────────── */
.custom-antd-table .ant-pagination {
  padding: 4px 11px !important;
  margin: 0 !important;
  border-top: 1px solid #e8edf2;
  background: #f0f4f8;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.custom-antd-table .ant-pagination-item {
  border-radius: 6px;
  border-color: #e8edf2;
  font-size: 12px;
  min-width: 28px !important;
  height: 28px !important;
  line-height: 26px !important;
  transition: all 0.15s;
}

.custom-antd-table .ant-pagination-item:hover {
  border-color: #2563eb;
}
.custom-antd-table .ant-pagination-item:hover a {
  color: #2563eb;
}

.custom-antd-table .ant-pagination-item-active {
  background: #1e3a5f;
  border-color: #1e3a5f;
}
.custom-antd-table .ant-pagination-item-active a {
  color: #ffffff;
}

.custom-antd-table .ant-pagination-prev button,
.custom-antd-table .ant-pagination-next button {
  border-radius: 6px;
  border-color: #e8edf2 !important;
  height: 28px !important;
  width: 28px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.custom-antd-table .ant-pagination-prev:hover button,
.custom-antd-table .ant-pagination-next:hover button {
  border-color: #2563eb;
  color: #2563eb;
}

.custom-antd-table .ant-pagination-total-text {
  font-size: 12px;
  color: #64748b;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .custom-antd-table .ant-table-thead > tr > th {
    font-size: 10px !important;
    padding: 9px 10px !important;
    letter-spacing: 0.04em !important;
  }

  .custom-antd-table .ant-table-tbody > tr > td {
    font-size: 12px !important;
    padding: 8px 10px !important;
  }

  .custom-antd-table .ant-pagination {
    justify-content: center;
    padding: 8px 10px !important;
  }
}

@media (max-width: 480px) {
  .custom-antd-table .ant-table-thead > tr > th {
    font-size: 9.5px;
    padding: 8px 8px;
  }

  .custom-antd-table .ant-table-tbody > tr > td {
    font-size: 11.5px;
    padding: 7px 8px;
  }

  .custom-antd-table .ant-pagination-total-text {
    display: none;
  }
}

.custom-antd-table .ant-table-header {
  overflow-x: auto !important;
  overflow-y: hidden !important;

  scrollbar-width: none;
}

.custom-antd-table .ant-table-header::-webkit-scrollbar {
  display: none;
}

.custom-antd-table .ant-table-body {
  overflow: auto !important;
}

.custom-antd-table.has-floating-scrollbar {
  border-radius: 10px;
  padding-bottom: 20px;
}

.custom-antd-table.has-floating-scrollbar
  .ant-table-wrapper
  .ant-table-container {
  border-radius: 10px;
  overflow: hidden;
}

.custom-antd-table.has-floating-scrollbar .ant-pagination {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.custom-antd-table.has-floating-scrollbar
  .ant-table-body::-webkit-scrollbar:vertical {
  width: 5px;
  display: block;
}

.custom-antd-table.has-floating-scrollbar .ant-table-sticky-scroll {
  display: none !important;
}

.custom-antd-table.has-floating-scrollbar .ant-table-body {
  overflow-x: auto !important;
  scrollbar-width: none;
}

.custom-antd-table.has-floating-scrollbar
  .ant-table-body::-webkit-scrollbar:horizontal {
  display: none;
}

.custom-antd-table.has-floating-scrollbar
  .ant-table-body::-webkit-scrollbar:vertical {
  width: 5px;
  display: block;
}

.custom-sticky-hscroll {
  overflow-x: auto;
  overflow-y: hidden;
  height: 12px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #eef2f7;
  border-top: 1px solid #cbd5e1;
  z-index: 1000;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.08);
}

.custom-sticky-hscroll::-webkit-scrollbar {
  height: 7px;
}

.custom-sticky-hscroll::-webkit-scrollbar-track {
  background: #e0e8f2;
}

.custom-sticky-hscroll::-webkit-scrollbar-thumb {
  background: #103460;
  border-radius: 7px;
  border: 3px solid #eef2f7;
  background-clip: padding-box;
}

.custom-sticky-hscroll::-webkit-scrollbar-thumb:hover {
  background: #103460;
}

/* Firefox */
.custom-sticky-hscroll {
  scrollbar-width: auto;
  scrollbar-color: #5b7ca3 #eef2f7;
}

.page_404 {
  padding: 40px 0;
  background: #fff;
}

.page_404-container {
  display: grid;
  align-content: center;
  justify-content: center;
  align-items: center;
  justify-items: center;
}

.page_404-img {
  height: 375px;
  width: 100%;
}

.four_zero_four_bg {
  height: 400px;
  background-position: center;
}

.four_zero_four_bg-h3 {
  font-size: 35px;
}

.link_404 {
  color: #fff !important;
  padding: 10px 20px;
  background: #39ac31;
  margin: 20px 95px;
  display: inline-block;
}

.contant_box_404 {
  margin-top: -50px;
}

.required-text {
  margin: 0px;
  margin-left: 2px;
  padding: 0px;
  color: red;
  font-size: 8px;
  white-space: pre-line;
}

.prod-std-lbl {
  font-weight: bold;
  display: flex;
  align-items: center;
  text-indent: 5px;
  color: #0f3460;
  flex-wrap: nowrap;
  white-space: nowrap;
  margin-top: 5px;
  margin-bottom: 5px;
  font-size: 0.625rem;
  margin-right: 5px;
}

.prod-std-lbl-value {
  font-weight: bold;
  display: flex;
  align-items: center;
  text-indent: 5px;
  color: #076ce7;
  flex-wrap: nowrap;
  white-space: nowrap;
  margin-top: 5px;
  margin-bottom: 5px;
  font-size: 0.625rem;
  margin-right: 5px;
}

.common-modal-title {
  font-size: 0.7rem;
}
.common-card-container {
  margin: 5px 0px 30px 0px;
  padding-right: 10px;
}

.common-left-side {
  height: 73vh;
  overflow-x: auto;
  overflow-y: auto;
}

.ant-drawer-body .floatableStyle {
  top: 40px;
}
.common-details-sub-container {
  border-radius: 5px;
  box-shadow:
    rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
  padding: 5px;
  max-height: 82vh;
  overflow: auto;
  overflow-x: hidden;
}
.task-default-img {
  display: block;
  margin: auto;
  opacity: 0.85;
  /* height: 78vh; */
  width: 60%;
}
.common-name-order {
  margin: 0;
  font-weight: bold;
  color: #4f7da5;
  justify-content: left;
  font-size: 0.7rem;
  padding: 3px;
  border-radius: 3px;
  display: flex;
}
.common-img-del {
  display: flex;
  position: absolute;
  right: -4px;
  top: 18px;
}

.common-qr {
  white-space: nowrap;
}
/* .ant-card-head {
  min-height: 40px !important;
} */

.common-copy-btn {
  display: flex;
  justify-content: end;
}
.common-img-tour-btn {
  width: 50% !important;
}

.common-file-uploader {
  border: 2px dashed #ccc;
  padding: 3px;
}
.common-file-container {
  text-align: center;
  padding: 0 5px;
  display: flex;
  gap: 10px;
}

.common-doc-upload-btn {
  text-align: center;
}
.common-pTag {
  margin: 0px;
  font-size: 12px;
  cursor: pointer;
}
.common-file-div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.common-sub-container {
  height: 59vh;
}
.common-image-holder {
  align-items: center;
  display: flex;
  width: 100%;
  text-align: center;
  margin: 0 auto;
  height: 20px;
}
.common-store-orderRequest {
  width: 200px;
}
.common-image-uploader {
  border: 2px dashed #ccc;
  text-align: center;
  height: 50px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px;
}
.common-table tbody tr:nth-child(odd) td {
  background-color: #fff;
}
.common-table tbody tr:nth-child(even) td {
  background-color: #f2f5f8;
}
.common-image-uploader-no-height {
  border: 2px dashed #ccc;
  text-align: center;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px;
}
.common-img-div {
  width: 147px;
  display: contents;
}

.common-delete-upload {
  display: flex;
  align-content: center;
  justify-content: center;
  align-items: center;
}
.common-spec-images-container {
  display: flex;
  align-items: center;
  overflow-y: auto;
  scroll-behavior: smooth;
  transition: scroll 0.3s ease-in-out;
  max-width: 98%;
  padding: 1% 0 0 0;
}
.common-image-name-container {
  text-align: center;
  width: -webkit-min-content;
  width: min-content;
  margin: 10px;
}

.common-disable-input:disabled {
  background: #a8a8a8;
  color: black;
}
.or-csp-btn {
  display: flex;
  justify-content: center;
}
.prod-std-txt {
  border: 1px solid rgb(201, 200, 200);
  border-radius: 5px;
}
.common-table-filter-container {
  margin: 10px;
}

.common-table-filter {
  margin: 0px 5px;
}

.common-link-btn {
  margin: 5px 0 0 5px;
}
.common-small-refresh-btn {
  margin: 2px 0 0 0;
}
.common-header-add-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 5px 0 0 0;
}

.drag-drop-container {
  display: flex;
  height: 100%;
  justify-content: center;
}

.prod-std-txt:focus {
  outline: 1px solid rgb(201, 200, 200);
}
.prod-std-txt:hover {
  box-shadow: 0 0 3px grey;
}

.prod-std-element-size {
  font-size: 0.625rem;
  height: 24px;
}

.prod-std-checkbox-lbl {
  font-size: 12px;
  width: -webkit-fit-content;
  width: fit-content;
  height: 25px;
  color: #0f3460;
  font-weight: 700;
  display: flex;
  align-items: center;
  text-indent: 5px;
  white-space: nowrap;
}
.segment-container {
  padding: 0 10px;
}
.common-table-address-td {
  border-radius: 2px;
  text-align: center;
  min-width: 20vw;
  background: #ffffff;
  padding: 5px 5px;
  color: black;
}

.common-table-container {
  overflow-x: hidden;
  height: 30vh;
  overflow-y: auto;
}

.table-edit-button {
  border: none;
  background: none;
  cursor: pointer;
}

.textInput-qc-edit::-webkit-inner-spin-button,
.textInput-qc-edit::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

input[type="checkbox"] {
  accent-color: #0f3460ab;
}
input[type="radio"] {
  accent-color: #0f3460ab;
}

.card-textbox-input {
  width: 100%;
}

.card-select-div {
  width: 100%;
}

.input-file-name {
  font-size: 7pt;
  color: red;
}
.common-qty-tab-grp {
  display: flex;
  grid-template-columns: auto auto auto;
  column-gap: 10px;
}

@media only screen and (max-width: 1300px) {
  .prod-std-element-size {
    font-size: 0.625rem;
    height: 25px;
    white-space: nowrap;
  }

  .prod-std-checkbox-lbl {
    font-size: 8pt;
    width: -webkit-fit-content;
    width: fit-content;
    height: 25px;
    color: #0f3460;
    font-weight: 700;
    display: flex;
    align-items: center;
    text-indent: 5px;
    white-space: nowrap;
  }
}

.sub-header-container {
  border-radius: 5px;
  box-shadow:
    rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
  padding: 5px;
}
.float-div-margin {
  margin: 40px 5px 1px 5px;
}

.common-header-padding {
  padding-left: 15px;
}
.common-header {
  margin: 0;
  width: 100%;
  font-weight: bold;
  font-size: 0.8rem;
  color: #4f7da5;
  height: 32px;
  display: flex;
  justify-content: left;
  align-items: center;
}

.common-popup-modal {
  z-index: 99;
  display: block;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}
.common-no-data-label {
  text-align: center;
  display: block;
  font-weight: bold;
  color: #0f3460;
  white-space: nowrap;
  margin-top: 5px;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.common-modal-container {
  background-color: #f8fbfb;
  margin: auto;
  padding: 20px 24px;
  border: 1px solid #888;
  box-shadow:
    0 4px 8px 0 rgb(0 0 0 / 20%),
    0 6px 20px 0 rgb(0 0 0 / 19%);
  -webkit-animation-name: animatetop;
  -webkit-animation-duration: 0.4s;
  animation-name: animatetop;
  animation-duration: 0.4s;
  width: 30%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 10px;
}

.modal-container-common {
  background-color: #fefefe;
  margin: auto;
  padding: 0;
  border: 1px solid #888;
  box-shadow:
    0 4px 8px 0 rgb(0 0 0 / 20%),
    0 6px 20px 0 rgb(0 0 0 / 19%);
  -webkit-animation-name: animatetop;
  -webkit-animation-duration: 0.4s;
  animation-name: animatetop;
  animation-duration: 0.4s;
  width: 25%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 10px;
}
.common-input-qr-container {
  display: grid;
  grid-template-columns: 10fr 1fr;
  grid-column-gap: 10px;
  column-gap: 10px;
}

.common-header-title {
  margin: 0;
  color: #103460;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.5;
  word-wrap: break-word;
  margin-bottom: 8px;
}

.common-container {
  margin: 0 1% 0 1%;
}
.common-add-button-container {
  margin: 5px 0 5px 0;
  display: flex;
  justify-content: flex-end;
}
.common-img-container {
  height: 40px;
  width: 40px;
}

.common-img-container-sty {
  height: 10vh;
  /* width: 15vw; */
}
.common-default-img {
  display: block;
  height: 80%;
  width: 60%;
  margin: 0 auto;
}
.common-img-upload-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding-left: 3px;
  align-items: center;
  grid-column-gap: 5px;
  column-gap: 5px;
}

.common-input-label-container {
  width: 96%;
}
.textbox-input-common {
  width: 100%;
  padding: 5px;
}

.common-text-input {
  width: 100%;
}
.common-select {
  height: 24px;
  width: 100%;
}
.common-status-checkbox {
  display: flex;
  align-items: center;
  margin: 32px 0 0 0;
}
.checkbox-div-common {
  display: flex;
  align-items: center;
  margin: 12px 0 0 4px;
}
.common-checkBox-container {
  display: flex;
  text-align: left;
  align-items: flex-end;
  margin: 10px 0 0 0;
  white-space: nowrap;
}
.common-checkbox-wrapper {
  display: flex;
  column-gap: 10px;
}

.common-table-th {
  margin-top: 0px;
  font-size: 0.7rem;
  margin-bottom: 1px;
  color: white;
  padding: 5px 8px;
  /* background-color: #9e0c40; */
  background-color: #0f3460;
  /* background-color: #8c4278; */
  border-radius: 2px;
  text-align: left;
  white-space: nowrap;
  border-right: 1.5px solid rgb(255 255 255 / 38%);
  letter-spacing: 0.2px;
}
.common-table-th-with-width {
  margin-top: 0px;
  font-size: 0.7rem;
  margin-bottom: 1px;
  color: white;
  padding: 5px 8px;
  white-space: nowrap;
  /* background-color: #9e0c40; */
  background-color: #0f3460;
  /* background-color: #8c4278; */
  border-radius: 2px;
  text-align: left;
  /* min-width: 9vw;
  max-width: 15vw; */
  min-width: 13vw;
  max-width: 13vw;
}
.common-table-th:first-child {
  border-radius: 0;
}

.common-table-text {
  text-align: center;
}

.common-table-img-td {
  width: 10vh;
  border: 1px solid #f8f2f2;
  background: #fff;
}
.common-table-td-sn {
  padding: 5px 5px;
  vertical-align: middle;
  border: 1px solid #f8f2f2;
  background: #fff;
  overflow-wrap: break-word;
  text-align: center;
  color: black;
  font-size: 0.625rem !important;
  text-shadow: 0 0 black;
}

.common-table-row {
  background: #ffffff;
  transition: background 0.15s;
  border-bottom: 1px solid #eeeef5;
}
.common-table-row:hover {
  background: #f0f4ff;
}

.common-table-th .ant-checkbox-checked .ant-checkbox-inner {
  background-color: #518bd3 !important;
  border-color: #ffffff !important;
}

.common-table-td {
  border-radius: 2px;
  text-align: left;
  min-width: 5vw;
  max-width: 15vw;
  border: 1px solid #f8f2f2;
  /* background: #fffafe; */
  font-size: 0.625rem;
  overflow-wrap: break-word;
  /* font-weight: bold; */
  vertical-align: middle;
  padding: 5px 5px;
  color: black;
  background: #ffff;
  /* font-weight: 600; */
}

.common-table-td-for-spec {
  border-radius: 2px;
  text-align: left;
  min-width: 6vw;
  max-width: 10vw;
  font-size: 0.625rem;
  overflow-wrap: break-word;
  color: black;
}

.common-table-td-modify {
  background: red;
  border-color: red;
}

.common-table-td-error {
  border-radius: 2px;
  text-align: left;
  min-width: 5vw;
  max-width: 10vw;
  /* background: #fffafe; */
  background: #ff7373;
  font-size: 0.625rem;
  overflow-wrap: break-word;
  /* font-weight: bold; */
  padding: 2px;
  border: 1px solid #ff0000;
  color: black;
  /* font-weight: 600; */
}

.common-table-td-wt-width {
  min-width: 10vw;
  max-width: 20vw;
}

.common-table-sn-td {
  border-radius: 2px;
  text-align: center;
  min-width: 2vw;
  max-width: 10vw;
  /* background: #fffafe; */
  background: #ffffff;
  font-size: 0.625rem;
  overflow-wrap: break-word;
  /* font-weight: bold; */
  padding: 2px;

  color: black;
  /* font-weight: 600; */
  text-shadow: 0 0 black;
}

.common-table-th-big {
  margin-top: 0px;
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: 1px;
  color: white;
  padding: 5px;

  border-radius: 2px;
  text-align: left;
}

.common-table-td-span {
  text-align: center;
  font-size: 0.625rem;
  font-weight: bold;
}
.common-span-lbl {
  font-size: 0.7rem;
}

.common-table-count-no-border {
  border-radius: 5px;
  text-align: center;
  background: #f6f6f6;
}

.common-table-count {
  border: 1px solid #f8f2f2;
  border-radius: 2px;
  text-align: center;
  /* background: #fffafe; */
  background: #ffffff;
  font-weight: bold;
  font-size: 0.625rem;
}

.common-ant-table {
  margin: 10px 0 0 0;
  padding: 0.3rem;
  overflow: hidden;
}
.common-list-view-container {
  display: flex;
  box-shadow:
    rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;
  border-radius: 2px;
  padding: 3px;
  white-space: pre;
  margin: 5px;
  align-items: center;
}
.prod-std-txt-span {
  font-weight: bold;
  border-radius: 5px;
}

.common-list-wrapper {
  max-height: 84vh;
  overflow-x: auto;
  padding: 5px;
}
.common-list-view-emb-trim {
  width: 350px;
}
.common-dropdown-input {
  width: 100%;
  height: 24px;
  font-size: 0.625rem;
}
.common-dropdown-input .ant-select-selection-item {
  font-size: 0.625rem;
}
.ant-checkbox-wrapper {
  font-weight: bold;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  color: #0f3460;
  font-size: 0.625rem;
  line-height: 1.5714285714285714;
  list-style: none;
  display: inline-flex;
  align-items: baseline;
  cursor: pointer;
  white-space: nowrap;
}

.common-table-search {
  margin: 0 0 10px 0;
}
.table-container-margin {
  margin: 0 0 50px 0;
}
.commom-QR-btn {
  background: #0f3460;
}
.common-date-input {
  padding: 0 5px;
}
.aster-risk-Icon {
  position: relative;
  bottom: 5px;
  color: red;
  font-size: 0.625rem;
  left: 1px;
}
.common-QR-display {
  display: flex;
  justify-content: center;
}
.common-floatableStyle {
  position: fixed;
  top: 60px;
  right: 18px;
  z-index: 1000;
  padding: 2px 5px;
  background: whitesmoke;
}

.emp-prof-create {
  top: 0px;
  position: fixed;
  background: none;
  padding: 10px;
}
.common-red-color {
  border: 2px solid #b2ddd0;
  background-color: #b2ddd0;
  /* opacity: 0.5; */
}

.aster-risk-Icon-table {
  position: relative;
  bottom: 5px;
  color: #feff00;
  font-size: 0.625rem;
  left: 1px;
}
.common-flex-container {
  display: flex;
  gap: 15px;
}

.common-doc-file-upload-container {
  display: grid;
  grid-template-columns: 0.5fr 3fr;
  grid-column-gap: 10px;
  column-gap: 10px;
}
.common-doc-upload-file-lbl {
  display: flex;
}
.common-doc-upload-input {
  border: 2px dashed #ccc;
  text-align: center;
  height: 55px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px;
  width: 200px;
}

.fab-concat-lbl {
  white-space: normal;
  width: 350px;
}

.common-select-input-container {
  display: flex;
}

.common-arr-grid-container {
  margin: 10px 0 0 0;
  display: grid;
  grid-column-gap: 10px;
  column-gap: 10px;
  grid-template-columns: repeat(3, minmax(300px, 1fr));
  grid-row-gap: 10px;
  row-gap: 10px;
  align-items: start;
}

.grid-two-fields-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 10px;
  column-gap: 10px;
}

.table-exp-row {
  display: grid;
  grid-template-columns: 0.5fr 0.6fr 1.2fr 0.6fr;
  align-items: center;
  justify-content: left;
  text-align: left;
  height: 30px;
}

.table-exp-row-cost-centeric {
  display: grid;
  grid-template-columns: 0.8fr 0.8fr 1.2fr 1.4fr 0fr 1fr 0.7fr 0.9fr 0.5fr 0.6fr;
  align-items: center;
  text-align: left;
  height: 30px;
}

.table-exp-row-ledger-group {
  display: grid;
  grid-template-columns: 0.9fr 1.6fr 1.2fr 1.5fr 0fr 1fr 0.7fr 0.9fr 0.5fr 0.6fr;
  align-items: center;
  text-align: left;
  height: 30px;
}

.table-exp-value {
  margin: 0px;
  padding: 0px;
}

.table-exp-row-department {
  display: grid;
  grid-template-columns: 0.43fr 1.4fr 2fr 0.35fr;
  align-items: center;
  justify-content: left;
  text-align: left;
  height: 30px;
}
.labl-align-link {
  display: flex;
}

.common-table tr:nth-child(even) {
  background-color: #f2f5f8;
}

.common-table tr:hover {
  background: #f0f4ff;
}

.file-preview-image-holder {
  align-items: center;
  display: flex;
  text-align: center;
}

.file-images-main-container {
  width: 100%;
}

.filtersOpen {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
}

.tf-filter-header-left {
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: 600;
  font-size: 13px;
  color: #334155;
}

.file-preview-images-container {
  display: flex;
  align-items: center;
  scroll-behavior: smooth;
  transition: scroll 0.3s ease-in-out;
  column-gap: 20px;
  max-width: 40vw;
  overflow-x: auto;
}
.common-input-file {
  width: 112px;
}

.common-cost-dropdown {
  width: 10vw;
}
.common-edit-basic-container {
  height: 45vh;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 5px;
  background: #f7faff;
}
.common-doc-table-td {
  display: table-cell;
  justify-items: center;
}

.common-Qr-container {
  margin: 0 10px;
  display: flex;
  white-space: nowrap;
}

.file-preview-images-container::-webkit-scrollbar {
  display: none;
}
.file-preview-image-name-container {
  text-align: center;
  width: 100px;
}
.file-preview-image {
  max-height: 100px;
  height: 50px;
  max-width: 100px;
  width: 50px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.div-display-flex {
  display: inline-flex;
  margin-top: 1%;
}
.common-readOnly-input {
  background: rgba(0, 0, 0, 0.04);
  color: black;
}
.common-readOnly-input:hover {
  background: rgba(0, 0, 0, 0.04);
  color: black;
  cursor: not-allowed;
}
.common-readOnly-input:focus {
  background: rgba(0, 0, 0, 0.04);
  color: black;
  cursor: not-allowed;
}
.common-readOnly-input:disabled {
  background: rgba(0, 0, 0, 0.04);
  color: black;
  cursor: not-allowed;
}
.common-summary-tbl-bg {
  background: antiquewhite;
  border: 1px solid navajowhite;
}

.cost-width {
  width: 100px;
}

.style_image {
  height: 80% !important;
  width: 60% !important;
  object-fit: contain;
}
.card-list {
  min-height: 35vh;
  box-shadow:
    rgba(0, 0, 0, 0.02) 0px 1px 3px 0px,
    rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;
}

.common-label {
  align-items: center;
  text-indent: 5px;
  color: #0f3561;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.common-sub-title {
  align-items: center;
  color: #000;
  font-size: 0.625rem;
  white-space: nowrap;
}

.common-popover {
  display: block;
  font-size: 0.625rem;
}

.common-lbl-placeholder {
  color: #c0baba;
  font-size: 0.625rem;
}
.image-ratio {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  max-height: 133px;
}

.status-color {
  color: #000;
  font-weight: 600;
  font-size: 0.625rem;
}

.common-drawer-header-text {
  font-weight: bold;
  text-indent: 5px;
  color: #0f3460;
  font-size: 0.725rem;
}
.steps-scroll-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;

  -webkit-overflow-scrolling: touch;

  scrollbar-width: thin;
  scrollbar-color: #15325d #e9edf3;
}

.steps-scroll-wrapper::-webkit-scrollbar {
  height: 4px;
}

.steps-scroll-wrapper::-webkit-scrollbar-track {
  background: #e9edf3;
}

.steps-scroll-wrapper::-webkit-scrollbar-thumb {
  background: #15325d;
  border-radius: 10px;
}

.steps-scroll-wrapper .general-steps.ant-steps {
  width: -webkit-max-content;
  width: max-content;
  min-width: 100%;

  padding: 2px 12px;

  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;

  gap: 15px;

  background: #fbf3ef85;
  border-radius: 5px;

  box-sizing: border-box;
}

.steps-scroll-wrapper .general-steps .ant-steps-item {
  position: relative;
  box-sizing: border-box;

  flex: 1 1 auto;
  min-width: -webkit-max-content;
  min-width: max-content;
}

.steps-scroll-wrapper .general-steps .ant-steps-item-container {
  display: flex;
  flex-direction: column;
  align-items: center;

  width: -webkit-max-content;

  width: max-content;
  min-width: 100%;

  text-align: center;
}

.steps-scroll-wrapper .general-steps .ant-steps-item-icon {
  width: 10px;
  height: 10px;
  line-height: 10px;

  margin: 0 auto;

  font-size: 10px;

  flex-shrink: 0;
}

.steps-scroll-wrapper .general-steps .ant-steps-item-content {
  width: auto;
  min-width: 0;

  margin: 0;
  padding: 0;

  text-align: center;
}

.steps-scroll-wrapper .general-steps .ant-steps-item-title {
  margin: 0;
  padding: 0;

  font-size: 11px;
  line-height: 1.15;

  font-weight: 500;

  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;

  text-align: center;
}

.steps-scroll-wrapper .general-steps .ant-steps-item-tail {
  position: absolute;

  top: 11px;

  left: calc(100% - 1px);
  right: auto;

  width: 15px;

  padding: 0;
  margin: 0;
}

.steps-scroll-wrapper .general-steps .ant-steps-item-tail::after {
  width: 100%;
  height: 1px;

  background: #cbd5e1;
}

.steps-scroll-wrapper
  .general-steps
  .ant-steps-item-finish
  .ant-steps-item-tail::after {
  background: #15325d;
}

.steps-scroll-wrapper
  .general-steps
  .ant-steps-item-process
  .ant-steps-item-title {
  color: #15325d;
  font-weight: 600;
}

.steps-scroll-wrapper .general-steps .ant-steps-item-description {
  margin-top: 1px;

  font-size: 9px;
  line-height: 1.1;
}

@media (max-width: 991px) {
  .steps-scroll-wrapper .general-steps.ant-steps {
    padding: 3px 10px;
    gap: 14px;
  }

  .steps-scroll-wrapper .general-steps .ant-steps-item-icon {
    width: 20px;
    height: 20px;
    line-height: 20px;
  }

  .steps-scroll-wrapper .general-steps .ant-steps-item-title {
    font-size: 10px;
  }

  .steps-scroll-wrapper .general-steps .ant-steps-item-tail {
    top: 10px;
    left: calc(100% - 1px);
    width: 14px;
  }
}

@media (max-width: 576px) {
  .steps-scroll-wrapper .general-steps.ant-steps {
    padding: 3px 8px;
    gap: 10px;
  }

  .steps-scroll-wrapper .general-steps .ant-steps-item-icon {
    width: 18px;
    height: 18px;
    line-height: 18px;

    margin: 0;

    font-size: 8px;
  }

  .steps-scroll-wrapper .general-steps .ant-steps-item-title {
    font-size: 9px;
    line-height: 1.1;
  }

  .steps-scroll-wrapper .general-steps .ant-steps-item-tail {
    top: 9px;
    left: calc(100% - 1px);
    width: 10px;
  }
}
.common-default-inner-img {
  display: block;
  margin: auto;
  opacity: 0.6;
  height: 65vh;
}
.floatableStyle {
  position: fixed;
  top: 60px;
  z-index: 1000;
  background: whitesmoke;
  width: 95%;
}
.common-image-container {
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}
@media only screen and (min-width: 1025px) {
  .common-arr-grid-container {
    margin: 10px 0 0 0;
    display: grid;
    grid-column-gap: 10px;
    column-gap: 10px;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    grid-row-gap: 10px;
    row-gap: 10px;
    align-items: start;
  }
  .common-image-container {
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
  }
  .common-input-container {
    height: 89vh;
    overflow: auto;
  }
}
.commom-text-align {
  text-align: center;
}
.common-img-holder {
  width: 100%;
  object-fit: contain;
  max-height: 119px;
}

.reject-row {
  background: #fba0a1;
}

.first-row {
  background: #fbf8ca;
}
.second-row {
  background: #fcbe85;
}
.pass-row {
  background: #b3fba4;
}
.ant-table-tbody tr.pass-row > td.ant-table-cell-fix-left,
.ant-table-tbody tr.pass-row > td.ant-table-cell-fix-right {
  background-color: #b3fba4 !important;
}

.ant-table-tbody tr.first-row > td.ant-table-cell-fix-left,
.ant-table-tbody tr.first-row > td.ant-table-cell-fix-right {
  background-color: #fbf8ca !important;
}

.ant-table-tbody tr.second-row > td.ant-table-cell-fix-left,
.ant-table-tbody tr.second-row > td.ant-table-cell-fix-right {
  background-color: #fcbe85 !important;
}

.ant-table-tbody tr.reject-row > td.ant-table-cell-fix-left,
.ant-table-tbody tr.reject-row > td.ant-table-cell-fix-right {
  background-color: #fba0a1 !important;
}

.qc-status-pass {
  background: #009243;
}

.qc-status-fail {
  background: #fe2500;
}

.qc-status-second {
  background: #f8692a;
}

.qc-status-third {
  background: #e10000;
}

.load-more-wrapper {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}

.load-more-btn {
  background: #e4e6eb;
  border: none;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 13px;
  cursor: pointer;
  color: #050505;
  transition: background 0.2s ease;
}

.my-tabs-scroll .ant-tabs-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}

.my-tabs-scroll .ant-tabs-tab:hover {
  color: #0f172a;
  background: #eef2ff;
  border-radius: 6px 6px 0 0;
}

.load-more-btn:hover {
  background: #d8dadf;
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
/* DATE DIVIDER */
.date-divider {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.date-divider span {
  background: #d9dbd5;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: #555;
}

/* UNREAD DIVIDER */
.unread-divider {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}

.unread-divider span {
  background: #d1f4ff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: #007bff;
}

.unread-badge {
  background-color: #25d366; /* WhatsApp green */
  color: #fff;
  font-size: 11px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.red-text {
  color: red !important;
  font-weight: bold !important;
}

.my-tabs-scroll .ant-tabs-nav {
  margin: 0 !important;
}

.my-tabs-scroll .ant-tabs-nav-wrap {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-behavior: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.35) transparent;
}

.my-tabs-scroll .ant-tabs-nav-list {
  transform: none !important;
  display: flex;
  flex-wrap: nowrap !important;
  margin-bottom: 7px;
}

.my-tabs-scroll .ant-tabs-nav-wrap::-webkit-scrollbar {
  height: 8px;
}
.my-tabs-scroll .ant-tabs-nav-wrap::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
}
.my-tabs-scroll .ant-tabs-nav-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.my-tabs-scroll .ant-tabs-nav-operations {
  display: none !important;
}
.my-tabs-scroll .ant-tabs-left .ant-tabs-nav-wrap,
.my-tabs-scroll .ant-tabs-right .ant-tabs-nav-wrap {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
.my-tabs-scroll .ant-tabs-left .ant-tabs-nav-list,
.my-tabs-scroll .ant-tabs-right .ant-tabs-nav-list {
  flex-direction: column;
}
.custom-collapse .ant-collapse-item {
  border-radius: 10px !important;
  overflow: hidden;
}

.custom-collapse .ant-collapse-header {
  background: var(--collapseHeaderBg) !important;
  color: #fff !important;
  border-radius: 10px 10px 0 0;
  padding: 8px 0px;
  margin-top: 1px;
}

.custom-collapse .ant-collapse-header {
  border-radius: 10px !important;
  margin-top: 1px;
  padding: 10px 0px;
}

.custom-collapse .ant-collapse-item-active .ant-collapse-header {
  border-radius: 10px 10px 0 0 !important;
  margin-top: 1px;
}

.pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 0 0 10px 10px;
  flex-wrap: wrap;
  margin: 0;
  gap: 6px;
}

.pagination-container .ant-pagination-item {
  border-radius: 6px;
  border-color: #e8edf2;
  font-size: 12px;
  min-width: 28px !important;
  height: 28px !important;
  line-height: 26px !important;
  transition: all 0.15s;
}

.common-table-overflow {
  overflow-x: auto;
  scrollbar-width: thin;
  width: 100%;
}

.pagination-container .ant-pagination-item:hover {
  border-color: #2563eb;
}
.pagination-container .ant-pagination-item:hover a {
  color: #2563eb;
}

.pagination-container .ant-pagination-item-active {
  background: #1e3a5f;
  border-color: #1e3a5f;
}
.pagination-container .ant-pagination-item-active a {
  color: #ffffff;
}

.pagination-container .ant-pagination-prev button,
.pagination-container .ant-pagination-next button {
  border-radius: 6px;
  border-color: #e8edf2 !important;
  height: 28px !important;
  width: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s;
}

.pagination-container .ant-pagination-prev:hover button,
.pagination-container .ant-pagination-next:hover button {
  border-color: #1d6fd8;
  color: #1d6fd8;
}

.pagination-container .ant-pagination-disabled button {
  opacity: 0.9;
  cursor: not-allowed;
}

.pagination-container .ant-select-selector {
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  height: 28px;
  display: flex;
  align-items: center;
  font-size: 12px;
}

.pagination-container .ant-select:hover .ant-select-selector {
  border-color: #1d6fd8;
}
.pagination-container .ant-pagination-total-text {
  font-size: 12px;
  color: #64748b;
}

@media (max-width: 600px) {
  .pagination-container {
    justify-content: center;
  }

  .pagination-container .ant-pagination-total-text {
    display: none;
  }
}

.cell-highlight {
  background-color: rgb(244, 244, 115);
} /* =========================================================
   WRAPPER
   ========================================================= */

.fst-wrapper {
  position: relative;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.fst-body-clip {
  position: relative;

  width: 100%;
  min-width: 0;

  overflow: hidden;

  box-sizing: border-box;

  border: 1px solid #e2e2e2;
  border-radius: 6px;

  background: #fff;
}

.fst-body-area {
  position: relative;

  width: 100%;
  min-width: 0;

  height: 100%;

  box-sizing: content-box;

  overflow-y: auto;
  overflow-x: auto;

  -webkit-overflow-scrolling: touch;

  overscroll-behavior-x: contain;

  padding-bottom: 20px;
}

.fst-body-area table {
  width: -webkit-max-content;
  width: max-content;
  min-width: 100%;

  margin: 0;
  padding: 0;

  border-collapse: separate;

  table-layout: auto;
}

.fst-body-area table > tr:first-child {
  position: -webkit-sticky;
  position: sticky;

  top: 0;

  z-index: 100;

  background: #0f3460;
}

.fst-body-area table > tr:first-child > th {
  position: -webkit-sticky;
  position: sticky;

  top: 0;

  z-index: 101;

  height: auto;

  min-height: 0;
  margin-top: 0px;
  font-size: 0.7rem;
  margin-bottom: 1px;
  color: white;
  padding: 5px 8px;
  border-bottom: 1.5px solid rgb(255 255 255 / 38%);
  background-color: #0f3460;
  border-radius: 2px;
  text-align: left;
  white-space: nowrap;
  border-right: 1.5px solid rgb(255 255 255 / 38%);
  letter-spacing: 0.2px;
}

/* Last header cell */

.fst-body-area table > tr:first-child > th:last-child {
  border-right: 0;
}

/* =========================================================
   BODY ROWS
   ========================================================= */

.fst-body-area table > tr:not(:first-child) {
  background: #fff;
}

.fst-body-area .ant-checkbox-checked .ant-checkbox-inner {
  background-color: #518bd3 !important;
  border-color: #ffffff !important;
}

.fst-body-area .ant-checkbox-checked .ant-checkbox-inner::after {
  border-color: #ffffff !important;
}
/* =========================================================
   BODY CELLS
   ========================================================= */

.fst-body-area table > tr:not(:first-child) > td {
  box-sizing: border-box;

  margin: 0;

  padding: 8px 10px;

  font-size: 0.7rem;
  vertical-align: middle;

  border: 0;

  border-right: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;

  background: #fff;
}

/* Last body cell */

.fst-body-area table > tr:not(:first-child) > td:last-child {
  border-right: 0;
}

.fst-body-area table > tr.even-row > td {
  background: #f5f5f5;
  font-size: 0.7rem;
}

.fst-floating-track {
  position: fixed;

  height: 16px;

  box-sizing: border-box;

  padding: 3px 4px;

  background: #eeeeee;

  border: 1px solid #d6d6d6;

  border-radius: 999px;

  overflow: hidden;

  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);

  z-index: 1000;

  cursor: pointer;

  touch-action: none;

  user-select: none;

  -webkit-user-select: none;
}

/* =========================================================
   FLOATING THUMB
   ========================================================= */

.fst-floating-thumb {
  position: absolute;

  top: 3px;

  height: 8px;

  min-width: 40px;

  box-sizing: border-box;

  background: #0f3460;

  border-radius: 999px;

  cursor: grab;

  touch-action: none;

  user-select: none;

  -webkit-user-select: none;
}

/* =========================================================
   THUMB HOVER
   ========================================================= */

.fst-floating-thumb:hover {
  background: #0b2b4f;
}

/* =========================================================
   THUMB ACTIVE
   ========================================================= */

.fst-floating-thumb:active {
  cursor: grabbing;

  background: #666;
}

/* =========================================================
   DRAGGING
   ========================================================= */

.fst-dragging,
.fst-dragging * {
  user-select: none;

  -webkit-user-select: none;

  cursor: grabbing;
}
.inv-file-uploader {
  border: 2px dashed #ccc;
  text-align: center;
  height: 50px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.inv-file-embed {
  height: 40px;
  width: 45px;
  margin: 0px;
  border-radius: 8px;
  border: 1px solid #3e5888;
}

.inv-std-element-size {
  font-size: 0.625rem;
  /* height: 24px; */
}

.company-main-input-divs {
  padding: 15px;
}
.prod-std-lbl-company {
  font-weight: bold;
  display: flex;
  align-items: center;
  text-indent: 5px;
  color: #0f3460;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-size: 0.625rem;
}

.card-margin-company-div {
  border-radius: 5px;
  min-height: 40vh;
  margin-bottom: 10px;
  padding: 5px;
  box-shadow:
    rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
}
.companyCardHeading {
  background-color: white;
  overflow-x: auto;
  border-radius: 5px 5px 0 0;
}

input[type="file"]::-webkit-file-upload-button {
  border-radius: 4px;
  padding: 0 16px;
  height: 30px;
  cursor: pointer;
  background-color: white;
  border: 1px solid rgba(0, 0, 0, 0.16);
  box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.05);
  margin-right: 16px;
  -webkit-transition: background-color 200ms;
  transition: background-color 200ms;
}

input[type="file"]::file-selector-button {
  border-radius: 4px;
  padding: 0 16px;
  height: 30px;
  cursor: pointer;
  background-color: white;
  border: 1px solid rgba(0, 0, 0, 0.16);
  box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.05);
  margin-right: 16px;
  transition: background-color 200ms;
}

input[type="file"]::-webkit-file-upload-button:hover {
  background-color: #f3f4f6;
}

input[type="file"]::file-selector-button:hover {
  background-color: #f3f4f6;
}

input[type="file"]::-webkit-file-upload-button:active {
  background-color: #e5e7eb;
}

input[type="file"]::file-selector-button:active {
  background-color: #e5e7eb;
}

.table-scrollable-company {
  height: 200px;
  overflow: auto;
  padding: 15px;
  scrollbar-color: #0f3460 #e5e4e2;
}

.margin-input-company {
  border: 2px dashed #ccc;
  text-align: center;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2px;
  height: 50px;
}

.company-file-input-label {
  width: 112px;
}

.company-img-div {
  width: 147px;
  display: contents;
}

.company-image-uploader {
  border: 2px dashed #ccc;
  text-align: center;
  height: 50px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px;
}
.company-image-uploader-container {
  text-align: center;
  border-radius: 5px;
}

.company-page {
  min-height: 100vh;
}

.settings-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(26, 60, 94, 0.12);
  padding: 15px 15px 15px;
  margin: 10px 0px;
  border: 1px solid #d4dde9;
  animation: fadeSlideIn 0.3s ease both;
}

.img-delete-button {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #fff;
  border: 1px solid #e0d6e8;
  border-radius: 50%;
  width: 22px;

  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #c0392b;
  padding: 0;
}

.logo-upload-icon {
  font-size: 22px;
  color: #2563a8;
}

.logo-upload-label {
  font-size: 12px;
  font-weight: 600;
  color: #5a6e85;
  text-align: center;
  pointer-events: none;
}

.logo-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.status-tag.active {
  background: #e6f9f1;
  color: #22a06b;
}

.status-tag.ho {
  background: #fef3dc;
  color: #e8a020;
}

.unit-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(26, 60, 94, 0.12);
  border: 1px solid #d4dde9;
  margin-bottom: 20px;
  overflow: hidden;
  animation: fadeSlideIn 0.3s ease both;
}

.unit-card:nth-child(2) {
  animation-delay: 0.08s;
}
.unit-card:nth-child(3) {
  animation-delay: 0.16s;
}

.unit-card-header {
  background: linear-gradient(90deg, #1a3c5e 0%, #2563a8 100%);
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.unit-card-header .unit-badge {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
}

.unit-card-header .unit-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}

.unit-card-header .unit-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.unit-card-body {
  padding: 0;
  min-height: 34vh;
}

.preview-img {
  max-width: 100%;
  height: 60vh;
  width: 100vw;
}

.preview-image-container {
  text-align: center;
  overflow: hidden;
}
.preview-outer-image-container {
  width: 105vh;
}
.preview-images-container {
  display: flex;
  scroll-behavior: smooth;
  transition: scroll 0.3s ease-in-out;
  justify-content: space-evenly;
  align-items: center;
}

/* #scaled-frame {
  zoom: 80%;
} */

.errorOccurred {
  text-align: center;
  padding: 20px;
  background-color: #f8d7da;
  color: #721c24;
}

.error-page {
  min-height: 100vh;
  background: #f5f7fb;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.error-card {
  width: 100%;
  max-width: 620px;
  background: #ffffff;
  border-radius: 24px;
  padding: 50px 40px;
  text-align: center;
  border: 1px solid #e8edf5;
  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.08),
    0 2px 8px rgba(15, 23, 42, 0.05);
  animation: fadeUp 0.5s ease;
}

.error-icon {
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

.error-card h1 {
  font-size: 34px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}

.error-card p {
  color: #64748b;
  font-size: 16px;
  line-height: 1.7;
  max-width: 470px;
  margin: 0 auto 36px;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.action-buttons button {
  min-width: 170px;
  padding: 14px 26px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.retry-btn {
  background: linear-gradient(135deg, #0f3460, #19549c);
  color: white;
  border: none;
}

.retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.home-btn {
  background: white;
  color: #0f3460;
  border: 1px solid #dbe4ff;
}

.home-btn:hover {
  background: #eff6ff;
  transform: translateY(-2px);
}

.action-buttons button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-icon {
  font-size: 18px;
}

.retry-btn:hover .btn-icon {
  animation: rotate 0.8s linear;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  50% {
    transform: translateY(-6px);
  }
}

@media (max-width: 768px) {
  .error-card {
    padding: 40px 28px;
  }

  .error-card h1 {
    font-size: 28px;
  }
}

@media (max-width: 500px) {
  .error-card {
    padding: 30px 20px;
    border-radius: 18px;
  }

  .error-card h1 {
    font-size: 24px;
  }

  .error-card p {
    font-size: 14px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons button {
    width: 100%;
  }
}

.split-button {
  display: inline-flex;
  position: relative;
  align-items: center;
  /* border: 1px solid #ccc; */
  /* border-radius: 5px; */
  overflow: visible;
  height: 100%;
  margin-left: 2px;
}

.split-main-btn {
  /* display: flex; */
  /* align-items: center; */
  /* padding: 8px 12px; */
  /* background: #007bff; */
  background: #f1f1f1;
  color: black;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  border-radius: 5px;
}

.split-main-btn span {
  margin-left: 8px;
}

.split-main-btn:hover {
  background: #134074;
  color: white;
}

.split-dropdown-btn {
  /* padding: 8px; */
  background: #f1f1f1;
  color: black;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  border-radius: 0 5px 5px 0;
}

.split-dropdown-btn:hover {
  background: #134074;
  color: white;
}

/* Dropdown appears below the dropdown button */
.split-dropdown-menu {
  font-size: 0.625rem;
  position: absolute;
  top: 100%;
  left: 40%;
  min-width: -webkit-max-content;
  min-width: max-content;
  background: white;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: block;
  visibility: visible;
  opacity: 1;
  width: 65%;
  color: black;
}

.split-dropdown-item {
  display: flex;
  align-items: center;
  padding: 8px;
  cursor: pointer;
  transition: background 0.3s;
  height: 20px;
}

.split-dropdown-item span {
  margin-left: 8px;
}

.split-dropdown-item:hover {
  background: #f1f1f1;
}

.carousel {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #ccc;
}

.thumbnail {
  height: 100px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 0.2s ease-in-out;
  border-radius: 4px;
}

.thumbnail:hover {
  border-color: #aaa;
}

.thumbnail.selected {
  border-color: #1890ff;
  box-shadow: 0 0 4px #1890ff;
}

.qr-code-data {
  font-size: 0.625rem;
  background: #8080806b;
  border-radius: 2px;
  padding: 1px;
  padding-left: 5px;
  padding-right: 5px;
  white-space: normal;
}
.qr-code-data-print {
  font-weight: bold;
  display: flex;
  align-items: center;
  text-indent: 5px;
  color: #0f3460;
  font-size: 4pt;
}

.buyer-addtional-cost-table-container {
  max-height: 25vh;
  overflow-x: auto;
}

.buyer-contact-card {
  display: grid;
  grid-gap: 15px;
  gap: 15px;
  width: 100%;
}
.card-margin-div {
  min-height: -webkit-fit-content;
  min-height: fit-content;
  border-radius: 5px;
  box-shadow:
    rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
  padding: 10px;
  display: flex;
}
.buyer-qr-main-div {
  column-gap: 10px;
  width: 100%;
  margin-left: 10px;
}
.buyer-label-div {
  display: grid;
}

.buyer-card-heading {
  background-color: white;
  border-radius: 5px 5px 0 0;
}

.buyer-cert-img-uploader {
  border: 2px dashed #ccc;
  text-align: center;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.buyer-cert-table {
  margin: 10px 0 10px 0;
}
.buyer-cost-table {
  margin: 10px 0 0 0;
}

.buyer-cert-tr {
  text-align: left;
  padding-left: 10px;
}

input[type="file"]::-webkit-file-upload-button {
  border-radius: 4px;
  padding: 0 16px;
  height: 30px;
  cursor: pointer;
  background-color: white;
  border: 1px solid rgba(0, 0, 0, 0.16);
  box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.05);
  margin-right: 16px;
  -webkit-transition: background-color 200ms;
  transition: background-color 200ms;
}

input[type="file"]::file-selector-button {
  border-radius: 4px;
  padding: 0 16px;
  height: 30px;
  cursor: pointer;
  background-color: white;
  border: 1px solid rgba(0, 0, 0, 0.16);
  box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.05);
  margin-right: 16px;
  transition: background-color 200ms;
}
input[type="file"]::-webkit-file-upload-button:hover {
  background-color: #f3f4f6;
}
input[type="file"]::file-selector-button:hover {
  background-color: #f3f4f6;
}
input[type="file"]::-webkit-file-upload-button:active {
  background-color: #e5e7eb;
}
input[type="file"]::file-selector-button:active {
  background-color: #e5e7eb;
}

.table-certficate-buyer {
  height: 15vh;
  overflow: auto;
  overflow-x: hidden;
}

.buyer-Cost-Container {
  width: 25%;
}

.buyer-multiple-address-div {
  height: 25vh;
  overflow-x: auto;
}
.buyer-next-prvious-btn-container {
  display: flex;
  justify-content: space-between;
  margin: 10px 0 0 0;
}
.buyer-brand-details-main-container {
  height: 25vh;
  overflow: auto;
  overflow-x: hidden;
  width: 100%;
}
.buyer-noti-display {
  display: flex;
  gap: 5px;
}
.buyer-noti-text-wdt {
  width: 50%;
}

.card-margin-div .ant-row {
  display: flex;
  align-items: stretch;
}

.card-margin-div .ant-col {
  display: flex;
  flex-direction: column;
}

@media (max-width: 767px) {
  .card-margin-div .ant-col:first-child > div {
    height: auto !important;
    min-height: auto !important;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 14px 14px 0 0;
    padding: 6px 4px;
    scrollbar-width: none;
  }

  .card-margin-div .ant-col:last-child > div {
    height: auto !important;
    min-height: auto !important;
    border-radius: 0 0 14px 14px;
  }

  .sidebar-item {
    flex-shrink: 0 !important;
    border-left: none !important;
    border-bottom: 3px solid transparent;
    border-radius: 8px !important;
    white-space: nowrap;
  }
}

.hsncode-checkBox-container {
  display: flex;
  gap: 10px;
}

.hsncode-input-checkBox-container {
  display: flex;
  text-align: left;
  align-items: center;
  margin: 25px 0 0 0;
  white-space: nowrap;
}
.hsn-td-flex {
  display: flex;
}

.hsn-input-dropdown {
  width: 60%;
}
.hsn-table-conatiner {
  margin: 10px 0 0 0;
}

.hsncode-grid-container-in-db {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 5px;
  column-gap: 5px;
}
.hsn-tax-popup {
  width: 620px;
  max-height: 360px;
  overflow-y: auto;
  padding: 4px 2px;
}

.hsn-tax-popup .tax-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 14px;
  gap: 14px;
}

.hsn-tax-popup .tax-card {
  background: #fafbfc;
  border: 1px solid #e5e8eb;
  border-radius: 8px;
  padding: 14px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  min-width: 0; /* prevents grid overflow with long content */
}

.hsn-tax-popup .source-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #d9dce0;
  flex-wrap: wrap;
  gap: 6px;
}

.hsn-tax-popup .source-label {
  font-size: 11px;
  font-weight: 600;
  color: #8a8f98;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.hsn-tax-popup .source-value {
  font-size: 12.5px;
  font-weight: 600;
  color: #1a73e8;
  background: #eaf2fe;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.hsn-tax-popup .tax-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.hsn-tax-popup .tax-table thead th {
  text-align: left;
  color: #6b7280;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 5px 6px;
  border-bottom: 1px solid #e5e8eb;
}

.hsn-tax-popup .tax-table thead th:last-child {
  text-align: right;
}

.hsn-tax-popup .tax-table tbody td {
  padding: 6px 6px;
  color: #2d3339;
  border-bottom: 1px solid #f0f1f3;
}

.hsn-tax-popup .tax-table tbody tr:last-child td {
  border-bottom: none;
}

.hsn-tax-popup .tax-table tbody td:last-child {
  text-align: right;
  font-weight: 600;
  color: #16794b;
}

.hsn-tax-popup .tax-table tbody tr:hover td {
  background: #f5f8fc;
}

.ant-popover-inner {
  border-radius: 10px;
}

.ant-popover-title {
  font-weight: 700;
  font-size: 13px;
  color: #1a1a1a;
}

@media (max-width: 640px) {
  .hsn-tax-popup {
    width: 100%;
  }
  .hsn-tax-popup .tax-cards-grid {
    grid-template-columns: 1fr;
  }
}
/* ==========================================================
   HsnCodeEdit – redesigned, responsive layout
   All classes are prefixed with "hx-" so they don't clash
   with HSNCode.css / FormStyles.css
   ========================================================== */

.hx-page {
  --hx-primary: #1677ff;
  --hx-primary-soft: #e6f4ff;
  --hx-bg: #f5f7fa;
  --hx-card: #ffffff;
  --hx-border: #e5e8ef;
  --hx-text: #1f2937;
  --hx-muted: #6b7280;
  --hx-danger: #ff4d4f;
  --hx-radius: 12px;
  --hx-shadow:
    0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);

  background: var(--hx-bg);
  padding: 12px 16px 32px;
  min-height: 100%;
  box-sizing: border-box;
  color: var(--hx-text);
}

.hx-page *,
.hx-page *::before,
.hx-page *::after {
  box-sizing: border-box;
}

/* ---------- Top bar ---------- */
.hx-topbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: var(--hx-card);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow);
}

.hx-title-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hx-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.hx-subtitle {
  font-size: 12px;
  color: var(--hx-muted);
}

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

/* ---------- Cards ---------- */
.hx-card {
  background: var(--hx-card);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.hx-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--hx-border);
}

.hx-section-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--hx-primary-soft);
  color: var(--hx-primary);
  white-space: nowrap;
}

/* ---------- Form grid ---------- */
.hx-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 14px 16px;
  gap: 14px 16px;
  align-items: end;
}

.hx-field {
  display: flex;
  flex-direction: column;
  gap: 0px;
  min-width: 0;
}

.hx-field > label,
.hx-field .prod-std-lbl {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--hx-muted);
  display: flex;
  align-items: center;
  gap: 2px;
}

.hx-field .aster-risk-Icon {
  color: var(--hx-danger);
  font-size: 10px;
}

.hx-field .ant-select,
.hx-field .ant-input,
.hx-field .ant-input-affix-wrapper,
.hx-field input {
  width: 100% !important;
}

.hx-field-status {
  justify-content: flex-end;
}

/* ---------- Tax rows ---------- */
.hx-tax-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hx-tax-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr auto;
  grid-gap: 14px;
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--hx-border);
  border-radius: 10px;
  background: #fafbfd;
}

.hx-tax-row:nth-child(even) {
  background: #ffffff;
}

.hx-tax-pairs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}

.hx-tax-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-gap: 10px;
  gap: 10px;
  padding: 10px;
  border: 1px dashed var(--hx-border);
  border-radius: 8px;
  background: #fff;
  position: relative;
}

.hx-inline-del {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hx-inline-del .ant-input,
.hx-inline-del input {
  flex: 1 1;
  min-width: 0;
}

.hx-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 22px;
}

.hx-add-row {
  margin-top: 12px;
  display: flex;
  justify-content: flex-start;
}

/* ---------- Incentives / DrawBacks ---------- */
.hx-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
  align-items: start;
}

.hx-two-col > .hx-card {
  margin-bottom: 0;
}

.hx-picker {
  margin-bottom: 12px;
}

.hx-picker .ant-select,
.hx-picker .hsn-input-dropdown {
  width: 100% !important;
}

.hx-item-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hx-item {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  grid-gap: 10px;
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid var(--hx-border);
  border-radius: 10px;
  background: #fafbfd;
}

.hx-item:nth-child(even) {
  background: #fff;
}

.hx-item-del {
  padding-bottom: 2px;
}

.hx-empty {
  padding: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--hx-muted);
  border: 1px dashed var(--hx-border);
  border-radius: 10px;
  background: #fafbfd;
}

/* ---------- Questions list (modal) ---------- */
.hx-question-item {
  cursor: pointer;
  transition: background 0.15s ease;
  border-radius: 8px;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.hx-question-item:hover {
  background: var(--hx-primary-soft);
}

/* ==========================================================
   Responsive
   ========================================================== */

/* Large tablets / small laptops */
@media (max-width: 1200px) {
  .hx-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hx-item {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  }

  .hx-item .hx-field:first-child {
    grid-column: 1 / -1;
  }
}

/* Tablets */
@media (max-width: 992px) {
  .hx-two-col {
    grid-template-columns: 1fr;
  }

  .hx-two-col > .hx-card {
    margin-bottom: 16px;
  }

  .hx-tax-row {
    grid-template-columns: 1fr;
  }

  .hx-row-actions {
    padding-top: 0;
    justify-content: flex-end;
    border-top: 1px dashed var(--hx-border);
    padding-top: 10px;
  }
}

/* Phones */
@media (max-width: 640px) {
  .hx-page {
    padding: 8px 8px 24px;
  }

  .hx-topbar {
    padding: 10px 12px;
  }

  .hx-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .hx-card {
    padding: 12px;
  }

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

  .hx-field-status {
    padding-bottom: 0;
  }

  .hx-tax-pairs {
    grid-template-columns: 1fr;
  }

  .hx-tax-pair {
    grid-template-columns: 1fr;
  }

  .hx-item {
    grid-template-columns: 1fr 1fr;
  }

  .hx-item .hx-field:first-child {
    grid-column: 1 / -1;
  }

  .hx-item-del {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
  }
}

/* ==========================================================
   Compact revision – tax table, tighter spacing
   ========================================================== */
.hx-page {
  padding: 8px 12px 24px;
}
.hx-card {
  padding: 12px 14px;
  margin-bottom: 12px;
}
.hx-card-head {
  padding-bottom: 4px;
  margin-bottom: 6px;
}
.hx-topbar {
  padding: 8px 14px;
  margin-bottom: 12px;
}
.hx-form-grid {
  gap: 10px 14px;
}

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

.hx-tax-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.hx-tax-table th {
  background: #f3f6fb;
  color: var(--hx-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--hx-border);
  white-space: nowrap;
}

.hx-tax-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--hx-border);
  vertical-align: middle;
}

.hx-tax-table tbody tr:last-child td {
  border-bottom: none;
}
.hx-tax-table tbody tr:nth-child(even) {
  background: #fafbfd;
}
.hx-tax-table tbody tr:hover {
  background: var(--hx-primary-soft);
}

.hx-tax-table .ant-select,
.hx-tax-table .ant-input,
.hx-tax-table input {
  width: 100% !important;
}

.hx-th-actions,
.hx-td-actions {
  width: 1%;
  white-space: nowrap;
}
.hx-tax-table .hx-row-actions {
  padding-top: 0;
  border-top: none;
}
.hx-add-row {
  margin-top: 8px;
}
.hx-item {
  padding: 8px 10px;
}

/* ==========================================================
   Table borders & column grouping (overrides above)
   ========================================================== */
.hx-table-wrap {
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  overflow-x: auto;
}

.hx-tax-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 700px;
}

.hx-tax-table th,
.hx-tax-table td {
  border: 1px solid #dfe4ee;
  padding: 8px 10px;
}

.hx-tax-table thead th {
  background: #eaf0fa;
  color: #374151;
  border-bottom: 2px solid #cfd6e4;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 10px;
}

/* clear separation between each Tax + % group */
.hx-tax-table th.hx-group-start,
.hx-tax-table td.hx-group-start {
  border-left: 2px solid #b9c4da;
}

/* first column (Source From) stands out */
.hx-tax-table tbody td:first-child {
  background: #f7f9fd;
  min-width: 190px;
}

.hx-tax-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}
.hx-tax-table tbody tr:nth-child(even) td:first-child {
  background: #f1f5fb;
}
.hx-tax-table tbody tr:hover td {
  background: var(--hx-primary-soft);
}

/* action column */
.hx-tax-table th.hx-th-actions,
.hx-tax-table td.hx-td-actions {
  border-left: 2px solid #b9c4da;
  text-align: center;
  background: #f7f9fd;
}

/* ==========================================================
   FINAL table border fix – higher specificity + !important so
   global table/td styles can't remove the grid lines
   ========================================================== */
.hx-page .hx-table-wrap {
  border: 1px solid #9fb0cc !important;
  border-radius: 8px;
  overflow-x: auto;
  background: #fff;
}

.hx-page table.hx-tax-table {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  width: 100%;
  min-width: 700px;
}

.hx-page table.hx-tax-table th,
.hx-page table.hx-tax-table td {
  border: 1px solid #cad4e5 !important;
  padding: 8px 10px;
}

.hx-page table.hx-tax-table thead th {
  background: #e3ebf8 !important;
  border-bottom: 2px solid #a2b5d4 !important;
  color: #1f2a44;
}

.hx-page table.hx-tax-table th.hx-group-start,
.hx-page table.hx-tax-table td.hx-group-start,
.hx-page table.hx-tax-table th.hx-th-actions,
.hx-page table.hx-tax-table td.hx-td-actions {
  border-left: 2px solid #bccceb !important;
}

/* first table row sits flush under header, outer edges handled by wrapper */
.hx-page table.hx-tax-table tr > :first-child {
  border-left: none !important;
}
.hx-page table.hx-tax-table tr > :last-child {
  border-right: none !important;
}
.hx-page table.hx-tax-table thead tr:first-child th {
  border-top: none !important;
}
.hx-page table.hx-tax-table tbody tr:last-child td {
  border-bottom: none !important;
}



/* Trigger */
.created-info-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #0f3460;
  background: #f1f5fb;
  border: 1px solid #dfe8f3;
  border-radius: 9px;
  transition: all 0.2s ease;
}

.created-info-trigger:hover {
  color: #a34c99 !important;
  background: #faf0f8 !important;
  border-color: #e8cce4 !important;
}

.created-info-trigger .anticon {
  font-size: 16px;
}

.created-info-trigger:active {
  transform: scale(0.96);
}

/* Popover */
.created-info-overlay .ant-popover-inner {
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 13px;
  box-shadow: 0 12px 32px rgba(15, 52, 96, 0.15);
}

.created-info-overlay .ant-popover-inner-content {
  padding: 0;
}

.created-info-overlay .ant-popover-arrow::before {
  background: #0f3460;
}

.created-info-popover {
  width: 610px;
  max-width: calc(100vw - 40px);
  overflow: hidden;
  color: #243247;
  background: #fff;
}

/* Header */
.created-info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  background: linear-gradient(135deg, #0f3460 0%, #194b7e 100%);
}

.created-info-header-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 39px;
  height: 39px;
  color: #0f3460;
  background: #fff;
  border-radius: 10px;
  font-size: 18px;
}

.created-info-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.created-info-title {
  color: #fff !important;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}

.created-info-subtitle {
  color: #d5e2f1 !important;
  font-size: 11px;
  line-height: 1.5;
}

/* Two-column layout */
.created-info-layout {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  align-items: stretch;
  grid-gap: 0;
  gap: 0;
  padding: 16px;
}

.created-info-document-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  padding: 14px;
  background: #f5f8fd;
  border: 1px solid #e4ebf5;
  border-radius: 11px;
}

.created-info-panel-heading {
  align-self: flex-start;
  color: #8995a6 !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.9px;
}

.created-info-qr-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
  background: #fff;
  border: 1px solid #e5eaf2;
  border-radius: 10px;
}

.created-info-qr-frame .ant-qrcode {
  padding: 0;
  background: #fff;
}

.created-info-document-label {
  color: #7e8999 !important;
  font-size: 11px;
  text-align: center;
}

.created-info-code-value {
  width: 100%;
  color: #0f3460 !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.created-info-copy-button {
  height: 32px;
  color: #0f3460;
  background: #fff;
  border-color: #dce5f1;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.created-info-copy-button:hover {
  color: #a34c99 !important;
  background: #faf0f8 !important;
  border-color: #e8cce4 !important;
}

/* Right audit panel */
.created-info-audit-panel {
  min-width: 0;
  padding: 3px 0 3px 17px;
}

.created-info-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.created-info-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: #8995a6;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.9px;
}

.created-info-section-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
}

.created-dot {
  background: #0f3460;
}

.updated-dot {
  background: #b576ad;
}

/* Audit rows */
.created-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.created-info-row:hover {
  background: #f7f9fc;
}

.created-info-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  border-radius: 8px;
  font-size: 14px;
}

.created-info-icon-created {
  color: #0f3460;
  background: #eaf1fb;
}

.created-info-icon-updated {
  color: #a34c99;
  background: #f8edf7;
}

.created-info-field {
  display: flex;
  flex: 1 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.created-info-label {
  color: #7e8999 !important;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.created-info-value {
  color: #253449 !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Section separator */
.created-info-separator {
  height: 1px;
  margin: 12px 0;
  background: #e9eef5;
}

/* No-code fallback */
.created-info-no-code {
  width: 360px;
}

.created-info-no-code .created-info-layout {
  display: block;
}

.created-info-no-code .created-info-audit-panel {
  padding: 0;
}

/* Responsive */
@media (max-width: 600px) {
  .created-info-popover {
    width: 340px;
    max-width: calc(100vw - 32px);
  }

  .created-info-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 12px;
  }

  .created-info-document-panel {
    width: 100%;
  }

  .created-info-audit-panel {
    padding: 0;
  }
}

.menu-card {
  width: 11.5vw;
  min-height: 12vh;
  max-height: 30vh;
  text-align: center;
  border: 1px solid #bababa;

  /* border-width: 2px;
  border-style: solid;
  border-image: linear-gradient(to right, darkblue, darkorchid) 1;
  border-radius: 10px; */
}
.menu-card-title {
  font-size: 0.8rem;
  font-weight: bold;
  min-height: 200px;
}

.menu-sider .ant-layout-sider {
  background: #0f2447;
  border-right: 1px solid rgba(208, 14, 14, 0.681);
}
.menu-sider .ant-layout-sider-trigger {
  background: #0d1f3c;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.custom-menu .ant-menu-item-selected {
  background: #2563eb;
  color: #fefeff;
  transition: all 0.25s ease;
}

.custom-sider.expanded .ant-menu-item-selected {
  background: #2563eb;
  box-shadow: inset 3px 0 0 #ffffff;
}

.custom-sider.expanded .ant-menu-item:hover {
  background: #2563eb;
}
.management-search-container {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 10px;
  margin-bottom: 5px;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
}

.management-search {
  width: 100%;
  max-width: 520px;
  border-radius: 999px;
}

.management-search .ant-input-affix-wrapper {
  border-radius: 999px;
  height: 46px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
}

.management-search .ant-input-affix-wrapper:hover,
.management-search .ant-input-affix-wrapper-focused {
  border-color: #1677ff;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.18);
}

.management-search input {
  font-size: 15px;
}

.color-code-swatch-input-container {
  width: 93%;
}

.color-code-lab-dip-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  border-radius: 5px;
  margin: 0.25em;
}

.color-code-lab-dip-card {
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin: 5px;
  background-color: #ffff;
  box-shadow:
    0px 2px 4px rgba(0, 0, 0, 0.1),
    0px 4px 8px rgba(0, 0, 0, 0.15);
}

.color-code-swatch-image {
  margin: 0.25em;
  text-align: center;
}

.color-code-lab-dip-card-header {
  display: flex;
  justify-content: space-between;
  padding: 0 2%;
  margin: 0;
  gap: 5px;
  width: 100%;
  white-space: nowrap;
  font-weight: 700;
  font-size: 11px;
  border-radius: 4px 4px 0 0;
  color: #4f7da5;
  height: 30px;
  align-items: center;
}

.color-code-labdip-inner-container {
  display: grid;
  grid-template-columns: 70% 30%;
  align-items: center;
  width: 96%;
}

.color-code-swatch-approved-check-box {
  margin: 0px 0 0 5px;
}
.color-code-swatch-main-input-container {
  display: flex;
  flex-direction: column;
}

.color-code-swatch-approved {
  display: flex;
  align-items: center;
  margin: 1%;
  justify-content: space-between;
  width: 130px;
}

.color-code-img {
  height: 12vh;
  width: 6vw;

  object-fit: cover;
  object-position: center;

  border-radius: 8px;
  cursor: pointer;

  display: block;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.color-code-file-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  overflow: hidden;
  text-overflow: ellipsis;

  max-width: 6vw;
  font-size: 12px;
  margin-top: 2px;
  color: #0f3460;
  text-align: center;
}

.color-code-img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.color-code-embed-pdf {
  height: 100px;
  width: 100px;
  margin: 5px;
  border-radius: 8px;
  overflow-y: auto;
  overflow-x: hidden;
}

.doc-date-input {
  height: 20px;
  width: 98%;
  padding: 5px;
}

.doc-table-body {
  margin: 10px 4px 0 4px;
}

.doc-button-container {
  display: grid;
  justify-content: right;
}
.doc-inner-container-btns {
  text-align: right;
  display: flex;
  align-items: end;
}

.doc-checkBox-container {
  display: flex;
  text-align: left;
  align-items: flex-end;
  margin: 32px 0 0 0;
  white-space: nowrap;
}

.doc-img {
  height: 60px;
  width: 60px;
}

.user-model-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-column-gap: 25px;
  column-gap: 25px;
}
.user-table-exp-value {
  margin: 0px;
  padding: 0px;
  text-wrap: nowrap;
}

.user-table-exp-row {
  align-items: center;
  display: grid;
  grid-template-columns: 0.8fr 0.6fr 1fr 0.9fr 1.15fr 0.8fr 2.4fr 0.55fr;
  height: 30px;
  padding: 10px 0 0;
  text-align: left;
}
.user-modal .ant-modal-content {
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(26, 86, 160, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.08);
  font-family: "DM Sans", sans-serif;
  padding: 0;
}

.user-modal .ant-modal-header {
  background: linear-gradient(135deg, #0f3460, #19549c);
  padding: 7px 28px 7px;
  border-radius: 18px 18px 0 0;
  border-bottom: none;
  margin-bottom: 0;
}

.user-modal .ant-modal-title {
  color: #ffffff;
  font-family: "Sora", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.user-modal .ant-modal-close {
  color: rgba(255, 255, 255, 0.941);
  top: 7px;
  right: 20px;
}

.user-modal .ant-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
}

.user-modal .ant-modal-close .ant-modal-close-x {
  font-size: 20px !important;
}

.user-modal .ant-modal-body {
  padding: 10px 20px;
  background: #f5f8fc;
  max-height: 72vh;
  overflow-y: auto;
}

.user-modal .ant-modal-body::-webkit-scrollbar {
  width: 5px;
}

.user-modal .ant-modal-body::-webkit-scrollbar-thumb {
  background: #b0cce8;
  border-radius: 10px;
}

.user-modal .ant-modal-footer {
  padding: 9px 28px 9px;
  background: #f5f8fc;
  border-top: 1.5px solid #dde8f5;
  border-radius: 0 0 18px 18px;
}

.section-card {
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 17px;
  border: 1px solid #d0e8ff;
  height: 100%;
}

.section-title-user {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a56a0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: "DM Sans", sans-serif;
}

.modal-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

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

@media (max-width: 992px) {
  .user-modal .ant-modal-body {
    padding: 18px 16px;
  }

  .user-modal .ant-modal-footer {
    padding: 12px 16px 16px;
  }

  .modal-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 576px) {
  .user-modal .ant-modal-title {
    font-size: 16px;
  }

  .section-card {
    padding: 14px 12px;
  }

  .section-title {
    font-size: 11px;
  }

  .btn-close-modal,
  .btn-submit-modal {
    font-size: 12px;
    padding: 0 14px;
    height: 34px;
  }
}

/* NEW — inner permission groups on the Role Edit screen */

.role-perm-group {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #d9e0ea;
  border-left: 3px solid #0f3460;
  border-radius: 6px;
  background: #f7f9fc;
  cursor: default;
}

.role-perm-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.role-perm-group-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #0f3460;
}

.role-perm-group-count {
  font-size: 11px;
  color: #8c8c8c;
}

.style-modal-scroll {
  max-height: 40vh;
  overflow-y: auto;
  overflow-x: hidden;
}
.style-model-container {
  align-items: end;
  height: -webkit-fit-content;
  height: fit-content;
  margin: 0 3%;
}
.style-images-scroll-container {
  width: 26vw;
}
.style-trims-container {
  overflow: auto;
  height: 50vh;
}

.style-page {
  height: 100vh;
  overflow: hidden;
}

.style-sidebar-container {
  height: 74vh;
  padding: 5px 5px 15px;
  box-sizing: border-box;

  overflow-x: hidden;
  overflow-y: auto;

  border-radius: 5px;
  box-shadow:
    rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;

  scrollbar-width: thin;

  font-family: "DM Sans", sans-serif;
  background: #ffffff;
  border-right: 2px solid #e0d6e8;
}

.style-img-holder {
  width: 100%;
  height: auto;
  max-height: 110px;
  object-fit: contain;
  display: block;
}

@media (max-width: 991px) {
  .style-sidebar-container {
    height: 80vh;
  }
}

@media (max-width: 767px) {
  .style-sidebar-container {
    height: 85vh;
  }
}

@media (max-width: 480px) {
  .style-sidebar-container {
    height: 90vh;
  }
}
.style-details-container {
  border-radius: 5px;
  box-shadow:
    rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
  padding: 5px;
  overflow-x: hidden;
  height: 75vh;
  scrollbar-width: thin;
  font-family: "DM Sans", sans-serif;
  background: #ffffff;
  border-right: 2px solid #e0d6e8;
}
.style-split-btn .split-dropdown-menu {
  left: 43%;
  width: 55%;
}

.style-garment-clr-container {
  margin: 0.25em 0;
  overflow-y: auto;
  width: 100%;
  overflow-x: auto;
}

.style-gar-Clr-container {
  margin: 0.25em 0;
  overflow-y: auto;
  width: 100%;
  max-height: 33vh;
  min-height: 28vh;
  overflow-x: auto;
  box-sizing: border-box;
}

.style-gar-Clr-drawer-container {
  margin: 2px 0;
  overflow-y: auto;
  width: 100%;
  overflow-x: auto;
}
.style-garClr-table-th {
  margin-top: 0px;
  font-size: 0.7rem;
  margin-bottom: 1px;
  color: white;
  padding: 4px;
  /* background-color: #9e0c40; */
  background-color: #0f3460;
  border-radius: 2px;
  text-align: center;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}
.style-modal-input {
  display: grid;
  grid-template-columns: 1fr 0.3fr;
}

.style-check-box {
  height: 15px;
  margin-top: 5px;
}
.style-delete-td {
  align-items: center;
  margin-top: 2px;
}
.style-csp-alw-table-td {
  border-radius: 2px;
  text-align: center;
  max-width: 6vw;
  background: #ffffff;
  border: 1px solid #f8f2f2;
  font-size: 11px;
}
.fab-grp-csp-table-td {
  width: 15vw;
}
.style-csp-alw-table-td:disabled {
  background: #c3c3c3;
  color: black;
}

.style-flex-btn {
  display: flex;
  gap: 5px;
}
.style-size-lib-container {
  margin: 10px 0 0 0;
}
.style-add-link-container {
  display: flex;
  width: 100%;
  justify-content: end;
}

.style-tabs-inner-container {
  height: 66vh;
  overflow-y: auto;
}

.style-display-flex-center {
  display: grid;
  grid-template-columns: 1fr 10fr;
  align-items: center;
  grid-column-gap: 10px;
  column-gap: 10px;
  margin: 15px 0;
}
.style-text-area-cad-comments {
  margin: 3px;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 5px;
}
.style-img-container {
  width: 100%;
  object-fit: contain;
  max-height: 160px;
}
.active-file-container {
  border: 2px solid #00a86b;
  border-radius: 3px;
  padding: 3px;
}
.style-img-del {
  justify-content: end;
  position: absolute;
  right: 0px;
  display: flex;
  top: 15px;
}

.style-sub-main-container {
  margin: 5px 5px 1px 5px;
}

.style-select-width {
  width: 15%;
}
.style-select-cost-width {
  width: 20%;
}
.style-pack-type-container {
  display: grid;
  margin: 15px 0 0 0;
  grid-template-columns: 15% 15% 15% 15% 15% 15%;
  grid-row-gap: 15px;
  row-gap: 15px;
}

.style-pack-type-inner-conatiner {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.style-flex-container {
  display: flex;
  justify-content: flex-end;
}
.style-select-user {
  width: 160px;
}

.style-csp-table-td {
  display: flex;
  justify-content: center;
  gap: 5px;
}
.style-parts-header {
  margin: 0;
  font-weight: bold;
  font-size: 0.7rem;
  color: #4f7da5;
  align-items: center;
}
.style-header {
  font-weight: bold;
  font-size: 0.7rem;
  color: #4f7da5;
}
.style-parts-label {
  margin: 3px;
  display: flex;
}

.style-common-table-td-wdth {
  border-radius: 2px;
  text-align: left;
  min-width: 10vw;
  background: #ffffff;
  max-width: 10vw;
  font-weight: bold;
  font-size: 0.625rem;
  padding: 2px;
  border: 1px solid #f8f2f2;
}
.style-des-table-td-wdth {
  border-radius: 2px;
  text-align: left;
  min-width: 20vw;
  background: #f6f6f6;
  max-width: 20vw;
  font-weight: bold;
  font-size: 0.625rem;
  padding: 2px;
  border: 1px solid #f8f2f2;
}
.style-required-gar {
  grid-column: 3 / 4;
  white-space: noWrap;
}
.style-ob-table-container {
  overflow-x: auto;
  height: 33vh;
}
.style-ob-table-container-modal {
  overflow-x: auto;
  height: 50vh;
}

.style-fabric-table {
  overflow-x: auto;
  overflow-y: auto;
  border-radius: 2px;
  width: 100%;
  margin: 5px 0 0 0;
}

.style-Measure-images-container {
  display: flex;
  overflow-y: auto;
  scroll-behavior: smooth;
  transition: scroll 0.3s ease-in-out;
  width: 97%;
  align-items: center;
}
.style-spec-file-upload {
  border: 2px dashed #afa9a9;
  align-items: center;
  height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
}
.style-spec-image-holder {
  align-items: center;
  display: flex;
  width: 100%;
  text-align: center;
  height: 100px;
}

.style-table-ob {
  padding: 0.25em;
  border-radius: 2px;
}

.style-table-emb {
  width: 60%;
}

.style-textArea {
  width: 98%;
  margin: 3px;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 5px;
}
.style-textArea-background {
  background: #ccc;
}
.style-textArea-background :hover {
  background-color: #ccc !important;
}
.style-inner-table-header {
  display: flex;
  align-items: center;
  column-gap: 10px;
}

.style-ob-table-td {
  border-spacing: 5px;
  border-radius: 2px;
  text-align: center;
  min-width: 10vw;
  border: 1px solid #f8f2f2;
}
.style-preview .ant-image-preview-img {
  max-width: 80vw;
  max-height: 40vh;
  object-fit: contain;
}
.style-ob-table-td-value {
  border-spacing: 5px;
  border-radius: 5px;
  font-size: 12px;
  text-align: center;
  padding: 0.25em 0.5em;
  border: 1px solid#f6f6f6;
  min-width: 60px;
  border: 1px solid #f8f2f2;
  border-radius: 2px;
}
.style-spec-th {
  border-radius: 5px;
  /* background-color: #9e0c40; */
  background-color: #0f3460;
}

.style-spec-check.ant-checkbox-checked.ant-checkbox-inner {
  background-color: #518bd3;
  border-color: #ffffff;
}
.style-specmeasure-th {
  width: 75px;
  border-radius: 5px;
}
.style-spec-input {
  height: 26px;
  width: 95%;
  min-width: 50px;
  border: 1px solid rgb(201, 200, 200);
  border-radius: 5px;
  text-align: center;
}
.style-ob-buttons-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.style-req-container {
  display: flex;
}
.style-edit-spec-table {
  height: 54vh;
  overflow-y: auto;
  overflow-x: auto;
  width: 100%;
  padding: 0px 0.25em 0.25em 0.25em;
}
.style-spec-table {
  height: 30vh;
  overflow-y: auto;
  overflow-x: auto;
  width: 100%;
  padding: 0px 0.25em 0.25em 0.25em;
}
.style-spec-table-modal {
  height: 85vh;
  overflow-y: auto;
  overflow-x: auto;
  width: 100%;
  padding: 10px 0.25em 0.25em 0.25em;
}

.style-size-qty-input {
  height: 25px;
  font-size: 11px;
  text-align: left;
  width: 70px;
}
.style-price-button {
  display: flex;
  align-items: center;
}

.style-model-inner-div {
  display: flex;
  margin: 8px;
}
.style-model-piece-add {
  margin: 2% 0 0 0;
  text-align: right;
}

.style-fabric-width {
  width: 35%;
}

.style-alw-size-width {
  width: 4%;
  white-space: nowrap;
}

.style-header-tip {
  position: relative;
}
.style-header-tip .style-header-tip-text {
  visibility: hidden;
  font-size: 11px;
  width: 120px;
  background-color: #0f3460ab;
  color: #fff;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
}
.style-header-tip:hover .style-header-tip-text {
  visibility: visible;
}
.style-header-tip .style-header-tip-text {
  width: 120px;
  bottom: 80%;
  left: 50%;
  margin-left: -60px;
}
.style-header-tip .style-header-tip-text::after {
  content: " ";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #0f3460ab transparent transparent transparent;
}

.style-image {
  height: 50px;
  width: 50px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.style-pc-delete {
  padding: 5px 0 0 0;
  margin: 0 5px 0 5px;
}

.style-common-dropdown-input {
  width: 20%;
}

.style-piece-table-scroll {
  max-height: 35vh;
  overflow-x: auto;
  margin: 10px 0 0 0;
}
.style-trim-table-size {
  margin: 10px 0 0 0;
  display: flex;
  overflow-x: auto;
}
.style-fab-lbl-td {
  min-width: 19vw;
  padding: 5px;
  background: #ffffff;
  border-right: 1px solid #f8f2f2;
  border-radius: 2px;
  font-size: 0.625rem;
}
.style-ft-modal {
  z-index: 1;
  display: block;
  position: fixed;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.style-ft-modal-body {
  display: grid;
  grid-template-columns: 50% 50%;
  grid-column-gap: 10px;
  column-gap: 10px;
  justify-content: space-evenly;
  margin: 10px;
  padding: 10px;
}

.style-image-table {
  height: 100%;
  width: 50%;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.popup-input-size-qty {
  border: 1px solid rgb(201, 200, 200);
  border-radius: 5px;
  height: 25px;
  font-size: 0.625rem;
  font-weight: bold;
  text-align: center;
}
.style-fab-color-select {
  width: 120px;
}
.style-table-add-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 100%;
  min-width: -webkit-max-content;
  min-width: max-content;
  position: relative;
  z-index: 1;
  margin-left: 10px;
}

.style-table-add-row .ant-btn {
  flex-shrink: 0;
  white-space: nowrap;
}
.style-view-image-container {
  margin: 20px;
  display: flex;
  justify-content: center;
}

.style-image-lbl {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.style-file-embed {
  height: 50px;
  width: 50px;
  margin: 5px;
  border-radius: 8px;
  border: 1px solid #3e5888;
}
.style-additional-cost-table {
  margin: 10px 0 0 0;
}

.style-img-name {
  padding: 0px;
  margin: 0px;
  cursor: pointer;
}

.style-edit-color-per {
  display: flex;
  column-gap: 2px;
}

.style-pack-type-card {
  border: 1px solid #f0e9ff;
  border-radius: 5px;
  text-align: center;
  width: 150px;
  grid-gap: 5px;
  gap: 5px;
  display: grid;
  padding: 5px;
}

.style-ft-modal-body-3-div {
  display: grid;
  grid-template-columns: 33% 33% 33%;
  grid-column-gap: 10px;
  column-gap: 10px;
  justify-content: space-evenly;
  margin: 10px;
  padding: 10px;
}

.style-piece-container {
  height: 50vh;
  margin: 5px;
}
.style-spec-upload-container {
  margin: 5px;
  overflow: auto;
}
.style-command-height {
  height: 48vh;
}
.style-com-height {
  height: 42vh;
}

.style-spec-history {
  display: flex;
  justify-content: end;
  margin: 20px 0 0 0;
}
.style-process-list {
  margin: 0;
  padding: 4px 8px;
  list-style: disc;
  font-size: 0.625rem;
  color: #0f3460;
  font-weight: bold;
}

.style-table-td-grclr {
  border-radius: 2px;
  text-align: center;
  min-width: 0vw;
  background: #ffffff;
  font-size: 0.625rem;
  font-weight: bold;
  border: 1px solid #f8f2f2;
}
.style-upload-sub-spec-btn {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}
.style-casoroule-div {
  margin: 5px;
  padding: 5px;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  border-radius: 5px;
}
.spining-cl {
  display: flex !important;
  align-content: center;
  justify-content: center !important;
  align-items: center;
  height: 50vh !important;
  background: aliceblue;
  border-radius: 10px;
}
.style-file {
  border: 2px dashed #ccc;
  text-align: center;
  height: 26vh;
  border-radius: 5px;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 5px;
}

.style-cad-file {
  margin: 5px;
  overflow-y: auto;
  width: 100%;
  max-height: 40vh;
}

.horizontal-scroll {
  overflow-x: auto;
}

.select-file-type {
  width: 15vw;
}

.style-spec-header-span {
  margin-top: 0px;
  font-size: 0.7rem;
  margin-bottom: 1px;
  color: white;
  padding: 4px;
  /* background-color: #9e0c40; */
  background-color: #0f3460;
  /* background-color: #8c4278; */
  border-radius: 2px;
  text-align: left;
}

.style-spec-value-span {
  border-radius: 2px;
  text-align: left;
  min-width: 5vw;
  max-width: 10vw;
  /* background: #fffafe; */
  background: #ffffff;
  font-size: 0.625rem;
  overflow-wrap: break-word;
  /* font-weight: bold; */
  padding: 2px;
  border-right: 1px solid #f8f2f2;
  color: black;
}
.style-common-table-td-img {
  border-radius: 2px;
  text-align: left;
  min-width: 2vw;
  max-width: 2vw;
  /* background: #fffafe; */
  background: #ffffff;
  font-size: 0.625rem;
  overflow-wrap: break-word;
  /* font-weight: bold; */
  padding: 2px;
  border: 1px solid #f8f2f2;
  color: black;
  /* font-weight: 600; */
}

.comb-csp-card {
  margin-bottom: 1%;
  margin-right: 2%;
}
.style-garClr-table-no-sticky-th {
  margin-top: 0px;
  font-size: 0.7rem;
  margin-bottom: 1px;
  color: white;
  padding: 4px;
  /* background-color: #9e0c40; */
  background-color: #0f3460;
  border-radius: 2px;
  border-right: 1.5px solid rgb(255 255 255 / 38%);
  text-align: center;
}
.tech-pack-segmented.ant-segmented {
  background-color: #f0f1f3;
  border-radius: 8px;
  padding: 4px;
}

.tech-pack-segmented.ant-segmented .ant-segmented-item {
  border-radius: 6px;
  transition: all 0.2s ease;
}

.tech-pack-segmented.ant-segmented .ant-segmented-item-selected {
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.tech-pack-segmented.ant-segmented .ant-segmented-item-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
  color: #4a4a4a;
}

.tech-pack-segmented.ant-segmented
  .ant-segmented-item-selected
  .ant-segmented-item-label {
  color: #1a1a1a;
}
.tech-pack-segment-label {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tech-pack-notification-dot {
  position: absolute;
  top: -6px;
  right: -10px;
  font-size: 8px;
  color: #ff4d4f;
  animation: tech-pack-dot-pulse 1.6s ease-in-out infinite;
}

@keyframes tech-pack-dot-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.85);
  }
}

.spec-file-section {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  box-sizing: border-box;
}

.spec-file-upload-area {
  width: 180px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-file-upload-actions {
  margin: 0 !important;
}

.spec-file-drop-zone {
  position: relative;
  width: 100%;
  height: 72px;
  border: 1px dashed #b8c2cc;
  border-radius: 6px;
  background: #fafbfc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.spec-file-drop-zone:hover {
  border-color: #0f3460;
  background: #f4f7fa;
}

.spec-file-drop-text {
  padding: 8px;
  color: #7a8490;
  font-size: 12px;
  text-align: center;
  pointer-events: none;
}

.spec-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.spec-file-preview-wrapper {
  flex: 1 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spec-file-preview-scroll {
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
}

.spec-file-preview-list {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  padding: 4px 2px 8px;
  box-sizing: border-box;
}

.spec-file-preview-list::-webkit-scrollbar {
  height: 5px;
}

.spec-file-preview-list::-webkit-scrollbar-track {
  background: #edf0f3;
  border-radius: 10px;
}

.spec-file-preview-list::-webkit-scrollbar-thumb {
  background: #aab4bf;
  border-radius: 10px;
}

.spec-file-preview-list::-webkit-scrollbar-thumb:hover {
  background: #7d8995;
}

.spec-file-preview-card {
  flex: 0 0 150px;
  width: 150px;
  min-width: 180px;
  border: 1px solid #dfe4e8;
  border-radius: 7px;
  background: #ffffff;
  overflow: hidden;
  box-sizing: border-box;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.spec-file-preview-card:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.spec-file-preview-media {
  width: 100%;
  height: 105px;
  background: #f5f6f8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.spec-file-preview-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
  box-sizing: border-box;
  cursor: pointer;
}

.spec-file-preview-document {
  width: 100%;
  height: 100%;
  cursor: pointer;
  overflow: hidden;
}

.spec-file-preview-embed {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.spec-file-preview-footer {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  box-sizing: border-box;
  border-top: 1px solid #edf0f2;
}

.spec-file-preview-name {
  flex: 1 1;
  min-width: 0;
  margin: 0;
  white-space: normal;
  cursor: pointer;
  font-size: 11px;
  line-height: 18px;
}

.spec-file-tabs {
  width: 100%;
}

.spec-file-tabs .ant-tabs-nav {
  margin-bottom: 10px;
}

.spec-file-tabs .ant-tabs-nav::before {
  border-bottom: 1px solid #e4e8eb;
}

.spec-file-tabs .ant-tabs-tab {
  padding: 8px 4px;
  font-size: 13px;
  color: #7a8490;
  transition: color 0.2s ease;
}

.spec-file-tabs .ant-tabs-tab:hover {
  color: #1c80fc;
}

.spec-file-tabs .ant-tabs-tab + .ant-tabs-tab {
  margin-left: 24px;
}

.spec-file-tabs .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: #0f3460;
  font-weight: 600;
}

.spec-file-tabs .ant-tabs-ink-bar {
  background: #0f3460;
  height: 2px;
}

.spec-file-tabs .ant-tabs-content-holder {
  padding-top: 2px;
}

.style-display-flex-center-sty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.style-spec-image-holder-sty {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.style-images-scroll-container-sty {
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
}

.common-spec-images-container-sty {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  justify-content: center;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  padding: 4px 2px 8px;
  box-sizing: border-box;
}

.common-image-name-container-sty {
  flex: 0 0 150px;
  width: 150px;
  min-width: 150px;
  border: 1px solid #dfe4e8;
  border-radius: 7px;
  background: #ffffff;
  overflow: hidden;
  box-sizing: border-box;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.common-image-name-container-sty:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.style-image-sty {
  display: block;
  width: 100%;
  height: 105px;
  object-fit: contain;
  padding: 5px;
  box-sizing: border-box;
  cursor: pointer;
  background: #f5f6f8;
}

.style-file-embed-sty {
  width: 100%;
  height: 105px;
  border: 0;
  pointer-events: none;
  background: #f5f6f8;
}

.style-image-lbl-sty {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 5px 6px;
  box-sizing: border-box;
  border-top: 1px solid #edf0f2;
}

.style-img-name-sty {
  flex: 1 1;
  min-width: 0;
  margin: 0;
  white-space: normal;
  cursor: pointer;
  font-size: 11px;
  line-height: 18px;
}

.style-textArea-background {
  background: #f7f8fa;
}

@media (max-width: 1200px) {
  .spec-file-section {
    gap: 10px;
  }

  .spec-file-upload-area {
    width: 160px;
    min-width: 160px;
  }

  .spec-file-preview-card {
    flex-basis: 135px;
    width: 135px;
    min-width: 135px;
  }

  .spec-file-preview-media {
    height: 95px;
  }
}

@media (max-width: 992px) {
  .spec-file-section {
    align-items: stretch;
    flex-direction: column;
  }

  .spec-file-upload-area {
    width: 100%;
    min-width: 0;
  }

  .spec-file-drop-zone {
    height: 60px;
  }

  .spec-file-preview-wrapper {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .spec-file-section {
    padding: 6px;
    gap: 8px;
  }

  .spec-file-preview-card {
    flex-basis: 120px;
    width: 120px;
    min-width: 120px;
  }

  .spec-file-preview-media {
    height: 85px;
  }

  .spec-file-preview-footer {
    min-height: 34px;
    padding: 4px;
  }

  .spec-file-preview-name {
    font-size: 10px;
  }

  .spec-file-tabs .ant-tabs-tab {
    font-size: 12px;
  }

  .spec-file-tabs .ant-tabs-tab + .ant-tabs-tab {
    margin-left: 16px;
  }
}

.attach-style-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 15px;
  font-weight: 600;
  color: #0f3460;
}

.attach-style-container .ant-row {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.attach-style-upload-zone {
  position: relative;
  width: 100%;
  height: 92px;
  min-height: 92px;
  border: 1px dashed #b8c2cc;
  border-radius: 6px;
  background: #fafbfc;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.attach-style-upload-zone:hover {
  border-color: #0f3460;
  background: #f5f8fc;
}

.attach-style-upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

/* Preview holder */
.attach-style-preview-holder {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  height: 92px;
  box-sizing: border-box;
}

.attach-style-preview-holder > button,
.attach-style-preview-holder .ant-btn {
  flex: 0 0 auto;
}

.attach-style-scroll-container {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 92px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.attach-style-scroll-container::-webkit-scrollbar {
  height: 5px;
}

.attach-style-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.attach-style-scroll-container::-webkit-scrollbar-thumb {
  background: #c5cbd3;
  border-radius: 10px;
}

.attach-style-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #8d96a3;
}

.attach-style-thumbnail-track {
  display: flex;
  align-items: center;
  gap: 8px;
  width: -webkit-max-content;
  width: max-content;
  min-width: 100%;
  height: 100%;
  padding: 3px 2px;
  box-sizing: border-box;
}

.attach-style-thumbnail-card {
  position: relative;
  flex: 0 0 78px;
  width: 78px;
  height: 82px;
  padding: 5px;
  border: 1px solid #dfe3e8;
  border-radius: 5px;
  background: #fff;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.attach-style-thumbnail-img {
  display: block;
  width: 100%;
  height: 68px;
  object-fit: contain;
  border-radius: 3px;
  cursor: pointer;
}

.attach-style-thumbnail-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 3;
}

.attach-style-upload-zone {
  position: relative;
  width: 100%;
  height: 110px;
  min-height: 110px;

  border: 1.5px dashed #b8c2cc;
  border-radius: 6px;
  background: #fafafa;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  box-sizing: border-box;

  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.attach-style-upload-zone:hover {
  border-color: #0f3460;
  background: #f5f8fb;
}

.attach-style-upload-input {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  opacity: 0;
  cursor: pointer;

  z-index: 2;
}

.attach-style-upload-content {
  width: 100%;
  height: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 3px;

  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;

  z-index: 1;
}

.attach-style-upload-icon {
  font-size: 24px;
  color: #0f3460;
  margin-bottom: 3px;
}

.attach-style-upload-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.attach-style-upload-subtitle {
  font-size: 11px;
  color: #777;
}

.attach-style-upload-format {
  font-size: 10px;
  color: #999;
}
.style-ob-top-row {
  display: flex;
  align-items: flex-start;
  width: 100%;
  gap: 15px;
  justify-content: space-between;
}

.parts-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: clamp(6px, 0.7vw, 10px);
  gap: clamp(6px, 0.7vw, 10px);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.parts-upload-card {
  display: flex;
  flex-direction: column;
  min-width: 0;

  padding: clamp(5px, 0.5vw, 8px);

  border: 1px solid #d9dee5;
  border-radius: 7px;

  background: #fff;
  box-sizing: border-box;
}

.parts-upload-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 6px;
  min-width: 0;

  padding-bottom: clamp(3px, 0.35vw, 5px);

  border-bottom: 1px solid #e6e9ed;
}

.parts-upload-name {
  flex: 1 1;
  min-width: 0;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  font-size: clamp(12px, 0.85vw, 14px);
  font-weight: 600;
  line-height: 1.3;

  color: #343a40;
}

.parts-upload-card-body {
  display: flex;
  align-items: center;

  gap: clamp(5px, 0.6vw, 8px);

  width: 100%;
  min-width: 0;

  padding-top: clamp(4px, 0.45vw, 7px);
}

.parts-upload-card-body > *:first-child {
  flex: 0 0 auto;
}

.parts-upload-file {
  flex: 1 1 auto;
  min-width: 0;
  width: 0;

  box-sizing: border-box;
}

.parts-upload-file > div {
  width: 100%;
  max-width: 100%;

  box-sizing: border-box;
}

.parts-upload-file img {
  display: block;

  width: auto;
  max-width: 100%;

  object-fit: contain;
}

@media (min-width: 1400px) {
  .parts-upload-grid {
    gap: 10px;
  }

  .parts-upload-card {
    padding: 7px 9px;
  }

  .parts-upload-card-body {
    padding-top: 6px;
  }
}

@media (max-width: 1100px) {
  .parts-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .parts-upload-grid {
    grid-template-columns: 1fr;
  }

  .parts-upload-card {
    padding: 6px;
  }
}

.defect-type-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
  min-width: 0;
}

.defect-type-title {
  display: flex;
  align-items: center;
  min-width: 0;
}

.defect-type-title span {
  font-size: 14px;
  font-weight: 600;
  color: #262626;
  white-space: nowrap;
}

.defect-type-select-wrapper {
  width: 100%;
  margin-bottom: 12px;
  min-width: 0;
}

.defect-type-select {
  width: 100%;
  min-width: 0;
}

.defect-grid-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.defect-table-card {
  width: 100%;
  min-width: 0;
  border: 1px solid #e2e5e9;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-sizing: border-box;
}

.defect-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.defect-table thead th {
  height: 34px;
  padding: 7px 9px;
  background: #f5f6f8;
  border-bottom: 1px solid #e2e5e9;
  color: #444;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.defect-table thead th:first-child {
  width: calc(100% - 42px);
}

.defect-action-column {
  width: 42px;
  text-align: center !important;
}

.defect-table tbody tr {
  transition: background-color 0.15s ease;
}

.defect-table tbody tr:hover {
  background: #f8fafc;
}

.defect-table tbody tr.even-row {
  background: #fafafa;
}

.defect-table tbody td {
  height: 36px;
  padding: 6px 9px;
  border-bottom: 1px solid #eeeeee;
  font-size: 12px;
  vertical-align: middle;
  box-sizing: border-box;
}

.defect-table tbody tr:last-child td {
  border-bottom: none;
}

.defect-name-cell {
  overflow: hidden;
}

.defect-name-cell span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #333;
}

.defect-action-cell {
  width: 42px;
  padding: 3px !important;
  text-align: center;
  vertical-align: middle;
}

.defect-action-cell button {
  margin: 0 auto;
}

.additional-cost-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  table-layout: fixed;
}

.additional-cost-table th:nth-child(1) {
  width: 27%;
}

.additional-cost-table th:nth-child(2) {
  width: 30%;
}

.additional-cost-table th:nth-child(3) {
  width: 31%;
}

.additional-cost-table th:nth-child(4) {
  width: 12%;
}

.additional-cost-table thead th {
  height: 36px;
  padding: 7px 10px;
  background: #f5f6f8;
  border-bottom: 1px solid #dfe3e8;
  color: #444;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  box-sizing: border-box;
}

.additional-cost-action-header {
  text-align: center !important;
}

.additional-cost-table tbody tr {
  transition: background-color 0.15s ease;
}

.additional-cost-table tbody tr:hover {
  background: #f7faff;
}

.additional-cost-table tbody tr.additional-cost-even-row {
  background: #fafafa;
}

.additional-cost-table tbody tr.additional-cost-even-row:hover {
  background: #f7faff;
}

.additional-cost-table tbody td {
  height: 46px;
  padding: 6px 9px;
  border-bottom: 1px solid #eeeeee;
  font-size: 12px;
  vertical-align: middle;
  box-sizing: border-box;
}

.additional-cost-table tbody tr:last-child td {
  border-bottom: none;
}

.additional-cost-type-cell {
  overflow: hidden;
}

.additional-cost-type-cell span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #333;
  font-weight: 500;
}

.additional-cost-input-cell {
  min-width: 0;
}

.additional-cost-select {
  width: 100%;
  min-width: 0;
}

.additional-cost-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.additional-cost-action-cell {
  width: 12%;
  padding: 4px !important;
  text-align: center;
  vertical-align: middle;
}

.additional-cost-action-cell button {
  margin: 0 auto;
}

.cad-file-upload-box {
  width: 100%;
  height: 42px;
  min-height: 42px;
  border: 1px dashed #bfbfbf;
  border-radius: 4px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.cad-file-upload-box:hover {
  border-color: #1677ff;
  background: #f5f9ff;
}

.cad-file-upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.cad-preview-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.cad-preview-scroll {
  flex: 1 1;
  overflow: hidden;
}

.cad-preview-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px;
  /* hide scrollbar but keep scroll functionality */
  scrollbar-width: none;
}

.cad-preview-list::-webkit-scrollbar {
  display: none;
}

.cad-preview-item {
  flex: 0 0 auto;
  width: 120px;
}

.cad-preview-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px;
  background: #fafafa;
  height: 100%;
}

.cad-preview-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
}

.cad-preview-file-icon {
  cursor: pointer;
  color: #0f3460;
  margin: 12px 0;
}

.cad-preview-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.cad-preview-file-name {
  width: 100%;
  max-width: 104px;
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  color: #333;
  line-height: 1.4;
}

.cad-preview-file-name:hover {
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  position: relative;
  z-index: 2;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  padding: 2px 4px;
}

.ob-scan-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 8px;
  box-sizing: border-box;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.ob-scan-options {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ob-scan-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

.ob-scan-radio-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ob-scan-radio-group .ant-radio-wrapper {
  margin: 0;
  padding: 5px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  background: #fff;
  transition: all 0.2s ease;
  font-size: 13px;
  color: #4b5563;
}

.ob-scan-radio-group .ant-radio-wrapper:hover {
  border-color: #1677ff;
  color: #1677ff;
}

.ob-scan-radio-group .ant-radio-wrapper:has(.ant-radio-checked) {
  border-color: #1677ff;
  background: #eaf3ff;
  color: #0958d9;
  font-weight: 500;
}

.ob-delete-button {
  flex-shrink: 0;
  height: 32px;
  min-width: 72px;
  padding: 0 10px !important;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  border: 1px solid #ffccc7 !important;
  border-radius: 5px !important;

  background: #fff2f0 !important;
  color: #cf1322 !important;

  font-size: 13px;
  font-weight: 500;
}

.ob-delete-button:hover {
  background: #ffccc7 !important;
  border-color: #ff7875 !important;
  color: #a8071a !important;
}
/*-----------------garment color file upload styling ----------*/

.gcf-wrapper {
  --gcf-header-bg: #f1f5fb;
  --gcf-header-fg: #0f3460;
  --gcf-border: #d9e2ef;
  overflow-y: auto;
  padding: 4px 6px 4px 2px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gcf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gcf-collapse {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gcf-collapse > .ant-collapse-item.gcf-panel {
  border: 1px solid var(--gcf-border) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 52, 96, 0.06);
  overflow: hidden;
}
/* header: explicit bg + text colour so global theme CSS can't make it unreadable */
.gcf-collapse > .ant-collapse-item.gcf-panel > .ant-collapse-header {
  align-items: center;
  padding: 8px 12px;
  background: var(--gcf-header-bg) !important;
  color: var(--gcf-header-fg);
  border-radius: 0;
}
.gcf-collapse
  > .ant-collapse-item.gcf-panel
  > .ant-collapse-header
  .ant-typography,
.gcf-collapse
  > .ant-collapse-item.gcf-panel
  > .ant-collapse-header
  .ant-collapse-header-text,
.gcf-collapse
  > .ant-collapse-item.gcf-panel
  > .ant-collapse-header
  .ant-collapse-arrow,
.gcf-collapse
  > .ant-collapse-item.gcf-panel
  > .ant-collapse-header
  .ant-collapse-expand-icon {
  color: var(--gcf-header-fg) !important;
}
.gcf-collapse
  > .ant-collapse-item.gcf-panel.ant-collapse-item-active
  > .ant-collapse-header {
  border-bottom: 1px solid var(--gcf-border);
}
.gcf-collapse .ant-collapse-content-box {
  padding: 12px !important;
}
.gcf-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gcf-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gcf-header-fg);
}

.gcf-body {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

/* upload */
.gcf-upload-col {
  width: 170px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gcf-dropzone {
  flex: 1 1;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1.5px dashed #b7c3d6;
  border-radius: 8px;
  background: #fafcff;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.gcf-dropzone:hover {
  border-color: #0f3460;
  background: #eef3fb;
}
.gcf-drop-icon {
  font-size: 24px;
  color: #0f3460;
}
.gcf-drop-text {
  font-size: 12px;
  font-weight: 500;
}
.gcf-drop-hint {
  font-size: 11px;
}

/* files */
.gcf-files-col {
  flex: 1 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.gcf-slider {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.gcf-scroller {
  flex: 1 1;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px;
  scrollbar-width: none;
}
.gcf-scroller::-webkit-scrollbar {
  display: none;
}

.gcf-file {
  position: relative;
  width: 96px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.gcf-thumb {
  position: relative;
  width: 96px;
  height: 72px;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f7fa;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.gcf-thumb:hover {
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.2);
}
.gcf-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gcf-embed {
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}
.gcf-pdf-badge {
  position: absolute;
  top: 4px;
  right: 4px;
}
.gcf-file-name {
  width: 100%;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
}
.gcf-delete {
  position: absolute;
  top: 2px;
  left: 2px;
  background: rgba(255, 255, 255, 0.9);
}
.gcf-empty {
  margin: 0 auto;
}

@media (max-width: 768px) {
  .gcf-body {
    flex-direction: column;
  }
  .gcf-upload-col {
    width: 100%;
  }
}

/*-------------------------------addition cost styling -----------------*/
.ac-shell {
  --ac-navy: #0f3460;
  --ac-border: #d9e2ef;
  --ac-head-bg: #f1f5fb;
  --ac-stripe: #f9fbfe;
  border: 1px solid var(--ac-border);
  border-radius: 12px;
  padding: 10px;
  margin: 2px;
  background: #fff;
}

/* toolbar */
.ac-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #edf1f7;
}
.ac-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ac-count-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  border-radius: 999px;
  padding: 2px 10px;
}
.ac-tag-icon {
  font-size: 11px;
}

/* table */
.ac-table-wrap {
  overflow: auto;
  border: 1px solid var(--ac-border);
  border-radius: 10px;
}
.ac-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.ac-table thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--ac-head-bg);
  color: var(--ac-navy);
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ac-border);
}
.ac-table tbody td {
  padding: 8px 12px;
  vertical-align: middle;
  border-bottom: 1px solid #edf1f7;
}
.ac-table tbody tr:nth-child(even) td {
  background: var(--ac-stripe);
}
.ac-table tbody tr:hover td {
  background: #eef4fc;
}
.ac-table tbody tr:last-child td {
  border-bottom: none;
}
.ac-name {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.ac-control {
  width: 100%;
}
.ac-col-action {
  text-align: center !important;
  width: 56px;
}

/* empty */
.ac-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
}

@media (max-width: 768px) {
  .ac-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}
/*-----------------spec measurmnet ment style --------------*/
.sm-root {
  --sm-navy: #0f3460;
  --sm-border: #d9e2ef;
  --sm-head-bg: #f1f5fb;
  --sm-stripe: #f9fbfe;
  --sm-hover: #eef4fc;
  width: 100%;
}

.sm-toolbar {
  margin-bottom: 8px;
}

/* ---------- scroll container ---------- */
.sm-scroll {
  overflow: auto;
  max-height: 100%;
  border: 1px solid var(--sm-border);
  border-radius: 10px;
  background: #fff;
}

.sm-table {
  width: -webkit-max-content;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* ---------- header ---------- */
.sm-table thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--sm-head-bg);
  color: var(--sm-navy);
  font-weight: 600;
  font-size: 13px;
  padding: 10px;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--sm-border);
  border-right: 1px solid #e6edf6;
}
.sm-table thead th:last-child {
  border-right: none;
}
.sm-table thead th.sm-col-first {
  left: 0;
  z-index: 4;
}
.sm-table thead th.sm-dragging {
  background: #dfe9f8;
  box-shadow: 0 4px 14px rgba(15, 52, 96, 0.25);
}

.sm-th-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sm-th-title {
  display: block;
  text-align: center;
  white-space: nowrap;
}
.sm-th-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px dashed var(--sm-border);
}
.sm-type-select {
  width: 100%;
}

/* ---------- body ---------- */
.sm-table tbody td {
  padding: 6px 10px;
  background: #fff;
  vertical-align: middle;
  border-bottom: 1px solid #edf1f7;
  border-right: 1px solid #f1f4f9;
}
.sm-table tbody tr:nth-child(even) td {
  background: var(--sm-stripe);
}
.sm-table tbody tr:hover td {
  background: var(--sm-hover);
}
.sm-table tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- columns ---------- */
.sm-col-first {
  min-width: 220px;
  max-width: 300px;
}
.sm-table tbody td.sm-col-first,
.sm-table tbody td.sm-col-first {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 2px 0 4px -2px rgba(15, 52, 96, 0.15);
}
.sm-col-size {
  min-width: 130px;
}
.sm-col-action {
  width: 52px;
  min-width: 52px;
  text-align: center !important;
}

/* ---------- controls ---------- */
.sm-table .sm-input,
.sm-table .ant-input,
.sm-table .ant-select {
  width: 100% !important;
}
.sm-table tbody td.sm-col-size .ant-input,
.sm-table tbody td.sm-col-size input {
  text-align: center;
}

/* read-only look */
.sm-td-readonly {
  font-size: 13px;
}
.sm-td-readonly.sm-col-first {
  font-weight: 600;
  color: var(--sm-navy);
}
.sm-td-readonly.sm-col-size {
  text-align: center;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.sm-table-readonly tbody td {
  padding: 8px 10px;
}

/* ---------- add row / empty ---------- */
.sm-add-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px;
  border: 1.5px dashed #b7c3d6;
  border-radius: 8px;
  background: #fafcff;
}
.sm-add-row-text {
  font-size: 12px;
  color: var(--sm-navy);
}
.sm-empty {
  margin: 16px auto;
}
.ht-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ht-card {
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 52, 96, 0.06);
  overflow: hidden;
}
.ht-card > .ant-card-head {
  min-height: 42px;
  background: #f1f5fb !important;
  color: #0f3460 !important;
  border-bottom: 1px solid #d9e2ef;
}
.ht-card > .ant-card-head .ant-card-head-title,
.ht-card > .ant-card-head .ht-card-title {
  color: #0f3460 !important;
  font-size: 12px;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ht-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  white-space: wrap;
}
.ht-card > .ant-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

/* ---------- file slider ---------- */
.ht-slider {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ht-scroller {
  flex: 1 1;
  min-width: 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px;
  scrollbar-width: none;
}
.ht-scroller::-webkit-scrollbar {
  display: none;
}
.ht-file {
  position: relative;
  flex: 0 0 120px;
  width: 120px;
}
.ht-thumb {
  width: 120px;
  height: 90px;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  background: #f5f7fa;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.ht-thumb:hover {
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.22);
}
.ht-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ht-embed {
  width: 100%;
  height: 100%;
  pointer-events: none; /* clicks go to the wrapper so the file opens */
  overflow: hidden;
}
.ht-file-name {
  margin: 4px 0 0;
  font-size: 11px;
  text-align: center;
  white-space: wrap;
  cursor: pointer;
}
.ht-delete {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 6px;
}
.ht-comment {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ht-empty {
  margin: 0;
}

/* ---------- spec card ---------- */
.sp-card > .ant-card-body {
  gap: 10px;
  height: "100%";
}
.sp-toolbar {
  margin: 0 !important;
}
.sp-unit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #fafcff;
}
.sp-unit-label {
  font-size: 12px;
  font-weight: 600;
  color: #1c375f;
}
.sp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-table-area {
  min-width: 0;
}

/*-------panel qc spec tab styling -----------*/
.pq-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.pq-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pq-status-label {
  font-size: 12px;
  font-weight: 600;
  color: #1c375f;
}
.pq-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 500;
}
.fb-shell {
  --fb-navy: #0f3460;
  --fb-border: #d9e2ef;
  --fb-head-bg: #f1f5fb;
  --fb-stripe: #f9fbfe;
  --fb-hover: #eef4fc;
  padding: 2px;
}

/* ---------- card ---------- */
.fb-card {
  border: 1px solid var(--fb-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 52, 96, 0.06);
  overflow: hidden;
}
.fb-card > .ant-card-head {
  min-height: 44px;
  background: var(--fb-head-bg) !important;
  border-bottom: 1px solid var(--fb-border);
}
.fb-card > .ant-card-head .ant-card-head-title,
.fb-card > .ant-card-head .fb-card-title {
  color: var(--fb-navy) !important;
  font-size: 14px;
  font-weight: 600;
}
.fb-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fb-count {
  margin: 0;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--fb-navy);
  background: #fff;
  border: 1px solid var(--fb-border);
}
.fb-card > .ant-card-body {
  padding: 10px 12px;
}

/* ---------- toolbar / request status ---------- */
.fb-toolbar {
  display: flex;
  align-items: center;
}
.fb-req {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fb-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fb-status-label {
  font-size: 12px;
  font-weight: 600;
  color: #1c375f;
}
.fb-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 500;
}

/* ---------- groups ---------- */
.fb-group {
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid var(--fb-border);
  border-radius: 10px;
  background: #fff;
}
.fb-group-head {
  margin-bottom: 8px !important;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--fb-border);
}
.fb-group-title {
  margin: 0 !important;
  color: var(--fb-navy);
  font-size: 14px;
  font-weight: 600;
}
.fb-group-footer {
  margin-top: 8px !important;
}

/* ---------- footer (Add / Group buttons stay below the table) ---------- */
.fb-footer {
  border-top: 1px solid #edf1f7;
}

.cad-card {
  --cad-navy: #0f3460;
  --cad-border: #d9e2ef;
  border: 1px solid var(--cad-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 52, 96, 0.06);
  overflow: hidden;
  height: 100%;
}
.cad-card > .ant-card-head {
  min-height: 44px;
  background: #f1f5fb !important;
  border-bottom: 1px solid var(--cad-border);
}
.cad-card > .ant-card-head .ant-card-head-title,
.cad-card > .ant-card-head .cad-card-title {
  color: var(--cad-navy) !important;
  font-size: 14px;
  font-weight: 600;
}
.cad-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cad-count {
  margin: 0;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--cad-navy);
  background: #fff;
  border: 1px solid var(--cad-border);
}
.cad-card > .ant-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  height: "100%";
}

/* toolbar */
.cad-toolbar {
  display: flex;
  align-items: flex-end;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f7;
}
.cad-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 1 320px;
  min-width: 240px;
}
.cad-field > *,
.cad-field .ant-select,
.cad-field .select-file-type {
  width: 100% !important;
  min-width: 0;
}

/* table */
.cad-table-wrap {
  overflow: auto;
  border: 1px solid var(--cad-border);
  border-radius: 10px;
}
.cad-table-wrap .ant-table-thead > tr > th {
  background: #f1f5fb;
  color: var(--cad-navy);
  font-weight: 600;
}
.cad-table-wrap .ant-table-tbody > tr.even-row > td {
  background: #f9fbfe;
}
.cad-table-wrap .ant-table-tbody > tr:hover > td {
  background: #eef4fc;
}
.cad-empty {
  margin: 20px auto;
}

.ta-shell {
  padding: 2px;
}

.ta-card {
  --ta-navy: #0f3460;
  --ta-border: #d9e2ef;
  border: 1px solid var(--ta-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 52, 96, 0.06);
  overflow: hidden;
}
.ta-card > .ant-card-head {
  min-height: 44px;
  background: #f1f5fb !important;
  border-bottom: 1px solid var(--ta-border);
}
.ta-card > .ant-card-head .ant-card-head-title,
.ta-card > .ant-card-head .ta-card-title {
  color: var(--ta-navy) !important;
  font-size: 14px;
  font-weight: 600;
}
.ta-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ta-card > .ant-card-body {
  display: flex;
  flex-direction: column;
  padding: 12px;
}

/* toolbar */
.ta-toolbar {
  margin: 0 !important;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f7;
}
.ta-field-col {
  min-width: 240px;
}
.ta-field-col > div,
.ta-field-col .ant-select {
  width: 100% !important;
}
.ta-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ta-status-tag {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 16px;
  border-radius: 999px;
}

/* body */
.ta-body {
  border: 1px solid var(--ta-border);
  border-radius: 10px;
  overflow: auto;
  background: #fff;
}

/* card = picture on top, file name underneath */
.sf-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

/* picture area */
.sf-thumb {
  order: 1;
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  overflow: hidden;
  background: #f5f7fa;
}
.sf-thumb img,
.sf-thumb embed {
  display: block;
  width: 100%;
  height: auto;
}

/* name bar (independent of prod-std-lbl / prod-std-element-size) */
.sf-name-bar {
  order: 2;
  position: static;
  flex: 0 0 auto;
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  box-sizing: border-box;
  border-top: 1px solid #edf0f2;
  background: #fafcff;
}
.sf-name {
  flex: 1 1;
  min-width: 143px;
  margin: 0;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  color: #0f3460;
  cursor: pointer;
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: visible;
}
.sf-name:hover {
  text-decoration: underline;
}
/* ============================================================
   Style page header  (stl-hdr)  -  compact, single row on desktop
   ============================================================ */

.stl-hdr {
  --stl-ink: #16213e;
  --stl-muted: #5b6785;
  --stl-line: #dde3ee;
  --stl-accent: #0f3460;
  --stl-bg: #ffffff;
  --stl-control-h: 30px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* row 1 = title + buttons, row 2 = tags */
  gap: 6px 12px;
  padding: 5px 12px; /* slim bar */
  background: var(--stl-bg);
  border: 1px solid var(--stl-line);
  border-radius: 12px;
  /* soft two-layer shadow: tight edge + wide diffuse lift */
  box-shadow:
    0 1px 2px rgba(15, 52, 96, 0.08),
    0 6px 16px rgba(15, 52, 96, 0.1);
  position: relative; /* keeps the shadow above the section below */
  z-index: 2;
  box-sizing: border-box;
}

/* ---------- left: logo + title ---------- */

.stl-hdr__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.stl-hdr__logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--stl-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stl-hdr__heading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}

.stl-hdr__title {
  margin: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--stl-ink);
}

.stl-hdr__subtitle {
  margin: 0;
  padding: 0;
  font-size: 11px;
  color: var(--stl-muted);
  white-space: nowrap;
}

/* ---------- right: everything on one centre line ---------- */

.stl-hdr__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap; /* only wraps inside this box if it truly runs out of room */
  gap: 4px 12px;
  flex: 1 1; /* take the remaining width instead of forcing a new line */
  min-width: 0;
}

.stl-hdr__group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.stl-hdr__group:empty {
  display: none;
}

.stl-hdr__group > *,
.stl-hdr__meta > * {
  display: inline-flex;
  align-items: center;
  margin: 0;
  flex-shrink: 0;
}

.stl-hdr .ant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.stl-hdr .ant-checkbox-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: var(--stl-ink);
  white-space: nowrap;
}

/* ---------- row 2: tags (below the buttons) - collapsible ---------- */

/* the wrapper animates between 0 and its natural height */
.stl-hdr__tags-wrap {
  flex: 1 1 100%; /* always its own line under the buttons */
  display: grid;
  grid-template-rows: 0fr; /* collapsed */
  margin-top: -6px; /* cancels the header row-gap while collapsed */
  transition:
    grid-template-rows 0.2s ease,
    margin-top 0.2s ease;
}

.stl-hdr__tags-wrap.is-open {
  grid-template-rows: 1fr; /* expanded */
  margin-top: 0;
}

/* clips the content while the wrapper is shrinking */
.stl-hdr__tags-row {
  min-height: 0;
  overflow: hidden;
}

/* padding / border live on the inner box so they vanish when collapsed */
.stl-hdr__tags-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--stl-line);
}

.stl-hdr__tags-wrap:not(.is-open) .stl-hdr__tags-inner {
  visibility: hidden; /* not focusable / hoverable while collapsed */
}

.stl-hdr__tags-inner > * {
  display: inline-flex;
  margin: 0;
}

/* ---------- toggle button (sits with the other controls in row 1) ---------- */

.stl-hdr__tags-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 28px;
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--stl-ink);
  background: #f7f9fc;
  border: 1px solid var(--stl-line);
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.stl-hdr__tags-toggle:hover {
  color: var(--stl-accent);
  background: #eef3fa;
  border-color: var(--stl-accent);
}

.stl-hdr__tags-toggle:focus-visible {
  outline: 2px solid var(--stl-accent);
  outline-offset: 2px;
}

.stl-hdr__tags-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  line-height: 1;
  color: #fff;
  background: var(--stl-accent);
  border-radius: 999px;
}

.stl-hdr__tags-chevron {
  transition: transform 0.2s ease;
}

.stl-hdr__tags-toggle.is-open .stl-hdr__tags-chevron {
  transform: rotate(180deg); /* points up when open */
}

@media (prefers-reduced-motion: reduce) {
  .stl-hdr__tags-wrap,
  .stl-hdr__tags-chevron {
    transition: none;
  }
}

/* soft tinted pills (light fill + dark text + thin border) so they never
   look like the solid buttons above */
.stl-hdr-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  -webkit-margin-end: 0;
          margin-inline-end: 0;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  border-radius: 999px;
  border: 1px solid transparent;
}

/* requests sent */
.stl-hdr-tag--fabric {
  background: #f1ecfa;
  color: #5b3fa0;
  border-color: #d9ccf2;
}
.stl-hdr-tag--trim {
  background: #e6eefb;
  color: #1f4fa3;
  border-color: #c5d6f3;
}
.stl-hdr-tag--emb {
  background: #e0f4f8;
  color: #0e6a80;
  border-color: #b6e1ea;
}
.stl-hdr-tag--cad {
  background: #f1f7dc;
  color: #55701a;
  border-color: #d8e6a8;
}
.stl-hdr-tag--ob {
  background: #fcede6;
  color: #a04a2a;
  border-color: #f2cdbb;
}
.stl-hdr-tag--panel {
  background: #fbe8f1;
  color: #a3225f;
  border-color: #f1bfd7;
}
.stl-hdr-tag--sample {
  background: #e6f6e4;
  color: #2f7a25;
  border-color: #bfe3b8;
}
.stl-hdr-tag--prod {
  background: #e8e8fa;
  color: #251c89;
  border-color: #c9c7f0;
}

/* OB approval status */
.stl-hdr-tag--ob-pending {
  background: #e6f0ff;
  color: #1d4ed8;
  border-color: #bcd3fb;
}
.stl-hdr-tag--ob-reopen {
  background: #fff3e0;
  color: #b45309;
  border-color: #f6d9a8;
}
.stl-hdr-tag--ob-approved {
  background: #e4f7e9;
  color: #15803d;
  border-color: #b5e4c3;
}
.stl-hdr-tag--ob-rejected {
  background: #fdeaf0;
  color: #be123c;
  border-color: #f6bccb;
}

.stl-hdr-tag .anticon,
.stl-hdr-tag svg {
  font-size: 12px;
}

/* ---------- audit info ---------- */

.stl-hdr__meta {
  display: flex;
  align-items: center;
}

/* ---------- laptops: drop the subtitle to save width ---------- */

@media (max-width: 1280px) {
  .stl-hdr__subtitle {
    display: none;
  }
}

/* ---------- tablets / phones: stack, left aligned ---------- */

@media (max-width: 900px) {
  .stl-hdr {
    padding: 8px 12px;
  }

  .stl-hdr__right {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

/* ============================================================
   Version / status bar  (stl-bar)  -  never overflows its border
   ============================================================ */

/* the existing bordered box: let it shrink and size correctly inside the grid */
.fabric-panel-header {
  min-width: 0;
  box-sizing: border-box;
}

.stl-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap; /* wrap instead of overflowing */
  gap: 6px 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* tags: take the free width, wrap among themselves when it runs out */
.stl-bar__tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.stl-bar__tags:empty {
  display: none;
}

/* buttons: always on the right, even after the tags wrap */
.stl-bar__actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

.stl-bar__actions > * {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

/* every tag: same size, no stray margin (antd adds margin-inline-end: 8px) */
.stl-bar-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  -webkit-margin-end: 0;
          margin-inline-end: 0;
  white-space: nowrap;
  max-width: 100%;
}
.sx-page {
  --sx-navy: #0f3460;
  --sx-navy-2: #1c4a85;
  --sx-ink: #16213e;
  --sx-ink-2: #2b3652;
  --sx-mut: #454c5f;
  --sx-mut-2: #6b7690;
  --sx-line: #dde3ee;
  --sx-line-2: #eaeef5;
  --sx-hair: #e1e6ef;
  --sx-bg: #f1f4f9;
  --sx-surf: #ffffff;
  --sx-surf-2: #f7f9fc;
  --sx-soft: #e8eff9;
  --sx-soft-2: #d6e2f3;
  --sx-r: 12px;
  --sx-r-sm: 8px;
  --sx-ctl: 30px;
  --sx-offset: 96px; /* top app bar + footer bar; tune if the bottom clips / leaves a gap */
  --sx-comp-bg: #eaf0f9; /* component bar (collapse header) colour - JSX headerColor="var(--sx-comp-bg)" */
  --sx-comp-ink: #0f3460;
  --sx-field: #d5dce7; /* input borders */
  --sx-head: #f1f4f9; /* table head background */
  --sx-shadow:
    0 1px 2px rgba(15, 52, 96, 0.06), 0 4px 14px rgba(15, 52, 96, 0.06);

  background: var(--sx-bg);
  color: var(--sx-ink);
  padding: 6px 8px 4px;
  font-family: "DM Sans", "Segoe UI", Inter, Roboto, Arial, sans-serif;
  font-size: 13px;
}

/* the app renders everything in a serif font; the global rule is !important itself */

/* =====================================================================
   1. HEADER
   ===================================================================== */
.sx-page .sx-hdr {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  grid-column-gap: 18px;
  column-gap: 18px;
  grid-row-gap: 6px;
  row-gap: 6px;
  padding: 3px 14px;
  margin: 0 0 3px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
  border: 1px solid var(--sx-line);
  border-top: 3px solid var(--sx-navy);
  border-radius: 14px;
  box-shadow: var(--sx-shadow);
}

/* ---- brand ---- */
.sx-page .sx-hdr .stl-hdr__brand {
  gap: 12px;
  min-width: 0;
}
.sx-page .sx-hdr .stl-hdr__logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sx-navy) 0%, var(--sx-navy-2) 100%);
  box-shadow: 0 4px 10px rgba(15, 52, 96, 0.28);
}
.sx-page .sx-hdr .stl-hdr__title {
  font-size: 18px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--sx-navy);
}
.sx-page .sx-hdr .stl-hdr__subtitle {
  font-size: 12px;
  color: var(--sx-mut);
  margin-top: 2px;
}

/* ---- tools (right side) ---- */
.sx-page .sx-hdr .stl-hdr__right {
  flex: initial;
  width: 100%;
  justify-content: flex-end;
  align-items: center;
  gap: 8px 10px;
}
.sx-page .sx-hdr .stl-hdr__group {
  gap: 6px;
}

/* Requests toggle: pill with navy counter */
.sx-page .sx-hdr .stl-hdr__tags-toggle {
  height: 32px;
  padding: 0 12px;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sx-navy);
  background: var(--sx-surf);
  border: 1px solid var(--sx-soft-2);
  border-radius: 999px;
}
.sx-page .sx-hdr .stl-hdr__tags-toggle:hover {
  background: var(--sx-soft);
  border-color: var(--sx-navy);
}
.sx-page .sx-hdr .stl-hdr__tags-count {
  background: var(--sx-navy);
  min-width: 20px;
  height: 20px;
  font-weight: 700;
}

/* "Show One Component" checkbox as a soft pill */
.sx-page .sx-hdr .stl-hdr__group:not(.stl-hdr__group--actions) {
  height: 32px;
  padding: 0 12px;
  background: var(--sx-surf-2);
  border: 1px solid var(--sx-line);
  border-radius: 999px;
}
.sx-page .sx-hdr .ant-checkbox-wrapper {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sx-ink);
  gap: 6px;
}
.sx-page .sx-hdr .ant-checkbox-checked .ant-checkbox-inner {
  background-color: var(--sx-navy);
  border-color: var(--sx-navy);
}

/* action buttons: one size, one radius, divided from the options */
.sx-page .sx-hdr .stl-hdr__group--actions {
  gap: 6px;
  padding-left: 12px;
  border-left: 1px solid var(--sx-line);
}

/* split buttons (Draft / Edit / Submit with the arrow) keep one joined shape */
.sx-page
  .sx-hdr
  .ant-space-compact
  > .ant-btn:not(:first-child):not(:last-child) {
  border-radius: 0;
}
.sx-page .sx-hdr .ant-space-compact > .ant-btn:first-child:not(:last-child) {
  border-radius: var(--sx-r-sm) 0 0 var(--sx-r-sm);
}
.sx-page .sx-hdr .ant-space-compact > .ant-btn:last-child:not(:first-child) {
  border-radius: 0 var(--sx-r-sm) var(--sx-r-sm) 0;
}
.sx-page .sx-hdr .stl-hdr__meta {
  padding-left: 4px;
}

/* ---- request / OB status chips ---- */
.sx-page .sx-hdr .stl-hdr__tags-wrap {
  grid-column: 1 / -1;
  margin-top: -6px;
}
.sx-page .sx-hdr .stl-hdr__tags-wrap.is-open {
  margin-top: 0;
}
.sx-page .sx-hdr .stl-hdr__tags-inner {
  justify-content: flex-start;
  gap: 6px 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--sx-soft-2);
}
.sx-page .sx-hdr .stl-hdr__tags-inner::before {
  content: "Active requests";
  margin-right: 2px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sx-mut);
}
.sx-page .sx-hdr .stl-hdr-tag {
  padding: 3px 11px;
  font-size: 11.5px;
  font-weight: 700;
}
/* no purple: fabric + production move to navy / slate */
.sx-page .sx-hdr .stl-hdr-tag--fabric {
  background: #e8eff9;
  color: #0f3460;
  border-color: #c9d9ef;
}
.sx-page .sx-hdr .stl-hdr-tag--prod {
  background: #e9eef5;
  color: #2b4466;
  border-color: #cbd6e4;
}

/* ---- header responsive ---- */
@media (max-width: 1280px) {
  .sx-page .sx-hdr .stl-hdr__subtitle {
    display: block;
  }
}
@media (max-width: 1100px) {
  .sx-page .sx-hdr {
    grid-template-columns: minmax(0, 1fr);
  }
  .sx-page .sx-hdr .stl-hdr__right {
    justify-content: flex-start;
  }
}
@media (max-width: 767px) {
  .sx-page .sx-hdr {
    padding: 8px 10px;
    border-radius: 12px;
  }
  .sx-page .sx-hdr .stl-hdr__logo {
    width: 34px;
    height: 34px;
  }
  .sx-page .sx-hdr .stl-hdr__title {
    font-size: 16px;
  }
  .sx-page .sx-hdr .stl-hdr__subtitle {
    display: none;
  }
  .sx-page .sx-hdr .stl-hdr__group--actions {
    flex: 0 1 auto;
    padding-left: 0;
    border-left: 0;
  }
  /* info button sits in the top-right corner next to the title */
  .sx-page .sx-hdr {
    position: relative;
  }
  .sx-page .sx-hdr .stl-hdr__meta {
    position: absolute;
    top: 9px;
    right: 10px;
    padding: 0;
  }
}
@media (max-width: 420px) {
  .sx-page .sx-hdr .ant-btn {
    padding: 0 9px;
    font-size: 12px;
  }
  .sx-page .sx-hdr .stl-hdr__group:not(.stl-hdr__group--actions) {
    flex: 1 1 auto;
  }
}

.sx-page .sx-hdr .stl-hdr__tags-count {
  font-size: 11px !important;
}

/* =====================================================================
   3. LAYOUT : page fills the viewport (no cut-off behind the footer when the
      header tags row is open).  JSX: right Col has no inline height.
   ===================================================================== */
@media (min-width: 992px) {
  .sx-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--sx-offset));
    min-height: 480px;
  }
  .sx-page > * {
    flex: 0 0 auto;
  }
  .sx-page > .q-main-row {
    flex: 1 1 auto;
    min-height: 0;
    flex-wrap: nowrap;
  }
  .sx-page .q-main-row > .ant-col {
    height: 100%;
    min-height: 0;
  }
  .sx-page .q-main-row .sx-side {
    height: 100%;
  }
  .sx-page .sty-tbl-col {
    overflow: hidden;
  }
  .sx-page .sty-tbl-col > .style-sub-main-container {
    height: 96%;
  }
}
@media (max-width: 991.98px) {
  .sx-page .sty-tbl-col {
    min-height: 70vh;
  }
}

/* =====================================================================
   2. LEFT SIDEBAR
   JSX: .sx-side-col > .sx-side > (.sx-side__head , .sx-form > .sx-grid)
   ===================================================================== */
.sx-page .q-main-row {
  row-gap: 6px;
}
.sx-page .sx-side-col {
  min-width: 0;
}

.sx-page .sx-side {
  display: flex;
  flex-direction: column;
  height: 80vh;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--sx-hair);
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.05),
    0 6px 16px rgba(16, 24, 40, 0.05);
}

/* top bar: version + status + print / configure */
.sx-page .sx-side .sx-side__head {
  flex: 0 0 auto;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid var(--sx-hair);
}
.sx-page .sx-side .sx-side__head:empty {
  display: none;
}
.sx-page .sx-side .sx-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  flex-wrap: wrap;
}
.sx-page .sx-side .sx-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 4px 0 0;
  padding: 0 10px;
  height: 24px;
  line-height: 22px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid var(--sx-hair);
  background: #f6f8fb;
  color: var(--sx-ink);
}
.sx-page .sx-side .sx-tag.ant-tag-magenta {
  background: #fff4e5;
  border-color: #fbd9a5;
  color: #9a5b00;
}
.sx-page .sx-side .sx-tag.ant-tag-blue {
  background: #eaf2ff;
  border-color: #c3d8fb;
  color: #1d4ed8;
}
.sx-page .sx-side .sx-tag.ant-tag-orange {
  background: #fff1e8;
  border-color: #fdcfae;
  color: #b4470b;
}
.sx-page .sx-side .sx-tag.ant-tag-green {
  background: #e9f8ef;
  border-color: #b8e6c9;
  color: #157f3d;
}
.sx-page .sx-side .sx-tag.ant-tag-red {
  background: #fdecec;
  border-color: #f6c2c2;
  color: #b42318;
}
.sx-page .sx-side .sx-tag svg {
  flex: none;
}
.sx-page .sx-side .sx-bar .stl-bar__actions {
  display: flex;
  gap: 6px;
}
.sx-page .sx-side .sx-bar .stl-bar__actions .ant-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--sx-field);
  color: var(--sx-navy);
  box-shadow: none;
}
.sx-page .sx-side .sx-bar .stl-bar__actions .ant-btn:hover {
  background: #eef3fa;
  border-color: var(--sx-navy);
}

/* scrolling form (overrides the fixed 74vh box of Style.css) */
.sx-page .sx-side .sx-form {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  padding: 10px 14px 16px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c9d1de transparent;
}
.sx-page .sx-side .sx-form::-webkit-scrollbar {
  width: 6px;
}
.sx-page .sx-side .sx-form::-webkit-scrollbar-track {
  background: transparent;
}
.sx-page .sx-side .sx-form::-webkit-scrollbar-thumb {
  background: #c9d1de;
  border-radius: 6px;
}

/* responsive grid: as many 140px+ columns as fit (panel -> 2, tablet -> 4-5, phone -> 2) */
.sx-page .sx-side .sx-grid {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  margin: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
}
.sx-page .sx-side .sx-grid::before,
.sx-page .sx-side .sx-grid::after {
  display: none;
}
.sx-page .sx-side .sx-grid > .ant-col {
  flex: none;
  width: auto;
  max-width: none;
  min-width: 0;
  padding: 0;
  margin: 0;
}
.sx-page .sx-side .sx-grid > .sx-span-all {
  grid-column: 1 / -1;
}

/* section headings: tinted icon tile + label + hairline */
.sx-page .sx-side .sx-form .sx-sec {
  margin-top: 10px;
}
.sx-page .sx-side .sx-form .sx-grid > .sx-sec:first-child {
  margin-top: 0;
}
.sx-page .sx-side .sx-form .sx-sec__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sx-ink);
}
.sx-page .sx-side .sx-form .sx-sec__title svg {
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  padding: 5px;
  flex: none;
  border-radius: 7px;
  background: #eaf0f9;
  color: var(--sx-navy);
}
.sx-page .sx-side .sx-form .sx-sec__title::after {
  content: "";
  flex: 1 1;
  height: 1px;
  background: var(--sx-hair);
}

/* field: label row (always 20px so the controls line up) + control */
.sx-page .sx-side .sx-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 0;
}
.sx-page .sx-side .sx-form .sx-label {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  text-indent: 0;
  color: #4a5470;
  white-space: nowrap;
  flex-wrap: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sx-page .sx-side .sx-field > .labl-align-link {
  display: flex;
  width: 100%;
}

/* Piece Count: input + edit button */
.sx-page .sx-side .sx-form .sx-field .style-price-button {
  margin-left: 6px;
}
.sx-page .sx-side .sx-form .sx-field .style-price-button .ant-btn {
  height: var(--sx-ctl);
  width: var(--sx-ctl);
  border-radius: 8px;
}

/* checkboxes (Status / Garment ColorWise Fabric) */
.sx-page .sx-side .sx-form .common-checkBox-container {
  display: flex;
  align-items: center;
  min-height: var(--sx-ctl);
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--sx-hair);
  border-radius: 8px;
  background: #fafbfd;
}
.sx-page .sx-side .sx-form .common-checkBox-container .ant-checkbox-wrapper {
  align-items: center;
  gap: 2px;
  font-size: 12px;
}
.sx-page .sx-side .sx-form .common-checkBox-container .sx-label {
  min-height: 0;
  color: var(--sx-ink);
  font-weight: 600;
  white-space: normal;
}
.sx-page .sx-side .sx-form .ant-checkbox-checked .ant-checkbox-inner {
  background: var(--sx-navy);
  border-color: var(--sx-navy);
}
.sx-page .sx-side .sx-form input[type="checkbox"] {
  accent-color: var(--sx-navy);
}
.sx-page .sx-side .sx-form .sx-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sx-page .sx-side .sx-form .sx-checks > .ant-row {
  flex: 1 1 160px;
  margin: 0;
}
.sx-page .sx-side .sx-form .sx-checks > .ant-row > .ant-col {
  flex: 1 1 100%;
  max-width: 100%;
}

/* style image */
.sx-page .sx-side .sx-form .sx-span-all > .sx-label {
  margin-bottom: 4px;
}
.sx-page .sx-side .sx-form .sx-span-all > .sx-label .ant-btn {
  height: 22px;
  width: 22px;
  min-width: 22px;
  padding: 0;
  margin-left: 6px;
  border-radius: 6px;
}
.sx-page .sx-side .sx-form .fp-img-uploader {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  padding: 10px;
  border: 1.5px dashed #c3ccda;
  border-radius: 10px;
  background: #fafbfd;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.sx-page .sx-side .sx-form .fp-img-uploader:hover {
  border-color: var(--sx-navy);
  background: #f3f6fb;
}
.sx-page .sx-side .sx-form .fp-img-uploader-text {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7690;
  text-align: center;
}
.sx-page .sx-side .sx-form .style-img-holder {
  max-height: 150px;
  border-radius: 8px;
}
.sx-page .split-button {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin: 0;
  box-shadow: none;
  background: none;
  border-radius: 0;
}
.sx-page .split-button > :not(button):not(.split-dropdown-menu) {
  order: 0;
  flex: 1 1 auto;
  min-width: 0;
  margin-right: 6px;
}
.sx-page .split-button .split-main-btn,
.sx-page .split-button .split-dropdown-btn {
  order: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  height: 20px;
  min-width: 22px;
  padding: 0 4px;
  margin: 0;
  cursor: pointer;
  background: #fff;
  color: var(--sx-navy);
  border: 1px solid var(--sx-field);
  box-shadow: none;
}
.sx-page .split-button .split-dropdown-btn {
  order: 2;
  min-width: 18px;
  padding: 0 1px;
  border-left: 0;
  border-radius: 0 6px 6px 0;
}
.sx-page .split-button .split-main-btn:hover,
.sx-page .split-button .split-dropdown-btn:hover {
  background: #eef3fa;
  color: var(--sx-navy);
}
.sx-page .split-button svg {
  width: 12px;
  height: 12px;
}
.sx-page .split-button .split-dropdown-menu {
  top: calc(100% + 4px);
  left: auto;
  right: 0;
  width: auto;
  min-width: 120px;
  z-index: 1000;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--sx-hair);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.14);
  text-align: left;
}
.sx-page .split-button .split-dropdown-item {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sx-ink);
  background: #fff;
  cursor: pointer;
}
.sx-page .split-button .split-dropdown-item:hover {
  background: #eef3fa;
  color: var(--sx-navy);
}

/* =====================================================================
   12. THEME - richer colours (navy primary + teal secondary), less pale
   (overrides the earlier neutral values; everything above still applies)
   ===================================================================== */
.sx-page {
  --sx-bg: #e9eef5; /* page background: cool grey-blue, not white */
  --sx-canvas: #eef2f8; /* background behind the cards inside a tab */
  --sx-accent: #4f46e5; /* Deep Indigo */
  --sx-accent-soft: #edeff7;
  --sx-head: #e8eef8; /* table head: navy tint */
  --sx-field: #cdd6e4;
  --sx-hair: #dde4ee;
  --sx-comp-bg: linear-gradient(
    90deg,
    #0f3460 0%,
    #1c4a85 100%
  ); /* component bar */
  --sx-comp-ink: #ffffff;
  background: var(--sx-bg);
}

/* ---------- header ---------- */
.sx-page .sx-hdr {
  border-top: 3px solid var(--sx-navy);
  box-shadow: 0 2px 10px rgba(15, 52, 96, 0.08);
}

/* ---------- sidebar ---------- */
.sx-page .sx-side {
  border-color: #d6dfeb;
  box-shadow: 0 2px 10px rgba(15, 52, 96, 0.07);
}
.sx-page .sx-side .sx-side__head {
  background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%);
}
.sx-page .sx-side .sx-form .sx-sec__title {
  color: var(--sx-navy);
}
.sx-page .sx-side .sx-form .sx-sec__title svg {
  background: linear-gradient(135deg, var(--sx-navy) 0%, #1c4a85 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 52, 96, 0.25);
}
.sx-page .sx-side .sx-form .sx-sec__title::after {
  background: linear-gradient(90deg, #c9d5e6 0%, transparent 100%);
}
.sx-page .sx-side .sx-form .sx-label {
  color: #3d4866;
}

/* Status / Garment ColorWise Fabric: equal boxes, aligned in one row */
.sx-page .sx-side .sx-grid > .ant-col:has(.common-checkBox-container) {
  display: flex;
}
.sx-page .sx-side .sx-grid > .ant-col:has(.common-checkBox-container) > div {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}
.sx-page .sx-side .sx-form .common-checkBox-container {
  flex: 1 1 auto;
  box-sizing: border-box;
  min-height: 44px;
  height: 100%;
  padding: 6px 10px;
  background: #f7f9fc;
  border: 1px solid #d6dfeb;
  border-radius: 10px;
}
.sx-page .sx-side .sx-form .common-checkBox-container .ant-checkbox-wrapper {
  width: 100%;
  align-items: center;
  gap: 6px;
}
.sx-page
  .sx-side
  .sx-form
  .common-checkBox-container
  .ant-checkbox-wrapper
  > span:last-child {
  padding: 0;
}
.sx-page .sx-side .sx-form .common-checkBox-container .sx-label {
  font-size: 12px;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
}
.sx-page
  .sx-side
  .sx-form
  .common-checkBox-container:has(.ant-checkbox-checked) {
  background: #eef3fb;
  border-color: #b9c9e2;
}
.sx-page .sx-side .sx-form .sx-checks > .ant-row > .ant-col > div {
  height: 100%;
}

/* ---------- collapsible left panel ---------- */
.sx-page .sx-side-col.is-collapsed {
  display: none;
}

.sx-page .sx-hdr .sx-side-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--sx-navy);
  background: var(--sx-surf);
  border: 1px solid var(--sx-soft-2);
  border-radius: var(--sx-r-sm);
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.sx-page .sx-hdr .sx-side-toggle:hover {
  background: var(--sx-soft);
  border-color: var(--sx-navy);
}
.sx-page .sx-hdr .sx-side-toggle[aria-pressed="true"] {
  background: var(--sx-navy);
  color: #fff;
  border-color: var(--sx-navy);
}

/* summary chips shown in the header while the panel is collapsed */
.sx-page .sx-hdr .sx-hdr-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  padding-left: 14px;
}
.sx-page .sx-hdr .sx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 240px;
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sx-ink);
  background: var(--sx-surf-2);
  border: 1px solid var(--sx-line);
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sx-page .sx-hdr .sx-chip b {
  flex: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sx-mut-2);
}

/* the subtitle is the first thing to go when the chips need room */
@media (max-width: 1400px) {
  .sx-page .sx-hdr .sx-hdr-summary ~ * {
    min-width: 0;
  }
  .sx-page .sx-hdr:has(.sx-hdr-summary) .stl-hdr__subtitle {
    display: none;
  }
}
@media (max-width: 767px) {
  .sx-page .sx-hdr .sx-hdr-summary {
    flex-basis: 100%;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
}
/* =====================================================================
   SPEC FILE UPLOAD - drop zone | added files | comments
   ===================================================================== */
.sx-page .sx-spec {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--sx-hair);
  border-radius: 12px;
}
.sx-page .sx-spec__grid {
  display: grid;
  grid-template-columns: minmax(217px, 219px) minmax(0, 1fr);
  grid-gap: 14px;
  gap: 14px;
  align-items: stretch;
}

/* drop zone */
.sx-page .sx-spec-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 210px;
  padding: 16px 12px;
  text-align: center;
  background: linear-gradient(180deg, #f8fafe 0%, #f1f5fb 100%);
  border: 1.5px dashed #b4c2da;
  border-radius: 12px;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}
.sx-page .sx-spec-drop:hover:not(.is-full) {
  border-color: var(--sx-navy);
  background: #eef3fb;
  box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.08);
}
.sx-page .sx-spec-drop.is-full {
  opacity: 0.6;
  cursor: not-allowed;
}
.sx-page .sx-spec-drop__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.sx-page .sx-spec-drop__input:disabled {
  cursor: not-allowed;
}
.sx-page .sx-spec-drop__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  color: #fff;
  background: linear-gradient(135deg, var(--sx-navy) 0%, var(--sx-navy-2) 100%);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(15, 52, 96, 0.25);
}
.sx-page .sx-spec-drop__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--sx-navy);
}
.sx-page .sx-spec-drop__hint {
  font-size: 11.5px;
  color: var(--sx-mut-2);
}
.sx-page .sx-spec-drop__crop {
  position: relative; /* sits above the invisible file input */
  z-index: 2;
  margin-top: 8px;
  height: 26px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--sx-navy);
  background: #fff;
  border: 1px solid var(--sx-field);
  border-radius: 999px;
  cursor: pointer;
}
.sx-page .sx-spec-drop__crop:hover:not(:disabled) {
  border-color: var(--sx-navy);
  background: var(--sx-soft);
}
.sx-page .sx-spec-drop__crop:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* files panel */
.sx-page .sx-spec-files {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--sx-hair);
  border-radius: 12px;
  overflow: hidden;
}
.sx-page .sx-spec-files__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--sx-navy);
  background: var(--sx-head);
  border-bottom: 1px solid var(--sx-hair);
}
.sx-page .sx-spec > .sx-spec-files__head {
  border: 1px solid var(--sx-hair);
  border-radius: 10px;
}
.sx-page .sx-spec-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  margin-left: 6px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  color: #fff;
  background: var(--sx-navy);
  border-radius: 999px;
}
.sx-page .sx-spec-files__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  grid-gap: 10px;
  gap: 10px;
  padding: 12px;
}
.sx-page .sx-spec-files__empty {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  font-size: 12.5px;
  color: var(--sx-mut-2);
  background: repeating-linear-gradient(135deg, #fff 0 10px, #fafbfd 10px 20px);
}

/* file card */
.sx-page .sx-spec-file {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--sx-hair);
  border-radius: 10px;
  overflow: hidden;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
.sx-page .sx-spec-file:hover {
  border-color: var(--sx-navy-2);
  box-shadow: 0 4px 12px rgba(15, 52, 96, 0.14);
  transform: translateY(-1px);
}

.sx-page .sx-spec-file__thumb {
  display: block;
  width: 100%;
  height: 110px; /* or 140px if you want it taller */
  padding: 0;
  background: #f5f7fa;
  border: 0;
  cursor: zoom-in;
  overflow: hidden; /* re-enable so nothing spills out */
  /* removed: object-fit / object-position from here */
}
.sx-page .sx-spec-file__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* show the whole image, with letterboxing */
  object-position: center;
}
.sx-page .sx-spec-file__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 32px;
  padding: 3px 6px 3px 10px;
  border-top: 1px solid var(--sx-hair);
}
.sx-page .sx-spec-file__name {
  flex: 1 1;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sx-ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* comments */
.sx-page .sx-spec-comments {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sx-page .sx-spec-comments .prod-std-lbl {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: #3d4866;
}
.sx-page .sx-spec-comments .style-textArea {
  width: 100%;
  min-height: 72px;
  padding: 8px 10px;
  font-size: 12.5px;
  resize: vertical;
}

/* narrow screens: stack the drop zone above the files */
@media (max-width: 767px) {
  .sx-page .sx-spec__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sx-page .sx-spec-drop {
    min-height: 150px;
  }
}

/* ----------parts ------------*/

/* =====================================================================
   PARTS TAB - compact toolbar + card grid
   ===================================================================== */
.sx-page .sx-parts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--sx-hair);
  border-radius: 10px;
}

/* toolbar */
.sx-page .sx-parts__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.sx-page .sx-parts__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sx-page .sx-parts__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--sx-navy);
  border-radius: 999px;
}
.sx-page .sx-parts__add {
  width: 220px;
  max-width: 100%;
}

/* grid: as many 200px+ cards as fit, no fixed height */
.sx-page .sx-parts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 8px;
  gap: 8px;
}
.sx-page .sx-parts__empty {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--sx-mut-2);
  background: #f6f9fd;
  border: 1.5px dashed #c3cfe2;
  border-radius: 8px;
}

/* part card */
.sx-page .sx-part {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--sx-hair);
  border-radius: 10px;
  overflow: hidden;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.sx-page .sx-part:hover {
  border-color: var(--sx-navy-2);
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.12);
}
.sx-page .sx-part__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 32px;
  padding: 2px 6px 2px 10px;
  background: var(--sx-head);
  border-bottom: 1px solid var(--sx-hair);
}
.sx-page .sx-part__name {
  flex: 1 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--sx-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sx-page .sx-part__actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sx-page .sx-part__del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  color: #c0392b;
  background: #fff;
  border: 1px solid #ecd3d0;
  border-radius: 6px;
  cursor: pointer;
}
.sx-page .sx-part__del:hover {
  background: #fdecec;
  border-color: #c0392b;
}

/* image area: short, the image is contained instead of stretching the card */
.sx-page .sx-part__media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  max-height: 140px;
  padding: 6px;
  overflow: hidden;
}
.sx-page .sx-part__media img {
  max-width: 100%;
  max-height: 124px;
  object-fit: contain;
}

/* =====================================================================
   R. RIGHT PANEL - LIGHT & MINIMAL  (replaces the old sections 5-13 / 13b-13d)
   ---------------------------------------------------------------------
   main tabs (underline)
   card: [component name ............ copy]
         [Tech Pack  Parts  Material  Trims ...]   underline tabs, white
         [ content on a light grey canvas, white cards ]   <- the ONE scroll
         [Save & Previous ............ Save & Next]        pinned
   No sticky table headers, no dark bands, no scroll box inside a scroll box.
   ===================================================================== */
.sx-page {
  --sx-canvas: #f5f7fa;
  --sx-comp-bg: #ffffff; /* AntDesignCollapse headerColor */
  --sx-comp-ink: #0f3460;
  --sx-line-soft: #eef1f5;
  --sx-th-bg: #f4f6f9;
  --sx-th-ink: #475467;
}

/* ---------- R1. main tabs: Component Details / Additional Details / Related Orders ---------- */
.sx-page .style-sub-main-container {
  margin: 0;
}
.sx-page .style-sub-main-container > .my-tabs-scroll:first-child {
  padding: 0;
  margin: 0 0 10px;
  background: transparent;
}
.sx-page .style-sub-main-container > .my-tabs-scroll:first-child .ant-tabs-nav {
  margin: 0;
}
.sx-page
  .style-sub-main-container
  > .my-tabs-scroll:first-child
  .ant-tabs-nav::before {
  border-bottom: 1px solid var(--sx-hair);
}
.sx-page .style-sub-main-container > .my-tabs-scroll:first-child .ant-tabs-tab {
  margin: 0 8px;
  padding: 8px 6px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--sx-mut-2);
}
.sx-page
  .style-sub-main-container
  > .my-tabs-scroll:first-child
  .ant-tabs-tab:hover {
  color: var(--sx-navy);
  background: transparent;
}
.sx-page
  .style-sub-main-container
  > .my-tabs-scroll:first-child
  .ant-tabs-tab.ant-tabs-tab-active {
  border-bottom-color: var(--sx-navy);
}
.sx-page
  .style-sub-main-container
  > .my-tabs-scroll:first-child
  .ant-tabs-tab.ant-tabs-tab-active
  .ant-tabs-tab-btn {
  color: var(--sx-navy);
  font-weight: 700;
}

/* every tab bar: no scrollbar under it; desktop wraps, phones swipe */
.sx-page .my-tabs-scroll .ant-tabs-nav-wrap {
  overflow: visible !important;
  scrollbar-width: none;
} /* FormStyles: overflow-x:auto !important */
.sx-page .my-tabs-scroll .ant-tabs-nav-wrap::-webkit-scrollbar {
  display: none;
}
.sx-page .my-tabs-scroll .ant-tabs-nav-wrap::before,
.sx-page .my-tabs-scroll .ant-tabs-nav-wrap::after {
  display: none;
}
.sx-page .my-tabs-scroll .ant-tabs-nav-list {
  flex-wrap: wrap !important;
} /* FormStyles: nowrap !important */
.sx-page .my-tabs-scroll .ant-tabs-ink-bar {
  display: none;
}

/* ---------- R2. component card ---------- */
.sx-page .custom-collapse.ant-collapse {
  background: transparent;
  border: 0;
}
.sx-page .custom-collapse > .ant-collapse-item {
  margin: 0 0 10px;
  background: #fff;
  border: 1px solid var(--sx-hair);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.sx-page .custom-collapse > .ant-collapse-item > .ant-collapse-header {
  min-height: 0;
  padding: 10px 16px 4px;
  margin: 0;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--sx-ink) !important; /* FormStyles forces white */
}
.sx-page .custom-collapse > .ant-collapse-item > .ant-collapse-header * {
  color: var(--sx-ink) !important;
}
.sx-page
  .custom-collapse
  > .ant-collapse-item
  > .ant-collapse-header
  .ant-collapse-expand-icon,
.sx-page
  .custom-collapse
  > .ant-collapse-item
  > .ant-collapse-header
  .ant-collapse-expand-icon
  * {
  color: var(--sx-mut-2) !important;
}
.sx-page
  .custom-collapse
  > .ant-collapse-item:not(.ant-collapse-item-active)
  > .ant-collapse-header {
  padding-bottom: 10px;
}
.sx-page .custom-collapse > .ant-collapse-item > .ant-collapse-header .ant-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--sx-field);
  border-radius: 8px;
  box-shadow: none;
}
.sx-page
  .custom-collapse
  > .ant-collapse-item
  > .ant-collapse-header
  .ant-btn:hover {
  border-color: var(--sx-navy);
}
.sx-page .custom-collapse > .ant-collapse-item > .ant-collapse-content {
  background: var(--sx-canvas);
  border-top: 0;
}
.sx-page
  .custom-collapse
  > .ant-collapse-item
  > .ant-collapse-content
  > .ant-collapse-content-box {
  padding: 0 16px 12px;
  background: var(--sx-canvas);
}
/* AntDesignCollapse makes antd headings white; card titles inside must stay dark */
.sx-page .custom-collapse .ant-collapse-content .ant-card-head,
.sx-page .custom-collapse .ant-collapse-content .ant-card-head-title {
  color: var(--sx-ink);
}

/* component tabs (Tech Pack / Parts / Material ...): white strip, underline */
.sx-page
  .custom-collapse
  > .ant-collapse-item
  > .ant-collapse-content
  > .ant-collapse-content-box
  > .my-tabs-scroll:first-child,
.sx-page
  .custom-collapse[style*="sx-addl"]
  .ant-collapse-content-box
  > div:first-child
  > .my-tabs-scroll:first-child {
  margin: 0 -16px 12px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--sx-hair);
  box-shadow: none;
}
.sx-page
  .custom-collapse
  .ant-collapse-content-box
  > .my-tabs-scroll:first-child
  .ant-tabs-nav,
.sx-page
  .custom-collapse[style*="sx-addl"]
  .ant-collapse-content-box
  > div:first-child
  > .my-tabs-scroll:first-child
  .ant-tabs-nav {
  margin: 0;
  padding: 0;
}
.sx-page
  .custom-collapse
  .ant-collapse-content-box
  > .my-tabs-scroll:first-child
  .ant-tabs-nav::before,
.sx-page
  .custom-collapse[style*="sx-addl"]
  .ant-collapse-content-box
  > div:first-child
  > .my-tabs-scroll:first-child
  .ant-tabs-nav::before {
  border: 0;
}
.sx-page
  .custom-collapse[style*="sx-addl"]
  .ant-collapse-content-box
  > div:first-child
  > .my-tabs-scroll:first-child
  .ant-tabs-nav-wrap {
  justify-content: flex-start !important;
}
.sx-page
  .custom-collapse
  .ant-collapse-content-box
  > .my-tabs-scroll:first-child
  .ant-tabs-tab,
.sx-page
  .custom-collapse[style*="sx-addl"]
  .ant-collapse-content-box
  > div:first-child
  > .my-tabs-scroll:first-child
  .ant-tabs-tab {
  margin: 0 20px 0 0;
  padding: 9px 0 8px;
  gap: 6px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  box-shadow: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sx-mut-2);
}
.sx-page
  .custom-collapse
  .ant-collapse-content-box
  > .my-tabs-scroll:first-child
  .ant-tabs-tab
  .ant-tabs-tab-btn,
.sx-page
  .custom-collapse[style*="sx-addl"]
  .ant-collapse-content-box
  > div:first-child
  > .my-tabs-scroll:first-child
  .ant-tabs-tab
  .ant-tabs-tab-btn {
  color: inherit;
  font-weight: inherit;
}
.sx-page
  .custom-collapse
  .ant-collapse-content-box
  > .my-tabs-scroll:first-child
  .ant-tabs-tab:hover,
.sx-page
  .custom-collapse[style*="sx-addl"]
  .ant-collapse-content-box
  > div:first-child
  > .my-tabs-scroll:first-child
  .ant-tabs-tab:hover {
  color: var(--sx-navy);
  background: transparent;
}
.sx-page
  .custom-collapse
  .ant-collapse-content-box
  > .my-tabs-scroll:first-child
  .ant-tabs-tab.ant-tabs-tab-active,
.sx-page
  .custom-collapse[style*="sx-addl"]
  .ant-collapse-content-box
  > div:first-child
  > .my-tabs-scroll:first-child
  .ant-tabs-tab.ant-tabs-tab-active {
  color: var(--sx-navy);
  background: transparent;
  border-bottom-color: var(--sx-navy);
}
.sx-page
  .custom-collapse
  .ant-collapse-content-box
  > .my-tabs-scroll:first-child
  .ant-tabs-tab.ant-tabs-tab-active
  .ant-tabs-tab-btn,
.sx-page
  .custom-collapse[style*="sx-addl"]
  .ant-collapse-content-box
  > div:first-child
  > .my-tabs-scroll:first-child
  .ant-tabs-tab.ant-tabs-tab-active
  .ant-tabs-tab-btn {
  color: var(--sx-navy);
  font-weight: 700;
}
.sx-page
  .custom-collapse
  .ant-collapse-content-box
  > .my-tabs-scroll:first-child
  .ant-tabs-tab
  svg {
  flex: none;
}

/* Additional Details: the "Additional Details" header repeats the main tab -> hidden */
.sx-page
  .custom-collapse[style*="sx-addl"]
  > .ant-collapse-item
  > .ant-collapse-header {
  display: none;
}
.sx-page
  .custom-collapse[style*="sx-addl"]
  > .ant-collapse-item
  > .ant-collapse-content
  > .ant-collapse-content-box
  > div:first-child {
  margin-top: 0 !important;
} /* inline marginTop */

/* ---------- R3. desktop: card fills the height, ONE scroll inside, Save pinned ---------- */
@media (min-width: 992px) {
  .sx-page {
    overflow: hidden;
  }
  .sx-page .sty-tbl-col > .style-sub-main-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }
  .sx-page .style-sub-main-container > * {
    flex: 0 0 auto;
  }
  .sx-page .style-sub-main-container > .custom-collapse {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .sx-page
    .style-sub-main-container
    > .custom-collapse:has(> .ant-collapse-item ~ .ant-collapse-item) {
    overflow-y: auto;
  }
  .sx-page .style-sub-main-container > .custom-collapse > .ant-collapse-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
  }
  .sx-page
    .style-sub-main-container
    > .custom-collapse
    > .ant-collapse-item-active {
    flex: 1 1;
    min-height: 360px;
  }
  .sx-page
    .style-sub-main-container
    > .custom-collapse:has(> .ant-collapse-item ~ .ant-collapse-item)
    > .ant-collapse-item-active {
    flex: 0 0 auto;
    height: calc(100vh - var(--sx-offset) - 170px);
  }
  .sx-page
    .style-sub-main-container
    > .custom-collapse
    > .ant-collapse-item-active
    > .ant-collapse-content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .sx-page
    .style-sub-main-container
    > .custom-collapse
    > .ant-collapse-item-active
    > .ant-collapse-content
    > .ant-collapse-content-box {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 0;
  }
  .sx-page .custom-collapse .ant-collapse-content-box > * {
    flex: 0 0 auto;
    min-width: 0;
  }
  /* tab strip stays on top of the scroll */
  .sx-page
    .custom-collapse
    > .ant-collapse-item
    > .ant-collapse-content
    > .ant-collapse-content-box
    > .my-tabs-scroll:first-child {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 5;
  }
  /* Save & Previous / Save & Next pinned at the bottom */
  .sx-page
    .custom-collapse
    .ant-collapse-content-box
    > .ant-divider-horizontal {
    margin: auto 0 0;
    height: 0;
    border: 0;
  }
  .sx-page
    .custom-collapse
    .ant-collapse-content-box
    > .ant-divider-horizontal
    + .ant-row {
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 12px -16px 0;
    padding: 8px 16px;
    background: #fff;
    border-top: 1px solid var(--sx-hair);
  }
  /* Related Orders (no collapse) fills the same space */
  .sx-page
    .style-sub-main-container
    > :not(.my-tabs-scroll):not(.custom-collapse) {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
  }
}
.sx-page
  .custom-collapse
  .ant-collapse-content-box
  > .ant-divider-horizontal
  + .ant-row
  .ant-btn {
  height: 32px;
}

/* ---------- R4. nothing inside a tab scrolls vertically on its own ---------- */
.sx-page .sty-tbl-col .fst-wrapper,
.sx-page .sty-tbl-col .fst-body-clip,
.sx-page .sty-tbl-col .fst-body-area,
.sx-page .sty-tbl-col .style-ob-table-container,
.sx-page .sty-tbl-col .gcf-wrapper,
.sx-page .sty-tbl-col .style-piece-container,
.sx-page .sty-tbl-col .style-garment-clr-container,
.sx-page .sty-tbl-col .style-gar-Clr-container,
.sx-page .sty-tbl-col .style-trims-container,
.sx-page .sty-tbl-col .style-tabs-inner-container,
.sx-page .sty-tbl-col .style-cad-file,
.sx-page .sty-tbl-col .style-spec-table,
.sx-page .sty-tbl-col .style-edit-spec-table,
.sx-page .sty-tbl-col .style-spec-upload-container,
.sx-page .sty-tbl-col .style-piece-table-scroll {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important; /* inline / prop vh heights */
}
.sx-page .sty-tbl-col .style-spec-upload-container {
  overflow: visible !important;
  margin: 0;
  padding: 0;
}
/* wide tables scroll sideways only */
.sx-page .sty-tbl-col .fst-body-area,
.sx-page .sty-tbl-col .style-edit-spec-table,
.sx-page .sty-tbl-col .style-piece-table-scroll,
.sx-page .sty-tbl-col .style-ob-table-container,
.sx-page .sty-tbl-col .style-garment-clr-container,
.sx-page .sty-tbl-col .style-gar-Clr-container {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
}
.sx-page .fst-floating-track {
  display: none !important;
} /* window-fixed bar that covered the Save buttons */

/* ---------- R5. cards ---------- */
.sx-page .sty-tbl-col .custom-collapse .ant-card {
  background: #fff;
  border: 1px solid var(--sx-hair);
  border-radius: 10px;
  box-shadow: none;
  overflow: hidden;
}
.sx-page .sty-tbl-col .custom-collapse .ant-card + .ant-card {
  margin-top: 12px;
}
.sx-page .sty-tbl-col .custom-collapse .ant-card > .ant-card-head {
  min-height: 44px;
  padding: 0 14px;
  background: #fff !important;
  border-bottom: 1px solid var(--sx-line-soft); /* Style.css forces a tinted head */
}
.sx-page
  .sty-tbl-col
  .custom-collapse
  .ant-card
  > .ant-card-head
  .ant-card-head-wrapper {
  gap: 8px 12px;
  flex-wrap: wrap;
}

.sx-page
  .sty-tbl-col
  .custom-collapse
  .ant-card
  > .ant-card-head
  .ant-card-head-title::before {
  display: none;
}
.sx-page
  .sty-tbl-col
  .custom-collapse
  .ant-card
  > .ant-card-head
  .ant-card-extra {
  -webkit-margin-start: auto;
          margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 0;
}
.sx-page .sty-tbl-col .custom-collapse .ant-card > .ant-card-body {
  padding: 12px 14px;
}
.sx-page .sty-tbl-col .custom-collapse .ant-card .ant-card {
  border-color: var(--sx-line-soft);
}
.sx-page .sty-tbl-col .ht-card-title,
.sx-page .sty-tbl-col .cad-card-title,
.sx-page .sty-tbl-col .fb-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.sx-page .sty-tbl-col .ht-card-title svg,
.sx-page .sty-tbl-col .cad-card-title svg,
.sx-page .sty-tbl-col .fb-card-title svg {
  color: var(--sx-navy);
}
.sx-page .sty-tbl-col .cad-count {
  background: var(--sx-th-bg);
  border: 1px solid var(--sx-hair);
  color: var(--sx-navy);
  font-weight: 700;
}
/* the existing card themes are variable-driven */
.sx-page .sty-tbl-col .fb-shell {
  --fb-navy: #101828;
  --fb-border: #e4e7ec;
  --fb-head-bg: #ffffff;
  --fb-stripe: #ffffff;
  --fb-hover: #f9fafb;
}
.sx-page .sty-tbl-col .gcf-wrapper {
  --gcf-header-bg: #ffffff;
  --gcf-header-fg: #101828;
  --gcf-border: #e4e7ec;
}
.sx-page .sty-tbl-col .cad-card {
  --cad-navy: #101828;
  --cad-border: #e4e7ec;
}

/* ---------- R6. tables ---------- */
.sx-page .sty-tbl-col table {
  border-collapse: separate;
  border-spacing: 0;
}
.sx-page .sty-tbl-col .style-edit-spec-table > table,
.sx-page .sty-tbl-col .common-table-overflow > table {
  width: 100%;
  min-width: 100%;
}
.sx-page .sty-tbl-col .style-edit-spec-table td,
.sx-page .sty-tbl-col .style-edit-spec-table th {
  white-space: nowrap;
  min-width: 64px;
}
.sx-page .sty-tbl-col .fst-body-clip,
.sx-page .sty-tbl-col .common-table-overflow,
.sx-page .sty-tbl-col .style-piece-table-scroll,
.sx-page .sty-tbl-col .style-edit-spec-table {
  border: 1px solid var(--sx-hair);
  border-radius: 8px;
  background: #fff;
}
.sx-page .sty-tbl-col .ant-card .fst-body-clip,
.sx-page .sty-tbl-col .ant-card .common-table-overflow,
.sx-page .sty-tbl-col .ant-card .style-edit-spec-table {
  border-radius: 8px;
}

/* header cells - every table flavour on this page */
.sx-page .sty-tbl-col .style-garClr-table-th,
.sx-page .sty-tbl-col .style-garClr-table-no-sticky-th,
.sx-page .sty-tbl-col .style-spec-th,
.sx-page .sty-tbl-col th.style-spec-header-span,
.sx-page .sty-tbl-col .fst-body-area table > tr:first-child > th,
.sx-page .sty-tbl-col .fst-body-area table > thead > tr > th,
.sx-page .sty-tbl-col .style-edit-spec-table th,
.sx-page .sty-tbl-col .common-table-overflow th,
.sx-page .sty-tbl-col .ant-table-wrapper .ant-table-thead > tr > th {
  position: static;
  top: auto;
  z-index: auto; /* no sticky heads (they slid over the tabs) */
  padding: 9px 10px;
  margin: 0;
  border-radius: 0;
  vertical-align: middle;
  white-space: nowrap;
  text-align: left;
  background: var(--sx-th-bg);
  color: var(--sx-th-ink);
  border: 0;
  border-bottom: 1px solid var(--sx-hair);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.sx-page .sty-tbl-col .fst-body-area table > tr:first-child {
  background: var(--sx-th-bg);
}
.sx-page .sty-tbl-col .style-spec-header-span {
  background: transparent;
  color: var(--sx-th-ink);
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  margin: 0;
}
.sx-page .sty-tbl-col .ant-table-wrapper .ant-table-thead > tr > th::before {
  display: none;
}
.sx-page .sty-tbl-col th .ant-checkbox-checked .ant-checkbox-inner {
  background-color: var(--sx-navy) !important;
  border-color: var(--sx-navy) !important;
} /* global rule is !important */
.sx-page .sty-tbl-col th sup,
.sx-page .sty-tbl-col th .aster-risk-Icon {
  color: #e5484d;
}

/* body cells */
.sx-page .sty-tbl-col .common-table-td,
.sx-page .sty-tbl-col .style-table-td-grclr,
.sx-page .sty-tbl-col .style-ob-table-td,
.sx-page .sty-tbl-col .style-ob-table-td-value,
.sx-page .sty-tbl-col .common-table-count,
.sx-page .sty-tbl-col .style-delete-td,
.sx-page .sty-tbl-col .style-spec-value-span,
.sx-page .sty-tbl-col .style-csp-alw-table-td,
.sx-page .sty-tbl-col .style-common-table-td-wdth,
.sx-page .sty-tbl-col .style-des-table-td-wdth,
.sx-page .sty-tbl-col .fst-body-area table > tr:not(:first-child) > td,
.sx-page .sty-tbl-col .common-table-row > td {
  padding: 7px 10px;
  background: #fff;
  color: #344054;
  border: 0;
  border-bottom: 1px solid var(--sx-line-soft);
  border-radius: 0;
  font-size: 11.5px;
  font-weight: 500;
  vertical-align: middle;
  border-right: 1px solid #c3d6ee;
  border-bottom: 1px solid #c3d6ee;
  border-top: 1px solid #c3d6ee;
}
.sx-page .sty-tbl-col .common-table-row.even-row > td,
.sx-page .sty-tbl-col .fst-body-area table > tr.even-row > td,
.sx-page .sty-tbl-col .fb-row-even > td {
  background: #fff;
}
.sx-page .sty-tbl-col .common-table-row:hover > td,
.sx-page .sty-tbl-col .fb-row:hover > td,
.sx-page .sty-tbl-col .fst-body-area table > tr:not(:first-child):hover > td {
  background: #f9fafb;
}
.sx-page .sty-tbl-col tr:last-child > td {
  border-bottom: 0;
}
.sx-page .sty-tbl-col .common-table-count {
  color: var(--sx-mut-2);
  font-weight: 600;
  text-align: center;
}

.sx-page .sty-tbl-col .style-flex-btn {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---------- R7. small headings, toolbars, inputs outside tables ---------- */
.sx-page .sty-tbl-col .prod-std-lbl {
  margin: 0 0 4px;
  text-indent: 0;
  font-size: 12px;
  font-weight: 600;
  color: #475467;
}
.sx-page .sty-tbl-col .common-header,
.sx-page .sty-tbl-col .style-parts-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--sx-ink);
}
.sx-page .sty-tbl-col .common-header-add-new,
.sx-page .sty-tbl-col .style-req-container,
.sx-page .sty-tbl-col .style-ob-buttons-container {
  gap: 6px 8px;
  flex-wrap: wrap;
  align-items: center;
}
.sx-page .sty-tbl-col .style-textArea,
.sx-page .sty-tbl-col textarea.ant-input,
.sx-page .sty-tbl-col .style-text-area-cad-comments {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  font-size: 12.5px;
  border: 1px solid var(--sx-field);
  border-radius: 8px;
  background: #fff;
}

/* antd bits */
.sx-page .sty-tbl-col .ant-btn {
  border-radius: 8px;
  box-shadow: none;
}
.sx-page .sty-tbl-col .ant-btn-primary:not(:disabled) {
  background: var(--sx-navy);
  border-color: var(--sx-navy);
}
.sx-page .sty-tbl-col .ant-btn-primary:not(:disabled):hover {
  background: var(--sx-navy-2);
  border-color: var(--sx-navy-2);
}
.sx-page .sty-tbl-col .ant-btn-default:not(:disabled):hover {
  border-color: var(--sx-navy);
  color: var(--sx-navy);
}
.sx-page .sty-tbl-col .ant-switch.ant-switch-checked {
  background: var(--sx-navy);
}
.sx-page .sty-tbl-col .ant-checkbox-checked .ant-checkbox-inner {
  background-color: var(--sx-navy);
  border-color: var(--sx-navy);
}
.sx-page .sty-tbl-col .ant-radio-wrapper .ant-radio-checked .ant-radio-inner {
  background-color: var(--sx-navy);
  border-color: var(--sx-navy);
}
.sx-page .sty-tbl-col .ant-tag {
  border-radius: 999px;
}
.sx-page .sty-tbl-col .ant-divider-horizontal {
  margin: 12px 0;
  border-color: var(--sx-hair);
}
.sx-page .sty-tbl-col .ant-empty-normal {
  margin: 12px 0;
}

/* segmented switchers (Tech Pack, OB, Garment colour): light track, white active */
.sx-page .sty-tbl-col .ant-segmented {
  padding: 3px;
  background: #eef1f5;
  border-radius: 8px;
}
.sx-page .sty-tbl-col .ant-segmented .ant-segmented-item {
  border-radius: 6px;
}
.sx-page .sty-tbl-col .ant-segmented .ant-segmented-item-label {
  min-height: 28px;
  line-height: 28px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sx-mut-2);
}
.sx-page .sty-tbl-col .ant-segmented .ant-segmented-thumb,
.sx-page .sty-tbl-col .ant-segmented .ant-segmented-item-selected {
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}
.sx-page
  .sty-tbl-col
  .ant-segmented
  .ant-segmented-item-selected
  .ant-segmented-item-label {
  color: var(--sx-navy);
  font-weight: 700;
}
.sx-page
  .sty-tbl-col
  .ant-segmented.ant-segmented-sm
  .ant-segmented-item-label {
  min-height: 22px;
  line-height: 22px;
  padding: 0 8px;
  font-size: 12px;
}

/* ---------- R8. Tech Pack ---------- */
.sx-page .sx-tp {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.sx-page .sx-tp .sx-tp__body {
  margin: 0;
  padding: 0;
  overflow: visible !important;
}
.sx-page .sx-tp .tech-pack-segmented.ant-segmented {
  display: inline-flex;
  margin: 0 0 12px;
}
.sx-page .sx-tp .tech-pack-segmented.ant-segmented .ant-segmented-item {
  min-width: 128px;
}
.sx-page .sx-tp .tech-pack-notification-dot {
  top: -4px;
  right: -9px;
  color: #ff4d4f;
}
.sx-page .sx-tp .sp-toolbar {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 8px;
  margin: 0;
}
.sx-page .sx-tp .sp-toolbar > .ant-col {
  padding: 0;
}
.sx-page .sx-tp .sp-actions {
  display: flex;
  gap: 6px;
}
.sx-page .sx-tp .sp-unit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 2px 10px;
  background: #fff;
  border: 1px solid var(--sx-hair);
  border-radius: 8px;
}
.sx-page .sx-tp .sp-unit-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--sx-mut-2);
}
.sx-page .sx-tp .sp-toolbar .ant-btn,
.sx-page .sx-tp .sp-actions .ant-btn {
  height: 30px;
  font-size: 12.5px;
}
.sx-page .sx-tp .ht-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sx-page .sx-tp .ht-stack > .ant-card + .ant-card {
  margin-top: 0;
}
.sx-page .sx-tp .ht-card > .ant-card-head .ant-card-head-wrapper {
  flex-wrap: nowrap;
}
.sx-page .sx-tp .ht-empty.ant-empty {
  margin: 6px 0;
}
.sx-page .sx-tp .ht-empty .ant-empty-image {
  height: 34px;
  margin-bottom: 4px;
}
.sx-page .sx-tp .ht-empty .ant-empty-image svg {
  height: 34px;
}
.sx-page .sx-tp .ht-empty .ant-empty-description {
  font-size: 12px;
  color: var(--sx-mut-2);
}
.sx-page .sx-tp .ht-comment {
  margin-top: 8px;
}
.sx-page .sx-tp .ht-comment .style-textArea {
  height: 64px;
  min-height: 48px;
  resize: vertical;
}
.sx-page .sx-tp .ht-thumb {
  border-color: var(--sx-hair);
  background: #f9fafb;
}
.sx-page .sx-tp .style-specmeasure-th {
  width: auto;
  min-width: 70px;
}
.sx-page .sx-tp .style-inner-table-header {
  flex-wrap: wrap;
  gap: 4px 6px;
}
.sx-page .sx-tp .spec-file-tabs .ant-tabs-nav {
  margin-bottom: 8px;
}
.sx-page .sx-tp .spec-file-tabs .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: var(--sx-navy);
  font-weight: 700;
}
.sx-page .sx-tp .spec-file-tabs .ant-tabs-ink-bar {
  display: block;
  background: var(--sx-navy);
}
.sx-page .sx-tp .cad-toolbar {
  gap: 8px 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--sx-line-soft);
}
.sx-page .sx-tp .cad-file-upload-box {
  border: 1px dashed #c1c9d6;
  border-radius: 8px;
  background: #f9fafb;
}
.sx-page .sx-tp .cad-file-upload-box:hover {
  border-color: var(--sx-navy);
}
/* laptops: spec table full width first, How To Measure underneath */
@media (min-width: 992px) and (max-width: 1399.98px) {
  .sx-page .sx-tp .ant-row > .ant-col-lg-8:has(.ht-stack),
  .sx-page .sx-tp .ant-row > .ant-col-lg-16:has(.sp-card) {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .sx-page .sx-tp .ant-row > .ant-col-lg-16:has(.sp-card) {
    order: -1;
  }
  .sx-page .sx-tp .ht-stack {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sx-page .sx-tp .ht-stack > .ant-card {
    flex: 1 1 300px;
  }
}

/* ---------- R9. filter bar: [category tabs ...... Added n | Deleted n] ---------- */
.sx-page .sx-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0 0 10px;
  border-bottom: 1px solid var(--sx-line-soft);
}
.sx-page .sx-filterbar.sx-filterbar--end {
  justify-content: flex-end;
  border-bottom: 0;
}
.sx-page .sx-filterbar > .ant-tabs {
  width: auto;
  min-width: 0;
}
.sx-page .sx-filterbar > .sx-cat-tabs {
  flex: 1 1 auto;
}
.sx-page .sx-filterbar > .sx-status-tabs {
  flex: 0 0 auto;
  margin-bottom: 6px;
}
.sx-page .sx-filterbar > .ant-tabs > .ant-tabs-nav {
  margin: 0;
}
.sx-page .sx-filterbar > .ant-tabs > .ant-tabs-nav::before {
  border-bottom: 0;
}
.sx-page .sx-filterbar .ant-tabs-content-holder {
  display: none;
}
.sx-page .sx-filterbar .sx-cat-tabs .ant-tabs-tab {
  margin: 0 20px 0 0;
  padding: 8px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sx-mut-2);
}
.sx-page .sx-filterbar .sx-cat-tabs .ant-tabs-tab + .ant-tabs-tab {
  margin-left: 0;
}
.sx-page .sx-filterbar .sx-cat-tabs .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: var(--sx-navy);
  font-weight: 700;
}
.sx-page .sx-filterbar .sx-cat-tabs .ant-tabs-ink-bar {
  background: var(--sx-navy);
}
.sx-page .sx-filterbar .sx-status-tabs .ant-tabs-nav-list {
  padding: 3px;
  gap: 2px;
  background: #eef1f5;
  border-radius: 8px;
}
.sx-page .sx-filterbar .sx-status-tabs .ant-tabs-tab {
  margin: 0;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sx-mut-2);
}
.sx-page .sx-filterbar .sx-status-tabs .ant-tabs-tab + .ant-tabs-tab {
  margin-left: 0;
}
.sx-page .sx-filterbar .sx-status-tabs .ant-tabs-tab-active {
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}
.sx-page .sx-filterbar .sx-status-tabs .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: var(--sx-navy);
  font-weight: 700;
}
.sx-page .sx-filterbar .sx-status-tabs .ant-tabs-ink-bar {
  display: none;
}
.sx-page .sx-filterbar .sx-status-tabs .ant-tabs-tab .ant-tag {
  margin: 0 0 0 4px;
  padding: 0 6px;
  line-height: 16px;
  font-size: 10.5px;
  font-weight: 700;
  background: #e4e7ec;
  border-color: transparent;
  color: #344054;
}
.sx-page .sx-filterbar .sx-status-tabs .ant-tabs-tab-active .ant-tag {
  background: var(--sx-navy);
  color: #fff;
}
.sx-page .sx-filterbar .sx-status-tabs .ant-tabs-nav-operations {
  display: none;
}

/* ---------- R10. scrollbars that remain: thin ---------- */
.sx-page .sty-tbl-col ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.sx-page .sty-tbl-col ::-webkit-scrollbar-track {
  background: transparent;
}
.sx-page .sty-tbl-col ::-webkit-scrollbar-thumb {
  background: #cfd5df;
  border-radius: 8px;
}
.sx-page .sty-tbl-col ::-webkit-scrollbar-thumb:hover {
  background: #98a2b3;
}

/* ---------- R11. sidebar on tablet / phone ---------- */
@media (max-width: 991.98px) {
  .sx-page .sx-side {
    height: auto;
  }
  .sx-page .sx-side .sx-form {
    max-height: none;
    overflow: visible;
  }
  .sx-page .sx-side-col {
    margin-bottom: 10px;
  }
  .sx-page .sx-side .sx-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  }
}
@media (max-width: 767.98px) {
  .sx-page .my-tabs-scroll .ant-tabs-nav-wrap {
    overflow-x: auto !important;
  }
  .sx-page .my-tabs-scroll .ant-tabs-nav-list {
    flex-wrap: nowrap !important;
  }
  .sx-page .sx-tp .tech-pack-segmented.ant-segmented {
    display: flex;
    width: 100%;
  }
  .sx-page .sx-tp .tech-pack-segmented.ant-segmented .ant-segmented-group {
    width: 100%;
  }
  .sx-page .sx-tp .tech-pack-segmented.ant-segmented .ant-segmented-item {
    flex: 1 1;
    min-width: 0;
  }
  .sx-page .sx-tp .tech-pack-segmented.ant-segmented .ant-segmented-item-label {
    white-space: normal;
    line-height: 1.15;
    padding: 4px;
  }
  .sx-page .sx-filterbar > .sx-cat-tabs {
    flex: 1 1 100%;
  }
}
@media (max-width: 575.98px) {
  .sx-page {
    padding: 4px;
  }
  .sx-page .sx-side .sx-form {
    padding: 8px 10px 12px;
  }
  .sx-page .sx-side .sx-grid {
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  }
  .sx-page
    .custom-collapse
    > .ant-collapse-item
    > .ant-collapse-content
    > .ant-collapse-content-box {
    padding: 0 10px 10px;
  }
  .sx-page
    .custom-collapse
    > .ant-collapse-item
    > .ant-collapse-content
    > .ant-collapse-content-box
    > .my-tabs-scroll:first-child {
    margin: 0 -10px 10px;
    padding: 0 10px;
  }
}

/* =====================================================================
   V2. STYLE WORKSPACE - section menu | one section at a time
   JSX: root gets .sx-v2 (main style screen only); readiness bar .sx-ready;
        section menu column .sx-nav-col; the details form column and the sections
        column get .sx-pane-on / .sx-pane-off (both stay mounted, one is shown).
   The old tab bars stay rendered (they hold the same state) but are hidden here.
   ===================================================================== */

/* ---------- readiness bar ---------- */
.sx-page .sx-ready {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin: 0 0 10px;
  background: #fff;
  border: 1px solid var(--sx-hair);
  border-radius: 10px;
  overflow: hidden;
}
.sx-page .sx-ready__sum {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 120px;
  padding: 8px 16px;
  border-right: 1px solid #eef1f5;
  border-right: 1px solid var(--sx-line-soft, #eef1f5);
}
.sx-page .sx-ready__sum span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sx-mut-2);
}
.sx-page .sx-ready__sum b {
  font-size: 17px;
  font-weight: 700;
  color: var(--sx-ink);
  line-height: 1.1;
}
.sx-page .sx-ready__sum small {
  font-size: 12px;
  font-weight: 500;
  color: #98a2b3;
}
.sx-page .sx-ready__sum i {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: #eef1f5;
  overflow: hidden;
}
.sx-page .sx-ready__sum em {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: #12805c;
}
.sx-page .sx-ready__item {
  flex: 1 1 120px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 8px 14px;
  background: #fff;
  border: 0;
  border-right: 1px solid #eef1f5;
  border-right: 1px solid var(--sx-line-soft, #eef1f5);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.sx-page .sx-ready__item:last-child {
  border-right: 0;
}
.sx-page .sx-ready__item:hover {
  background: #f9fafb;
}
.sx-page .sx-ready__item > span {
  font-size: 12px;
  font-weight: 600;
  color: #475467;
}
.sx-page .sx-ready__item > b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid;
}
.sx-page .sx-ready__item > b svg {
  width: 11px;
  height: 11px;
}
.sx-page .sx-ready__item.is-ok > b {
  color: #067647;
  background: #ecfdf3;
  border-color: #abefc6;
}
.sx-page .sx-ready__item.is-todo > b {
  color: #b54708;
  background: #fffaeb;
  border-color: #fedf89;
}

/* ---------- section menu ---------- */
.sx-page.sx-v2 .q-main-row > .ant-col.sx-nav-col {
  flex: 0 0 236px;
  max-width: 236px;
  min-width: 0;
}
.sx-page .sx-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--sx-hair);
  border-radius: 10px;
  scrollbar-width: thin;
  scrollbar-color: #cfd5df transparent;
}
.sx-page .sx-nav__comp {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 6px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid #eef1f5;
}
.sx-page .sx-nav__comp > span {
  font-size: 11px;
  font-weight: 600;
  color: #98a2b3;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sx-page .sx-nav__comp select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--sx-field);
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--sx-ink);
}
.sx-page .sx-nav__group {
  padding: 12px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  color: #98a2b3;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sx-page .sx-nav__group:first-of-type {
  padding-top: 4px;
}
.sx-page .sx-nav__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #344054;
}
.sx-page .sx-nav__item:hover {
  background: #f2f4f7;
  color: var(--sx-ink);
}
.sx-page .sx-nav__item.is-active {
  background: #eef3fb;
  color: var(--sx-navy);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--sx-navy);
}
.sx-page .sx-nav__item > svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: #667085;
}
.sx-page .sx-nav__item.is-active > svg {
  color: var(--sx-navy);
}
.sx-page .sx-nav__item > span svg {
  flex: none;
}

/* ---------- panes: one shown, both mounted ---------- */
.sx-page.sx-v2 .q-main-row > .ant-col.sx-pane-off {
  display: none;
}
.sx-page.sx-v2 .q-main-row > .ant-col.sx-pane-on {
  flex: 1 1;
  max-width: none;
  min-width: 0;
}

/* the old tab bars are driven by the menu now */
.sx-page.sx-v2 .style-sub-main-container > .my-tabs-scroll:first-child,
.sx-page.sx-v2
  .custom-collapse
  > .ant-collapse-item
  > .ant-collapse-content
  > .ant-collapse-content-box
  > .my-tabs-scroll:first-child,
.sx-page.sx-v2
  .custom-collapse[style*="sx-addl"]
  .ant-collapse-content-box
  > div:first-child
  > .my-tabs-scroll:first-child {
  display: none;
}
.sx-page.sx-v2
  .custom-collapse
  > .ant-collapse-item
  > .ant-collapse-content
  > .ant-collapse-content-box {
  padding-top: 12px;
}
.sx-page.sx-v2 .sx-hdr .sx-side-toggle {
  display: none;
}

/* ---------- Style details pane: the sidebar form with room to breathe ---------- */
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side {
  height: 100%;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-side__head {
  padding: 10px 20px;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form {
  padding: 16px 24px 24px;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-grid {
  max-width: 1180px;
  gap: 14px 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form .sx-sec {
  margin-top: 14px;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form .sx-sec__title {
  font-size: 12px;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .fp-img-uploader {
  max-width: 420px;
}

/* ---------- tablet / phone: menu becomes a swipeable strip on top ---------- */
@media (max-width: 991.98px) {
  .sx-page.sx-v2 .q-main-row {
    flex-wrap: wrap;
  }
  .sx-page.sx-v2 .q-main-row > .ant-col.sx-nav-col {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .sx-page .sx-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px;
  }
  .sx-page .sx-nav__group {
    display: none;
  }
  .sx-page .sx-nav__comp {
    flex-direction: row;
    align-items: center;
    padding: 0 8px 0 0;
    margin: 0;
    border-bottom: 0;
    border-right: 1px solid #eef1f5;
  }
  .sx-page .sx-nav__item {
    width: auto;
    flex: none;
    white-space: nowrap;
  }
  .sx-page .sx-nav__item.is-active {
    box-shadow: inset 0 -2px 0 var(--sx-navy);
  }
  .sx-page.sx-v2 .q-main-row > .ant-col.sx-pane-on {
    flex: 1 1 100%;
  }
  .sx-page .sx-ready {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .sx-page .sx-ready::-webkit-scrollbar {
    display: none;
  }
  .sx-page .sx-ready__sum,
  .sx-page .sx-ready__item {
    flex: 0 0 auto;
  }
}

/* =====================================================================
   V3. HIGHLIGHTS + FIXES on the workspace
   - section menu items: icons left, text left (labels carry their own icons)
   - Save & Previous / Save & Next always LAST in the section (some tabs, e.g. OB,
     render content after it in JSX) - flex order, no JSX change
   - colour where it means something: navy component bar, navy active menu item,
     navy-tinted table heads, navy group rows (e.g. OB part groups)
   ===================================================================== */

/* ---- menu items ---- */
.sx-page .sx-nav__item {
  justify-content: flex-start;
  gap: 8px;
}
.sx-page .sx-nav__item > span,
.sx-page .sx-nav__item > span * {
  justify-content: flex-start !important;
  text-align: left !important;
} /* tab labels carry their own flex/align rules */
/* first span = the status + section icons, last span = the name */
.sx-page .sx-nav__item > span:not(:last-child) {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sx-page .sx-nav__item > span:last-child {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sx-page .sx-nav__item > span > * {
  margin: 0 !important;
}
.sx-page .sx-nav__item svg {
  width: 14px;
  height: 14px;
}
.sx-page .sx-nav__item.is-active {
  background: var(--sx-navy);
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 52, 96, 0.25);
}
.sx-page .sx-nav__item.is-active > svg,
.sx-page .sx-nav__item.is-active > span {
  color: #fff;
}
/* keep the green tick / red cross readable on the navy item */
.sx-page .sx-nav__item.is-active > span svg {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9));
}
.sx-page .sx-nav__group {
  color: #0f3460;
  opacity: 0.55;
}

/* ---- Save bar always at the end of the section ---- */
.sx-page .custom-collapse .ant-collapse-content-box > .ant-divider-horizontal,
.sx-page
  .custom-collapse
  .ant-collapse-content-box
  > .ant-divider-horizontal
  + .ant-row {
  order: 99;
}

/* ---- component bar: the strong anchor of the page ---- */
.sx-page.sx-v2 {
  --sx-comp-bg: #0f3460;
} /* AntDesignCollapse headerColor="var(--sx-comp-bg)" (FormStyles paints it with !important) */
.sx-page.sx-v2 .custom-collapse > .ant-collapse-item > .ant-collapse-header {
  padding: 10px 16px;
  background: var(--sx-navy);
  color: #fff !important; /* FormStyles forces the colour */
}
.sx-page.sx-v2 .custom-collapse > .ant-collapse-item > .ant-collapse-header * {
  color: #fff !important;
}
.sx-page.sx-v2
  .custom-collapse
  > .ant-collapse-item
  > .ant-collapse-header
  .ant-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}
.sx-page.sx-v2
  .custom-collapse
  > .ant-collapse-item
  > .ant-collapse-header
  .ant-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
}

/* ---- card titles: navy with a small accent ---- */
.sx-page .sty-tbl-col .custom-collapse .ant-card > .ant-card-head {
  background: #f7f9fc !important;
  border-bottom: 1px solid #e3e9f2;
}
.sx-page
  .sty-tbl-col
  .custom-collapse
  .ant-card
  > .ant-card-head
  .ant-card-head-title {
  color: var(--sx-navy) !important;
}

/* ---- table heads: navy tint, navy text ---- */
.sx-page .sty-tbl-col .style-garClr-table-th,
.sx-page .sty-tbl-col .style-garClr-table-no-sticky-th,
.sx-page .sty-tbl-col .style-spec-th,
.sx-page .sty-tbl-col th.style-spec-header-span,
.sx-page .sty-tbl-col .fst-body-area table > tr:first-child > th,
.sx-page .sty-tbl-col .fst-body-area table > thead > tr > th,
.sx-page .sty-tbl-col .style-edit-spec-table th,
.sx-page .sty-tbl-col .common-table-overflow th,
.sx-page .sty-tbl-col .ant-table-wrapper .ant-table-thead > tr > th {
  background: #e9eff7;
  color: var(--sx-navy);
  border-bottom: 1px solid #cdd8e8;
  font-weight: 700;
  border-right: 1px solid #c3d6ee;
  border-bottom: 1px solid #c3d6ee;
  border-top: 1px solid #c3d6ee;
}
.sx-page .sty-tbl-col .fst-body-area table > tr:first-child,
.sx-page .sty-tbl-col table tr:has(> th) {
  background: #e9eff7;
}
.sx-page .sty-tbl-col table tr:has(> th) > th:empty {
  background: #e9eff7;
}

/* split-button chips inside a head keep a white face */
.sx-page .sty-tbl-col th .split-button .split-main-btn,
.sx-page .sty-tbl-col th .split-button .split-dropdown-btn {
  background: #fff;
}

.sx-page .sty-tbl-col .common-table-row:hover > td,
.sx-page .sty-tbl-col .fst-body-area table > tr:not(:first-child):hover > td {
  background: #f5f8fc;
}

/* ---- OB: scan type bar ---- */
.sx-page .sty-tbl-col .ob-scan-controls {
  background: #f7f9fc;
  border: 1px solid #e3e9f2;
  border-radius: 10px;
  padding: 8px 12px;
}
.sx-page .sty-tbl-col .ob-scan-label {
  color: var(--sx-navy);
  font-weight: 700;
}
.sx-page .sty-tbl-col .ob-scan-radio-group .ant-radio-wrapper {
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12.5px;
}
.sx-page
  .sty-tbl-col
  .ob-scan-radio-group
  .ant-radio-wrapper:has(.ant-radio-checked) {
  border-color: var(--sx-navy);
  background: #eef3fb;
  color: var(--sx-navy);
}

/* ---- readiness bar: a little more presence ---- */
.sx-page .sx-ready {
  border-color: #dfe6f0;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.sx-page .sx-ready__sum {
  background: #f7f9fc;
}
.sx-page .sx-ready__sum b {
  color: var(--sx-navy);
}

/* =====================================================================
   V4. SETUP + REVISE MODES
   JSX: .sx-step (setup: step header with Back / Next), .sx-rev (revise:
        version state + section finder), .sx-mark (step number in the menu),
        nav gets .is-setup / .is-revise.
   Setup  = first version being built (new / draft v1 / rejected v1).
   Revise = approved template being corrected or updated from the buyer.
   ===================================================================== */

/* ---- setup: step header ---- */
.sx-page .sx-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin: 0 0 10px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--sx-hair);
  border-radius: 10px;
  box-shadow: inset 4px 0 0 var(--sx-navy);
}
.sx-page .sx-step__main {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sx-page .sx-step__count {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sx-mut-2);
}
.sx-page .sx-step__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--sx-ink);
}
.sx-page .sx-step__hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #475467;
}

.sx-page .sx-stchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 9px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 18px;
}
.sx-page .sx-stchip svg {
  width: 11px;
  height: 11px;
}
.sx-page .sx-stchip.is-ok {
  color: #067647;
  background: #ecfdf3;
  border-color: #abefc6;
}
.sx-page .sx-stchip.is-todo {
  color: #b54708;
  background: #fffaeb;
  border-color: #fedf89;
}
.sx-page .sx-stchip.is-opt {
  color: #475467;
  background: #f2f4f7;
  border-color: #e4e7ec;
}

.sx-page .sx-step__prog {
  flex: 0 1 220px;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sx-page .sx-step__prog span {
  font-size: 12px;
  color: #475467;
}
.sx-page .sx-step__prog span b {
  font-size: 14px;
  color: var(--sx-ink);
}
.sx-page .sx-step__prog i {
  display: block;
  height: 6px;
  border-radius: 6px;
  background: #eef1f5;
  overflow: hidden;
}
.sx-page .sx-step__prog em {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: #12805c;
  transition: width 0.3s ease;
}

.sx-page .sx-step__nav {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sx-page .sx-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--sx-ink-2);
  white-space: nowrap;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
.sx-page .sx-btn svg {
  width: 11px;
  height: 11px;
}
.sx-page .sx-btn:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #98a2b3;
}
.sx-page .sx-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sx-page .sx-btn.is-primary {
  background: var(--sx-navy);
  border-color: var(--sx-navy);
  color: #fff;
}
.sx-page .sx-btn.is-primary:hover:not(:disabled) {
  background: #0a2547;
  border-color: #0a2547;
}
.sx-page .sx-btn.is-ghost {
  border-color: #fedf89;
  background: #fffaeb;
  color: #93370d;
}
.sx-page .sx-btn.is-ghost:hover:not(:disabled) {
  background: #fef0c7;
  border-color: #fec84b;
}
.sx-page .sx-btn:focus-visible {
  outline: 2px solid var(--sx-navy);
  outline-offset: 2px;
}

/* ---- setup: step numbers in the menu ---- */
.sx-page .sx-nav__item > span:last-of-type {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sx-page .sx-mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}
.sx-page .sx-mark.is-ok {
  color: #067647;
  background: #ecfdf3;
}
.sx-page .sx-mark.is-todo {
  color: #b54708;
  background: #fef0c7;
}
.sx-page .sx-mark.is-opt {
  color: #667085;
  background: #f2f4f7;
}
.sx-page .sx-nav__item.is-active .sx-mark {
  color: var(--sx-navy);
  background: #fff;
}

/* ---- revise: version state + finder ---- */
.sx-page .sx-rev {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin: 0 0 10px;
  padding: 10px 16px;
  border: 1px solid;
  border-radius: 10px;
}
.sx-page .sx-rev.is-ok {
  background: #f6fef9;
  border-color: #abefc6;
}
.sx-page .sx-rev.is-warn {
  background: #fffaeb;
  border-color: #fedf89;
}
.sx-page .sx-rev.is-wait {
  background: #eff8ff;
  border-color: #b2ddff;
}
.sx-page .sx-rev.is-bad {
  background: #fef3f2;
  border-color: #fecdca;
}
.sx-page .sx-rev__state {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.sx-page .sx-rev__state span {
  font-size: 13px;
  line-height: 1.45;
  color: #344054;
}
.sx-page .sx-rev__tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.sx-page .sx-rev.is-ok .sx-rev__tag {
  background: #067647;
}
.sx-page .sx-rev.is-warn .sx-rev__tag {
  background: #b54708;
}
.sx-page .sx-rev.is-wait .sx-rev__tag {
  background: #175cd3;
}
.sx-page .sx-rev.is-bad .sx-rev__tag {
  background: #b42318;
}

/* ---- phones / narrow tablets ---- */
@media (max-width: 991px) {
  .sx-page .sx-step {
    padding: 10px 12px;
    gap: 10px;
  }
  .sx-page .sx-step__hint {
    display: none;
  } /* keep the content in view; the title + status stay */
  .sx-page .sx-step__prog {
    flex: 1 1 100%;
    min-width: 0;
  }
  .sx-page .sx-step__nav {
    flex: 1 1 100%;
  }
  .sx-page .sx-step__nav .sx-btn {
    flex: 1 1;
    justify-content: center;
    min-width: 0;
  }
  .sx-page .sx-step__nav .sx-btn.is-ghost {
    display: none;
  }
  .sx-page .sx-step__nav .sx-btn.is-primary {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sx-page .sx-rev {
    padding: 10px 12px;
  }
  .sx-page .sx-rev__find.ant-select {
    flex: 1 1 100%;
  }
  .sx-page .sx-mark {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
  }
}

/* =====================================================================
   V5. COMPACT STYLE DETAILS (the Style details pane of the workspace)
   - 4 fields per row: buyer name + buyer style name + code on one row,
     style name + description + style type + type on the next
   - "Classification", "Production" and "Links & status" headings merge into the group above
     (JSX: .sx-sec--joined) so those fields keep flowing on the same rows
   - tighter spacing, smaller image box; 3 / 2 / 1 columns on smaller screens
   ===================================================================== */
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-side__head {
  padding: 8px 16px;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form {
  padding: 10px 16px 16px;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-grid {
  max-width: 1280px;
  gap: 8px 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* headings: one thin line per group */
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form .sx-sec {
  margin-top: 6px;
}
.sx-page.sx-v2
  .sx-side-col.sx-pane-on
  .sx-side
  .sx-form
  .sx-grid
  > .sx-sec:first-child {
  margin-top: 0;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form .sx-sec__title {
  gap: 6px;
  font-size: 10.5px;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form .sx-sec__title svg {
  width: 20px;
  height: 20px;
  padding: 4px;
  border-radius: 6px;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form .sx-sec--joined {
  display: none;
}

/* fields that used to take a whole row now take one cell */
.sx-page.sx-v2
  .sx-side-col.sx-pane-on
  .sx-side
  .sx-grid
  > .sx-span-all:not(.sx-sec) {
  grid-column: span 1;
}
.sx-page.sx-v2
  .sx-side-col.sx-pane-on
  .sx-side
  .sx-grid
  > .sx-span-all:has(.fp-img-uploader) {
  grid-column: span 2;
}

/* field: label + control, tighter */
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-field {
  gap: 1px;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form .sx-label {
  min-height: 18px;
  font-size: 11px;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form .sx-checks {
  gap: 6px;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form .sx-checks > .ant-row {
  flex: 1 1 140px;
}

/* style image: smaller drop box */
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .fp-img-uploader {
  max-width: none;
  min-height: 84px;
  padding: 6px;
}
.sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form .style-img-holder {
  max-height: 110px;
}

@media (max-width: 1199.98px) {
  .sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 767.98px) {
  .sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form {
    padding: 10px 12px 14px;
  }
  .sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
  }
}
@media (max-width: 479.98px) {
  /* phones keep 2 per row; wide fields (buyer, checks, image) take the full row */
  .sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-grid {
    gap: 6px 8px;
  }
  .sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-grid > .sx-sec:first-child + .sx-span-all, /* buyer name */
  .sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-grid > .sx-span-all.sx-checks,
  .sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-grid > .sx-span-all:has(.fp-img-uploader) {
    grid-column: 1 / -1;
  }
}
@media (max-width: 339.98px) {
  .sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- V5b: style image in the right-hand column ----
   Desktop: column 4 holds the image (from the buyer row down); the two checkboxes
   follow Link Type in the normal flow. Tablet: same with 3 columns. Phones: unchanged.
   Rows have no row-gap (spacing is a margin on each field) so the tall right-hand
   column never adds empty space. */
@media (min-width: 768px) {
  .sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-grid {
    row-gap: 0;
  }
  .sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-grid > .ant-col {
    margin-bottom: 8px;
  }
  .sx-page.sx-v2
    .sx-side-col.sx-pane-on
    .sx-side
    .sx-grid
    > .sx-span-all.sx-sec {
    grid-column: 1 / span 3;
  }
  /* "Team & production" starts below the image, full width (JSX: .sx-sec--full) */
  .sx-page.sx-v2
    .sx-side-col.sx-pane-on
    .sx-side
    .sx-grid
    > .sx-span-all.sx-sec.sx-sec--full {
    grid-column: 1 / -1;
  }
  .sx-page.sx-v2
    .sx-side-col.sx-pane-on
    .sx-side
    .sx-grid
    > .sx-span-all:has(.fp-img-uploader) {
    grid-column: 4;
    grid-row: 1 / span 6;
    align-self: stretch; /* buyer + style rows */
    display: flex;
    flex-direction: column;
    margin-top: 26px; /* lines the image label up with the Buyer Name label */
  }
  /* the drop box grows to fill down to the checkboxes */
  .sx-page.sx-v2
    .sx-side-col.sx-pane-on
    .sx-side
    .sx-grid
    > .sx-span-all:has(.fp-img-uploader)
    > :not(.sx-label) {
    flex: 1 1 auto;
  }
  /* Status + Garment colourwise: the cell right after Link Type, side by side */
  .sx-page.sx-v2
    .sx-side-col.sx-pane-on
    .sx-side
    .sx-grid
    > .sx-span-all.sx-checks {
    grid-column: span 1;
    align-self: end;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .sx-page.sx-v2
    .sx-side-col.sx-pane-on
    .sx-side
    .sx-form
    .sx-checks
    > .ant-row {
    flex: 1 1;
    min-width: 0;
  }
  .sx-page.sx-v2
    .sx-side-col.sx-pane-on
    .sx-side
    .sx-form
    .sx-checks
    .sx-label {
    white-space: normal;
    line-height: 1.2;
  }
  .sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .fp-img-uploader {
    min-height: 150px;
  }
  .sx-page.sx-v2 .sx-side-col.sx-pane-on .sx-side .sx-form .style-img-holder {
    max-height: 140px;
  }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
  .sx-page.sx-v2
    .sx-side-col.sx-pane-on
    .sx-side
    .sx-grid
    > .sx-span-all.sx-sec {
    grid-column: 1 / span 2;
  }
  .sx-page.sx-v2
    .sx-side-col.sx-pane-on
    .sx-side
    .sx-grid
    > .sx-span-all:has(.fp-img-uploader) {
    grid-column: 3;
    grid-row: 1 / span 8;
  }
}

/* =====================================================================
   V6. MENU RAIL + GROUPS, SHOW-DELETED, SLIM MATERIAL CARDS, TABLE GRID, HEADER FLAGS
   JSX: nav .sx-nav__top (title + .sx-nav__rail-btn), .sx-nav__sec(.is-closed) >
        button.sx-nav__group + .sx-nav__item (> i.sx-nav__ico + span.sx-nav__lbl),
        nav.is-rail = icons only (names in a tooltip); label.sx-showdel;
        header .sx-chip--flag(.is-on/.is-off); step chips .sx-stchip
   ===================================================================== */

/* ---- menu header: title + collapse button ---- */
.sx-page .sx-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 4px 6px 10px;
}
.sx-page .sx-nav__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--sx-ink);
}
.sx-page .sx-nav__rail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  background: #fff;
  border: 1px solid var(--sx-line);
  border-radius: 7px;
  color: var(--sx-mut);
  cursor: pointer;
}
.sx-page .sx-nav__rail-btn:hover {
  background: #f2f4f7;
  color: var(--sx-navy);
}
.sx-page .sx-nav__rail-btn svg {
  width: 16px;
  height: 16px;
}

/* ---- groups fold ---- */
.sx-page .sx-nav__sec {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sx-page .sx-nav__sec > .sx-nav__group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 10px 4px;
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  opacity: 0.75;
}
.sx-page .sx-nav__top + .sx-nav__sec > .sx-nav__group,
.sx-page .sx-nav__comp + .sx-nav__sec > .sx-nav__group {
  padding-top: 4px;
}
.sx-page .sx-nav__sec > .sx-nav__group:hover {
  opacity: 1;
}
.sx-page .sx-nav__chev {
  width: 9px;
  height: 9px;
  transform: rotate(90deg);
  transition: transform 0.15s ease;
}
.sx-page .sx-nav__sec.is-closed > .sx-nav__group .sx-nav__chev {
  transform: rotate(0deg);
}
.sx-page .sx-nav__item.is-hid {
  display: none;
}

/* ---- items: icons in a fixed slot so every name starts at the same x ---- */
.sx-page .sx-nav__ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: 36px;
  font-style: normal;
  color: #667085;
}
.sx-page .sx-nav__ico > span {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
} /* icon spans carry inline styles */
.sx-page .sx-nav__item.is-active .sx-nav__ico {
  color: #fff;
}
.sx-page .sx-nav__item.is-active .sx-nav__ico svg {
  filter: none;
}

/* ---- rail: icons only, names on hover (tooltip) ---- */
.sx-page.sx-v2 .q-main-row > .ant-col.sx-nav-col:has(.sx-nav.is-rail) {
  flex: 0 0 64px;
  max-width: 64px;
}
.sx-page .sx-nav.is-rail {
  padding: 8px 6px;
}
.sx-page .sx-nav.is-rail .sx-nav__top {
  justify-content: center;
  padding: 2px 0 8px;
}
.sx-page .sx-nav.is-rail .sx-nav__title,
.sx-page .sx-nav.is-rail .sx-nav__comp,
.sx-page .sx-nav.is-rail .sx-nav__lbl {
  display: none;
}
.sx-page .sx-nav.is-rail .sx-nav__sec > .sx-nav__group {
  height: 1px;
  padding: 0;
  margin: 6px 8px;
  background: var(--sx-line);
  border-radius: 0;
  pointer-events: none;
}
.sx-page .sx-nav.is-rail .sx-nav__sec > .sx-nav__group > * {
  display: none;
}
.sx-page .sx-nav.is-rail .sx-nav__item {
  justify-content: center;
  padding: 6px 0;
}
.sx-page .sx-nav.is-rail .sx-nav__ico {
  width: auto;
  justify-content: center;
}

/* ---- phones / tablets: the menu is a strip, no folding ---- */
@media (max-width: 991.98px) {
  .sx-page.sx-v2 .q-main-row > .ant-col.sx-nav-col:has(.sx-nav.is-rail) {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .sx-page .sx-nav__top {
    display: none;
  }
  .sx-page .sx-nav__sec {
    display: contents;
  }
  .sx-page .sx-nav__sec > .sx-nav__group {
    display: none;
  }
  .sx-page .sx-nav__item.is-hid {
    display: flex;
  }
  .sx-page .sx-nav.is-rail .sx-nav__lbl {
    display: block;
  }
  .sx-page .sx-nav.is-rail .sx-nav__comp {
    display: flex;
  }
  .sx-page .sx-nav__ico {
    width: auto;
  }
}

/* ---- top bar: Save & Previous (moved up from the bottom) ---- */
.sx-page .sx-btn.is-prev {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
}
.sx-page .sx-btn.is-prev:hover:not(:disabled) {
  background: #ccfbf1;
  border-color: #5eead4;
}
.sx-page .sx-rev .sx-step__nav {
  flex: 0 0 auto;
}
@media (max-width: 991px) {
  .sx-page .sx-btn__more {
    display: none;
  } /* phones: just "Save & Next" */
}

/* ---- "Show deleted" (replaces the Added / Deleted tabs) ---- */
.sx-page .sx-showdel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  margin: 0 0 6px;
  background: #fff;
  border: 1px solid var(--sx-line);
  border-radius: 7px;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--sx-mut);
}
.sx-page .sx-showdel input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #d92d20;
  cursor: pointer;
}
.sx-page .sx-showdel:has(input:checked) {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
}
.sx-page .sx-filterbar > .sx-showdel {
  flex: 0 0 auto;
}

/* ---- material / trims / embellishment: no box inside the box ---- */
.sx-page.sx-v2 .sty-tbl-col .fb-shell {
  padding: 0;
}
.sx-page.sx-v2 .sty-tbl-col .style-piece-container {
  margin: 0;
}
.sx-page.sx-v2 .sty-tbl-col .custom-collapse .ant-card.fb-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
.sx-page.sx-v2
  .sty-tbl-col
  .custom-collapse
  .ant-card.fb-card
  > .ant-card-head {
  min-height: 40px;
  padding: 0 2px;
}
.sx-page.sx-v2
  .sty-tbl-col
  .custom-collapse
  .ant-card.fb-card
  > .ant-card-body {
  padding: 8px 0 0 !important;
} /* JSX bodyStyle is inline */

/* ---- tables: light grid on every section table ---- */
.sx-page.sx-v2
  .sty-tbl-col
  :is(
    .common-table-overflow,
    .fst-body-area,
    .style-edit-spec-table,
    .style-piece-table-scroll,
    .gcf-wrapper
  )
  :is(th, td) {
  border-right: 1px solid #edf0f5;
}
.sx-page.sx-v2
  .sty-tbl-col
  :is(
    .common-table-overflow,
    .fst-body-area,
    .style-edit-spec-table,
    .style-piece-table-scroll,
    .gcf-wrapper
  )
  :is(th, td):last-child {
  border-right: 0;
}
.sx-page.sx-v2
  .sty-tbl-col
  :is(
    .common-table-overflow,
    .fst-body-area,
    .style-edit-spec-table,
    .style-piece-table-scroll,
    .gcf-wrapper
  )
  td {
  border-bottom: 1px solid #edf0f5;
}
.sx-page.sx-v2
  .sty-tbl-col
  :is(
    .common-table-overflow,
    .fst-body-area,
    .style-edit-spec-table,
    .style-piece-table-scroll,
    .gcf-wrapper
  )
  tr:last-child
  > td {
  border-bottom: 0;
}
.sx-page.sx-v2
  .sty-tbl-col
  :is(
    .common-table-overflow,
    .fst-body-area,
    .style-edit-spec-table,
    .style-piece-table-scroll,
    .gcf-wrapper
  )
  tr:hover
  > td {
  background-color: #f8fafd;
}
.sx-page.sx-v2
  .sty-tbl-col
  :is(
    .fst-body-clip,
    .common-table-overflow,
    .style-piece-table-scroll,
    .style-edit-spec-table
  ) {
  border-color: #e3e8ef;
}

/* ---- header: unit + garment colourwise ---- */
.sx-page .sx-hdr .sx-chip--flag svg {
  width: 12px;
  height: 12px;
  flex: none;
}
.sx-page .sx-hdr .sx-chip--flag.is-on {
  color: #067647;
  background: #ecfdf3;
  border-color: #abefc6;
}
.sx-page .sx-hdr .sx-chip--flag.is-off {
  color: var(--sx-mut);
}

/* =====================================================================
   V7. MENU POLISH, TABLE GRID, DELETED ROWS
   JSX: menu item = i.sx-nav__ico + span.sx-nav__lbl + i.sx-nav__st(.is-ok/.is-todo);
        group header gets em.sx-nav__cnt ("2/3", .is-done); rows shown through
        "Show deleted" get tr.sx-row-del
   ===================================================================== */

/* ---- menu: one status mark on the right instead of the circles in the icons ---- */
.sx-page .sx-nav__ico [style*="border-radius: 50%"] {
  display: none !important;
} /* the ✓/✗ circles from the tab definitions carry an inline display */
.sx-page .sx-nav__ico {
  width: 18px;
  justify-content: center;
}
.sx-page .sx-nav__ico svg {
  width: 15px;
  height: 15px;
}
.sx-page .sx-nav__item > span.sx-nav__lbl {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sx-page .sx-nav__st {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  font-style: normal;
}
.sx-page .sx-nav__st.is-ok svg {
  width: 13px;
  height: 13px;
  color: #12b76a;
}
.sx-page .sx-nav__st.is-todo::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f79009;
  box-shadow: 0 0 0 3px #fef0c7;
}
.sx-page .sx-nav__item.is-active .sx-nav__st.is-ok svg {
  color: #6ce9a6;
}
.sx-page .sx-nav__item.is-active .sx-nav__st.is-todo::before {
  background: #fdb022;
  box-shadow: 0 0 0 3px rgba(253, 176, 34, 0.25);
}

/* ---- menu: calmer groups ---- */
.sx-page .sx-nav {
  gap: 0;
  padding: 8px 8px 10px;
}
.sx-page .sx-nav__sec + .sx-nav__sec {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #f0f2f5;
}
.sx-page .sx-nav__sec > .sx-nav__group {
  gap: 8px;
  padding: 8px 10px 6px;
  opacity: 1;
  color: #667085;
}
.sx-page .sx-nav__sec > .sx-nav__group > span {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
}
.sx-page .sx-nav__sec > .sx-nav__group:hover {
  background: #f8f9fb;
  color: var(--sx-navy);
}
.sx-page .sx-nav__cnt {
  flex: none;
  padding: 0 7px;
  border-radius: 999px;
  background: #f2f4f7;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 18px;
  color: #475467;
  letter-spacing: 0;
}
.sx-page .sx-nav__cnt.is-done {
  background: #ecfdf3;
  color: #067647;
}
.sx-page .sx-nav__item {
  gap: 10px;
  min-height: 34px;
  padding: 6px 10px;
  margin: 1px 0;
  color: #344054;
}
.sx-page .sx-nav__item:hover {
  background: #f2f5fa;
  color: var(--sx-ink);
}
.sx-page .sx-nav__item.is-active:hover {
  background: var(--sx-navy);
  color: #fff;
}

/* ---- rail: icons only, no ticks / counts ---- */
.sx-page .sx-nav.is-rail .sx-nav__st,
.sx-page .sx-nav.is-rail .sx-nav__cnt {
  display: none;
}
.sx-page .sx-nav.is-rail .sx-nav__sec + .sx-nav__sec {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.sx-page .sx-nav.is-rail .sx-nav__ico svg {
  width: 17px;
  height: 17px;
}
@media (max-width: 991.98px) {
  .sx-page .sx-nav__sec + .sx-nav__sec {
    margin: 0;
    padding: 0;
    border: 0;
  }
  .sx-page .sx-nav__item {
    margin: 0;
  }
}

/* ---- tables: light grid on every section table ---- */
.sx-page.sx-v2 .sty-tbl-col .style-sub-main-container table {
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: #fff;
}
.sx-page.sx-v2 .sty-tbl-col .style-sub-main-container table {
  border-collapse: collapse; /* prevents double (2px) lines between cells */
  border-spacing: 0;
}

/* Header: slightly darker so it is visible on the blue-grey background */
.sx-page.sx-v2 .sty-tbl-col .style-sub-main-container table th {
  border-right: 1px solid #c3d6ee;
  border-bottom: 1px solid #c3d6ee;
  border-top: 1px solid #c3d6ee;
}

/* Body: lighter so it does not look heavy on white */
.sx-page.sx-v2 .sty-tbl-col .style-sub-main-container table td {
  border-right: 1px solid #e3edf9;
  border-bottom: 1px solid #e3edf9;
  border-top: none; /* the previous row's bottom border already covers this */
  white-space: wrap;
}
.sx-page.sx-v2 .sty-tbl-col .style-sub-main-container table th {
  border-bottom-color: #e4e9f0;
}
.sx-page.sx-v2
  .sty-tbl-col
  .style-sub-main-container
  table
  tr
  > :is(th, td):last-child {
  border-right: 0;
}
.sx-page.sx-v2 .sty-tbl-col .style-sub-main-container table tr:last-child > td {
  border-bottom: 0;
}
/* the scroll boxes around the tables no longer draw a second frame */
.sx-page.sx-v2
  .sty-tbl-col
  .style-sub-main-container
  :is(
    .fst-body-clip,
    .common-table-overflow,
    .style-piece-table-scroll,
    .style-edit-spec-table
  ) {
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* ---- deleted rows shown alongside the active ones ---- */
.sx-page.sx-v2 .sty-tbl-col .style-sub-main-container tr.sx-row-del > td,
.sx-page.sx-v2 .sty-tbl-col .style-sub-main-container tr.sx-row-del:hover > td {
  background: #fef6f5;
  color: #98a2b3;
}
.sx-page.sx-v2
  .sty-tbl-col
  .style-sub-main-container
  tr.sx-row-del
  > td:first-child {
  box-shadow: inset 3px 0 0 #f04438;
}

/* =====================================================================
   V8. HEADER, ONE SECTION CARD, SPEC COMMENTS RIGHT, HOW-TO-MEASURE ACCORDION,
       ADD-PART CARD, CARD-HEADER FILTERS, MENU SUB SECTIONS
   JSX: .sx-chip--wide, .sx-card-extra, .sx-acc(.is-open) > .sx-acc__head,
        .sx-part--add (.sx-part__addbody, .sx-part__new), .sx-clr-shell,
        .sx-nav__subs > .sx-nav__sub(.is-on)
   ===================================================================== */

/* ---- header: every button the same size, smaller text ---- */
.sx-page .sx-hdr .stl-hdr__group--actions {
  gap: 8px;
}
.sx-page .sx-hdr .ant-btn {
  height: 30px;
  padding: 0 12px;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
.sx-page .sx-hdr .ant-btn.ant-btn-icon-only {
  width: 30px;
  padding: 0;
}
.sx-page .sx-hdr .ant-btn svg {
  width: 13px;
  height: 13px;
}
.sx-page .sx-hdr .ant-space-compact > .ant-btn {
  padding: 0 10px;
}
.sx-page .sx-hdr .ant-space-compact > .ant-btn.ant-dropdown-trigger,
.sx-page .sx-hdr .ant-space-compact > .ant-btn:last-child:not(:first-child) {
  width: 28px;
  padding: 0;
}
.sx-page .sx-hdr .stl-hdr__tags-toggle,
.sx-page .sx-hdr .stl-hdr__group:not(.stl-hdr__group--actions) {
  height: 30px;
  font-size: 12px;
}
/* style summary chips */
.sx-page .sx-hdr .sx-hdr-summary {
  gap: 6px;
}
.sx-page .sx-hdr .sx-chip {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.sx-page .sx-hdr .sx-chip.sx-chip--wide {
  max-width: 320px;
}

/* ---- one outer card for every section: the component panel itself ---- */
.sx-page.sx-v2
  .sty-tbl-col
  .custom-collapse
  .ant-collapse-content
  > .ant-collapse-content-box {
  padding: 12px 14px 14px;
}
.sx-page.sx-v2
  .sty-tbl-col
  :is(.fb-shell, .sx-parts, .sx-clr-shell, .style-piece-container) {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.sx-page.sx-v2 .sty-tbl-col .sx-spec {
  padding: 15px;
  border: 0;
  border-radius: 0;
}

/* ---- spec files: comments on the right ---- */
@media (min-width: 992px) {
  .sx-page .sx-spec {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(214px, 350px);
    grid-auto-rows: -webkit-min-content;
    grid-auto-rows: min-content;
    grid-column-gap: 16px;
    column-gap: 16px;
    grid-row-gap: 10px;
    row-gap: 10px;
    align-items: start;
  }
  .sx-page .sx-spec > :not(.sx-spec-comments) {
    grid-column: 1;
  }
  .sx-page .sx-spec > .sx-spec-comments {
    grid-column: 2;
    grid-row: 1 / span 3;
  }
  .sx-page .sx-spec > .sx-spec-comments textarea {
    min-height: 175px;
  }
}

/* ---- how to measure: two collapsible cards, one open at a time ---- */
.sx-page .sx-acc:not(.is-open) > .ant-card-body {
  display: none;
}
.sx-page .sx-acc:not(.is-open) > .ant-card-head {
  border-bottom: 0;
}
.sx-page .sx-acc__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--sx-ink);
  text-align: left;
  white-space: normal;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.sx-page .sx-acc__head .sx-acc__chev,
.sx-page .sx-ht-active-group > svg {
  flex-shrink: 0;
}
.sx-page .sx-acc__chev {
  width: 10px;
  height: 10px;
  color: var(--sx-mut);
  transition: transform 0.15s ease;
}
.sx-page .sx-acc.is-open .sx-acc__chev {
  transform: rotate(90deg);
}
.sx-page .ht-stack {
  gap: 10px;
}

/* Add part container */
.sx-part--add {
  background: #f7f9fc;
  border: 1px solid #d8e3ef;
  border-radius: 9px;
  padding: 0px;
  min-width: 220px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Header */
.sx-part--add .sx-part__head {
  display: flex;
  align-items: center;
  /* padding-bottom: 9px; */
  border-bottom: 1px solid #dce6f0;
  border-radius: 10px 10px 0px 0px;
}

.sx-part--add .sx-part__name {
  color: #0f3460;
  font-size: 13px;
  font-weight: 600;
}

/* Add body */
.sx-part--add .sx-part__addbody {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Select */

/* Create new part button */
.sx-part--add .sx-part__new {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px dashed #8ba8c7;
  border-radius: 6px;
  background: #edf3f9;
  color: #0f3460;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sx-part--add .sx-part__new:hover:not(:disabled) {
  background: #e1ebf6;
  border-color: #527da8;
  color: #0f3460;
}

.sx-part--add .sx-part__new:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- material / trims / embellishment: "Show deleted" beside Request ---- */
.sx-page .sx-card-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.sx-page .sx-card-extra > .sx-showdel {
  margin: 0;
}

/* ---- menu: category sub sections under Trims / Embellishments ---- */
.sx-page .sx-nav__subs {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0 0 4px 27px;
  padding-left: 10px;
  border-left: 1px solid #e4e7ec;
}
.sx-page .sx-nav__subs.is-hid {
  display: none;
}
.sx-page .sx-nav__sub {
  position: relative;
  padding: 4px 8px;
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #667085;
  text-align: left;
}
.sx-page .sx-nav__sub:hover {
  background: #f2f5fa;
  color: var(--sx-ink);
}
.sx-page .sx-nav__sub.is-on {
  color: var(--sx-navy);
  font-weight: 700;
  background: #eef3fa;
}
.sx-page .sx-nav__sub.is-on::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 5px;
  bottom: 5px;
  width: 2px;
  border-radius: 2px;
  background: var(--sx-navy);
}
@media (max-width: 991.98px) {
  .sx-page .sx-nav__subs {
    display: none;
  }
}

/* =====================================================================
   V9. ONE CARD PER SECTION
   JSX: .sx-sec-card wraps every section of a component; sections without their
        own title row get .sx-sec-card__head (icon + name). Material / Trims /
        Embellishment (.fb-card header) and Parts (.sx-parts__bar) use the same
        header look. Menu: trims / embellishment categories are normal items.
   ===================================================================== */

/* the component panel is a soft grey surface, the section sits on it as a card */
.sx-page.sx-v2
  .sty-tbl-col
  .custom-collapse
  .ant-collapse-content
  > .ant-collapse-content-box {
  padding: 12px;
  background: #f4f6f9;
}

/* one header look for every section */
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card__head,
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card .sx-parts__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 35px;
  margin: 0 -12px 11px;
  padding: 0 14px;
  background: #fafbfd;
  border-bottom: 1px solid #edf0f5;
  border-radius: 10px 10px 0 0;
}
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card__title,
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card .fb-card-title,
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card .style-parts-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--sx-ink);
}
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card__ico {
  display: inline-flex;
  align-items: center;
  font-style: normal;
  color: var(--sx-navy);
}
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card__ico svg {
  width: 16px;
  height: 16px;
}
/* the ✓/✗ circles of the tab definitions (inline display) are not needed in the title */
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card__ico [style*="border-radius: 50%"] {
  display: none !important;
}
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card__title .anticon,
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card__title svg {
  vertical-align: middle;
}

/* material / trims / embellishment: the card is the section card, no second frame */
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card .ant-card.fb-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card .ant-card.fb-card > .ant-card-head {
  display: flex;
  align-items: center;
  min-height: 46px;
  margin: 0 -14px 14px;
  padding: 0 14px;
  background: #fafbfd;
  border-bottom: 1px solid #edf0f5;
  border-radius: 10px 10px 0 0;
}
.sx-page.sx-v2
  .sty-tbl-col
  .sx-sec-card
  .ant-card.fb-card
  > .ant-card-head
  .ant-card-head-wrapper {
  width: 100%;
}
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card .ant-card.fb-card > .ant-card-body {
  padding: 0 !important;
} /* JSX bodyStyle is inline */

/* parts toolbar is the header of the parts card */
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card .sx-parts__bar {
  justify-content: space-between;
}

/* sections that already start with their own small title row keep it under the header */
.sx-page.sx-v2
  .sty-tbl-col
  .sx-sec-card
  > :is(.sx-tp, .sx-spec, .sx-clr-shell) {
  margin-top: 0;
}

@media (max-width: 767.98px) {
  .sx-page.sx-v2
    .sty-tbl-col
    .custom-collapse
    .ant-collapse-content
    > .ant-collapse-content-box {
    padding: 8px;
  }
  .sx-page.sx-v2 .sty-tbl-col .sx-sec-card {
    padding: 0 10px 10px;
  }
  .sx-page.sx-v2 .sty-tbl-col .sx-sec-card__head,
  .sx-page.sx-v2 .sty-tbl-col .sx-sec-card .ant-card.fb-card > .ant-card-head,
  .sx-page.sx-v2 .sty-tbl-col .sx-sec-card .sx-parts__bar {
    margin: 0 -10px 10px;
    padding: 0 10px;
  }
}

/* =====================================================================
   V10. GUIDED TOURS (antd Tour, rootClassName="sx-tour" lands on the panel itself)
   ===================================================================== */
.ant-tour.sx-tour {
  width: 400px;
  max-width: calc(100vw - 32px);
}
.ant-tour.sx-tour .ant-tour-content {
  border-radius: 12px;
}
.ant-tour.sx-tour .ant-tour-inner {
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.18);
}
.ant-tour.sx-tour .ant-tour-header {
  padding: 14px 16px 4px;
}
.ant-tour.sx-tour .ant-tour-title {
  font-size: 15px;
  font-weight: 700;
  color: #101828;
}
.ant-tour.sx-tour .ant-tour-description {
  padding: 4px 16px 8px;
  font-size: 13px;
  line-height: 1.55;
  color: #344054;
}
.ant-tour.sx-tour .sx-tour-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ant-tour.sx-tour .sx-tour-list li::marker {
  color: #0f3460;
}
.ant-tour.sx-tour .sx-tour-list b {
  color: #0f3460;
  font-weight: 700;
}
.ant-tour.sx-tour .ant-tour-footer {
  padding: 8px 16px 14px;
}
.ant-tour.sx-tour .ant-tour-indicator-active {
  background: #0f3460;
}
.ant-tour.sx-tour .ant-tour-buttons .ant-btn-primary {
  background: #0f3460;
  border-color: #0f3460;
}
.ant-tour.sx-tour .ant-tour-buttons .ant-btn-primary:hover {
  background: #0a2547;
  border-color: #0a2547;
}
/* many steps: indicators become small dots that wrap */
.ant-tour.sx-tour .ant-tour-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-width: 200px;
}
.ant-tour.sx-tour .ant-tour-indicator {
  width: 6px;
  height: 6px;
  margin: 0;
}

/* =====================================================================
   V11. SAME CARD HEIGHT FOR EVERY SECTION + T&A TABLE
   JSX: .sx-sec-card (component sections), style-level sections are the
        antd .ant-card inside the panel; TandA.js wraps its table in .sx-tanda
   ===================================================================== */

/* the section card always fills the panel: empty sections look the same as
   full ones, longer content still scrolls inside the panel */
@media (min-width: 992px) {
  .sx-page.sx-v2
    .sty-tbl-col
    .custom-collapse
    .ant-collapse-content-box
    > :is(.sx-sec-card, .ant-card) {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
  }
  .sx-page.sx-v2
    .sty-tbl-col
    .custom-collapse
    .ant-collapse-content-box
    > .ant-card
    > .ant-card-body {
    flex: 1 0 auto;
  }
}
/* style-level sections use the same card look as component sections */
.sx-page.sx-v2
  .sty-tbl-col
  .custom-collapse
  .ant-collapse-content-box
  > .ant-card {
  border: 1px solid #e1e6ef;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
.sx-page.sx-v2
  .sty-tbl-col
  .custom-collapse
  .ant-collapse-content-box
  > .ant-card
  > .ant-card-head {
  min-height: 46px;
  background: #fafbfd;
  border-bottom: 1px solid #edf0f5;
  border-radius: 10px 10px 0 0;
}

/* ---- T&A table: one row height, no gaps between rows ---- */
.sx-page .sx-tanda {
  width: 100%;
  min-width: 0;
}
.sx-page .sx-tanda table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.sx-page .sx-tanda tr {
  margin: 0;
}
.sx-page .sx-tanda :is(th, td) {
  height: 46px;
  padding: 6px 8px;
  vertical-align: middle;
  box-sizing: border-box;
  border-right: 1px solid #edf1f6;
  border-bottom: 1px solid #edf1f6;
  background-clip: padding-box;
}
.sx-page .sx-tanda tr > :is(th, td):last-child {
  border-right: 0;
}
.sx-page .sx-tanda tbody tr:last-child > td {
  border-bottom: 0;
}
.sx-page .sx-tanda tbody tr > td {
  background-color: #fff;
}
.sx-page .sx-tanda tbody tr:hover > td {
  background-color: #f8fafd;
}
.sx-page .sx-tanda th {
  background-color: #eef2f8;
  background-color: var(--sx-th-bg, #eef2f8);
  font-weight: 700;
  white-space: nowrap;
}
/* row being dragged keeps its look */
.sx-page .sx-tanda tr[data-rbd-draggable-id] > td {
  background-color: #fff;
}

/* step / handle columns */
.sx-page .sx-tanda td:first-child,
.sx-page .sx-tanda th:first-child {
  width: 72px;
  white-space: nowrap;
}

/* Departments filter above the table */
.sx-page.sx-v2 .sty-tbl-col .ta-toolbar {
  margin: 0 0 12px;
  align-items: flex-end;
}

/* =====================================================================
   V12. TECH PACK CARDS: SAME HEIGHT, MENUS NOT CLIPPED, EMPTY STATE
   ===================================================================== */

/* split-button menus (Spec Edit / Spec Excel Upload / Image Annotation…) open
   inside the card: let them show instead of cutting them at the card edge */
.sx-page .sx-tp .ht-card {
  overflow: visible;
}
.sx-page .sx-tp .ht-card > .ant-card-head {
  border-radius: 12px 12px 0 0;
}
.sx-page .sx-tp .ht-card > .ant-card-body {
  border-radius: 0 0 12px 12px;
}
.sx-page .sx-tp .ht-card .ant-card-extra {
  position: relative;
  z-index: 5;
}

/* side-by-side cards in Tech pack are always the same height */
.sx-page .sx-tp .ant-row {
  align-items: stretch;
}
.sx-page .sx-tp .ant-row > .ant-col:has(> .ht-card),
.sx-page .sx-tp .ant-row > .ant-col:has(> .ht-stack) {
  display: flex;
  flex-direction: column;
}
.sx-page .sx-tp .ant-row > .ant-col > .ht-card,
.sx-page .sx-tp .ant-row > .ant-col > .ht-stack {
  flex: 1 1 auto;
}
/* wide screens (side by side): the last how-to-measure card fills down to
   the spec card's height; laptops keep their own row layout */
@media (min-width: 1400px) {
  .sx-page .sx-tp .ht-stack > .ht-card:last-child {
    flex: 1 1 auto;
  }
}
.sx-page .sx-tp .ht-card {
  display: flex;
  flex-direction: column;
}
.sx-page .sx-tp .ht-card > .ant-card-body {
  flex: 1 1 auto;
}

/* spec measurement: same body height with or without a spec */
.sx-page .sx-tp .sp-card > .ant-card-body {
  min-height: 260px;
}
.sx-page .sx-tp .sp-table-area {
  flex: 1 1 auto;
}
.sx-page .sx-tp .sp-table-area:not(:has(table)) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border: 1.5px dashed #c9d3e1;
  border-radius: 8px;
  background: #fafbfd;
}
.sx-page .sx-tp .sp-table-area:not(:has(table))::after {
  content: "No spec measurements yet. Use Spec Excel Upload, or Spec Edit to enter them.";
  max-width: 340px;
  padding: 0 16px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #667085;
  text-align: center;
}

@media (max-width: 991.98px) {
  .sx-page .sx-tp .sp-card > .ant-card-body {
    min-height: 200px;
  }
  .sx-page .sx-tp .sp-table-area:not(:has(table)) {
    min-height: 160px;
  }
}

/* =====================================================================
   14. HEADER - two rows (must stay LAST in the file)
   row 1: toggle + logo + title ........ controls
   row 2: full-length chips (wrap, never truncated)
   row 3: active requests (only when open)
   ===================================================================== */
.sx-page .sx-hdr.sx-hdr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 6px 12px;
  margin: 0 0 4px;
  border-radius: 12px;
}

/* brand wrapper disappears so its children can sit on different rows */
.sx-page .sx-hdr .stl-hdr__brand {
  display: contents;
}

/* ---- row 1 left ---- */
.sx-page .sx-hdr .sx-side-toggle {
  order: 1;
  width: 28px;
  height: 28px;
}
.sx-page .sx-hdr .stl-hdr__logo {
  order: 1;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: none;
}
.sx-page .sx-hdr .stl-hdr__heading {
  order: 1;
  flex: none;
}
.sx-page .sx-hdr .stl-hdr__title {
  font-size: 16px;
}
.sx-page .sx-hdr .stl-hdr__subtitle,
.sx-page .sx-hdr:has(.sx-hdr-summary) .stl-hdr__subtitle {
  display: none;
}

/* ---- row 1 right: all controls on one line ---- */
.sx-page .sx-hdr .stl-hdr__right {
  order: 2;
  flex: 0 0 auto;
  width: auto;
  margin-left: auto;
  flex-wrap: nowrap;
  gap: 8px;
}
.sx-page .sx-hdr .stl-hdr__group,
.sx-page .sx-hdr .stl-hdr__group--actions {
  flex-wrap: nowrap;
}
.sx-page .sx-hdr .stl-hdr__group:not(.stl-hdr__group--actions) {
  height: 28px;
  padding: 0 10px;
}
.sx-page .sx-hdr .stl-hdr__tags-toggle {
  height: 28px !important;
  padding: 0 10px;
}
.sx-page .sx-hdr .stl-hdr__tags-count {
  min-width: 18px;
  height: 18px;
}
.sx-page .sx-hdr .ant-btn {
  height: 28px !important;
  min-width: 28px;
  padding: 0 10px;
}
.sx-page .sx-hdr .ant-btn.ant-btn-icon-only {
  width: 28px;
  padding: 0;
}
.sx-page .sx-hdr .stl-hdr__group--actions {
  padding-left: 10px;
}
.sx-page .sx-hdr .stl-hdr__meta {
  padding-left: 0;
}

/* Summary container */
.sx-page .sx-hdr .sx-hdr-summary {
  order: 3;
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  padding: 7px 0 2px;
  border-top: 1px solid #dce5ef;
}

/* Individual groups */
.sx-page .sx-hdr .sx-summary-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: 7px 11px;
  background: #f7f9fc;
  border: 1px solid #dce5ef;
  border-radius: 7px;
}

/* Group heading */
.sx-page .sx-hdr .sx-summary-group__title {
  color: #0f3460;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.55px;
}

/* Values inside group */
.sx-page .sx-hdr .sx-summary-group__items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  min-width: 0;
}

/* Individual text values */
.sx-page .sx-hdr .sx-summary-item {
  min-width: 0;
  max-width: 240px;
  color: #40546b;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.sx-page .sx-hdr .sx-summary-item b {
  color: #263e59;
  font-weight: 650;
  margin-right: 3px;
}

/* Configuration status */
.sx-page .sx-hdr .sx-summary-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
}

.sx-page .sx-hdr .sx-summary-status b {
  color: #40546b;
}

.sx-page .sx-hdr .sx-summary-status.is-on {
  color: #238653;
}

.sx-page .sx-hdr .sx-summary-status.is-off {
  color: #788697;
}

/* Responsive */
@media (max-width: 768px) {
  .sx-page .sx-hdr .sx-summary-group {
    flex: 1 1 100%;
  }

  .sx-page .sx-hdr .sx-summary-item {
    max-width: 100%;
  }
}

/* ---- row 3: active requests, only takes space when open ---- */
.sx-page .sx-hdr .stl-hdr__tags-wrap {
  order: 4;
  flex: 1 1 100%;
  margin-top: -6px;
}
.sx-page .sx-hdr .stl-hdr__tags-wrap.is-open {
  margin-top: 0;
}
.sx-page .sx-hdr .stl-hdr__tags-inner {
  padding-top: 5px;
  gap: 6px;
}
.sx-page .sx-hdr .stl-hdr__tags-inner::before {
  font-size: 10px;
}
.sx-page .sx-hdr .stl-hdr-tag {
  padding: 1px 9px;
  font-size: 11px;
}

/* ---- narrow screens: controls drop under the title ---- */
@media (max-width: 1100px) {
  .sx-page .sx-hdr .stl-hdr__right {
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
@media (max-width: 767px) {
  .sx-page .sx-hdr .stl-hdr__right {
    justify-content: flex-start;
  }
  .sx-page .sx-hdr .stl-hdr__meta {
    position: static;
  }
} /* =====================================================================
   15. COLLAPSE TOGGLE - labelled pill, placed after the title
   (must stay LAST in the file)
   ===================================================================== */

/* new order on row 1: logo + title | toggle | ...... controls */
.sx-page .sx-hdr .sx-side-toggle {
  order: 2;
  width: auto;
  height: 28px;
  margin-left: 4px;
  padding: 0 12px 0 9px;
  gap: 6px;
  display: inline-flex;
  align-items: center;
  color: var(--sx-accent);
  background: var(--sx-accent-soft);
  border: 1px dashed var(--sx-accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.sx-page .sx-hdr .stl-hdr__right {
  order: 3;
}
.sx-page .sx-hdr .sx-hdr-summary {
  order: 4;
}
.sx-page .sx-hdr .stl-hdr__tags-wrap {
  order: 5;
}

/* text label comes from CSS, based on the current state */
.sx-page .sx-hdr .sx-side-toggle::after {
  content: "Hide details";
}
.sx-page .sx-hdr .sx-side-toggle[aria-pressed="true"]::after {
  content: "Show details";
}

.sx-page .sx-hdr .sx-side-toggle:hover {
  background: #e3e6f7;
  border-style: solid;
  border-color: var(--sx-accent);
}

.sx-page.sx-v2 .sty-tbl-col .sx-sec-card {
  position: relative;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid #d5dfeb;
  border-radius: 11px;
  box-shadow:
    0 2px 5px rgba(15, 52, 96, 0.04),
    0 5px 14px rgba(15, 52, 96, 0.035);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.sx-page.sx-v2 .sty-tbl-col .sx-sec-card:hover {
  border-color: #b7c9dc;
  box-shadow:
    0 3px 8px rgba(15, 52, 96, 0.07),
    0 7px 18px rgba(15, 52, 96, 0.045);
}

/* Card section heading */
.sx-page.sx-v2 .sty-tbl-col .sx-sec-card .sx-sec-head {
  padding-bottom: 0px;
  margin-bottom: 0px;
  border-bottom: 1px solid #e5ebf3;
  color: #0f3460;
  font-weight: 650;
}
/* ==========================================================================
   StyleOb / OBComponent – Operation Bulletin styling
   Everything here is scoped to the OB table (.style-table-ob) or the OB
   toolbar, so shared classes (common-table-row, common-header-add-new,
   prod-std-txt, style-select-user, style-fab-color-select) keep their
   normal look on every other screen.
   ========================================================================== */

:root {
  --ob-ink: #1f2933;
  --ob-ink-soft: #52606d;
  --ob-line: #d9e0e7;
  --ob-line-strong: #b8c2cc;
  --ob-surface: #ffffff;
  --ob-surface-alt: #f5f7fa;
  --ob-head: #e8edf3;
  --ob-accent: #0f6f83;
  --ob-accent-soft: #e0f1f4;
  --ob-danger: #c0392b;
  --ob-danger-soft: #fdecea;
  --ob-radius: 6px;
  --ob-row-h: 40px;
  --ob-font-size: 12.5px;
}

/* ---------- Scroll wrappers ---------- */

.sx-ob-scroll {
  overflow: auto;
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-color: #b8c2cc transparent;
  scrollbar-color: var(--ob-line-strong) transparent;
}

.style-ob-table-container-modal {
  overflow: auto;
  padding-right: 2px;
}

/* ---------- Top toolbar (OB select + SMV total) ---------- */

.style-select-user:has(.approval-select) {
  min-width: 260px;
}

input.style-fab-color-select[readonly] {
  width: 120px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
  background: #f5f7fa;
  background: var(--ob-surface-alt);
}

/* ---------- Per-OB block: scan controls ---------- */

.ob-scan-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 6px;
  padding: 8px 12px;
  background: #f5f7fa;
  background: var(--ob-surface-alt);
  border: 1px solid #d9e0e7;
  border: 1px solid var(--ob-line);
  border-left: 3px solid #0f6f83;
  border-left: 3px solid var(--ob-accent);
  border-radius: 6px;
  border-radius: var(--ob-radius);
}

.ob-scan-options {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.ob-scan-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #1f2933;
  color: var(--ob-ink);
}

.ob-scan-radio-group {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ob-scan-radio-group .ant-radio-wrapper {
  margin: 0;
  font-size: 12.5px;
  color: #52606d;
  color: var(--ob-ink-soft);
}

.ob-scan-radio-group .ant-radio-wrapper-checked {
  color: #1f2933;
  color: var(--ob-ink);
  font-weight: 500;
}

.ob-delete-button.ant-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 6px;
  border-radius: var(--ob-radius);
  background: transparent;
  transition: background 0.15s ease;
}

.ob-delete-button.ant-btn:hover {
  background: #fdecea;
  background: var(--ob-danger-soft);
}

/* ---------- The table ---------- */

.style-table-ob {
  width: 100%;
  min-width: 2300px; /* 23 columns – keeps inputs readable, scroll handles overflow */
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  font-size: var(--ob-font-size);
  color: #1f2933;
  color: var(--ob-ink);
  background: #ffffff;
  background: var(--ob-surface);
  border: 1px solid #d9e0e7;
  border: 1px solid var(--ob-line);
  border-radius: 6px;
  border-radius: var(--ob-radius);
}

/* OB title row (first header row) */
.style-table-ob thead tr:first-child th {
  padding: 8px 10px;
  background: #ffffff;
  background: var(--ob-surface);
  border-bottom: 1px solid #d9e0e7;
  border-bottom: 1px solid var(--ob-line);
  font-size: 13.5px;
  font-weight: 700;
  text-align: left;
  color: black;
}

.style-table-ob thead tr:nth-child(2) th {
  padding: 8px 8px;
  background: #e8edf3;
  background: var(--ob-head);
  border-bottom: 2px solid #b8c2cc;
  border-bottom: 2px solid var(--ob-line-strong);
  border-right: 1px solid #d9e0e7;
  border-right: 1px solid var(--ob-line);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  vertical-align: bottom;
  color: #1f2933;
  color: var(--ob-ink);
  white-space: normal;
}

.style-header-tip {
  cursor: help;
}

.style-table-ob .common-header-add-new {
  display: flex;
  align-items: center;
  gap: 4px;
}

.style-table-ob .common-header-add-new label,
.style-table-ob thead label {
  font-size: 11.5px;
  font-weight: 600;
}

/* ---------- Body rows ---------- */

.style-ob-table-td,
.style-ob-table-td-value {
  padding: 4px 6px;
}

/* Numeric inputs line up nicely */
.style-ob-table-td-value input {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* Inputs / selects fill their cell */
.style-table-ob .ant-select,
.style-table-ob .ant-input,
.style-table-ob .ant-input-affix-wrapper {
  width: 100%;
}

.style-table-ob .prod-std-txt,
input.style-fab-color-select[readonly] {
  font-size: 12.5px;
  font-size: var(--ob-font-size);
}

.style-table-ob .ant-input,
.style-table-ob .ant-select-selector {
  border-radius: 4px !important;
  border-color: #d9e0e7 !important;
  border-color: var(--ob-line) !important;
  background: #ffffff !important;
  background: var(--ob-surface) !important;
}

.style-table-ob .ant-input:hover,
.style-table-ob
  .ant-select:not(.ant-select-disabled):hover
  .ant-select-selector {
  border-color: #0f6f83 !important;
  border-color: var(--ob-accent) !important;
}

.style-table-ob .ant-input:focus,
.style-table-ob .ant-select-focused .ant-select-selector {
  border-color: #0f6f83 !important;
  border-color: var(--ob-accent) !important;
  box-shadow: 0 0 0 2px rgba(15, 111, 131, 0.18) !important;
}

/* ---------- Column widths (23 columns) ----------
   1 drag | 2 delete | 3 SI | 4 scan | 5 parts | 6 operation | 7 category
   8 machine | 9 spec | 10 smv | 11 tgt | 12 planned | 13 manpower | 14 grade
   15 spi | 16 seam | 17 needle thread | 18 looper | 19 needle size
   20 guide | 21 mmt | 22 cost | 23 remarks                              */

.style-table-ob thead tr:nth-child(2) th:nth-child(1),
.style-table-ob .common-table-row td:nth-child(1) {
  width: 34px;
  min-width: 34px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(2),
.style-table-ob .common-table-row td:nth-child(2) {
  width: 44px;
  min-width: 44px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(3),
.style-table-ob .common-table-row td:nth-child(3) {
  width: 56px;
  min-width: 56px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(4),
.style-table-ob .common-table-row td:nth-child(4) {
  width: 84px;
  min-width: 84px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(5),
.style-table-ob .common-table-row td:nth-child(5) {
  width: 200px;
  min-width: 200px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(6),
.style-table-ob .common-table-row td:nth-child(6) {
  width: 200px;
  min-width: 200px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(7),
.style-table-ob .common-table-row td:nth-child(7) {
  width: 170px;
  min-width: 170px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(8),
.style-table-ob .common-table-row td:nth-child(8) {
  width: 170px;
  min-width: 170px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(9),
.style-table-ob .common-table-row td:nth-child(9) {
  width: 190px;
  min-width: 190px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(n + 10):nth-child(-n + 14),
.style-table-ob .common-table-row td:nth-child(n + 10):nth-child(-n + 14) {
  width: 92px;
  min-width: 92px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(15),
.style-table-ob .common-table-row td:nth-child(15) {
  width: 80px;
  min-width: 80px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(16),
.style-table-ob .common-table-row td:nth-child(16) {
  width: 110px;
  min-width: 110px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(17),
.style-table-ob .common-table-row td:nth-child(17),
.style-table-ob thead tr:nth-child(2) th:nth-child(18),
.style-table-ob .common-table-row td:nth-child(18) {
  width: 180px;
  min-width: 180px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(19),
.style-table-ob .common-table-row td:nth-child(19) {
  width: 100px;
  min-width: 100px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(20),
.style-table-ob .common-table-row td:nth-child(20),
.style-table-ob thead tr:nth-child(2) th:nth-child(21),
.style-table-ob .common-table-row td:nth-child(21) {
  width: 150px;
  min-width: 150px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(22),
.style-table-ob .common-table-row td:nth-child(22) {
  width: 90px;
  min-width: 90px;
}
.style-table-ob thead tr:nth-child(2) th:nth-child(23),
.style-table-ob .common-table-row td:nth-child(23) {
  width: 220px;
  min-width: 220px;
}

/* ---------- Drag & drop (react-beautiful-dnd) ----------
   While dragging, rbd switches the <tr> to position: fixed, which makes
   cells collapse. display:table keeps the cell widths intact.
   Needs the 2-line JSX tweak described in the notes (is-dragging class). */

.style-table-ob .common-table-row.is-dragging {
  display: table;
  background: #ffffff;
  background: var(--ob-surface);
  box-shadow: 0 8px 24px rgba(31, 41, 51, 0.22);
  outline: 2px solid #0f6f83;
  outline: 2px solid var(--ob-accent);
  outline-offset: -1px;
  opacity: 0.97;
}

/* ---------- Add-row button ---------- */

.ob-add-btn {
  display: flex;
  justify-content: flex-start;
  padding: 8px 4px 16px;
}

/* ---------- Layout-planning button in the OB title row ---------- */

.style-table-ob thead tr:first-child .ant-btn {
  font-size: 12px;
}

/* ---------- Accessibility ---------- */

.style-table-ob :focus-visible {
  outline: 2px solid #0f6f83;
  outline: 2px solid var(--ob-accent);
  outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .style-table-ob .common-table-row,
  .ob-delete-button.ant-btn {
    transition: none;
  }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 768px) {
  .ob-scan-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .style-select-user:has(.approval-select),
  .style-select-user .approval-select {
    min-width: 0;
    width: 100%;
  }
}

/* ---------- Buyer code entry table ---------- */
.sx-page .bce-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  background: #fff;
}

.sx-page .bce-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.sx-page .bce-table .bce-size-col {
  width: 140px;
  min-width: 140px;
}

/* Color column stays visible while scrolling sideways */
.sx-page .bce-table .bce-color-col {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 2;
  width: 180px;
  min-width: 180px;
  text-align: left;
  font-weight: 600;
  box-shadow: 1px 0 0 #c3d6ee;
}

.sx-page .bce-table tbody .bce-color-col {
  background: #fff;
}
.sx-page .bce-table tbody tr:hover .bce-color-col {
  background: #f5f8fc;
}

/* header: checkbox + size label on one line */
.sx-page .bce-th-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}
.sx-page .bce-table thead .bce-size-col {
  text-align: center;
}

/* inputs fill the cell */
.sx-page .bce-table td .ant-input,
.sx-page .bce-table td input {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

/* hide number spinners so the code is not clipped */
.sx-page .bce-table input[type="number"]::-webkit-outer-spin-button,
.sx-page .bce-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.sx-page .bce-table input[type="number"] {
  -moz-appearance: textfield;
}
/* Common select height */
.sx-select.ant-select {
  width: 100%;
  height: 24px !important;
  line-height: 24px !important;
}

/* Single and multiple selector */
.sx-select.ant-select .ant-select-selector {
  height: 24px !important;
  min-height: 24px !important;
}

.fab-process-default {
  display: flex;
  margin: 25px 0 0 5px;
}
.spec-input-container {
  margin: 10px 0 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-column-gap: 10px;
  column-gap: 10px;
}

@media only screen and (max-width: 1025px) {
  .fabric-details-container {
    height: 400px;
    overflow: auto;
    position: fixed;
    top: 100px;
  }
  .fabric-process-loss-td {
    border-radius: 2px;
    text-align: center;
    min-width: 3vw;
    background: #ffffff;
    border: 1px solid #f8f2f2;
    border-radius: 2px;
  }
}
.fab-default-img {
  display: block;
  margin: auto;
  opacity: 0.6;
  height: 40vh;
}

.fab-clr-list {
  border-radius: 2px;
  margin: 4px;
  box-shadow:
    rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;
}
.fab-process-input-wrapper {
  display: block;
  width: 20vw;
}
.fab-clr-desc {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.fabric-details-container {
  position: absolute;
  top: 87px;
}

.fab-clr-lbl {
  white-space: pre-line;
  width: 60px;
}
.spec-dim-popup-container {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  grid-template-columns: 20% 20% 20% 20%;
}

.fab-yarn-table-input {
  min-width: 14vw;
  padding: 0 3px 0 0;
}

.fabric-colorWise-Loss {
  display: flex;
  justify-content: center;
  height: 300px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 0 0 0;
}

.fab-buyer-table-td {
  border-radius: 2px;
  text-align: center;
  min-width: 20vw;
  background: #f6f6f6;
  text-align: left;
  padding: 0 0 0 5px;
}
.td-del-btn {
  min-width: 3vw;
  border-spacing: 5px;
  border-radius: 5px;
  text-align: center;
}

.fabric-knitting-seg-container {
  margin: 10px 0 0 0;
}

.fabric-img {
  height: 97px;
  width: 150px;
}

.fabric-file-uploader {
  border: 2px dashed #ccc;
  text-align: center;
  height: 138px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fab-clr-table-container {
  display: flex;
  justify-content: end;
}

.fabric-file-input-label {
  height: 200px;
}

.fabric-process-loss-td {
  border-radius: 2px;
  text-align: center;
  min-width: 3vw;
  max-width: 5vw;
  background: #ffffff;
  border: 1px solid #f8f2f2;
  border-radius: 2px;
}
.fab-process-display-container {
  max-height: 50px;
  overflow-x: hidden;
}
.fabric-file-name {
  font-size: 11px;
}

.fabric-inner-container {
  margin: 10px 0 0 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.fabric-buyer-input {
  width: 22%;
}
.fabric-suppliers-del-btn {
  display: flex;
  justify-content: right;
  align-items: center;
  gap: 15px;
}

.fabric-edit-color-other {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1%;
}
.common-header-height {
  height: 10px;
}
.number-td-width-fab {
  border-radius: 2px;
  text-align: center;
  width: 10vw;
  background: #f6f6f6;
  border: 1px solid #f8f2f2;
  border-radius: 2px;
}
.select-td-width-fab {
  border-radius: 2px;
  text-align: center;
  width: 25vw;
  background: #ffffff;
  border: 1px solid #f8f2f2;
  border-radius: 2px;
}
.pop-confirm-fab-width {
  width: 300px;
}
.fab-color-tbl-th {
  width: 20vw;
}

/* css for fabric color component */
.fabric-color-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.fabric-color-box {
  flex: 1 1 1;
  box-sizing: border-box;
  padding: 20px;
  text-align: center;
  max-height: 50vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .fabric-color-box {
    flex: 1 1 1;
  }
}

.fabric-payment-terms {
  height: 40vh;
  overflow-y: auto;
  overflow-x: hidden;
}
/* ══════════════════════════════════════════════════════
   FABRIC MANAGEMENT — DESIGN SYSTEM
   Clean, modern, professional UI
══════════════════════════════════════════════════════ */

/* ── Page background ── */
.fab-page {
  background: #f0f2f5;
  min-height: 100vh;
}

/* ══════════════════════════════════════════
   FILTER BAR
══════════════════════════════════════════ */
.fab-filter-bar {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e8ecf0;
  padding: 12px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ══════════════════════════════════════════
   TOOLBAR ROW  (status cards + pagination + toggle)
══════════════════════════════════════════ */
.fab-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e8ecf0;
  padding: 8px 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.fab-toolbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

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

/* ══════════════════════════════════════════
   CARD SHELL
══════════════════════════════════════════ */
.fab-card {
  border-radius: 12px;
  border: 1px solid #e8ecf0;
  overflow: hidden;
  height: 100%;
  background: #ffffff;
  transition:
    box-shadow 0.22s ease,
    transform 0.22s ease,
    border-color 0.22s ease;
}

.fab-card:hover {
  box-shadow: 0 8px 28px rgba(22, 119, 255, 0.12);
  border-color: #91caff;
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════
   HORIZONTAL BODY  (image-left | content-right)
══════════════════════════════════════════ */
.fab-card-body {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
}

/* ── LEFT — image panel ── */
.fab-img-panel {
  width: 130px;
  min-width: 130px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab-img-panel::after {
  content: "";
  position: absolute;
  inset: 0;

  pointer-events: none;
}

.fab-img-panel svg,
.fab-img-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* vertical colour accent bar */
.fab-img-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;

  z-index: 2;
}

/* ── badges on image ── */
.fab-img-badges {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 8px;
  display: flex;
  flex-direction: row;
  gap: 5px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.fab-edit-center-val {
  display: flex;
  align-self: center;
  justify-content: center;
  align-items: center;
}

.fab-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  border-width: 1px;
  border-style: solid;
  white-space: nowrap;
  max-width: 126px;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  line-height: 1.6;
  letter-spacing: 0.2px;
  width: -webkit-fit-content;
  width: fit-content;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.fab-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 20px;
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(249, 240, 255, 0.94);
  color: #531dab;
  border: 1px solid #d3adf7;
  width: -webkit-fit-content;
  width: fit-content;
  letter-spacing: 0.2px;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ── RIGHT — content panel ── */
.fab-content-panel {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 9px 13px;
  border-left: 1px solid #f0f2f5;
}

/* ── Top bar: code + type ── */
.fab-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.fab-code-text {
  font-family: "SF Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: #0f3460;
  letter-spacing: 0.4px;
  white-space: nowrap;
  line-height: 1.6;
}

.fab-type-tag {
  border-radius: 20px;
  font-size: 9.5px;
  font-weight: 600;
  margin: 0;
  padding: 0 8px;
  line-height: 18px;
  flex-shrink: 0;
  letter-spacing: 0.2px;
}

.fab-no-type-tag {
  border-radius: 20px;
  font-size: 9.5px;
  font-weight: 500;
  margin: 0;
  padding: 0 8px;
  line-height: 18px;
  background: #f5f5f5;
  color: #bfbfbf;
  border: 1px solid #e8e8e8;
  flex-shrink: 0;
}

/* ── Fabric name ── */
.fab-card-name {
  font-size: 12px;
  font-weight: 600;
  color: #0f3460;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 34px;
}

/* ── Divider ── */
.fab-divider {
  margin: 6px 0;
  border-color: #f0f2f5;
}

/* ══════════════════════════════════════════
   FIELDS GRID  (2-column)
══════════════════════════════════════════ */
.fab-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 5px 10px;
  gap: 5px 10px;
  flex: 1 1;
}

.fab-field {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}

.fab-field-icon {
  color: #b0b8c4;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-top: 3px;
}

.fab-field-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1;
}

.fab-field-label {
  font-size: 10.5px;
  color: #7a818c;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 17px;
}

.fab-field-value {
  font-size: 11px;
  font-weight: 500;
  color: #2c3450;
  line-height: 1.35;
  white-space: nowrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fab-field-value-mono {
  font-family: "SF Mono", "Fira Code", monospace;
  color: #0f3460;
  font-size: 10.5px;
}

.fab-field-empty {
  color: #d0d5dd;
  font-weight: 400;
  font-style: italic;
  font-size: 10px;
}

/* ══════════════════════════════════════════
   METRICS + PROCESS ROW
══════════════════════════════════════════ */
.fab-metrics-process-row {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.fab-metric-pill {
  display: inline-flex;
  flex-direction: column;
  background: #f8fafc;
  border-radius: 7px;
  padding: 3px 8px;
  border: 1px solid #e8ecf0;
  min-width: 42px;
  flex-shrink: 0;
}

.fab-metric-pill-label {
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a0a8b4;
  line-height: 1.1;
  font-weight: 600;
}

.fab-metric-pill-value {
  font-size: 12px;
  font-weight: 700;
  color: #0f3460;
  line-height: 1.3;
}

.fab-metric-pill-value--empty {
  color: #d0d5dd;
  font-weight: 400;
  font-size: 11px;
}

.fab-process-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1 1;
}

/* ══════════════════════════════════════════
   FOOTER  (dates + actions)
══════════════════════════════════════════ */
.fab-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 2px;
}

.fab-dates {
  display: flex;
  align-items: center;
  gap: 5px;
}

.fab-date-chip {
  display: flex;
  flex-direction: column;
}

.fab-date-chip-label {
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #b0b8c4;
  line-height: 1.1;
  font-weight: 600;
  white-space: nowrap;
}

.fab-date-chip-value {
  font-size: 10.5px;
  font-weight: 600;
  color: #4a5568;
  line-height: 1.4;
  display: -webkit-box;
  text-overflow: ellipsis;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: wrap;
}

.fab-date-sep {
  color: #d0d5dd;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ── Action Buttons ── */
.fab-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.fab-btn-edit {
  border-radius: 7px;
  font-size: 11px;
  height: 27px;
  font-weight: 600;
  padding: 0 10px;
  border-color: #0f3460;
  color: #0f3460;
  background: #ffffff;
  transition: all 0.18s;
}

.fab-btn-edit:hover {
  background: #0f3460 !important;
  color: #fff !important;
}

.fab-copy {
  border-radius: 7px;
  height: 27px !important;
  width: 27px !important;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8c8c8c;
  border-color: #e8ecf0;
  background: #f8fafc;
  transition: all 0.18s;
}

.fab-copy:hover {
  border-color: #0f3460 !important;
  color: #0f3460 !important;
  background: #f9f0ff !important;
}

/* ══════════════════════════════════════════
   LEFT SIDEBAR
══════════════════════════════════════════ */
.fab-sidebar-card {
  border-radius: 12px;
  border: 1px solid #e8ecf0;
  overflow: hidden;
  height: 100%;
}

.common-sub-title {
  font-size: 11.5px;
  color: #4a5568;
  cursor: pointer;
  line-height: 1.35;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  display: block;
  transition: color 0.15s;
}

.fab-sidebar-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #a0a8b4;
  padding: 4px 8px 6px;
  border-bottom: 1px solid #f0f2f5;
  margin-bottom: 4px;
}

/* ── Placeholder ── */
.common-lbl-placeholder {
  color: #c8d0dc;
  font-style: italic;
  font-weight: 400;
  font-family: inherit;
  font-size: 10px;
}

.common-card-container {
  padding-top: 0;
}

/* ══════════════════════════════════════════
   TABLE STATUS TAG
══════════════════════════════════════════ */
.fab-table-status-tag {
  border-radius: 20px;
  font-weight: 700;
  font-size: 10.5px;
  padding: 0 9px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  letter-spacing: 0.2px;
}

.fab-table-name {
  display: block;
  font-weight: 500;
  color: #2c3450;
}

.fab-table-code {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: #0f3460;
  background: #e6f4ff;
  padding: 1px 7px;
  border-radius: 5px;
  border: 1px solid #bae0ff;
}

/* ══════════════════════════════════════════
   INLINE STATUS ROW (inside card image-meta)
══════════════════════════════════════════ */
.fab-inline-status {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  justify-content: space-between;
  padding-top: 5px;
}

/* ══════════════════════════════════════════
   VERTICAL CARD VIEW (3rd view) — fab-vc-*
   All classes prefixed to avoid conflicts
══════════════════════════════════════════ */
.fab-vc-card {
  border-radius: 12px;
  border: 1px solid #e8ecf0;
  overflow: hidden;
  height: 100%;
  background: #ffffff;
  transition:
    box-shadow 0.22s ease,
    transform 0.22s ease,
    border-color 0.22s ease;
}
.fab-vc-card:hover {
  box-shadow: 0 8px 28px rgba(22, 119, 255, 0.12);
  border-color: #91caff;
  transform: translateY(-2px);
}

/* Image zone */
.fab-vc-img-zone {
  display: flex;
  gap: 10px;
  padding: 10px 11px;
  align-items: flex-start;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}
.fab-vc-img-wrap {
  width: 100px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ebebeb;
}
.fab-vc-img-wrap svg,
.fab-vc-img-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.fab-vc-img-meta {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 1px;
  min-width: 0;
}
.fab-vc-inline-st {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.fab-images {
  padding-top: 50px;
}
.fab-icon {
  margin-top: 10px;
}

/* Badges */
.fab-vc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 9.5px;
  font-weight: 700;
  border: 1px solid;
  white-space: nowrap;
  line-height: 1.5;
  width: -webkit-fit-content;
  width: fit-content;
}
.fab-vc-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
  background: #f9f0ff;
  color: #531dab;
  border: 1px solid #d3adf7;
  width: -webkit-fit-content;
  width: fit-content;
  line-height: 1.5;
}
.fab-vc-type-tag {
  border-radius: 20px;
  font-size: 9.5px;
  font-weight: 600;
  margin: 0;
  padding: 2px 8px;
  line-height: 18px;
  width: -webkit-fit-content;
  width: fit-content;
}
.fab-vc-no-type-tag {
  border-radius: 20px;
  font-size: 9.5px;
  margin: 0;
  padding: 0 8px;
  line-height: 18px;
  background: #f5f5f5;
  color: #bfbfbf;
  border: 1px solid #e8e8e8;
  width: -webkit-fit-content;
  width: fit-content;
}
.fab-vc-code-text {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 10.5px;
  font-weight: 700;
  color: #0f3460;
  background: #e6f4ff;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #bae0ff;
  width: -webkit-fit-content;
  width: fit-content;
}

/* Content area */
.fab-vc-content {
  padding: 10px 11px 10px;
  flex: 1 1;
  display: flex;
  flex-direction: column;
}
.fab-vc-name {
  font-size: 12px;
  font-weight: 600;
  color: #0f3460;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 32px;
}
.fab-vc-divider {
  margin: 5px 0;
  border-color: #f0f2f5;
}

/* Field rows */
.fab-vc-frow {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-bottom: 5px;
}
.fab-vc-ficon {
  color: #c0c0c0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-top: 2px;
}
.fab-vc-finner {
  flex: 1 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.fab-vc-flbl {
  font-size: 10.5px;
  color: #7a818c;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 17px;
}
.fab-vc-fval {
  font-size: 11px;
  font-weight: 500;
  color: #2c3450;
  text-align: right;
  line-height: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}
.fab-vc-fval-mono {
  font-family: monospace;
  color: #0f3460;
}
.fab-vc-empty {
  color: #d0d5dd;
  font-style: italic;
  font-weight: 400;
  font-size: 10px;
}

/* Metric pills + process */
.fab-vc-mrow {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 4px;
}
.fab-vc-mpill {
  display: inline-flex;
  flex-direction: column;
  background: #f8fafc;
  border-radius: 7px;
  padding: 3px 8px;
  border: 1px solid #e8ecf0;
  min-width: 42px;
}
.fab-vc-mpill-lbl {
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #a0a8b4;
  font-weight: 700;
  line-height: 1.1;
}
.fab-vc-mpill-val {
  font-size: 12px;
  font-weight: 700;
  color: #0f3460;
  line-height: 1.3;
}
.fab-vc-mpill-empty {
  color: #d0d5dd;
  font-weight: 400;
  font-size: 11px;
}
.fab-vc-process-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.fab-vc-proc-lbl {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex-direction: row;
}

.fab-vc-proc-lbl-st {
  font-size: 9px;
  color: #8d95a0;
  padding-right: 5px;

  letter-spacing: 0.4px;
  font-weight: 700;
  padding-top: 4px;
}
.fab-proc-lbl {
  font-size: 9px;
  color: #8d95a0;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: block;
  margin-top: 2px;
  font-weight: 700;
}

/* Footer */
.fab-vc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding-top: 10px;
}
.fab-vc-dates {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.fab-vc-dblk {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.fab-vc-dlbl {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #949da9;
  font-weight: 700;
  line-height: 1.1;
}
.fab-vc-dval {
  font-size: 10.5px;
  font-weight: 600;
  color: #4a5568;
  line-height: 1.3;
}
.fab-vc-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.fab-vc-btn-edit {
  border-radius: 7px;
  font-size: 10px;
  height: 25px;
  font-weight: 600;
  padding: 0 8px;
  border-color: #0f3460;
  color: #0f3460;
  background: #ffffff;
  transition: all 0.18s;
  padding-left: 10px;
}
.fab-vc-btn-edit:hover {
  background: #0f3460;
  color: #fff;
}
.fab-vc-btn-copy {
  border-radius: 7px;
  height: 25px;
  width: 25px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8c8c8c;
  border-color: #e8ecf0;
  background: #f8fafc;
  transition: all 0.18s;
}
.fab-vc-btn-copy:hover {
  border-color: #0f3460;
  color: #0f3460;
  background: #f9f0ff;
}

/* Panel container */
.fabric-panel-root {
  font-family: "DM Sans", sans-serif;
  background: #ffffff;
  border-right: 2px solid #e0d6e8;
  position: absolute;
  top: 10px;
  overflow-y: hidden;
  overflow: hidden;

  padding: 0;
  box-shadow: 0 2px 12px rgba(44, 26, 46, 0.08);
}

/* Header row */
.fabric-panel-header {
  background: linear-gradient(90deg, #1c2e52 0%, #2a4070 100%);
  border-radius: 10px 10px 0px 0px;
  padding: 5px 10px 5px 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 3px solid rgba(255, 255, 255, 0.08);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  gap: 2px;
}

.fabric-panel-header .panel-title {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0;
}

/* Form body */
.fabric-panel-body {
  padding: 0px 7px 3px 5px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  height: 70vh;
  max-width: 300px;
  overflow-x: hidden;
}

.fp-label {
  font-weight: bold;
  display: flex;
  align-items: center;
  text-indent: 5px;
  color: #0f3460;
  flex-wrap: nowrap;
  white-space: nowrap;
  margin-top: 8px;
  margin-bottom: 3px;
  font-size: 0.525rem;
  font-family: var(--font-main);
  text-transform: uppercase;
  text-align: center;
}

.fp-img-uploader {
  border: 2px dashed #e0d6e8;
  border-radius: 8px;
  background: #f7f3fb;

  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  position: relative;
  overflow: hidden;
}

.fp-img-uploader:hover {
  border-color: #5c1a2e;
  background: #f5eef5;
}

.fp-img-uploader-text {
  font-size: 10.5px;
  color: #888;
  font-family: "DM Sans", sans-serif;
}

.fp-img-uploader input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.sr-header__title__fab {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.fab-img-holder {
  width: 100%;
  object-fit: contain;
  max-height: 110px;
}

.fp-img-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fab-vc-spec-tag {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
}

.fab-vc-no-spec {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 11px;
  padding: 2px 10px;
}

.fab-vc-spec-tag:hover {
  filter: brightness(1.05);
}

.fab-vc-no-spec:hover {
  border-color: #cbd5f5;
}

.fab-request-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px 0px 5px;
}

.fab-fabric-request-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #0958d9;
  background: #e6f4ff;
  border: 1px solid #91caff;
  border-radius: 12px;
  padding: 2px 8px;
  white-space: nowrap;
}

.fab-fabric-request-tag svg {
  color: #0958d9;
}

@media (max-width: 768px) {
  .fabric-panel-body {
    padding: 10px;
  }

  .fabric-panel-root {
    border-right: none;
    border-bottom: 2px solid #e0d6e8;
  }
}

@media screen and (min-width: 1024px) {
  .fabric-panel-root {
    width: 20%;
    width: 20%;
    min-width: 300px;
    max-width: 300px;
    height: 78vh;
  }

  .fabric-panel-body {
    height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
  }
}

@media screen and (max-width: 1100px) {
  .fabric-panel-root {
    width: 19%;
    min-width: 250px;
    max-width: 250px;
    height: 74vh;
  }

  .fabric-panel-body {
    height: 68vh;
    overflow-y: auto;
    overflow-x: hidden;
  }
}

@media screen and (max-width: 1023px) {
  .fabric-panel-root {
    width: 24%;
    min-width: 240px;
    height: 76vh;
  }

  .fabric-panel-body {
    height: 66vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
  }
}

@media screen and (max-width: 1280px) {
  .fabric-panel-root {
    width: 24%;
    min-width: 250px;
    max-width: 250px;
  }

  .fabric-panel-body {
    height: 64vh;
    max-width: 250px;
    min-width: 250px;
  }
}

@media screen and (max-width: 768px) {
  .fabric-panel-root {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 100%;

    height: auto;
    top: 0;

    border-right: none;
    border-bottom: 2px solid #e0d6e8;
  }

  .fabric-panel-body {
    height: auto;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    max-width: 100%;
  }
}

@media screen and (max-width: 480px) {
  .fabric-panel-root {
    width: 100%;
    border-radius: 0;
  }

  .fabric-panel-body {
    padding: 8px;
    max-height: 300px;
  }
}

@media screen and (min-width: 1600px) {
  .fabric-panel-root {
    width: 18%;
    min-width: 300px;
    max-width: 320px;
  }

  .fabric-panel-body {
    max-width: 320px;
  }
}

@media screen and (max-width: 1599px) and (min-width: 1281px) {
  .fabric-panel-root {
    width: 20%;
    min-width: 285px;
    max-width: 300px;
  }

  .fabric-panel-body {
    max-width: 300px;
  }
}

@media screen and (max-width: 1500px) {
  .fabric-panel-root {
    width: 22%;
    min-width: 280px;
    max-width: 280px;
  }

  .fabric-panel-body {
    max-width: 300px;
  }
}
.fx-page {
  --fx-navy: #0f3460;
  --fx-navy-soft: #eaf0f7;
  --fx-ink: #1d2939;
  --fx-sub: #475467;
  --fx-mut: #667085;
  --fx-line: #e3e8ef;
  --fx-hair: #eef2f6;
  --fx-bg: #f6f8fb;
  --fx-field: #d0d7e2;
  --fx-ok: #067647;
  --fx-ok-bg: #ecfdf3;
  --fx-warn: #b54708;
  --fx-warn-bg: #fff6e5;
  /* height of the workspace below the app header; change 150px if yours differs */
  --fx-h: calc(100vh - 154px);
  --fx-nav-w: 232px;

  min-width: 0;
  margin-top: 8px;
  color: var(--fx-ink);
}
/* header shows its info boxes -> give the workspace that height back */
.fx-page.has-hdr-facts {
  --fx-h: calc(100vh - 222px);
}

/* ---------- key facts in the Fabric header (like the Style edit header) ----------
   Shown only while the Fabric details form is hidden or scrolled away. */
.sr-header.fx-hdr {
  flex-wrap: wrap;
}
.sr-header.fx-hdr .fx-hdr-info {
  display: none; /* FabricEdit adds .has-facts on the header while scrolling */
  flex: 1 0 100%;
  flex-wrap: wrap;
  gap: 8px;
  order: 3;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eef2f6;
  animation: fx-hdr-in 0.16s ease-out;
}
.sr-header.fx-hdr.has-facts .fx-hdr-info {
  display: flex;
}
.sr-header.fx-hdr .fx-hdr-box {
  min-width: 0;
  padding: 7px 14px 8px;
  background: #f8fafc;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
}
.sr-header.fx-hdr .fx-hdr-box__t {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f3460;
}
.sr-header.fx-hdr .fx-hdr-box__row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
}
.sr-header.fx-hdr .fx-hdr-kv {
  display: inline-flex;
  gap: 5px;
  min-width: 0;
  max-width: 280px;
  font-size: 12.5px;
  white-space: nowrap;
  color: #475467;
}
.sr-header.fx-hdr .fx-hdr-kv b {
  font-weight: 700;
  color: #1d2939;
}
.sr-header.fx-hdr .fx-hdr-kv > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes fx-hdr-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =====================================================================
   LAYOUT: menu + sections
   ===================================================================== */
.fx-page .fx-body {
  display: grid;
  grid-template-columns: var(--fx-nav-w) minmax(0, 1fr);
  grid-gap: 12px;
  gap: 12px;
  height: var(--fx-h);
  min-height: 460px;
  transition: grid-template-columns 0.18s ease;
}
.fx-page.is-rail .fx-body {
  grid-template-columns: 58px minmax(0, 1fr);
}

/* ---------- menu ---------- */
.fx-page .fx-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 10px 8px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  background: #fff;
  border: 1px solid var(--fx-line);
  border-radius: 12px;
}
.fx-page .fx-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 8px 8px;
}
.fx-page .fx-nav__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fx-mut);
}
.fx-page .fx-nav__fold {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: var(--fx-mut);
  background: #fff;
  border: 1px solid var(--fx-line);
  border-radius: 7px;
  cursor: pointer;
}
.fx-page .fx-nav__fold:hover {
  color: var(--fx-navy);
  border-color: var(--fx-navy);
}
.fx-page .fx-nav__group {
  margin: 12px 0 4px;
  padding: 0 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #98a2b3;
}
.fx-page .fx-nav__item {
  position: relative; /* needed for the active ::before bar */
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  margin: 0;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  text-align: left;
  color: var(--fx-sub);
  background: transparent;
  border: 0;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
}
.fx-page .fx-nav__item:focus-visible {
  box-shadow:
    0 0 0 2px var(--fx-navy-soft),
    0 0 0 3px var(--fx-navy);
}
.fx-page .fx-nav__item:hover:not(:disabled) {
  color: var(--fx-navy);
  background: var(--fx-bg);
}
.fx-page .fx-nav__item.is-active {
  font-weight: 600;
  color: var(--fx-navy);
  background: var(--fx-navy-soft);
}
.fx-page .fx-nav__item.is-active::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  background: var(--fx-navy);
  border-radius: 0 3px 3px 0;
}
.fx-page .fx-nav__item.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.fx-page .fx-nav__ico {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  font-style: normal;
}
.fx-page .fx-nav__ico svg {
  width: 15px;
  height: 15px;
}
.fx-page .fx-nav__lbl {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 13px;
}
.fx-page .fx-nav__badge {
  min-width: 20px;
  padding: 0 7px;
  font-size: 10.5px;
  font-style: normal; /* <em> is italic by default */
  font-weight: 700;
  line-height: 18px;
  color: var(--fx-mut);
  background: var(--fx-hair);
  border-radius: 999px;
}
.fx-page .fx-nav__badge.is-ok {
  color: var(--fx-ok);
  background: var(--fx-ok-bg);
}
.fx-page .fx-nav__badge.is-todo {
  color: var(--fx-warn);
  background: var(--fx-warn-bg);
}
.fx-page .fx-nav__item.is-active .fx-nav__badge {
  background: #fff;
}

/* version / status / print / created info: small card in the menu */
.fx-page .fx-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 4px;
  padding: 8px;
  background: var(--fx-bg);
  border: 1px solid var(--fx-hair);
  border-radius: 10px;
}
.fx-page .fx-meta .fabric-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.fx-page .fx-meta .ant-tag {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0 9px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 22px;
  border-radius: 999px;
}

.fx-page .fx-meta > .ant-row {
  gap: 6px;
  margin: 0;
}
.fx-page .fx-meta > .ant-row:empty {
  display: none;
}

/* menu folded to icons (names show as the native tooltip) */
.fx-page.is-rail .fx-nav {
  padding: 10px 6px;
}
.fx-page.is-rail .fx-nav__top {
  justify-content: center;
  padding: 0 0 8px;
}
.fx-page.is-rail .fx-nav__title,
.fx-page.is-rail .fx-nav__lbl,
.fx-page.is-rail .fx-nav__badge,
.fx-page.is-rail .fx-meta {
  display: none;
}
.fx-page.is-rail .fx-nav__group {
  height: 1px;
  margin: 8px 6px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  background: var(--fx-hair);
}
.fx-page.is-rail .fx-nav__item {
  justify-content: center;
  padding: 7px 0;
}

/* =====================================================================
   SECTIONS
   ===================================================================== */
.fx-page .fx-main {
  position: relative; /* section offsets are measured from here while scrolling */
  min-width: 0;
  padding-right: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}
.fx-page .fx-sec {
  margin-bottom: 12px;
  scroll-margin-top: 2px;
  background: #fff;
  border: 1px solid var(--fx-line);
  border-radius: 12px;
}
.fx-page .fx-sec:last-child {
  margin-bottom: 4px;
}
.fx-page .fx-sec__head {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 52px;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid var(--fx-hair);
  border-radius: 12px 12px 0 0;
}
.fx-page .fx-sec__ico {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--fx-navy);
  background: var(--fx-navy-soft);
  border-radius: 8px;
}
.fx-page .fx-sec__ico svg {
  width: 15px;
  height: 15px;
}
.fx-page .fx-sec__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--fx-navy);
  white-space: nowrap;
}
.fx-page .fx-sec__sub {
  max-width: 50%;
  padding: 2px 10px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fx-sub);
  background: var(--fx-bg);
  border: 1px solid var(--fx-hair);
  border-radius: 999px;
}
.fx-page .fx-sec__count {
  min-width: 22px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  color: var(--fx-mut);
  background: var(--fx-hair);
  border-radius: 999px;
}
.fx-page .fx-sec__body {
  min-width: 0;
  padding: 14px 16px 16px;
}
.fx-page .fx-sec--muted .fx-sec__ico {
  color: var(--fx-mut);
  background: var(--fx-hair);
}

/* Fabric details: Hide / Show (body stays mounted) */
.fx-page .fx-sec__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  margin-left: auto;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fx-navy);
  background: #fff;
  border: 1px solid var(--fx-field);
  border-radius: 8px;
  cursor: pointer;
}
.fx-page .fx-sec__toggle:hover {
  background: var(--fx-navy-soft);
}
.fx-page .fx-sec__chev {
  width: 11px;
  height: 11px;
  transform: rotate(90deg);
  transition: transform 0.15s;
}
.fx-page .fx-sec.is-collapsed .fx-sec__chev {
  transform: rotate(0deg);
}
.fx-page .fx-sec.is-collapsed > .fx-sec__body {
  display: none;
}
.fx-page .fx-sec.is-collapsed > .fx-sec__head {
  border-bottom: 0;
  border-radius: 12px;
}

/* Basic details tabs: segmented control in the sticky head */
.fx-page .fx-tabs {
  display: flex;
  flex: 0 1 auto;
  gap: 2px;
  min-width: 0;
  margin-left: auto;
  padding: 3px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #f1f4f8;
  border-radius: 10px;
}
.fx-page .fx-tabs::-webkit-scrollbar {
  display: none;
}
.fx-page .fx-tab {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--fx-sub);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
}
.fx-page .fx-tab:hover:not(:disabled) {
  color: var(--fx-navy);
}
.fx-page .fx-tab.is-active {
  font-weight: 600;
  color: var(--fx-navy);
  background: #fff;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.08),
    0 0 0 1px rgba(16, 24, 40, 0.04);
}
.fx-page .fx-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.fx-page .fx-tab__ico {
  display: inline-flex;
  font-style: normal;
}
.fx-page .fx-tab__ico svg {
  width: 14px;
  height: 14px;
}
.fx-page .fx-tab__badge {
  padding: 0 6px;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 17px;
  color: var(--fx-mut);
  background: var(--fx-hair);
  border-radius: 999px;
}
.fx-page .fx-tab__badge.is-ok {
  color: var(--fx-ok);
  background: var(--fx-ok-bg);
}
.fx-page .fx-tab__badge.is-todo {
  color: var(--fx-warn);
  background: var(--fx-warn-bg);
}

/* =====================================================================
   FORMS: fabric details (.fx-form-grid) and knitting (.fx-knit-grid)
   share one look - labels, controls, checkboxes
   ===================================================================== */
.fx-page .fx-form-grid,
.fx-page .fx-knit-grid {
  display: grid;
  grid-gap: 14px 16px;
  gap: 14px 16px;
  align-items: end;
  margin: 0;
}
.fx-page .fx-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(200px, 240px);
  grid-auto-flow: row dense;
}
.fx-page .fx-knit-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.fx-page :is(.fx-form-grid, .fx-knit-grid) > .ant-col,
.fx-page :is(.fx-form-grid, .fx-knit-grid) > .fx-contents > .ant-col,
.fx-page
  :is(.fx-form-grid, .fx-knit-grid)
  > .fx-contents
  > .fx-contents
  > .ant-col,
.fx-page
  :is(.fx-form-grid, .fx-knit-grid)
  > .fx-contents
  > .fx-contents
  > .fx-contents
  > .ant-col {
  flex: none;
  width: auto;
  max-width: none;
  min-width: 0;
  padding: 0;
}
.fx-page :is(.fx-form-grid, .fx-knit-grid) .fx-contents {
  display: contents;
}
.fx-page :is(.fx-form-grid, .fx-knit-grid) > .fx-span-2 {
  grid-column: span 2;
}
.fx-page :is(.fx-form-grid, .fx-knit-grid) .ctf-stcard-field,
.fx-page :is(.fx-form-grid, .fx-knit-grid) .common-input-label-container {
  margin: 0;
}

/* labels (fp-label in details, prod-std-lbl in knitting) */
.fx-page :is(.fx-form-grid, .fx-knit-grid) :is(.fp-label, .prod-std-lbl) {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  color: var(--fx-sub);
}

/* label rows that carry refresh / add buttons */
.fx-page :is(.fx-form-grid, .fx-knit-grid) .labl-align-link {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  margin-bottom: 6px;
}
.fx-page
  :is(.fx-form-grid, .fx-knit-grid)
  .labl-align-link
  :is(.fp-label, .prod-std-lbl) {
  margin: 0;
}

/* controls: one height, one look */
.fx-page
  :is(.fx-form-grid, .fx-knit-grid)
  :is(.ant-select, .ant-input, .ant-input-affix-wrapper, .ant-input-number) {
  width: 100%;
}

/* checkbox fields: a tile the same height as the inputs */
.fx-page :is(.fx-form-grid, .fx-knit-grid) .fx-check-cell .fp-label {
  display: none; /* empty spacer labels above the checkbox */
}
.fx-page :is(.fx-form-grid, .fx-knit-grid) .fx-check-cell .ctf-stcard-field {
  margin-top: 0;
}
.fx-page
  :is(.fx-form-grid, .fx-knit-grid)
  .fx-check-cell
  .ant-checkbox-wrapper {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0 11px;
  font-size: 12.5px;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--fx-field);
  border-radius: 8px;
}
.fx-page
  :is(.fx-form-grid, .fx-knit-grid)
  .fx-check-cell
  .ant-checkbox-wrapper
  .fp-label {
  display: inline-flex; /* the checkbox's own label stays visible */
  margin: 0;
  font-size: 11.5px;
  color: var(--fx-ink);
}
.fx-page
  :is(.fx-form-grid, .fx-knit-grid)
  .fx-check-cell
  .ant-checkbox-wrapper-checked {
  background: var(--fx-navy-soft);
  border-color: #bccbdd;
}
.fx-page .fx-main .ant-checkbox-checked .ant-checkbox-inner {
  background-color: var(--fx-navy);
  border-color: var(--fx-navy);
}

/* fabric image: own column on the right of the details form */
.fx-page .fx-form-grid > .fx-img-cell {
  grid-column: 4;
  grid-row: 1 / span 5;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}
.fx-page .fx-form-grid > .fx-img-cell > div:last-child {
  flex: 1 1 auto;
  min-height: 0;
}
.fx-page .fx-form-grid > .fx-img-cell .fp-img-uploader {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 120px;
  padding: 10px;
  box-sizing: border-box;
  text-align: center;
  background: var(--fx-bg);
  border: 1px dashed #c6d0dd;
  border-radius: 10px;
}
.fx-page .fx-form-grid > .fx-img-cell .fp-img-uploader:hover {
  border-color: var(--fx-navy);
}
.fx-page .fx-form-grid > .fx-img-cell .fab-img-holder {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 8px;
}

/* =====================================================================
   BASIC DETAILS content (all tabs share one look)
   ===================================================================== */
/* the segmented tabs in the head replace the old tab bar (hidden, same handler) */
.fx-page .fx-basic > div > :first-child {
  display: none;
}
/* old frames and fixed heights go; the section card is the frame */
.fx-page .fx-basic :is(.sub-header-container, .common-edit-basic-container) {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
/* toolbar row on every tab: Add button + title / refresh */
.fx-page .fx-basic .labl-align-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.fx-page .fx-basic .labl-align-link > div {
  margin: 0;
}
/* field label rows inside the knitting form keep their compact look */
.fx-page .fx-basic .fx-knit-grid .labl-align-link {
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0 0 6px;
}
.fx-page .fx-basic .common-header {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--fx-navy);
}
/* "Knitting" title above the knitting form */
.fx-page .fx-basic .common-edit-basic-container > .common-header {
  display: block;
  margin: 0 0 12px;
}
.fx-page .fx-basic .common-table-overflow {
  height: auto;
  max-height: 52vh;
}
.fx-page .fx-basic .common-table-overflow > table {
  min-width: 100%;
}

/* tables in all sections: light grid, rounded frame */
.fx-page .fx-basic .common-table-td {
  border-color: var(--fx-hair);
}
.fx-page .fx-main .ant-table-wrapper .ant-table {
  overflow: hidden;
  border: 1px solid var(--fx-line);
  border-radius: 10px;
}
.fx-page .fx-main .ant-table-wrapper .ant-table-thead > tr > th {
  font-size: 12px;
  font-weight: 600;
}
.fx-page .fx-main .ant-table-wrapper .ant-table-tbody > tr > td {
  font-size: 12.5px;
}

/* tabs inside sections (process steps): left aligned, navy */
.fx-page
  .fx-main
  .ant-tabs-centered
  > .ant-tabs-nav
  .ant-tabs-nav-wrap:not([class*="ant-tabs-nav-wrap-ping"]) {
  justify-content: flex-start;
}
.fx-page .fx-main .ant-tabs .ant-tabs-tab {
  padding: 8px 2px;
  font-size: 12.5px;
}
.fx-page .fx-main .ant-tabs .ant-tabs-tab + .ant-tabs-tab {
  margin-left: 20px;
}
.fx-page
  .fx-main
  .ant-tabs
  .ant-tabs-tab.ant-tabs-tab-active
  .ant-tabs-tab-btn {
  font-weight: 600;
  color: var(--fx-navy);
}
.fx-page .fx-main .ant-tabs .ant-tabs-ink-bar {
  background: var(--fx-navy);
}

/* ---------- Basic details tables ---------- */
/* lists split into small tables (Buyer, Document, Specification) sit side by side */
.fx-page .fx-basic .common-arr-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr));
  grid-gap: 12px;
  gap: 12px;
  align-items: start;
}
.fx-page .fx-basic .common-arr-grid-container > * {
  min-width: 0;
}
/* one table look for every antd table in the sections */
.fx-page .fx-main .ant-table-wrapper .ant-table {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--fx-line);
  border-radius: 10px;
}
.fx-page .fx-main .ant-table-wrapper .ant-table-container,
.fx-page .fx-main .ant-table-wrapper .ant-table-container table {
  border-radius: 10px;
}
.fx-page .fx-main .ant-table-wrapper .ant-table-thead > tr > th {
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  color: var(--fx-navy);
  background: #f2f5f9;
  border-bottom: 1px solid var(--fx-line);
}
.fx-page .fx-main .ant-table-wrapper .ant-table-thead > tr > th::before {
  height: 14px;
  background-color: var(--fx-line);
}
.fx-page .fx-main .ant-table-wrapper .ant-table-tbody > tr > td {
  padding: 7px 12px;
  font-size: 12.5px;
  color: var(--fx-ink);
  border-bottom: 1px solid var(--fx-hair);
}
.fx-page .fx-main .ant-table-wrapper .ant-table-tbody > tr:last-child > td {
  border-bottom: 0;
}
.fx-page .fx-main .ant-table-wrapper .ant-table-tbody > tr:hover > td {
  background: #fafbfd;
}

.fx-page .fx-main .ant-table-wrapper .ant-table-placeholder .ant-empty {
  margin: 12px 0;
}

/* =====================================================================
   PROCESS ROUTES
   ===================================================================== */
.fx-page .fx-routes .ant-alert {
  margin-bottom: 10px;
  font-size: 12.5px;
  border-radius: 8px;
}
.fx-page .fx-route {
  margin-top: 10px;
  padding: 12px 14px 14px;
  background: #fff;
  border: 1px solid var(--fx-line);
  border-left: 3px solid var(--fx-navy);
  border-radius: 10px;
}
.fx-page .fx-sec--muted .fx-route {
  border-left-color: #98a2b3;
}
.fx-page .fx-route > .ant-divider {
  display: none;
}
.fx-page .fx-route__fields {
  margin-bottom: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--fx-hair);
}
.fx-page .fx-route__fields .prod-std-lbl {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fx-sub);
}
.fx-page .fx-route__fields input.ant-input,
.fx-page .fx-route__fields .ant-select-single .ant-select-selector {
  border-radius: 8px;
}
.fx-page .fx-route .ant-switch.ant-switch-checked {
  background: var(--fx-navy);
}

/* new fabric: routes come after the first save */
.fx-page .fx-empty {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  background: var(--fx-bg);
  border-style: dashed;
}
.fx-page .fx-empty__img.fab-default-img {
  width: 110px;
  max-width: 30%;
  height: auto;
  margin: 0;
}
.fx-page .fx-empty__txt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--fx-mut);
}
.fx-page .fx-empty__txt b {
  font-size: 13.5px;
  color: var(--fx-navy);
}

/* =====================================================================
   SCREEN SIZES
   ===================================================================== */
/* Trims: image + buyer layout uploaders stacked in the image column */
.fx-page .fx-form-grid > .fx-img-stack {
  grid-row: 1 / span 6;
  gap: 12px;
  margin: 0;
}
.fx-page .fx-form-grid > .fx-img-stack > .ant-col {
  flex: none;
  width: 100%;
  max-width: none;
  padding: 0;
}
.fx-page .fx-empty__img {
  width: 110px;
  max-width: 30%;
  height: auto;
  margin: 0;
}

@media (max-width: 1499.98px) {
  .fx-page .fx-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 180px;
  }
  .fx-page .fx-tab__ico {
    display: none; /* keeps all Basic details tabs visible on laptops */
  }
}
@media (max-width: 1199.98px) {
  .fx-page .fx-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(170px, 200px);
  }
  .fx-page .fx-form-grid > .fx-img-cell {
    grid-column: 3;
    grid-row: 1 / span 6;
  }
  .fx-page .fx-tabs {
    flex-basis: 100%;
    margin-left: 0;
  }
}
@media (max-width: 991.98px) {
  .fx-page .fx-body,
  .fx-page.is-rail .fx-body {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 0;
  }
  .fx-page .fx-nav {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .fx-page .fx-nav__top,
  .fx-page .fx-nav__group,
  .fx-page .fx-meta {
    display: none;
  }
  .fx-page .fx-nav__item {
    flex: none;
    width: auto;
  }
  .fx-page.is-rail .fx-nav__lbl {
    display: inline;
  }
  .fx-page .fx-main {
    overflow: visible;
    padding-right: 0;
  }
}
@media (max-width: 767.98px) {
  .fx-page .fx-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .fx-page .fx-form-grid > .fx-img-cell {
    grid-column: 1;
    grid-row: auto;
  }
  .fx-page :is(.fx-form-grid, .fx-knit-grid) > .fx-span-2 {
    grid-column: auto;
  }
}
.fx-page #fx-sec-basic {
  display: flex;
  flex-direction: column;
  min-height: calc(70vh - 24px);
  min-height: calc(var(--fx-h, 70vh) - 24px);
}
.fx-page #fx-sec-basic > .fx-sec__body {
  flex: 1 1 auto;
}
@media (max-width: 991.98px) {
  .fx-page #fx-sec-basic {
    min-height: 420px;
  }
}

/* ---------- root ---------- */
.react-search-field-demo {
  padding: 0;
  width: 100%;
  position: relative;
  display: inline-block;
}

.react-search-field-demo .tableSelect-container {
  display: flex;
  align-items: stretch;
  height: 24px;
}

/* !important: beats global input/button rules (antd, app css) that were
   making the field tall and pill-shaped */
.react-search-field-demo .tableSelect-container input {
  height: 24px;
  min-height: 0;
  margin: 0;
  padding: 2px 10px;
  border: 1px solid #d0d5dd;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: #fff;
  font-size: 0.625rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.88);
  box-shadow: none;
}

.react-search-field-demo .tableSelect-container input:focus {
  border-color: #0f3460;
  box-shadow: 0 0 0 2px rgba(15, 52, 96, 0.15);
}

.react-search-field-demo .tableSelect-container input:disabled {
  background: rgba(60, 60, 60, 0.06);
  color: rgb(150, 150, 150);
  cursor: not-allowed;
}

.react-search-field-demo .tableSelect-container button.ts-btn {
  width: 32px;
  height: 24px;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: #f9fafb;
  border: 1px solid #d0d5dd;
  box-shadow: none;
}

.react-search-field-demo .tableSelect-container button.ts-btn-delete {
  border-radius: 0;
  border-right: 0;
}

.react-search-field-demo .tableSelect-container button.ts-btn-search {
  border-radius: 0 6px 6px 0;
}

.react-search-field-demo .tableSelect-container button.ts-btn:disabled {
  background: rgba(60, 60, 60, 0.06);
  cursor: not-allowed;
}

/* ---------- buttons ---------- */
.react-search-field-demo .ts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 30px;
  height: 100%;
  padding: 0;
  background: #fff;
  color: #4b5563;
  border: 1px solid #c9c8c8;
  cursor: pointer;
  -webkit-appearance: none;
          appearance: none;
  outline: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.react-search-field-demo .ts-btn-delete {
  border-radius: 0;
  border-right: none;
}

.react-search-field-demo .ts-btn-search {
  border-radius: 0 6px 6px 0;
  border-left: none;
}

.react-search-field-demo .ts-btn-delete:hover:not(:disabled) {
  background: #fff1f2;
  color: #e11d48;
}

.react-search-field-demo .ts-btn-search:hover:not(:disabled) {
  background: #e3ebf5;
  color: #0f3460;
}

.react-search-field-demo .ts-btn:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(15, 52, 96, 0.4);
}

.react-search-field-demo .ts-btn:disabled {
  cursor: not-allowed;
  background: rgba(60, 60, 60, 0.06);
  color: rgb(170, 170, 170);
  border-color: rgba(118, 118, 118, 0.3);
}

/* ---------- dropdown ---------- */
/* Hidden by default; shown only when the component asked to open it
   (list-example) AND something inside it has focus. */
.react-search-field-demo .list-example,
.react-search-field-demo .list-example-hidden {
  display: none;
}

.react-search-field-demo:focus-within .list-example {
  display: block;
}

.react-search-field-demo .list-example {
  position: fixed; /* top/left/bottom/minWidth are set from JS */
  z-index: 99999;
  box-sizing: border-box;
  width: -webkit-max-content;
  width: max-content;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d6e0ec;
  border-radius: 8px;
  box-shadow: 0 10px 28px -8px rgba(15, 52, 96, 0.3);
  animation: ts-pop 0.12s ease-out;
}

@keyframes ts-pop {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* header stays visible while rows scroll */
.react-search-field-demo .list-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef3f9;
  border-bottom: 1px solid #d6e0ec;
}

.react-search-field-demo .list-body {
  display: flex;
  flex-direction: column;
}

/* ---------- rows ---------- */
.react-search-field-demo .custom-ul {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid #e6edf5;
}

.react-search-field-demo .custom-li {
  flex: 1 1; /* equal columns so header and rows line up */
  min-width: 140px;
  margin: 0;
  padding: 7px 10px;
  list-style: none;
  font-size: 12px;
  color: #0f3460;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.react-search-field-demo .list-header .custom-ul {
  border-bottom: none;
}

.react-search-field-demo .list-header .custom-li {
  font-size: 10.5px;
  letter-spacing: 0.4px;
  color: #0f3460;
  cursor: default;
}

.react-search-field-demo .list-body .custom-ul:nth-child(even) {
  background: #f6f9fc;
}

.react-search-field-demo .list-body .custom-ul:hover {
  background: #e3ebf5;
}

.react-search-field-demo .list-body .custom-ul:last-child {
  border-bottom: none;
}

.react-search-field-demo .list-empty {
  padding: 14px 12px;
  text-align: center;
  font-size: 12px;
  color: #98a2b3;
}

.pointer > :focus-within {
  cursor: pointer;
}

.hcard {
  border-radius: 12px;
  border: 1px solid #e4e7ec;
  transition: all 0.2s ease;
}

.hcard:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.hcard-container {
  display: flex;
  gap: 12px;
}

.hcard-left {
  width: 90px;
  position: relative;
  flex-shrink: 0;
}

.hcard-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background: #f2f4f7;
}

.hcard-version-no {
  position: absolute;
  bottom: -6px;
  left: 0;
  font-size: 11px;
  background: #eef2ff;
  padding: 2px 6px;
  border-radius: 6px;
}

.hcard-version {
  font-size: 11px;
  background: #eef2ff;
  padding: 2px 6px;
  border-radius: 6px;
  margin-top: 2px;
}

.hcard-center {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 10px;
  border-left: 1px solid #f0f2f5;
}

.hcard-title {
  display: flex;
  flex-direction: column;
}

.hcard-code {
  font-size: 12px;
  font-weight: 600;
  color: #0f3460;
}

.hcard-name {
  font-size: 12px;
  font-weight: 600;
  color: #0f3460;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hcard-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f2f5;
}

.tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #f2f4f7;
}

.tag-sample {
  background: #eef2ff;
}

.hcard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 5px 10px;
  gap: 5px 10px;
  flex: 1 1;
}

.hcard-value {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: #2c3450;
  line-height: 1.35;
  white-space: nowrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 2px;
}

.hcard-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gen-split-button {
  display: inline-flex;
  position: relative;
  align-items: center;
  /* border: 1px solid #ccc; */
  /* border-radius: 5px; */
  overflow: visible;
  height: 100%;
  border-radius: 5px;
  margin: 0 0 0 10px;
}

.gen-split-main-btn {
  /* display: flex; */
  /* align-items: center; */
  /* padding: 8px 12px; */
  /* background: #007bff; */
  background: linear-gradient(135deg, #0f3460, #19549c);
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 0.625rem;
  height: 30px;
  border-radius: 7px 0px 0px 7px;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  padding: 10px;
}

/* .gen-split-main-btn span {
  margin-left: 8px;
} */

.gen-split-main-btn:hover {
  background: #1d6fd8;
}

.gen-split-dropdown-btn {
  /* padding: 8px; */
  background: linear-gradient(135deg, #0f3460, #19549c);
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  height: 30px;
  border-radius: 0px 7px 7px 0px;

  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gen-split-dropdown-btn:hover {
  background: #1d6fd8;
}

.gen-split-dropdown-item {
  display: flex;
  align-items: center;
  padding: 8px;
  cursor: pointer;
  transition: background 0.3s;
  height: 25px;
}

.gen-split-dropdown-item span {
  margin-left: 8px;
}

.gen-split-dropdown-item:hover {
  background: #f1f1f1;
}

.gen-split-icon {
  margin-left: 4px;
}

.gen-split-button-small {
  display: inline-flex;
  position: relative;
  align-items: center;
  /* border: 1px solid #ccc; */
  /* border-radius: 5px; */
  overflow: visible;
  height: 100%;
  border-radius: 5px;
  margin: 0 0 0 10px;
}

.gen-split-main-btn-small {
  /* display: flex; */
  /* align-items: center; */
  /* padding: 8px 12px; */
  /* background: #007bff; */
  background: #f0f1fc;
  color: black;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 0.625rem;
  height: 25px;
  border-radius: 5px 0px 0px 5px;
  display: flex;
  align-items: center;
}

/* .gen-split-main-btn span {
  margin-left: 8px;
} */

.gen-split-main-btn-small:hover {
  background: #dee0f7;
}

.gen-split-dropdown-btn-small {
  /* padding: 8px; */
  background: #f0f1fc;
  color: black;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  height: 25px;
  border-radius: 0px 5px 5px 0px;
}

.gen-split-dropdown-btn-small:hover {
  background: #dee0f7;
}

/* Dropdown appears below the dropdown button */
.gen-split-dropdown-menu-small {
  font-size: 0.625rem;
  position: absolute;
  top: 100%;
  left: 22px;
  min-width: 100%;
  background: black;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: block;
  visibility: visible;
  opacity: 1;
  width: 200%;
}

.gen-split-dropdown-item-small {
  display: flex;
  align-items: center;
  padding: 8px;
  cursor: pointer;
  transition: background 0.3s;
  height: 25px;
}

.gen-split-dropdown-item-small span {
  margin-left: 8px;
}

.gen-split-dropdown-item-small:hover {
  background: #f1f1f1;
}

.gen-split-dropdown-menu-left-small {
  font-size: 0.625rem;
  position: absolute;
  top: 100%;
  left: 0px;
  min-width: 100%;
  background: white;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: block;
  visibility: visible;
  opacity: 1;
  width: 150%;
}

.gen-split-icon-small {
  margin-left: 4px;
}

.gen-split-dropdown-menu,
.gen-split-dropdown-menu-left {
  font-size: 0.75rem;
  position: absolute;
  top: calc(100% + 6px);
  min-width: 180px;
  width: auto;
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  padding: 4px;
  overflow: hidden;
  animation: dropIn 0.15s ease;
}

.gen-split-dropdown-menu {
  left: 0;
}
.gen-split-dropdown-menu-left {
  right: 0;
  left: auto;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gen-split-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  height: auto;
  min-height: 32px;
  cursor: pointer;
  border-radius: 7px;
  transition: background 0.12s;
  color: #1a1a1a;
  font-size: 0.72rem;
  font-weight: 500;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.07);
}

.gen-split-dropdown-item span {
  margin-left: 0;
}

.gen-split-dropdown-item:hover {
  background: #f0f1fc;
}
.gen-split-dropdown-item:active {
  background: #e2e4f8;
}

.gen-split-dropdown-item:last-child {
  border-bottom: none;
}

.defect-image-upload-container {
  width: 120px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
}

.defect-image-upload-wrapper {
  width: 120px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.defect-image-upload-box {
  width: 120px;
  height: 70px;
  border: 1px dashed #bfbfbf;
  border-radius: 8px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.defect-image-upload-box:hover {
  border-color: #1677ff;
  background-color: #f5f9ff;
}

.defect-image-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.defect-image-upload-icon {
  font-size: 24px;
  color: #8c8c8c;
  line-height: 1;
}

.defect-image-upload-box:hover .defect-image-upload-icon {
  color: #1677ff;
}

.defect-image-upload-text {
  margin-top: 4px;
  font-size: 11px;
  line-height: 14px;
  color: #8c8c8c;
}

.defect-image-upload-box:hover .defect-image-upload-text {
  color: #1677ff;
}

.defect-image-file-input {
  display: none;
}

.defect-image-preview-wrapper {
  position: relative;
  width: 120px;
  height: 70px;
  display: inline-block;
}

.defect-image-preview {
  width: 120px;
  height: 70px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  cursor: pointer;
  box-sizing: border-box;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.defect-image-preview:hover {
  transform: scale(1.03);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.defect-image-delete-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background-color: #ffffff;
  color: #ff4d4f;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.defect-image-delete-btn:hover {
  background-color: #ff4d4f;
  color: #ffffff;
}

.defect-image-delete-btn svg {
  display: block;
}

.defect-option-image-cell {
  width: 130px;
  min-width: 130px;
  padding: 8px;
  text-align: center;
  vertical-align: middle;
}

.defect-option-image-cell .defect-image-upload-container {
  margin: 0 auto;
}

@media (max-width: 768px) {
  .defect-image-upload-container,
  .defect-image-upload-wrapper,
  .defect-image-preview-wrapper {
    width: 100px;
    height: 65px;
  }

  .defect-image-upload-box,
  .defect-image-preview {
    width: 100px;
    height: 65px;
  }

  .defect-image-delete-btn {
    width: 18px;
    height: 18px;
  }
}

.em-file-upload-container {
  border: 2px dashed #ccc;
  text-align: center;
  height: 50px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px;
  width: 200px;
}
.emb-file-upload {
  width: 112px;
}

.emb-grid-two-fields-container {
  display: grid;
  grid-template-columns: 3fr 1fr;
  grid-column-gap: 10px;
  column-gap: 10px;
}

.embellish-file-nego {
  border: 2px dashed #ccc;
  text-align: center;
  border-radius: 5px;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 5px;
}

.embellish-select-dropdown {
  width: 25%;
}

.embellish-file {
  border: 2px dashed #ccc;
  text-align: center;
  height: 40vh;
  border-radius: 5px;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 5px;
}

.embellish-file-div {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  width: 100%;
}

.embellish-select {
  width: 250px;
}

.embellish-color-searchbar {
  width: 230px;
}

.emb-color-wise-wid {
  min-width: 0;
  text-align: center;
}

.embellish-process-select {
  margin: 5px;
}
.embellish-inner-container {
  overflow-y: auto;
  overflow-x: hidden;
  margin: 10px 0 5px 0;
}
.emb-process-container {
  height: 27vh;
}
.emb-process-wid {
  width: 20vw;
  border-radius: 2px;
  text-align: center;
  background: #ffffff;
  border: 1px solid #f8f2f2;
  border-radius: 2px;
}
.emb-basic-container {
  height: 40vh;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 5px;
}
.emb-split-button .split-dropdown-menu {
  left: 35%;
}

.embellish-file-div .ant-image-img {
  max-height: 39vh;
  width: 100%;
  object-fit: contain;
}

/* ---------- Root / Layout ---------- */
.sr-root {
  font-family: sans-serif;
  background: #f8fafc;
  min-height: 100vh;
  padding: 0;
}

.mention-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 400px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
}

.mention-card {
  padding: 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fafafa;
}

.mention-card div {
  margin-bottom: 6px;
}

/* ---------- Header ---------- */
.sr-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px;
  margin-top: 5px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.sr-header__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sr-header__logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f3460, #2872cc);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sr-header__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.sr-header__subtitle {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

.sr-header__actions {
  display: flex;
  gap: 8px;
}

/* ---------- Buttons (generic) ---------- */
.sr-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
}

.sr-btn--primary {
  padding: 12px 14px;
  height: 30px;
  border: none;
  font-size: 12px;
  background: linear-gradient(135deg, #0f3460, #19549c);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.sr-btn--primary:hover {
  background: linear-gradient(135deg, #0f3460, #19549c) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* ---------- Page Body ---------- */
.sr-body {
  padding: 6px 10px;
}

/* ---------- Main Card ---------- */
.sr-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

/* ---------- Status Tabs ---------- */
.sr-tabs {
  padding: 14px 20px 0;
  border-bottom: 1px solid #e2e8f0;
  overflow-x: auto;
}

.sr-tabs__inner {
  display: flex;
  gap: 4px;
  min-width: -webkit-max-content;
  min-width: max-content;
}

.sr-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px 8px 0 0;
  border: none;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  font-weight: 500;
  font-size: 13px;
  border-bottom: 2.5px solid transparent;
  transition: all 0.15s;
  font-family: inherit;
}

.sr-tab--active {
  /* background, color, border-bottom-color set dynamically */
  font-weight: 700;
}

.sr-tab__badge {
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.sr-tab__badge--inactive {
  background: #e2e8f0;
  color: #64748b;
}

/* ---------- Toolbar ---------- */
.sr-toolbar {
  padding: 6px 6px;
  display: flex;
  align-items: center;
  background: #ffffff;
  flex-wrap: wrap;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  margin-bottom: 3px;
}

.sr-search {
  flex: 1 1;
  min-width: 200px;
  position: relative;
}

.sr-search__icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.sr-cell--code {
  font-weight: 600;
  color: #1e40af;
  font-family: monospace;
  font-size: 12px;
}

/* User cell */
.sr-user-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sr-user-cell__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sr-user-cell__name {
  color: #475569;
  white-space: nowrap;
}

/* ETA badge */
.sr-eta-badge {
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
}

.active-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Secondary / normal buttons */
.sr-btn--secondary {
  background: #ffffff;
  border: 1px solid #b2d5ff;
  color: #334155;
  box-shadow: 0 1px 2px rgba(9, 15, 31, 0.04);
  font-size: 12px;
  font-weight: 800;
  padding: 12px 14px;
  height: 30px;
}

.sr-btn--secondary:hover {
  border-color: #0f3460 !important;
  color: #0f3460 !important;
  background: #ffffff;
}

/* Approval button */
.sr-btn--approval {
  background: #ffffff;
  border: 1px solid #b2d5ff;
  color: #0f3460;
  font-size: 12px;
  font-weight: 800;
  padding: 12px 14px;
  height: 30px;
}

.sr-btn--approval:hover {
  border-color: #0f3460 !important;
  color: #0f3460 !important;
  background: #ffffff;
}

/* Switch wrapper */
.active-toggle-wrapper {
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #dbe3ef;
  background: #f8fafc;
  display: flex;
  align-items: center;
}

/* ─── Section Label ─────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a6bb;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::after {
  content: "";
  flex: 1 1;
  height: 1px;
  background: #dce6f5;
}

.sidebar-textarea {
  border-radius: 10px;
  border-color: #dce6f5;
  font-size: 13px;
  resize: vertical;
  background: #fff;
  transition: all 0.2s;
}

.sidebar-textarea:hover,
.sidebar-textarea:focus {
  border-color: #2554a0;
  box-shadow: 0 0 0 3px rgba(37, 84, 160, 0.1);
}

/* ─── Checkboxes Row ────────────────────────────────────── */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid #dce6f5;
  border-bottom: 1px solid #dce6f5;
  margin-bottom: 20px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #0f1e38;
  cursor: pointer;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.active {
  background: #f0fdf4;
  color: #22c55e;
  border: 1px solid #bbf7d0;
}

/* ─── Divider ───────────────────────────────────────────── */
.form-divider {
  height: 1px;
  background: #dce6f5;
  margin: 20px 0;
}

/* ════════════════════════════════════════════════════
   SUBTASKS  –  horizontal scroll row of open cards
════════════════════════════════════════════════════ */
.ctf-subtasks-section {
  border-top: 2px solid #e0e8f4;
  background: #edf1fa;
}

/* panel header bar */
.ctf-subtasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #1c2e52;
}
.ctf-subtasks-header-title {
  font-family: sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctf-subtasks-count-badge {
  background: #e05c1a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 20px;
  min-width: 22px;
  text-align: center;
}
.ctf-subtasks-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* hint text */
.ctf-subtasks-hint {
  padding: 6px 24px 0;
  font-size: 11.5px;
  color: #7a90b0;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* horizontal scroll track */
.ctf-subtasks-track {
  display: flex;
  gap: 16px;
  flex-wrap: nowrap;
  padding: 14px 24px 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  align-items: flex-start;
}
.ctf-subtasks-track::-webkit-scrollbar {
  height: 5px;
}
.ctf-subtasks-track::-webkit-scrollbar-track {
  background: #d8e0ef;
  border-radius: 4px;
}
.ctf-subtasks-track::-webkit-scrollbar-thumb {
  background: #a0b2cc;
  border-radius: 4px;
}

/* empty state */
.ctf-subtasks-track-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 30px 0;
  color: #8fa0bc;
  font-size: 13px;
}
.ctf-subtasks-empty-icon {
  width: 52px;
  height: 52px;
  background: #dce4f0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8fa0bc;
}

/* ── Single subtask card ─────────────────────────── */
.ctf-stcard {
  flex-shrink: 0;
  width: 40vw;
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid #d6e0f0;
  box-shadow: 0 3px 14px rgba(20, 33, 61, 0.08);
  scroll-snap-align: start;
  overflow: hidden;
  transition:
    box-shadow 0.2s,
    border-color 0.2s,
    transform 0.2s;
  animation: cardIn 0.28s ease;
}
.ctf-stcard:hover {
  box-shadow: 0 8px 28px rgba(20, 33, 61, 0.14);
  border-color: #a0b8d8;
  transform: translateY(-2px);
}
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* card top bar */
.ctf-stcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  background: linear-gradient(90deg, #1c2e52 0%, #2a4070 100%);
}
.ctf-stcard-title {
  font-family: sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 7px;
}
.ctf-stcard-num {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}
.ctf-stcard-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctf-stcard-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  padding: 3px 9px;
}
.ctf-stcard-pill span {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.ctf-stcard-icon-btn {
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.ctf-stcard-icon-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}
.ctf-stcard-icon-btn.del {
  background: rgba(220, 38, 38, 0.65);
  border-color: rgba(220, 38, 38, 0.5);
}
.ctf-stcard-icon-btn.del:hover {
  background: #dc2626;
}

/* card body */
.ctf-stcard-body {
  padding: 13px 13px 0;
}

.ctf-stcard-grid {
  display: grid;
  grid-gap: 9px 11px;
  gap: 9px 11px;
  margin-bottom: 10px;
}
.ctf-stcard-g3 {
  grid-template-columns: repeat(3, 1fr);
}
.ctf-stcard-g2 {
  grid-template-columns: repeat(2, 1fr);
}

.ctf-stcard-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ctf-stcard-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #5a6f8a;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
}
.ctf-stcard-req {
  color: #e05c1a;
}

/* description inside card */
.ctf-stcard-desc {
  margin-bottom: 10px;
}
.ctf-stcard-desc-label {
  font-size: 9px;
  font-weight: 700;
  color: #8fa0bc;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: sans-serif;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.task-highlight {
  color: #ed4747;
  font-size: 11.5px;
  font-weight: 600;
}
.ctf-stcard-desc .ant-input {
  border-radius: 6px;
  border-color: #dde5f0;
  font-family: sans-serif;
  font-size: 11.5px;
  background: #fafbfd;
  height: auto;
  resize: none;
}

/* card footer */
.ctf-stcard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  background: #f5f8fd;
  border-top: 1px solid #e8eef8;
}
.ctf-stcard-footer-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ctf-stcard-cb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: #14213d;
  cursor: pointer;
}
.ctf-stcard-submit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 12px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.22);
}
.ctf-stcard-submit:hover {
  background: #15803d;
}

.sr-btn--edit {
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f3460, #1e5495);
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 3px 10px rgba(15, 52, 96, 0.28);
  padding: 12px 14px;
  height: 30px;
}

.sr-btn--edit:hover {
  background: linear-gradient(135deg, #0b2748, #18457c);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(15, 52, 96, 0.35);
}

.sr-btn--edit:active {
  transform: scale(0.98);
}

.sr-btn--edit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.sr-btn--submit {
  border: 1px solid #42ae54;
  border-radius: 8px;
  background: linear-gradient(135deg, #42ae54, #2f9e44);
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 3px 10px rgba(66, 174, 84, 0.28);
  padding: 12px 14px;
  height: 30px;
}

.sr-btn--submit:hover {
  background: linear-gradient(135deg, #379448, #27863a);
  border-color: #379448;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(66, 174, 84, 0.35);
}

.sr-btn--submit:active {
  transform: scale(0.98);
}

.sr-btn--submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.sr-btn--cancel {
  padding: 12px 14px;
  height: 30px;
  border: 1px solid #d1495b;
  border-radius: 8px;
  background: linear-gradient(135deg, #d1495b, #b93c4d);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 3px 4px rgba(209, 73, 91, 0.28);
}

.sr-btn--cancel:hover {
  background: linear-gradient(135deg, #c44153, #a83243);
  border-color: #c44153;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(209, 73, 91, 0.35);
}

.sr-btn--cancel:active {
  transform: scale(0.98);
}

.sr-btn--cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}
/* ── Responsive ──────────────────────────────────── */
@media (max-width: 1100px) {
  .ctf-body {
    grid-template-columns: 1fr;
  }
  .ctf-sidebar {
    border-top: 1px solid #e6ecf5;
  }
  .ctf-g5 {
    grid-template-columns: repeat(3, 1fr);
  }
  .ctf-stcard {
    width: 420px;
  }
}
@media (max-width: 768px) {
  .ctf-page {
    padding: 10px 8px 40px;
  }
  .ctf-form-area {
    padding: 16px 14px;
  }
  .ctf-g5,
  .ctf-g4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .ctf-g3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .ctf-stcard {
    width: 86vw;
  }
  .ctf-stcard-g3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .ctf-g5,
  .ctf-g4,
  .ctf-g3 {
    grid-template-columns: 1fr;
  }
  .ctf-cb-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
  }
  .ctf-stcard {
    width: 92vw;
  }
  .ctf-stcard-g3,
  .ctf-stcard-g2 {
    grid-template-columns: 1fr;
  }
}

.supplier-fab-trims-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 5px;
  gap: 5px;
  margin: 5px;
}

.supp-vessel-wrapper {
  display: flex;
  align-items: end;
  gap: 10px;
}

.suppliers-capacity-container {
  max-height: 28vh;
  overflow-x: hidden;
}

.suppliers-del-btn {
  margin: 29px 0 0 0;
}

.supplier-inner-tabs-certification-container {
  border-radius: 5px;
  padding: 1.5% 5px 5px 5px;
  max-height: 25vh;
  overflow-y: auto;
}

.supplier-file-upload-container {
  border: 2px dashed #ccc;
  text-align: center;
  border-radius: 5px;
  padding: 2px;
  height: 65px;
}

.supplier-margin {
  padding: 6px;
}

.suppliers_image_label {
  padding: 5px;
}

.supplier-img {
  height: 50px;
  width: 50px;
}

.supplier-ImageName-div {
  display: flex;
  align-items: center;
  border: 2px dashed #ccc;
  border-radius: 5px;
}

.supplier-select-wid {
  width: 50%;
  margin: 0px 0 0 0;
}
.supp-file-img {
  width: 80%;
  margin: 10px 0;
}
.supp-image-wrapper {
  width: 20vw;
}

.supp-align {
  padding-top: 10px;
}

.del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #fee2e2;
  color: #ef4444;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.15s;
}

.sup-main-card {
  margin: 5px 5px 0;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.supplier-header {
  padding: 14px 17px;
  background: #ffffff;
}

.tabs-wrapper {
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.tabs-nav {
  display: flex;
  overflow-x: auto;
  padding: 0 16px;
  border-bottom: 1px solid #e2e8f0;
  scrollbar-width: none;
}

.tabs-nav::-webkit-scrollbar {
  display: none;
}

.sup-field-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sup-card-fields-label {
  font-size: 9.5px;
  font-weight: 600;
  color: #0f3460;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.upload-area-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.upload-area {
  border: 2px dashed #e2e8f0;
  border-radius: 10px;

  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
  min-width: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  height: 90px;

  position: relative;
  overflow: hidden;
}

.upload-area:hover {
  border-color: #1e2d5e;
  background: #ffffff;
}

.upload-icon {
  font-size: 20px;
  color: darkblue;
  margin-bottom: 6px;
  display: flex;
  justify-content: center;
}

.upload-text {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.contact-section {
  display: flex;
  flex-direction: column;
}

.contact-card {
  background: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
  margin-top: 10px;
}

.contact-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.contact-label {
  font-size: 13px;
  font-weight: 600;
  color: #1e2d5e;
}

.vendor-tagline {
  font-size: 14px;
  color: #6b7280;
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.5;
}

.company-name-supp {
  color: #1f2937;
  font-weight: 600;
  font-size: 13px;
}

.separator {
  margin: 0 8px;
  color: #cbd5e1;
}

.powered-by {
  font-size: 13px;
  color: #9ca3af;
}

.powered-by strong {
  color: #0f3460;
  font-weight: 700;
}

@media (max-width: 991px) {
  .common-add-button-container-supp {
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .vendor-tagline {
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
  }

  .separator {
    display: none;
  }

  .common-add-button-container-supp {
    justify-content: center;
    width: 100%;
  }
}

.material-color-details-container {
  overflow-x: hidden;
  overflow-y: auto;
  margin: 10px 0 0 0;
  max-height: 20vh;
}
.material-details-container {
  position: fixed;
  top: 9vh;
  margin-top: 10px;
}
.ant-drawer-body .common-floatableStyle {
  top: 35px;
}
.material-supp-btn {
  height: 200px;
}

.material-cost-dropdown {
  width: 10vw;
}
.matertial-card-container {
  height: 100%;
}
.matertial-file-uploader {
  border: 2px dashed #ccc;
  text-align: center;
  height: 27vh;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.material-img {
  max-height: 150px;
  width: 150px !important;
}

.material-add-btn-div {
  display: flex;
  align-items: center;
  margin-left: 5px;
}
.marterial-sup-div {
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px;
}
.yarn-tbl-col {
  height: 100%;
  overflow: auto;
  margin: 2.2% 0 0 21%;
}
/* ==========================================================================
   Yarn Material page – modern styling (v3)
   - Left column is your original code (no ym- styles). Right side grid (19/24,
     supplier cards span 12, supplier fields 6/24 at lg+).
   - Every class starts with "ym-" and is scoped under .ym-page.
   - No !important. Ant Design inputs/selects are only restyled inside
     .ym-field (this page), never globally.
   ========================================================================== */

.ym-page {
  --ym-primary: #0f3460;
  --ym-primary-2: #2457a6;
  --ym-primary-soft: #eef3fc;
  --ym-accent: #3b82f6;
  --ym-text: #18233d;
  --ym-label: #4a5575;
  --ym-muted: #7a85a3;
  --ym-line: #e6ebf5;
  --ym-surface: #ffffff;
  --ym-canvas: #f4f6fb;
  --ym-danger: #d64545;
  --ym-radius-xl: 16px;
  --ym-radius-lg: 12px;
  --ym-radius-md: 8px;
  --ym-shadow:
    0 1px 2px rgba(15, 52, 96, 0.04), 0 6px 18px rgba(15, 52, 96, 0.06);

  --ym-pane-height: calc(100vh - var(--ym-offset));
  --ym-offset: 154px;

  box-sizing: border-box;
  padding: 5px;
  padding-bottom: 0px;
  background: var(--ym-canvas);
  color: var(--ym-text);
}

.ym-page *,
.ym-page *::before,
.ym-page *::after {
  box-sizing: border-box;
}

/* ---------- Page header ------------------------------------------------- */

.ym-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 5px;
  padding: 4px 8px;
  background: var(--ym-surface);
  border: 1px solid var(--ym-line);
  border-radius: var(--ym-radius-xl);
  box-shadow: var(--ym-shadow);
}

.ym-header__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ym-header__logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(140deg, var(--ym-primary), var(--ym-primary-2));
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(15, 52, 96, 0.25);
}

.ym-header__titles {
  min-width: 0;
}

.ym-header__title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ym-primary);
}

.ym-header__item-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ym-muted);
}

.ym-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ym-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ym-page .ym-field__label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--ym-label);
}

/* Every field header (plain label or label + refresh/add chips) gets the same
   minimum height, so the inputs in a row always line up. */
.ym-field > :first-child {
  min-height: 28px;
  align-items: center;
}

.ym-required {
  font-size: 10px;
  color: var(--ym-danger);
}

/* Inputs and selects: fill the field, softer corners, clear focus state.
   Selectors are scoped to this page only. */
.ym-page .ym-field .ant-select,
.ym-page .ym-field .ant-input,
.ym-page .ym-field .ant-input-affix-wrapper {
  width: 100%;
}

.ym-page .ym-field .ant-input:hover,
.ym-page .ym-field .ant-select:hover .ant-select-selector {
  border-color: var(--ym-primary-2);
}

.ym-page .ym-field .ant-input:focus,
.ym-page .ym-field .ant-input-focused,
.ym-page .ym-field .ant-select-focused .ant-select-selector {
  border-color: var(--ym-primary-2);
  box-shadow: 0 0 0 3px rgba(36, 87, 166, 0.14);
}

/* ---------- Right column ------------------------------------------------ */

.ym-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.ym-card {
  min-width: 0;
  overflow: hidden;
  background: var(--ym-surface);
  border: 1px solid var(--ym-line);
  border-radius: var(--ym-radius-xl);
  box-shadow: var(--ym-shadow);
}

.ym-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(
    180deg,
    var(--ym-primary-soft),
    var(--ym-surface)
  );
  border-bottom: 1px solid var(--ym-line);
}

.ym-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ym-primary);
}

.ym-card__body {
  padding: 12px 16px 16px;
}

.ym-table-wrap {
  overflow-x: auto;
}

/* ---------- Supplier cards ---------------------------------------------- */

.ym-supplier-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--ym-surface);
  border: 1px solid var(--ym-line);
  border-radius: var(--ym-radius-xl);
  box-shadow: var(--ym-shadow);
}

.ym-supplier-card--company {
  border-top: 3px solid var(--ym-accent);
}

.ym-supplier-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 54px;
  padding: 8px 16px;

  border-bottom: 1px solid var(--ym-line);
}

.ym-supplier-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ym-primary);
}

.ym-supplier-card__title::before {
  content: "";
  flex: none;
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--ym-primary-2), var(--ym-accent));
  border-radius: 4px;
}

.ym-supplier-card__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ym-supplier-card__body {
  flex: 1 1;
  padding: 14px 16px 16px;
}

.ym-supplier-card__tabs {
  margin-top: 10px;
}

.ym-cost-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 16px;
  margin: 8px 0;
}

.ym-cost-toolbar .ant-select {
  min-width: 190px;
}

.ym-default-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ym-label);
  background: var(--ym-primary-soft);
  border-radius: 999px;
  cursor: pointer;
}

.ym-cost-body {
  margin-top: 8px;
  overflow-x: auto;
}

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

.ym-moq-head__title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ym-primary);
}

.ym-empty {
  margin: 0;
  padding: 20px 12px;
  font-size: 13px;
  text-align: center;
  color: var(--ym-muted);
  background: #fafbff;
  border: 1px dashed var(--ym-line);
  border-radius: var(--ym-radius-lg);
}

/* ---------- Add-supplier footer ----------------------------------------- */

.ym-footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--ym-surface);
  border: 1.5px dashed #bcc8e2;
  border-radius: var(--ym-radius-xl);
}

/* ==========================================================================
   LEFT: same structure as before, card look + scoped restyle of your classes
   ========================================================================== */

.ym-left {
  overflow: hidden;
  background: var(--ym-surface);
  border: 1px solid var(--ym-line);
  border-radius: var(--ym-radius-xl);
  box-shadow: var(--ym-shadow);
}

.ym-left .fabric-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 5px 6px;
  background: linear-gradient(135deg, var(--ym-primary), var(--ym-primary-2));
}

.ym-left__body {
  padding: 5px 7px 8px;
  max-height: 72vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* Same header height for every field, so inputs in a row line up. */
.ym-left .ctf-stcard-field > :first-child {
  display: flex;
  align-items: center;
  min-height: 28px;
}

.ym-left .aster-risk-Icon {
  margin-left: 3px;
  font-size: 10px;
  color: var(--ym-danger);
}

.ym-left .ant-input:hover,
.ym-left .ant-select:hover .ant-select-selector {
  border-color: var(--ym-primary-2);
}

.ym-left .ant-input:focus,
.ym-left .ant-input-focused,
.ym-left .ant-select-focused .ant-select-selector {
  border-color: var(--ym-primary-2);
  box-shadow: 0 0 0 3px rgba(36, 87, 166, 0.14);
}

.ym-left .fp-img-uploader {
  background: #fafbff;
  border: 1.5px dashed #bcc8e2;
  border-radius: var(--ym-radius-lg);
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.ym-left .fp-img-uploader:hover {
  background: var(--ym-primary-soft);
  border-color: var(--ym-primary-2);
}

/* ==========================================================================
   RIGHT: extra detail for the supplier cards
   ========================================================================== */

.ym-fieldset {
  padding: 12px;
  background: #f8faff;
  border: 1px solid var(--ym-line);
  border-radius: var(--ym-radius-lg);
}

.ym-supplier-card .ant-tabs-nav {
  margin-bottom: 8px;
}

/* ==========================================================================
   TWO PANES (tablet and up): left stays put, only the right side scrolls
   ========================================================================== */

@media (min-width: 768px) {
  .ym-layout {
    height: var(--ym-pane-height);
    min-height: 420px;
  }

  .ym-left-col,
  .ym-right-col {
    height: 100%;
  }

  .ym-left {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  /* Header strip keeps its height, the fields area takes the rest and
     scrolls on its own only when the form is taller than the screen. */
  .ym-left > .ant-row {
    flex: 1 1;
    min-height: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .ym-left > .ant-row > .ant-col {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .ym-left > .ant-row > .ym-left__body {
    flex: 1 1;
    min-height: 0;
    max-height: none;
  }

  .ym-main {
    height: 100%;
    padding: 0px 4px 0px 0px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  /* Add-supplier bar stays reachable while the cards scroll under it. */
  .ym-footer-bar {
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    z-index: 2;
    box-shadow: 0 -8px 14px -10px rgba(15, 52, 96, 0.25);
  }
}

/* ---------- Small screens ----------------------------------------------- */

@media (max-width: 575px) {
  .ym-page {
    padding: 8px;
  }

  .ym-header {
    padding: 10px 12px;
  }

  .ym-header__actions {
    justify-content: flex-start;
    width: 100%;
  }

  .ym-card__body,
  .ym-supplier-card__body {
    padding-right: 12px;
    padding-left: 12px;
  }

  .ym-cost-toolbar .ant-select {
    min-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ym-left .fp-img-uploader {
    transition: none;
  }
}

.ym-page .ym-left {
  border-radius: var(--ym-radius-xl);
  box-shadow:
    0 2px 4px rgba(15, 52, 96, 0.06),
    0 12px 28px rgba(15, 52, 96, 0.12);
}

.spec-popup-tbl-div {
  max-height: 13vh;
  overflow-y: auto;
}
.spec-card-container {
  margin: 0.4em;
  height: 40vh;
  overflow: auto;
}

.ssm-default-spec {
  background: #ffffff;
  border: 1px solid #dfe4ec;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow:
    0 2px 10px rgba(21, 41, 75, 0.06),
    0 1px 2px rgba(21, 41, 75, 0.04);
}

.ssm-body {
  padding: 22px 24px 20px;
  overflow-y: auto;
  overflow-x: hidden;
}

.ssm-card-title-muted {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5b6577;
}

.ssm-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #dfe4ec;
  border-radius: 12px;
  padding: 18px 18px 16px;
  box-shadow:
    0 2px 10px rgba(21, 41, 75, 0.06),
    0 1px 2px rgba(21, 41, 75, 0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  transition: box-shadow 0.2s ease;
  height: 100%;
  width: 100%;
}

.ssm-card:hover {
  box-shadow: 0 10px 24px rgba(21, 41, 75, 0.12);
}

.ssm-grid {
  display: block;
}

.fabric-payment-terms {
  padding: 12px;
  background: #fafafa;
  border-radius: 8px;
}

.payment-terms-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #262626;
}
.table-wt_width {
  width: 100%;
}

.payment-term-card {
  border-left: 4px solid #1677ff;
  border-radius: 6px;
  background: #fff;
  transition: all 0.2s ease;
}

.payment-term-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ob-general-edit-process-mainContainer {
  overflow-x: auto;
  scrollbar-color: #0f3460 #e5e4e2;
}

.ob-add-btn {
  margin: 10px 0 10px 0;
}

.ob-table-container {
  table-layout: fixed;
  border-collapse: collapse;
}

.ob-edit-drag-drop-td {
  display: flex;
  align-items: center;
}

.size-lib-input-div {
  display: grid;
  grid-template-columns: 1fr 1fr 3fr;
  grid-column-gap: 10px;
  column-gap: 10px;
}

.size-lib-table {
  max-width: -webkit-fit-content;
  max-width: fit-content;
  border-spacing: 5px;
}

.size-lib-table-input {
  width: 100%;
}
.size-lib-container{
  height: 70vh;
  overflow: auto;
}

.trims-image-table-td {
  border-spacing: 5px;
  border-radius: 2px;
  text-align: center;
  min-width: 10vw;
  background: #f6f6f6;
  border: 1px solid #f8f2f2;
  border-radius: 2px;
}
.trim-img {
  width: 77.5%;
}
.trm-img-del {
  display: flex;
  position: absolute;
  right: 0px;
  top: 20px;
}

.trims-fab-inner-container {
  overflow-y: auto;
  overflow-x: hidden;
  margin: 10px 0 0 0;
  height: 19vh;
}
.trims-basic-container {
  margin: 5px;
  background: #f7faff;
  height: 45vh;
  overflow-x: auto;
}
.trims-arr-grid-container {
  margin: 10px 0 0 0;
  display: grid;
  grid-column-gap: 10px;
  column-gap: 10px;
  grid-template-columns: repeat(3, minmax(342px, 1fr));
  grid-row-gap: 10px;
  row-gap: 10px;
  align-items: start;
}
.trims-color-search {
  width: 20%;
  margin: 0 0 10px 0;
}

.trims-select-dropdown {
  width: 25%;
}

.trims-dropdown-input-table {
  height: -webkit-fit-content;
  height: fit-content;
}

.trims-doc-td {
  display: flex;
  justify-content: center;
}

.trims-label {
  margin: 5px;
}
.trim-table-div {
  width: 15%;
}

.trims-table-td {
  width: 0;
}
.trims-file-uploader {
  border: 2px dashed #ccc;
  text-align: center;
  height: 50px;
  border-radius: 5px;
  display: grid;
  align-items: center;
  width: 145px;
}

.trims-image-uploader-container {
  text-align: center;
  border-radius: 5px;
}

.trims-process-loss-td {
  min-width: 4vw;
}
.trim-details-container {
  position: absolute;
  top: 86px;
}
@media only screen and (min-width: 1024px) and (max-width: 1200px) {
  .trim-details-container {
    position: fixed;
    top: 98px;
    max-height: 500px;
    overflow: auto;
  }
  .trims-arr-grid-container {
    margin: 10px 0 0 0;
    display: grid;
    grid-column-gap: 10px;
    column-gap: 10px;
    grid-template-columns: repeat(2, minmax(342px, 1fr));
    grid-row-gap: 10px;
    row-gap: 10px;
    align-items: start;
  }
}
.trm-tbl-col {
  height: 100%;
  overflow: auto;
  margin: 2.2% 0 0 21%;
}

.trim-table-main {
  overflow-y: auto;
  margin: 0.4% 0 0 19.6%;
  max-height: 74vh;
}

.trims-image-uploader {
  border: 2px dashed #ccc;
  text-align: center;
  height: 135px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px;
}

.trim-process-wid {
  width: 20vw;
  border-radius: 2px;
  text-align: left;
  background: #f6f6f6;
  border: 1px solid #f8f2f2;
  border-radius: 2px;
}

.trim-table-main {
  overflow-y: auto;
  margin: 0.4% 0 0 19.6%;
  max-height: 74vh;
  scrollbar-width: thin;
}

.trim-panel-root {
  font-family: "DM Sans", sans-serif;
  background: #ffffff;
  border-right: 2px solid #e0d6e8;
  position: absolute;
  top: 10px;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 2px 12px rgba(44, 26, 46, 0.08);
}

.trim-panel-body {
  padding: 0px 7px 3px 5px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  height: 70vh;
  max-width: 300px;
}

@media screen and (max-width: 1700px) {
  .trim-table-main {
    margin-left: 18%;
    max-height: 76vh;
  }

  .trim-panel-body {
    max-width: 290px;
    height: 72vh;
  }
}

@media screen and (max-width: 1536px) {
  .trim-table-main {
    margin-left: 19.6%;
    max-height: 74vh;
  }

  .trim-panel-body {
    max-width: 300px;
    height: 70vh;
  }
}

@media screen and (max-width: 1440px) {
  .trim-table-main {
    margin-left: 21%;
    max-height: 72vh;
  }

  .trim-panel-body {
    max-width: 280px;
    height: 68vh;
  }
}

@media screen and (max-width: 1280px) {
  .trim-table-main {
    margin-left: 23%;
    max-height: 68vh;
  }

  .trim-panel-body {
    max-width: 260px;
    height: 65vh;
  }
}

@media screen and (max-width: 1100px) {
  .trim-table-main {
    margin-left: 0;
    margin-top: 10px;
    max-height: 65vh;
  }

  .trim-panel-root {
    position: relative;
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #e0d6e8;
  }

  .trim-panel-body {
    max-width: 100%;
    height: auto;
    max-height: 300px;
  }
}

@media screen and (max-width: 768px) {
  .trim-table-main {
    margin: 10px 0 0 0;
    max-height: 60vh;
  }

  .trim-panel-root {
    width: 100%;
    position: relative;
    top: 0;
  }

  .trim-panel-body {
    max-width: 100%;
    padding: 10px;
    height: auto;
    max-height: 250px;
  }
}

.trim-panel-root {
  font-family: "DM Sans", sans-serif;
  background: #ffffff;
  border-right: 2px solid #e0d6e8;
  position: absolute;
  top: 10px;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 2px 12px rgba(44, 26, 46, 0.08);

  width: 300px;
}

.trim-panel-body {
  padding: 0px 7px 3px 5px;
  display: flex;
  flex-direction: column;
  gap: 0;

  overflow-y: auto;
  overflow-x: hidden;

  height: 73vh;

  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.buyer-checkbox .ant-checkbox + span {
  -webkit-padding-start: 0 !important;
          padding-inline-start: 0 !important;
}

.trim-table-main {
  overflow-y: auto;
  overflow-x: auto;

  margin: 0.4% 0px 2px 20.6%;
  height: 74vh;

  width: calc(100% - 19.6%);
}

@media screen and (max-width: 1450px) {
  .trim-panel-root {
    width: 280px;
    height: 74vh;
  }

  .trim-panel-body {
    overflow-x: hidden;
    max-width: 100%;
    height: 64vh;
  }

  .trim-table-main {
    margin-left: 21%;
    width: calc(100% - 21%);
  }
}

@media screen and (max-width: 1280px) {
  .trim-panel-root {
    width: 260px;
  }

  .trim-panel-body {
    overflow-x: hidden;
    height: 64vh;
  }

  .trim-table-main {
    margin-left: 23%;
    width: calc(100% - 23%);
  }
}

@media screen and (max-width: 1100px) {
  .trim-panel-root {
    position: relative;
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #e0d6e8;
  }

  .trim-panel-body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .trim-table-main {
    margin-left: 0;
    width: 100%;
  }
}

.file-container {
  border: 2px dashed #ccc;
  text-align: center;
  height: 15vh;
  border-radius: 5px;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 5px;
}
.print-img-container {
  height: 12vh;
}

.file-name {
  margin: 0px;
  font-size: 12px;
  cursor: pointer;
}

.file-upload-file-div {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.trimTypes-specifications-input-container {
  display: grid;
  grid-template-columns: 1fr 0.1fr;
  margin: 5px;
}
.trimsTypes-spec-input-holder {
  width: 95%;
}
.specifications-trimTypes-container {
  width: 93%;
  padding: 5px 3%;
  gap: 10px;
  align-items: flex-start;
}

.HeaderButton-TrimTypes {
  display: flex;
  justify-content: space-between;
  text-align: left;
  align-items: center;
  min-height: 30px;
  margin: 20px 0 0 0;
  padding-bottom: 2px;
  border-bottom: 1px solid #ccc;
}

.task-container {
  border-radius: 5px;
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
  padding: 5px;
  height: 84vh;
  overflow: auto;
  overflow-x: hidden;
}

.split-highlight {
  border: 2px solid #ff9800;
  box-shadow: 0 0 12px rgba(255, 152, 0, 0.8);
  transition: all 0.3s ease-in-out;
  animation: splitPulse 1.2s ease-in-out;
  border-radius: 8px;
}

@keyframes splitPulse {
  0% {
    box-shadow: 0 0 0 rgba(255, 152, 0, 0);
    transform: scale(1);
  }
  40% {
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.9);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 152, 0, 0);
    transform: scale(1);
  }
}

.supply-line {
  margin: 0 0;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.supply-line span {
  font-size: 8px;
  font-weight: 500;
  transform: rotate(-90deg);
  white-space: nowrap;
}

.card-label {
  font-size: 10px;
  font-weight: 600;
  color: #444;
}

.machine-info .common-label {
  font-size: 9px;
  font-weight: 600;
  color: #444;
  margin-bottom: 2px;
  display: block;
}

.machine-info .common-sub-title {
  font-size: 9px;
  font-weight: 500;
  color: #000;
  margin-left: 4px;
}

.machine-info .additional-items {
  margin-top: 4px;
}

.machine-info .ant-row {
  margin-bottom: 4px;
}

/* ---- React Flow specific ---- */

/* dashed, animated edge stroke (replaces the old .xarrow-dash-animate use on Xarrow) */
.xarrow-dash-animate {
  stroke-dasharray: 8 4;
  animation: xarrowDashMove 0.8s linear infinite;
}

@keyframes xarrowDashMove {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -12;
  }
}

/* hover label rendered via <EdgeLabelRenderer /> (replaces the old <ArrowLabel />) */
.xarrow-label {
  padding: 4px 8px;
  background: #0f3460;
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}

/* keep operation cards from triggering a node-drag when the user is
   actually interacting with a control inside them */
.react-flow__node-operationNode .nodrag {
  cursor: default;
}

.react-flow__minimap {
  border-radius: 6px;
}

.operation-card {
  background-color: #e5ebf2;
}

#scroll-wrapper {
  position: relative;
}

.split-highlight {
  border: 2px solid #ff9800;
  box-shadow: 0 0 12px rgba(255, 152, 0, 0.8);
  transition: all 0.3s ease-in-out;
  animation: splitPulse 1.2s ease-in-out;
}

@keyframes splitPulse {
  0% {
    box-shadow: 0 0 0 rgba(255, 152, 0, 0);
    transform: scale(1);
  }
  40% {
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.9);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 152, 0, 0);
    transform: scale(1);
  }
}

.supply-line {
  margin: 0 0;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #f2f2f2; /* light gray */
  display: flex;
  align-items: center;
  justify-content: space-between; /* text across the line */
}

.supply-line span {
  font-size: 8px;
  font-weight: 500;
  transform: rotate(-90deg);
  white-space: nowrap;
}

.card-label {
  font-size: 10px;
  font-weight: 600;
  color: #444;
}

.machine-info .common-label {
  font-size: 9px;
  font-weight: 600;
  color: #444;
  margin-bottom: 2px;
  display: block;
}

.machine-info .common-sub-title {
  font-size: 9px;
  font-weight: 500;
  color: #000;
  margin-left: 4px;
}

.machine-info .additional-items {
  margin-top: 4px;
}

/* Optional: reduce spacing between rows */
.machine-info .ant-row {
  margin-bottom: 4px;
}

.xarrow-dash-animate {
  stroke-dasharray: 8 4;
  animation: xarrowDashMove 0.8s linear infinite;
}

@keyframes xarrowDashMove {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -12;
  }
}

.gcl {
  /* app palette (falls back to the same values if the --sx vars are missing) */
  --gcl-navy: var(--sx-navy, #0f3460);
  --gcl-ink: var(--sx-ink, #16213e);
  --gcl-line: #d9e1ec;
  --gcl-card: #f7f9fd;
  --gcl-hover: #edf3fc;

  /* same pair the OB approved / rejected tags use */
  --gcl-ok: #15803d;
  --gcl-ok-bg: #e4f7e9;
  --gcl-ok-line: #b5e4c3;
  --gcl-bad: #be123c;
  --gcl-bad-bg: #fdeaf0;
  --gcl-bad-line: #f6bccb;

  padding: 10px 12px 12px;
}

.gcl__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

/* neutral cards: status is carried by the icon and the tag only */
.gcl__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  background: var(--gcl-card);
  border: 1px solid var(--gcl-line);
  border-radius: 10px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.gcl__item:hover {
  background: var(--gcl-hover);
  border-color: #b9c9e2;
}

.gcl__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid transparent;
}
.gcl__item.is-done .gcl__icon {
  color: var(--gcl-ok);
  background: var(--gcl-ok-bg);
  border-color: var(--gcl-ok-line);
}
.gcl__item.is-pending .gcl__icon {
  color: var(--gcl-bad);
  background: var(--gcl-bad-bg);
  border-color: var(--gcl-bad-line);
}

.gcl__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  color: var(--gcl-ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gcl__item.is-all .gcl__name {
  color: var(--gcl-navy);
  font-weight: 700;
}

.gcl__right {
  display: flex;
  align-items: center;
  flex: none;
  gap: 8px;
}

/* tags: soft tinted pills like the header tags, not antd's default fills */
.gcl__tag.ant-tag {
  margin: 0;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 20px;
  border-radius: 999px;
}
.gcl__tag.ant-tag-success {
  color: var(--gcl-ok);
  background: var(--gcl-ok-bg);
  border-color: var(--gcl-ok-line);
}
.gcl__tag.ant-tag-error {
  color: var(--gcl-bad);
  background: var(--gcl-bad-bg);
  border-color: var(--gcl-bad-line);
}

@media (max-width: 575.98px) {
  .gcl__grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gcl__item {
    transition: none;
  }
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  font-family:
    "Segoe UI",
    Roboto,
    -apple-system,
    sans-serif;
}

.page-content {
  text-align: center;
}

.result-text {
  margin-top: 16px;
  font-size: 15px;
  color: #16a34a;
  font-weight: 600;
}

/* ---------- Overlay ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease-out;
}

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

/* ---------- Card ---------- */
.modal-card {
  background: #ffffff;
  width: 380px;
  max-width: 90vw;
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: slideUp 0.18s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ---------- Header ---------- */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition:
    background 0.15s,
    color 0.15s;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

/* ---------- Body ---------- */
.modal-body {
  padding: 18px 20px;
}

.modal-subtext {
  margin: 0 0 14px;
  font-size: 13px;
  color: #6b7280;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.check-item:has(input:checked) {
  border-color: #0f3460;
  background: #eef2ff;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #1f2937;
  -webkit-user-select: none;
          user-select: none;
}

.check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0f3460;
  cursor: pointer;
  flex-shrink: 0;
}

.check-text {
  text-transform: capitalize;
}

/* ---------- Footer ---------- */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.btn {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition:
    background 0.15s,
    opacity 0.15s,
    transform 0.05s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-cancel {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #374151;
}

.btn-cancel:hover {
  background: #f3f4f6;
}

.btn-submit {
  background: #0f3460;
  color: #ffffff;
}

.btn-submit:hover:not(:disabled) {
  background: #0f3460;
}

.btn-submit:disabled {
  background: #c7d2fe;
  cursor: not-allowed;
}

.btn-open {
  background: #0f3460;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-open:hover {
  background: #0f3460;
}

.or-print-container {
  display: flex;
  align-items: end;
  margin-left: 5px;
  justify-content: flex-end;
}

.or-view-history-td {
  display: flex;
  justify-content: center;
}
.fab-title {
  font-size: 0.7rem;
  font-weight: bold;
}
.ord-details-container {
  overflow: auto;
  height: 81vh;
}

.ord-details-container-fabric {
  overflow: auto;
  height: 87vh;
}

.ord-main-details-container {
  margin: 0 0 0 22%;
}
.ord-container-margin {
  margin: 0 15px 0 0;
}
.ord-img {
  width: 100%;
  object-fit: contain;
  max-height: 250px;
  margin: 10px 0 0 0;
}
.ord-sty-img {
  padding: 0 0 0 70px;
}
.ord-sty-img-container {
  width: 150px;
  height: 150px;
}
.or-btn-container {
  margin: 0px 0 0 30px;
}

.or-size-csp-alw {
  display: flex;
  float: inline-end;
}

.or-table-container {
  overflow-y: hidden;
  width: 98.5%;
  margin: 5px 0 5px 0;
  overflow-x: auto;
}

.or-cut-plan-file-upload {
  border: 2px dashed #ccc;
  text-align: center;
  height: 100px;
  border-radius: 5px;
  justify-content: center;
  align-items: center;
  padding: 5px;
  width: 300px;
  margin: 10px 0 0 0;
}
.or-Color-td {
  border-spacing: 5px;
  border-radius: 2px;
  text-align: center;
  min-width: 30vw;
  max-width: 10vw;
  background: #f6f6f6;
}

.or-select-dropdown-type {
  height: 24px;
}

.or-powise-tab-container {
  display: grid;
  grid-template-columns: 0.1fr 2fr;
}

.or-input-container {
  width: 15%;
  padding: 5px;
}

.or-trimsDetails-oq-th {
  margin-top: 0px;
  font-size: 0.625rem;
  margin-bottom: 1px;
  color: black;
  padding: 4px;
  white-space: nowrap;
  border: 1px solid #ccc;
  border-radius: 5px;
  text-align: center;
}

.or-image {
  max-height: 200px;
  height: 200px;
  max-width: 200px;
  width: 200px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.or-img-name {
  margin-right: 2%;
}

.or-del-cad {
  padding: 1px 2px 1px 2px;
  border: 1px solid rgb(201, 200, 200);
  border-radius: 50px;
  height: 24px;
  width: 22px;
  font-size: 11px;
  color: #dc432b;
  left: 97px;
  background: white;
}

.or-spec-images-container {
  display: flex;
  overflow-y: scroll;
  scroll-behavior: smooth;
  transition: scroll 0.3s ease-in-out;
  max-width: 1054px;
  padding: 3% 0 0 0;
}

.or-orderQty-tr {
  text-align: left;
  border: 1px solid rgb(201, 200, 200);
  border-spacing: 5px;
  padding: 5px;
  border-radius: 5px;
}

.or-specMeasure-file-upload-container {
  display: grid;
  grid-column: 1 / span 2;
  border-radius: 5px;
}
.or-images-scroll-contaniner {
  width: 65vw;
}
.or-file-upload-lables {
  margin-top: 0px;
  font-size: 12px;
  margin-bottom: 1px;
}

.or-mrp-sizewise-input {
  border: 1px solid rgb(201, 200, 200);
  border-radius: 5px;
  height: 24px;
  font-size: 0.625rem;
  width: 100%;
  text-align: center;
}

.or-sizeWise-table-td {
  border-spacing: 5px;
  border-radius: 5px;
  text-align: center;
  width: 85px;
}

.or-po-btn-flex {
  display: flex;
  align-items: flex-end;
}

.next-prev-div {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}

.or-fabric-width-td {
  width: 25vw;
  /* background:#f6f6f6; */
  background: #ffffff;
  font-size: 0.625rem;
  text-align: left;
  letter-spacing: 0px;
  /* border: 1px solid #f8f2f2; */
  border: 1px solid #f8f2f2;
  border-radius: 2px;
}

.or-mat-details-fab {
  min-width: 20vw;
}
.or-qty-table-th {
  margin-top: 0px;
  font-size: 0.7rem;
  margin-bottom: 1px;
  color: white;
  padding: 4px;
  background-color: #0f3460;
  border-radius: 2px;
  border-radius: 2px;

  white-space: nowrap;
  border-right: 1.5px solid rgb(255 255 255 / 38%);
  letter-spacing: 0.2px;
}

.sub-header-container-or {
  margin: 0.25em 0;
  border-radius: 5px;
  box-shadow:
    rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
  padding: 5px;
}

.or-fab-table-container {
  max-height: 60vh;
  overflow: auto;
}

.or-doc-view-td {
  display: flex;
  justify-content: center;
}

.or-qty-tab-div {
  width: 25%;
}
.or-po-add-btn {
  padding: 0 0 0 5px;
  margin-bottom: 5px;
}
.or-tabs-bottom {
  margin-bottom: 10px;
}
.or-csp-btn-tab {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 5px;
}

.or-date-input {
  height: 24px;
  width: 100%;
  padding: 5px;
}

.or-common-header {
  margin-top: 0px;
  font-size: 0.625rem;
  margin-bottom: 1px;
  color: black;
  padding: 4px;
  background-color: #b197e11c;
  border-radius: 2px;
  text-align: center;
  border: 1px;
  border-style: solid;
  border-color: #b197e169;
}

.ant-table-wrapper .ant-table-tbody > tr.or-common-header-comb > td {
  background: #f4efff !important;
  color: #5b21b6 !important;
}

.consumption-card {
  border-radius: 0.5rem; /* rounded-lg */
  border: 1px solid #fcd34d; /* border-amber-300 */
  background-color: #fffbeb; /* bg-amber-50 */
  padding: 1rem; /* p-4 */
}

.consumption-card__title {
  font-size: 0.875rem; /* text-sm */
  line-height: 1.25rem;
  font-weight: 500; /* font-medium */
  color: #78350f; /* text-amber-900 */
  margin: 0;
}

.consumption-card__chips {
  margin-top: 0.5rem; /* mt-2 */
  display: flex;
  flex-wrap: wrap; /* flex-wrap */
  gap: 0.5rem; /* gap-2 */
}

.consumption-card__chip {
  border-radius: 9999px; /* rounded-full */
  background-color: #fde68a; /* bg-amber-200 */
  padding: 0.25rem 0.75rem; /* py-1 px-3 */
  font-size: 0.75rem; /* text-xs */
  line-height: 1rem;
  font-weight: 600; /* font-semibold */
  color: #78350f; /* text-amber-900 */
}

.or-csp-btn-with-val {
  display: flex;
  align-items: center;
  gap: 8px;
}

.or-csp-uniform {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 8px;
  border-left: 2px solid #0f3460;
  font-size: 12px;
  line-height: 1.3;
  color: #0f3460;
  white-space: nowrap;
}

.or-csp-uniform-item b {
  font-weight: 600;
}

/* ============================================================
   FabProcessPlanningScreen - scoped classnames (prefix: pln-)
   These are intentionally NOT reusing common-table-th / common-table-td
   etc. so existing screens remain unaffected.
   ============================================================ */

.pln-page-wrap {
  padding: 8px 4px;
  position: relative;
}

.pln-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pln-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f3460;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pln-header-actions {
  display: flex;
  gap: 8px;
}

/* --------------------- Loading overlay (fixed, above drawers) --------------------- */
.pln-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
}

/* --------------------- Overall (bom-to-bom) progress overview --------------------- */
.pln-overview-section {
  margin-bottom: 20px;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.pln-overview-stat-row {
  margin-bottom: 4px;
}

.pln-stat-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fafafa;
}

.pln-stat-card-label {
  font-size: 12px;
  color: #8792a2;
}

.pln-stat-card-value {
  font-size: 22px;
  font-weight: 700;
}

.pln-overview-table {
  width: 100%;
  border-collapse: collapse;
}

/* --------------------- Progress bars (per-bom drawer, overview table, group table) --------------------- */
.pln-progress-steps-wrap {
  margin: 16px 0 20px 0;
}

.pln-progress-bars-wrap {
  margin-bottom: 10px;
}

.pln-progress-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: #555b66;
  margin-bottom: 2px;
}

.pln-progress-cell {
  display: inline-block;
  width: 110px;
}

/* --------------------- Summary table (BOM items) --------------------- */
.pln-summary-section {
  margin-bottom: 18px;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 10px;
  background: #fafbfd;
}

.pln-summary-table-container {
  overflow-x: auto;
}

.pln-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.pln-summary-th {
  background: #0f3460;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
  border: 1px solid #16457c;
}

.pln-summary-td {
  border: 1px solid #e6e8ee;
  padding: 6px 10px;
  font-size: 12.5px;
  text-align: center;
  vertical-align: middle;
}

.pln-summary-row-even {
  background: #f2f5fa;
}

.pln-summary-item-name {
  font-weight: 600;
  color: #0f3460;
}

.pln-summary-item-sub {
  font-size: 11px;
  color: #7a8699;
}

.pln-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid #0f3460;
  background: #ffffff;
  color: #0f3460;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.pln-icon-btn:hover {
  background: #0f3460;
  color: #ffffff;
}

.pln-icon-btn.pln-icon-btn-consumption {
  border-color: #679728;
  color: #679728;
}
.pln-icon-btn.pln-icon-btn-consumption:hover {
  background: #679728;
  color: #fff;
}

.pln-icon-btn.pln-icon-btn-settings {
  border-color: #c09337;
  color: #c09337;
}
.pln-icon-btn.pln-icon-btn-settings:hover {
  background: #c09337;
  color: #fff;
}

.pln-icon-btn.pln-icon-btn-progress {
  border-color: #6c5ce7;
  color: #6c5ce7;
}
.pln-icon-btn.pln-icon-btn-progress:hover {
  background: #6c5ce7;
  color: #fff;
}

/* --------------------- Grouped-by-process collapse --------------------- */
.pln-group-collapse {
  background: transparent;
  border: none;
}

.pln-group-panel {
  margin-bottom: 10px;
  border: 1px solid #dde3ee !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.pln-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
}

.pln-panel-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pln-panel-step-badge {
  background: #0f3460;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.pln-panel-process-name {
  font-weight: 600;
  color: #0f3460;
  font-size: 13.5px;
}

.pln-panel-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.pln-stat-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 90px;
}

.pln-stat-label {
  font-size: 10.5px;
  color: #8792a2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pln-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: #0f3460;
}

/* --------------------- Budget-status breakdown bar (replaces donut chart) --------------------- */
.pln-panel-status-wrap {
  min-width: 220px;
  max-width: 320px;
}

.pln-status-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pln-status-bar-outer {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: #eceff5;
}

.pln-status-bar-segment {
  height: 100%;
  transition: width 0.2s ease-in-out;
}

.pln-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.pln-status-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: #555b66;
  white-space: nowrap;
}

.pln-status-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* --------------------- Editable process table --------------------- */
.pln-table-container {
  overflow-x: auto;
  padding: 6px 4px 10px 4px;
}

.pln-table {
  width: 100%;
  border-collapse: collapse;
}

.pln-th {
  background: #eef2f8;
  color: #0f3460;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 8px;
  border: 1px solid #dde3ee;
  text-align: center;
  white-space: nowrap;
}

.pln-td {
  border: 1px solid #eceff5;
  padding: 5px 6px;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}

.pln-td-big {
  border: 1px solid #eceff5;
  padding: 5px 6px;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
  min-width: 11vw;
}

.pln-td-modify {
  background: #fff6e0;
}

.pln-row-even {
  background: #f8f9fc;
}

.pln-input,
.pln-select {
  min-width: 90px;
}

.pln-bom-tag {
  font-size: 10.5px;
  white-space: normal;
  text-align: left;
  display: block;
}

.pln-required-note {
  color: #d4380d;
  font-size: 10px;
}

/* --------------------- Footer --------------------- */
.pln-footer-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid #dde3ee;
  padding: 10px 4px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* --------------------- Drawers --------------------- */
.pln-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f3460;
  font-weight: 600;
}

.pln-consumption-color-block {
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
}

.pln-consumption-color-header {
  background: #0f3460;
  color: #fff;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 13px;
}

.pln-consumption-comp-header {
  background: #eef2f8;
  color: #0f3460;
  font-weight: 600;
  font-size: 12.5px;
  padding: 6px 12px;
  border-top: 1px solid #e6e8ee;
}

.pln-consumption-table {
  width: 100%;
  border-collapse: collapse;
}

.pln-consumption-th {
  background: #f5f7fb;
  font-size: 11px;
  color: #0f3460;
  padding: 6px 8px;
  border: 1px solid #e6e8ee;
  text-align: center;
}

.pln-consumption-td {
  font-size: 12px;
  padding: 5px 8px;
  border: 1px solid #eceff5;
  text-align: center;
}

.pln-settings-block-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f3460;
  margin: 10px 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pln-empty-note {
  text-align: center;
  color: #8792a2;
  padding: 20px 0;
  font-size: 12.5px;
}

.pln-icon-btn.pln-icon-btn-allocated {
  border-color: #2980b9;
  color: #2980b9;
}
.pln-icon-btn.pln-icon-btn-allocated:hover {
  background: #2980b9;
  color: #fff;
}
.pln-icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --------------------- Column width tuning (renderGroupTable) --------------------- */
.pln-th.pln-col-wide,
.pln-td.pln-col-wide {
  min-width: 220px;
  max-width: 400px;
  white-space: normal;
  text-align: left;
}

.pln-th.pln-col-narrow,
.pln-td.pln-col-narrow {
  min-width: 56px;
  max-width: 70px;
  padding-left: 4px;
  padding-right: 4px;
}

.pln-col-narrow .pln-input,
.pln-col-narrow .pln-select {
  min-width: 56px;
  width: 100%;
}

/* ==========================================================
   Append to FabProcessPlanningScreen.css
   Adds: sticky toolbar, stage cards, scroll-contained tables
   with sticky headers + pinned first columns, mini progress,
   pagination, drawer subtitle. Colors reuse the screen's palette.
   ========================================================== */

:root {
  --pln-ink: #1f2a3c;
  --pln-muted: #5c6778;
  --pln-line: #e3e7ee;
  --pln-row-even-bg: #f7f9fc; /* match your existing .pln-row-even background */
  --pln-selected-bg: #eef3fb;
  --pln-head-bg: #0f3460; /* match your existing .pln-th background */
  --pln-head-row-h: 36px; /* height of the first group-table header row */
}

/* ---------- toolbar ---------- */
.pln-toolbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 10px 0;
  background: #fff;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-radius: 6px;
}
.pln-toolbar-search {
  width: 280px;
}
.pln-toolbar-select {
  min-width: 150px;
}
.pln-toolbar-select-wide {
  min-width: 220px;
  max-width: 320px;
}
.pln-toolbar-spacer {
  flex: 1 1;
}
.pln-toolbar-count {
  color: #5c6778;
  color: var(--pln-muted);
  font-size: 12px;
  white-space: nowrap;
}

.pln-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: #2980b9;
  cursor: pointer;
  font-size: 13px;
}
.pln-link-btn:hover {
  text-decoration: underline;
}
.pln-link-btn:focus-visible,
.pln-stage-card:focus-visible,
.pln-section-toggle:focus-visible,
.pln-icon-only-btn:focus-visible {
  outline: 2px solid #2980b9;
  outline-offset: 2px;
}

/* ---------- stage cards (overview) ---------- */
.pln-stage-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}
.pln-stage-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-left: 4px solid var(--stage-color);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.pln-stage-card:hover {
  background: #fafbfd;
}
.pln-stage-card.is-active {
  background: #eef3fb;
  background: var(--pln-selected-bg);
  box-shadow: inset 0 0 0 1px var(--stage-color);
}
.pln-stage-card-label {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-stage-card-count {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--stage-color);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.pln-stage-card-meta {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

@media (max-width: 900px) {
  .pln-stage-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- section heads ---------- */
.pln-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 6px;
}
.pln-section-toggle,
.pln-section-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #1f2a3c;
  color: var(--pln-ink);
  background: none;
  border: 0;
  padding: 0;
}
.pln-section-toggle {
  cursor: pointer;
}
.pln-section-hint {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- scroll-contained tables with sticky header ---------- */
.pln-summary-table-container,
.pln-group-table-container {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-radius: 4px;
}
.pln-summary-table thead th,
.pln-group-table-container thead th {
  position: -webkit-sticky;
  position: sticky;
  z-index: 3;
}
.pln-summary-table thead th {
  top: 0;
}

.pln-group-table-container .pln-thead-row-1 > th {
  top: 0;
  height: 36px;
  height: var(--pln-head-row-h);
  box-sizing: border-box;
}
.pln-group-table-container .pln-thead-row-2 > th {
  top: 36px;
  top: var(--pln-head-row-h);
}

/* pinned columns: Split | Del | BOM Item */
.pln-group-table-container .pln-sticky-col {
  position: -webkit-sticky;
  position: sticky;
  z-index: 2;
}
.pln-group-table-container thead .pln-sticky-col {
  z-index: 4;
  background: #0f3460;
  background: var(--pln-head-bg);
}
.pln-group-table-container tbody .pln-sticky-col {
  background: #fff;
}
.pln-group-table-container tbody tr.pln-row-even .pln-sticky-col {
  background: #f7f9fc;
  background: var(--pln-row-even-bg);
}

.pln-sticky-col-1 {
  left: 0;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.pln-sticky-col-2 {
  left: 44px;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.pln-sticky-col-3 {
  left: 88px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  box-shadow: 2px 0 0 #e3e7ee;
  box-shadow: 2px 0 0 var(--pln-line);
}

/* BOM cell: name + color stacked instead of one wide tag */
.pln-bom-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}
.pln-bom-cell-name {
  font-weight: 600;
  color: #1f2a3c;
  color: var(--pln-ink);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pln-bom-cell-sub {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-yarn-color-chip {
  font-size: 11px;
  padding: 0 6px;
  border-radius: 8px;
  background: #fdf3e1;
  color: #8a6420;
}

/* ---------- summary table extras ---------- */
.pln-col-check {
  width: 36px;
}
.pln-row-selected > td {
  background: #eef3fb !important;
  background: var(--pln-selected-bg) !important;
}

.pln-actions-cell {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.pln-icon-only-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pln-mini-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pln-stage-pill {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  color: var(--stage-color);
  border: 1px solid var(--stage-color);
  white-space: nowrap;
  min-width: 74px;
  text-align: center;
}
.pln-mini-progress {
  display: grid;
  grid-template-columns: repeat(4, 22px);
  grid-gap: 3px;
  gap: 3px;
}
.pln-mini-progress-track {
  height: 6px;
  background: #e8ebf0;
  border-radius: 3px;
  overflow: hidden;
}
.pln-mini-progress-fill {
  height: 100%;
}

/* ---------- group panel header ---------- */
.pln-panel-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pln-group-meta {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
  font-weight: 400;
}

/* ---------- pagination ---------- */
.pln-pagination {
  display: flex;
  justify-content: flex-end;
  padding: 8px 4px;
}

/* ---------- footer ---------- */
.pln-footer-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #e3e7ee;
  border-top: 1px solid var(--pln-line);
}
.pln-footer-note {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- drawer title ---------- */
.pln-drawer-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pln-drawer-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: #5c6778;
  color: var(--pln-muted);
}

.pln-sticky-col-0 {
  left: 0;
  width: 40px;
  min-width: 40px;
  z-index: 3;
}
.pln-sticky-col-1 {
  left: 40px;
} /* was 0 */
.pln-sticky-col-2 {
  left: calc(40px + W1);
} /* was W1 */
.pln-sticky-col-3 {
  left: calc(40px + W1 + W2);
} /* was W1 + W2 */

.pln-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 12px;
  padding: 8px 4px;
}

/* SPECIAL PROCESS - append to FabProcessPlanningScreen.css */
.pln-row-special td {
  background: #fffbe6;
}
.pln-row-special td:first-child {
  box-shadow: inset 3px 0 0 #c09337;
}
.pln-group-panel-special {
  border-left: 3px solid #c09337;
}

.aph-wrap {
  position: relative;
  min-height: 120px;
}
.aph-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
}
.aph-muted {
  color: #7a8599;
  font-size: 12px;
}
.aph-pad {
  padding: 4px 0 8px;
}
.aph-comment {
  font-style: italic;
  color: #34495e;
  font-size: 12px;
  margin-top: 2px;
}
.aph-mine {
  margin-left: 6px;
}

.aph-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #e3e8f0;
  border-radius: 6px;
  background: #f7f9fc;
}
.aph-summary {
  flex: 1 1;
  min-width: 240px;
}
.aph-summary-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: #e8ecf2;
}
.aph-summary-seg {
  height: 100%;
}
.aph-summary-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  font-size: 12px;
  color: #34495e;
}
.aph-summary-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 3px;
}

.aph-section-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.aph-section-title {
  font-weight: 600;
  color: #0f3460;
}
.aph-section-sum {
  width: 45%;
  min-width: 220px;
  cursor: default;
}

.aph-target {
  border: 1px solid #e3e8f0;
  border-left: 4px solid #95a5a6;
  border-left: 4px solid var(--aph-c, #95a5a6);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
}
.aph-target-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.aph-target-title {
  font-weight: 600;
  color: #1f2d3d;
}
.aph-target-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.aph-now {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  background: #fdf6e8;
  color: #7a5a14;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.aph-ladder {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding: 6px 0 10px;
}
.aph-ladder-link {
  align-self: center;
  flex: 0 0 18px;
  height: 2px;
  background: #cfd6e1;
}
.aph-level {
  position: relative;
  flex: 0 0 180px;
  border: 1px solid #e3e8f0;
  border-top: 3px solid var(--aph-c);
  border-radius: 5px;
  padding: 6px 8px;
  background: #fbfcfe;
  font-size: 12px;
}
.aph-level-pending {
  background: #fffaf0;
}
.aph-level-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.aph-level-no {
  font-weight: 600;
  color: #0f3460;
}
.aph-level-state {
  color: var(--aph-c);
  font-weight: 600;
}
.aph-level-approvers {
  position: absolute;
  right: 6px;
  bottom: 4px;
  color: #7a8599;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.aph-timeline {
  margin-top: 6px;
}
.aph-timeline .ant-timeline-item {
  padding-bottom: 10px;
}
.aph-tl-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.aph-tl-what {
  font-weight: 500;
}
.aph-tl-user {
  font-size: 12px;
  color: #34495e;
}

.aph-older .ant-collapse-header {
  padding-left: 0 !important;
  color: #0f3460;
}
.aph-older-cycle {
  border-top: 1px dashed #e3e8f0;
  padding-top: 8px;
  margin-top: 8px;
}
.aph-older-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
  font-weight: 600;
}

/* history trigger inside Budget Status cell of planning screens */
.aph-status-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.aph-hist-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 2px;
  color: #0f3460;
  display: inline-flex;
  border-radius: 4px;
}
.aph-hist-btn:hover {
  background: #eef2f8;
}
.aph-hist-btn:disabled {
  color: #c3cad6;
  cursor: not-allowed;
  background: transparent;
}

/* SpecialProcess.css - special process display (imported by SpecialProcessModal.jsx, so every screen gets it) */

/* ---- highlighted special row ---- */
tr.sp-row > td {
  background-color: #fffaf0;
}
tr.sp-row > td:first-child {
  box-shadow: inset 3px 0 0 #c9971c;
}

/* ---- star badge ---- */
.sp-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 6px;
  height: 18px;
  border-radius: 9px;
  border: 1px solid #f0d58a;
  background: #fff3d6;
  color: #8a6100;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
  vertical-align: middle;
}
.sp-badge svg {
  color: #c9971c;
  flex-shrink: 0;
}
.sp-badge-compact {
  width: 18px;
  padding: 0;
  justify-content: center;
}
.sp-badge-orphan {
  border-color: #f2b8b5;
  background: #fdecea;
  color: #b42318;
}
.sp-badge-orphan svg {
  color: #b42318;
}

/* ---- "+" / "x" buttons ---- */
.sp-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}
.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid;
  background: #fff;
  cursor: pointer;
  line-height: 0;
  transition:
    background-color 0.15s,
    color 0.15s;
}
.sp-btn-add {
  border-color: #0f3460;
  color: #0f3460;
}
.sp-btn-add:hover:not(:disabled) {
  background: #0f3460;
  color: #fff;
}
.sp-btn-remove {
  border-color: #c0392b;
  color: #c0392b;
}
.sp-btn-remove:hover:not(:disabled) {
  background: #c0392b;
  color: #fff;
}
.sp-btn:disabled {
  border-color: #d9d9d9;
  color: #bfbfbf;
  background: #fafafa;
  cursor: not-allowed;
}

/* ---- step-number cell (popups): "3 ★ + x" in one line ---- */
.sp-step-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.sp-step-no {
  min-width: 14px;
  text-align: right;
  font-weight: 600;
}

/* ---- BOM item cell (planning screens): actions under the item name ---- */
.sp-bom-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* ---- special process group (planning screens) ---- */
.ant-collapse > .ant-collapse-item.sp-group-panel > .ant-collapse-header {
  background: #fffaf0;
  box-shadow: inset 3px 0 0 #c9971c;
}
.sp-group-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---- modal ---- */
.sp-modal-alert {
  margin-bottom: 12px;
}

/* ---- SPECIAL PROCESS: supplier cost UOM picker ---- */
.sp-uom-picker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}
.sp-uom-select {
  width: 100%;
}
.sp-uom-conv {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12px;
  color: #0f3460;
}
.sp-uom-conv-item {
  min-width: 80px;
}
.sp-uom-conv-rate {
  width: 90px;
}
.sp-uom-conv-warn {
  color: #cf1322;
  font-size: 11px;
}
.sp-uom-compact {
  margin-top: 4px;
}
.sp-uom-qty {
  font-size: 11px;
  color: #0f3460;
}

/* ============================================================
   FabProcessGroupList - scoped classnames (prefix: grp-)
   ============================================================ */

.grp-page-wrap {
  padding: 8px 4px;
}

.grp-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.grp-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f3460;
  display: flex;
  align-items: center;
  gap: 8px;
}

.grp-table-container {
  overflow-x: auto;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 6px;
  background: #fafbfd;
}

.grp-table {
  width: 100%;
  border-collapse: collapse;
}

.grp-th {
  background: #0f3460;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
  border: 1px solid #16457c;
}

.grp-td {
  border: 1px solid #e6e8ee;
  padding: 7px 10px;
  font-size: 12.5px;
  text-align: center;
  vertical-align: middle;
}

.grp-row-even {
  background: #f2f5fa;
}

.grp-fab-name {
  font-weight: 600;
  color: #0f3460;
  display: inline-flex;
  align-items: center;
}

.grp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid #0f3460;
  background: #ffffff;
  color: #0f3460;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.grp-icon-btn:hover {
  background: #0f3460;
  color: #ffffff;
}

.grp-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f3460;
  font-weight: 600;
  flex-wrap: wrap;
}

.yarn-store-orderRequest {
  width: 15%;
  padding: 0 0 0 0.3rem;
}
.yarn-alloc-btn-container {
  display: flex;
  gap: 10px;
}

.ys-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 16px;
}
.ys-chip {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  overflow: hidden;
  min-width: 200px;
}
.ys-accent {
  width: 4px;
  flex-shrink: 0;
}
.ys-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  flex: 1 1;
}
.ys-title {
  font-size: 11px;
  font-weight: 500;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ys-sep {
  height: 0.5px;
  background: rgba(0, 0, 0, 0.1);
}
.ys-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.ys-lbl {
  font-size: 11px;
  color: #aaa;
  min-width: 34px;
}
.ys-num {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
}
.ys-unit {
  font-size: 10px;
  color: #bbb;
}

.yarn-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0 14px;
}
.yarn-meta-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 14px;
  border-radius: 8px;
  background: #f5f7ff;
  border-left: 3px solid #3b5bdb;
  min-width: 120px;
}
.yarn-meta-key {
  font-size: 10px;
  font-weight: 500;
  color: #7c8db5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.yarn-meta-val {
  font-size: 13px;
  font-weight: 500;
  color: #1e2a4a;
  letter-spacing: 0.01em;
}
.bag-details-card {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.bag-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #172637;
}

.bag-details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 12px;
  gap: 12px;
}

.detail-item {
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 65px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-label {
  font-size: 11px;
  font-weight: 600;
  color: #7a7a7a;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.detail-value {
  font-size: 14px;
  font-weight: 600;
  color: #172637;
  word-break: break-word;
}

.empty-data {
  text-align: center;
  padding: 40px;
  color: #999;
}

/* ── CSS Variables & Root ───────────────────────────────────────────────── */
.kfs-root {
  --kfs-primary: #0f3460;
  --kfs-accent: #1a6b4a;
  --kfs-danger: #c0392b;
  --kfs-border: #e2e8f0;
  --kfs-bg: #f8fafc;
  --kfs-card: #ffffff;
  --kfs-label: #475569;
  --kfs-muted: #94a3b8;
  --kfs-th-bg: #0f3460;
  --kfs-th-clr: #ffffff;
  --kfs-radius: 8px;
  --kfs-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  font-family: "Segoe UI", system-ui, sans-serif;
}

/* ── Page Top Bar ───────────────────────────────────────────────────────── */
.kfs-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--kfs-border);
}

.kfs-top-bar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--kfs-primary);
}

.kfs-top-bar-title-icon {
  background: var(--kfs-primary);
  color: #fff;
  border-radius: 6px;
  padding: 6px;
  display: flex;
  align-items: center;
}

/* ── Section Card ───────────────────────────────────────────────────────── */
.kfs-card {
  background: var(--kfs-card);
  border: 1px solid var(--kfs-border);
  border-radius: var(--kfs-radius);
  padding: 16px 20px;
  box-shadow: var(--kfs-shadow);
  margin-bottom: 12px;
}

/* ── Section Header Strip ───────────────────────────────────────────────── */
.kfs-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--kfs-primary);
  border-radius: var(--kfs-radius) var(--kfs-radius) 0 0;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin: -16px -20px 16px;
}

.kfs-section-header svg {
  opacity: 0.85;
}

/* ── Field Label ────────────────────────────────────────────────────────── */
.kfs-label {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--kfs-label);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.kfs-label .aster-risk-Icon {
  color: #e53e3e;
  font-size: 9px;
}

/* ── Field Grid & Group ─────────────────────────────────────────────────── */
.kfs-field-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}

.kfs-field-group {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

/* ── Material Card ──────────────────────────────────────────────────────── */
.kfs-mat-card {
  border: 1px solid var(--kfs-border);
  border-radius: var(--kfs-radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--kfs-shadow);
}

.kfs-mat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f5f9;
  padding: 10px 16px;
  border-bottom: 1px solid var(--kfs-border);
}

.kfs-mat-header-left {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
}

/* ── Info Chip ──────────────────────────────────────────────────────────── */
.kfs-info-chip {
  display: flex;
  flex-direction: column;
}

.kfs-info-chip-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--kfs-muted);
  font-weight: 600;
}

.kfs-info-chip-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--kfs-primary);
}

.kfs-info-chip-value--normal {
  font-size: 12px;
  font-weight: 500;
  color: #334155;
}

/* ── Entry Panel ────────────────────────────────────────────────────────── */
.kfs-entry-panel {
  background: #fafbfc;
  border-bottom: 1px solid var(--kfs-border);
  padding: 14px 16px;
}

.kfs-entry-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
  margin-bottom: 10px;
}

.kfs-entry-row:last-child {
  margin-bottom: 0;
}

/* ── Divider Label ──────────────────────────────────────────────────────── */
.kfs-divider-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--kfs-muted);
  margin: 6px 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kfs-divider-label::after {
  content: "";
  flex: 1 1;
  height: 1px;
  background: var(--kfs-border);
}

/* ── Add Bag Button ─────────────────────────────────────────────────────── */
.kfs-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--kfs-primary);
  cursor: pointer;
  border: none;
  transition:
    background 0.2s,
    transform 0.15s;
  flex-shrink: 0;
}

.kfs-add-btn:hover {
  background: #1a4a7a;
  transform: scale(1.08);
}

/* ── Bags Table ─────────────────────────────────────────────────────────── */
.kfs-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 380px;
  border-top: 1px solid var(--kfs-border);
}

.kfs-table {
  width: 100%;
  min-width: 1500px;
  border-collapse: collapse;
  font-size: 12.5px;
}

.kfs-table thead tr {
  background: var(--kfs-th-bg);
  color: var(--kfs-th-clr);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
}

.kfs-table th {
  padding: 9px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.kfs-table th:last-child {
  border-right: none;
}

.kfs-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--kfs-border);
  vertical-align: middle;
}

.kfs-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.kfs-table tbody tr:hover {
  background: #eef4ff;
}

/* ── Serial Number Badge ────────────────────────────────────────────────── */
.kfs-sn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--kfs-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

/* ── Required Star in Table Header ─────────────────────────────────────── */
.kfs-req-star {
  color: #e53e3e;
  font-size: 9px;
  vertical-align: super;
}

/* ── Empty State ────────────────────────────────────────────────────────── */
.kfs-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--kfs-muted);
}

.kfs-empty svg {
  margin-bottom: 12px;
  opacity: 0.35;
}

.kfs-empty p {
  font-size: 14px;
  font-weight: 500;
}

.fabric-Store-btn-container {
  display: flex;
}
.roll-defect-table-container {
  display: flex;
  overflow-x: auto;
}

.fabStore-ant-table {
  overflow: auto;
}
.fabricStore-name-display {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 0.3fr 2fr;
  box-shadow: rgba(0, 0, 0, 0.04) 0px 3px 5px;
  border-radius: 5px;
  padding: 10px;
  margin: 0.25rem;
}
.fabric-store-add-btn-div {
  display: flex;
  text-align: end;
  justify-content: space-between;
  align-items: center;
}
.roll-defect-table-process {
  border-radius: 5px;
  margin-top: 10px;
}
.roll-defect-th {
  text-align: center;
}
/* --- Additive styles for the enhanced FabricRoll inventory view --- */
/* Append these to FabricStore.css (nothing here overrides existing rules) */

/* .fab-roll-summary-row {
  margin: 12px 0 16px;
}

.fab-roll-stat-card {
  border-radius: 10px;
  height: 100%;
}

.fab-roll-qc-card .fab-roll-qc-label {
  font-weight: 600;
  color: #595959;
  margin-bottom: 4px;
}

.fab-roll-hoverable {
  cursor: pointer;
}

.fab-roll-more-tag {
  cursor: pointer;
  border-style: dashed;
}

.fab-roll-empty {
  color: #bfbfbf;
}

.fab-roll-weight-value {
  font-size: 14px;
  color: #262626;
}

.fab-roll-weight-sub {
  font-size: 11px;
  color: #8c8c8c;
} */
/* --- Additive styles for the enhanced FabricRoll inventory view --- */
/* Append these to FabricStore.css (nothing here overrides existing rules) */

.fab-roll-summary-row {
  margin: 12px 0 16px;
  align-items: stretch;
}

.fab-roll-summary-row .ant-col {
  display: flex;
}

.fab-roll-stat-card {
  border-radius: 10px;
  width: 100%;
}

.fab-roll-stat-card .ant-card-body {
  padding: 14px 16px;
}

.fab-roll-stat-card-warn {
  background: #fffbe6;
  border-color: #ffe58f;
}

.fab-roll-attention-banner {
  margin-bottom: 16px;
  border-radius: 10px;
}

.fab-roll-hoverable {
  cursor: pointer;
}

.fab-roll-more-tag {
  cursor: pointer;
  border-style: dashed;
}

.fab-roll-empty {
  color: #bfbfbf;
}

.fab-roll-weight-value {
  font-size: 14px;
  color: #262626;
}

.fab-roll-weight-sub {
  font-size: 11px;
  color: #8c8c8c;
  margin-top: 2px;
}

.fab-roll-age-code-list {
  margin-top: 4px;
}

.fab-roll-analytics-collapse {
  background: transparent;
  margin: 12px 0 16px;
}

.fab-roll-analytics-collapse .ant-collapse-item {
  border: none;
}

.fab-roll-analytics-collapse .ant-collapse-header {
  font-weight: 600;
  font-size: 14px;
  padding-left: 0 !important;
}

.fab-roll-analytics-collapse .ant-collapse-content-box {
  padding: 8px 0 0 !important;
}

/* ============================================================
   FabProcessPlanningScreenCombMP - scoped classnames (prefix: pln-)
   Base rules copied from FabProcessPlanningScreen.css, plus new
   ApexCharts-specific containers appended at the bottom.
   ============================================================ */

.pln-page-wrap {
  padding: 8px 4px;
  position: relative;
}

.pln-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pln-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f3460;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pln-header-actions {
  display: flex;
  gap: 8px;
}

/* --------------------- Loading overlay --------------------- */
.pln-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
}

/* --------------------- Overview dashboard --------------------- */
.pln-overview-section {
  margin-bottom: 20px;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.pln-stat-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fafafa;
}

.pln-stat-card-label {
  font-size: 12px;
  color: #8792a2;
}

.pln-stat-card-value {
  font-size: 20px;
  font-weight: 700;
}

/* --------------------- Summary table --------------------- */
.pln-summary-section {
  margin-bottom: 18px;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 10px;
  background: #fafbfd;
}

.pln-summary-table-container {
  overflow-x: auto;
}

.pln-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.pln-summary-th {
  background: #0f3460;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
  border: 1px solid #16457c;
}

.pln-summary-td {
  border: 1px solid #e6e8ee;
  padding: 6px 10px;
  font-size: 12.5px;
  text-align: center;
  vertical-align: middle;
}

.pln-summary-row-even {
  background: #f2f5fa;
}

.pln-summary-item-name {
  font-weight: 600;
  color: #0f3460;
}

.pln-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid #0f3460;
  background: #ffffff;
  color: #0f3460;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.pln-icon-btn:hover {
  background: #0f3460;
  color: #ffffff;
}

.pln-icon-btn.pln-icon-btn-consumption {
  border-color: #679728;
  color: #679728;
}
.pln-icon-btn.pln-icon-btn-consumption:hover {
  background: #679728;
  color: #fff;
}

.pln-icon-btn.pln-icon-btn-settings {
  border-color: #c09337;
  color: #c09337;
}
.pln-icon-btn.pln-icon-btn-settings:hover {
  background: #c09337;
  color: #fff;
}

.pln-icon-btn.pln-icon-btn-progress {
  border-color: #6c5ce7;
  color: #6c5ce7;
}
.pln-icon-btn.pln-icon-btn-progress:hover {
  background: #6c5ce7;
  color: #fff;
}

/* --------------------- Grouped-by-process collapse --------------------- */
.pln-group-collapse {
  background: transparent;
  border: none;
}

.pln-group-panel {
  margin-bottom: 10px;
  border: 1px solid #dde3ee !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.pln-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
}

.pln-panel-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pln-panel-step-badge {
  background: #0f3460;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.pln-panel-process-name {
  font-weight: 600;
  color: #0f3460;
  font-size: 13.5px;
}

.pln-panel-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.pln-stat-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 90px;
}

.pln-stat-label {
  font-size: 10.5px;
  color: #8792a2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pln-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: #0f3460;
}

/* --------------------- Editable process table --------------------- */
.pln-table-container {
  overflow-x: auto;
  padding: 6px 4px 10px 4px;
}

.pln-table {
  width: 100%;
  border-collapse: collapse;
}

.pln-th {
  background: #eef2f8;
  color: #0f3460;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 8px;
  border: 1px solid #dde3ee;
  text-align: center;
  white-space: nowrap;
}

.pln-td {
  border: 1px solid #eceff5;
  padding: 5px 6px;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}
.pln-td-big {
  border: 1px solid #eceff5;
  padding: 5px 6px;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
  min-width: 11vw;
}

.pln-row-even {
  background: #f8f9fc;
}

.pln-input,
.pln-select {
  min-width: 90px;
}

.pln-bom-tag {
  font-size: 10.5px;
  white-space: normal;
  text-align: left;
  display: block;
}

/* --------------------- Footer --------------------- */
.pln-footer-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid #dde3ee;
  padding: 10px 4px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* --------------------- Drawers --------------------- */
.pln-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f3460;
  font-weight: 600;
}

.pln-consumption-color-block {
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
}

.pln-consumption-color-header {
  background: #0f3460;
  color: #fff;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 13px;
}

.pln-consumption-comp-header {
  background: #eef2f8;
  color: #0f3460;
  font-weight: 600;
  font-size: 12.5px;
  padding: 6px 12px;
  border-top: 1px solid #e6e8ee;
}

.pln-consumption-table {
  width: 100%;
  border-collapse: collapse;
}

.pln-consumption-th {
  background: #f5f7fb;
  font-size: 11px;
  color: #0f3460;
  padding: 6px 8px;
  border: 1px solid #e6e8ee;
  text-align: center;
}

.pln-consumption-td {
  font-size: 12px;
  padding: 5px 8px;
  border: 1px solid #eceff5;
  text-align: center;
}

.pln-settings-block-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f3460;
  margin: 10px 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pln-empty-note {
  text-align: center;
  color: #8792a2;
  padding: 20px 0;
  font-size: 12.5px;
}

/* ============================================================
   NEW: ApexCharts containers
   ============================================================ */

.pln-apex-overview {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pln-apex-gauge-grid {
  margin: 12px 0 6px 0;
}

.pln-apex-donut-wrap {
  cursor: default;
}

.pln-status-lazy-hint {
  font-size: 10.5px;
  color: #9aa3b2;
  font-style: italic;
  padding: 4px 0;
}

.pln-panel-status-wrap {
  min-width: 220px;
  max-width: 260px;
}

/* --------------------- Progress bars (per-bom drawer, overview table, group table) --------------------- */
.pln-progress-steps-wrap {
  margin: 16px 0 20px 0;
}

.pln-progress-bars-wrap {
  margin-bottom: 10px;
}

.pln-progress-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: #555b66;
  margin-bottom: 2px;
}

.pln-progress-cell {
  display: inline-block;
  width: 110px;
}

/* --------------------- Column width tuning (renderGroupTable) --------------------- */
.pln-th.pln-col-wide,
.pln-td.pln-col-wide {
  min-width: 220px;
  max-width: 260px;
  white-space: normal;
  text-align: left;
}

.pln-th.pln-col-narrow,
.pln-td.pln-col-narrow {
  min-width: 56px;
  max-width: 70px;
  padding-left: 4px;
  padding-right: 4px;
}

.pln-col-narrow .pln-input,
.pln-col-narrow .pln-select {
  min-width: 56px;
  width: 100%;
}

/* ==========================================================
   Append to FabProcessPlanningScreen.css
   Adds: sticky toolbar, stage cards, scroll-contained tables
   with sticky headers + pinned first columns, mini progress,
   pagination, drawer subtitle. Colors reuse the screen's palette.
   ========================================================== */

:root {
  --pln-ink: #1f2a3c;
  --pln-muted: #5c6778;
  --pln-line: #e3e7ee;
  --pln-row-even-bg: #f7f9fc; /* match your existing .pln-row-even background */
  --pln-selected-bg: #eef3fb;
  --pln-head-bg: #0f3460; /* match your existing .pln-th background */
  --pln-head-row-h: 36px; /* height of the first group-table header row */
}

/* ---------- toolbar ---------- */
.pln-toolbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 10px 0;
  background: #fff;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-radius: 6px;
}
.pln-toolbar-search {
  width: 280px;
}
.pln-toolbar-select {
  min-width: 150px;
}
.pln-toolbar-select-wide {
  min-width: 220px;
  max-width: 320px;
}
.pln-toolbar-spacer {
  flex: 1 1;
}
.pln-toolbar-count {
  color: #5c6778;
  color: var(--pln-muted);
  font-size: 12px;
  white-space: nowrap;
}

.pln-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: #2980b9;
  cursor: pointer;
  font-size: 13px;
}
.pln-link-btn:hover {
  text-decoration: underline;
}
.pln-link-btn:focus-visible,
.pln-stage-card:focus-visible,
.pln-section-toggle:focus-visible,
.pln-icon-only-btn:focus-visible {
  outline: 2px solid #2980b9;
  outline-offset: 2px;
}

/* ---------- stage cards (overview) ---------- */
.pln-stage-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}
.pln-stage-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-left: 4px solid var(--stage-color);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.pln-stage-card:hover {
  background: #fafbfd;
}
.pln-stage-card.is-active {
  background: #eef3fb;
  background: var(--pln-selected-bg);
  box-shadow: inset 0 0 0 1px var(--stage-color);
}
.pln-stage-card-label {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-stage-card-count {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--stage-color);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.pln-stage-card-meta {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

@media (max-width: 900px) {
  .pln-stage-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- section heads ---------- */
.pln-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 6px;
}
.pln-section-toggle,
.pln-section-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #1f2a3c;
  color: var(--pln-ink);
  background: none;
  border: 0;
  padding: 0;
}
.pln-section-toggle {
  cursor: pointer;
}
.pln-section-hint {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- scroll-contained tables with sticky header ---------- */
.pln-summary-table-container,
.pln-group-table-container {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-radius: 4px;
}
.pln-summary-table thead th,
.pln-group-table-container thead th {
  position: -webkit-sticky;
  position: sticky;
  z-index: 3;
}
.pln-summary-table thead th {
  top: 0;
}

.pln-group-table-container .pln-thead-row-1 > th {
  top: 0;
  height: 36px;
  height: var(--pln-head-row-h);
  box-sizing: border-box;
}
.pln-group-table-container .pln-thead-row-2 > th {
  top: 36px;
  top: var(--pln-head-row-h);
}

/* pinned columns: Split | Del | BOM Item */
.pln-group-table-container .pln-sticky-col {
  position: -webkit-sticky;
  position: sticky;
  z-index: 2;
}
.pln-group-table-container thead .pln-sticky-col {
  z-index: 4;
  background: #0f3460;
  background: var(--pln-head-bg);
}
.pln-group-table-container tbody .pln-sticky-col {
  background: #fff;
}
.pln-group-table-container tbody tr.pln-row-even .pln-sticky-col {
  background: #f7f9fc;
  background: var(--pln-row-even-bg);
}

.pln-sticky-col-1 {
  left: 0;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.pln-sticky-col-2 {
  left: 44px;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.pln-sticky-col-3 {
  left: 88px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  box-shadow: 2px 0 0 #e3e7ee;
  box-shadow: 2px 0 0 var(--pln-line);
}

/* BOM cell: name + color stacked instead of one wide tag */
.pln-bom-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}
.pln-bom-cell-name {
  font-weight: 600;
  color: #1f2a3c;
  color: var(--pln-ink);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pln-bom-cell-sub {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-yarn-color-chip {
  font-size: 11px;
  padding: 0 6px;
  border-radius: 8px;
  background: #fdf3e1;
  color: #8a6420;
}

/* ---------- summary table extras ---------- */
.pln-col-check {
  width: 36px;
}
.pln-row-selected > td {
  background: #eef3fb !important;
  background: var(--pln-selected-bg) !important;
}

.pln-actions-cell {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.pln-icon-only-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pln-mini-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pln-stage-pill {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  color: var(--stage-color);
  border: 1px solid var(--stage-color);
  white-space: nowrap;
  min-width: 74px;
  text-align: center;
}
.pln-mini-progress {
  display: grid;
  grid-template-columns: repeat(4, 22px);
  grid-gap: 3px;
  gap: 3px;
}
.pln-mini-progress-track {
  height: 6px;
  background: #e8ebf0;
  border-radius: 3px;
  overflow: hidden;
}
.pln-mini-progress-fill {
  height: 100%;
}

/* ---------- group panel header ---------- */
.pln-panel-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pln-group-meta {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
  font-weight: 400;
}

/* ---------- pagination ---------- */
.pln-pagination {
  display: flex;
  justify-content: flex-end;
  padding: 8px 4px;
}

/* ---------- footer ---------- */
.pln-footer-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #e3e7ee;
  border-top: 1px solid var(--pln-line);
}
.pln-footer-note {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- drawer title ---------- */
.pln-drawer-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pln-drawer-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- cost strip (combined-order overview) ---------- */
.pln-cost-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
  font-size: 13px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-cost-strip strong {
  color: #1f2a3c;
  color: var(--pln-ink);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.pln-sticky-col-0 {
  left: 0;
  width: 40px;
  min-width: 40px;
  z-index: 3;
}
.pln-sticky-col-1 {
  left: 40px;
} /* was 0 */
.pln-sticky-col-2 {
  left: calc(40px + W1);
} /* was W1 */
.pln-sticky-col-3 {
  left: calc(40px + W1 + W2);
} /* was W1 + W2 */

.pln-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
}

/* ============================================================
   TrimProcessPlanningScreen - scoped classnames (prefix: tpln-)
   Mirrors FabProcessPlanningScreen's pln- styling so both dashboards
   look/feel identical.
   ============================================================ */

.tpln-page-wrap {
  padding: 8px 4px;
  position: relative;
}

.tpln-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tpln-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f3460;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tpln-header-actions {
  display: flex;
  gap: 8px;
}

/* --------------------- Loading overlay --------------------- */
.tpln-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
}

/* --------------------- Overall progress overview --------------------- */
.tpln-overview-section {
  margin-bottom: 20px;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.tpln-overview-stat-row {
  margin-bottom: 4px;
}

.tpln-stat-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fafafa;
}

.tpln-stat-card-label {
  font-size: 12px;
  color: #8792a2;
}

.tpln-stat-card-value {
  font-size: 22px;
  font-weight: 700;
}

.tpln-overview-table {
  width: 100%;
  border-collapse: collapse;
}

/* --------------------- Progress bars --------------------- */
.tpln-progress-steps-wrap {
  margin: 16px 0 20px 0;
}

.tpln-progress-bars-wrap {
  margin-bottom: 10px;
}

.tpln-progress-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: #555b66;
  margin-bottom: 2px;
}

.tpln-progress-cell {
  display: inline-block;
  width: 110px;
}

/* --------------------- Summary table (BOM items) --------------------- */
.tpln-summary-section {
  margin-bottom: 18px;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 10px;
  background: #fafbfd;
}

.tpln-summary-table-container {
  overflow-x: auto;
}

.tpln-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.tpln-summary-th {
  background: #0f3460;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
  border: 1px solid #16457c;
}

.tpln-summary-td {
  border: 1px solid #e6e8ee;
  padding: 6px 10px;
  font-size: 12.5px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.tpln-summary-row-even {
  background: #f2f5fa;
}

.tpln-summary-item-name {
  font-weight: 600;
  color: #0f3460;
}

.tpln-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid #0f3460;
  background: #ffffff;
  color: #0f3460;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.tpln-icon-btn:hover {
  background: #0f3460;
  color: #ffffff;
}

.tpln-icon-btn.tpln-icon-btn-rolls {
  border-color: #679728;
  color: #679728;
}
.tpln-icon-btn.tpln-icon-btn-rolls:hover {
  background: #679728;
  color: #fff;
}

.tpln-icon-btn.tpln-icon-btn-settings {
  border-color: #c09337;
  color: #c09337;
}
.tpln-icon-btn.tpln-icon-btn-settings:hover {
  background: #c09337;
  color: #fff;
}

.tpln-icon-btn.tpln-icon-btn-progress {
  border-color: #6c5ce7;
  color: #6c5ce7;
}
.tpln-icon-btn.tpln-icon-btn-progress:hover {
  background: #6c5ce7;
  color: #fff;
}

/* --------------------- Grouped-by-process collapse --------------------- */
.tpln-group-collapse {
  background: transparent;
  border: none;
}

.tpln-group-panel {
  margin-bottom: 10px;
  border: 1px solid #dde3ee !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.tpln-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
}

.tpln-panel-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tpln-panel-step-badge {
  background: #0f3460;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.tpln-panel-process-name {
  font-weight: 600;
  color: #0f3460;
  font-size: 13.5px;
}

.tpln-panel-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.tpln-stat-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 90px;
}

.tpln-stat-label {
  font-size: 10.5px;
  color: #8792a2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tpln-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: #0f3460;
}

/* --------------------- Budget-status breakdown bar --------------------- */
.tpln-panel-status-wrap {
  min-width: 220px;
  max-width: 320px;
}

.tpln-status-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tpln-status-bar-outer {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: #eceff5;
}

.tpln-status-bar-segment {
  height: 100%;
  transition: width 0.2s ease-in-out;
}

.tpln-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.tpln-status-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: #555b66;
  white-space: nowrap;
}

.tpln-status-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* --------------------- Editable process table --------------------- */
.tpln-table-container {
  overflow-x: auto;
  padding: 6px 4px 10px 4px;
}

.tpln-table {
  width: 100%;
  border-collapse: collapse;
}

.tpln-th {
  background: #eef2f8;
  color: #0f3460;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 8px;
  border: 1px solid #dde3ee;
  text-align: center;
  white-space: nowrap;
}

.tpln-td {
  border: 1px solid #eceff5;
  padding: 5px 6px;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}

.tpln-row-even {
  background: #f8f9fc;
}

.tpln-input,
.tpln-select {
  min-width: 90px;
}

.tpln-bom-tag {
  font-size: 10.5px;
  white-space: normal;
  text-align: left;
  display: block;
}

/* --------------------- Footer --------------------- */
.tpln-footer-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid #dde3ee;
  padding: 10px 4px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* --------------------- Drawers --------------------- */
.tpln-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f3460;
  font-weight: 600;
}

.tpln-settings-block-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f3460;
  margin: 10px 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tpln-empty-note {
  text-align: center;
  color: #8792a2;
  padding: 20px 0;
  font-size: 12.5px;
}

/* ==========================================================
   Append to TrimProcessPlanningScreen.css AND
   TrimProcessPlanningScreenCombMP.css
   (same rules as the fabric additions + status bar / progress /
   unmapped chip, which the trim stylesheets did not have)
   ========================================================== */

:root {
  --pln-ink: #1f2a3c;
  --pln-muted: #5c6778;
  --pln-line: #e3e7ee;
  --pln-row-even-bg: #f7f9fc; /* match your existing .pln-row-even background */
  --pln-selected-bg: #eef3fb;
  --pln-head-bg: #0f3460; /* match your existing .pln-th background */
  --pln-head-row-h: 36px; /* height of the first group-table header row */
}

/* ---------- toolbar ---------- */
.pln-toolbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 10px 0;
  background: #fff;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-radius: 6px;
}
.pln-toolbar-search {
  width: 280px;
}
.pln-toolbar-select {
  min-width: 150px;
}
.pln-toolbar-select-wide {
  min-width: 220px;
  max-width: 320px;
}
.pln-toolbar-spacer {
  flex: 1 1;
}
.pln-toolbar-count {
  color: #5c6778;
  color: var(--pln-muted);
  font-size: 12px;
  white-space: nowrap;
}

.pln-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: #2980b9;
  cursor: pointer;
  font-size: 13px;
}
.pln-link-btn:hover {
  text-decoration: underline;
}
.pln-link-btn:focus-visible,
.pln-stage-card:focus-visible,
.pln-section-toggle:focus-visible,
.pln-icon-only-btn:focus-visible {
  outline: 2px solid #2980b9;
  outline-offset: 2px;
}

/* ---------- stage cards (overview) ---------- */
.pln-stage-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}
.pln-stage-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-left: 4px solid var(--stage-color);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.pln-stage-card:hover {
  background: #fafbfd;
}
.pln-stage-card.is-active {
  background: #eef3fb;
  background: var(--pln-selected-bg);
  box-shadow: inset 0 0 0 1px var(--stage-color);
}
.pln-stage-card-label {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-stage-card-count {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--stage-color);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.pln-stage-card-meta {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

@media (max-width: 900px) {
  .pln-stage-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- section heads ---------- */
.pln-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 6px;
}
.pln-section-toggle,
.pln-section-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #1f2a3c;
  color: var(--pln-ink);
  background: none;
  border: 0;
  padding: 0;
}
.pln-section-toggle {
  cursor: pointer;
}
.pln-section-hint {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- scroll-contained tables with sticky header ---------- */
.pln-summary-table-container,
.pln-group-table-container {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-radius: 4px;
}
.pln-summary-table thead th,
.pln-group-table-container thead th {
  position: -webkit-sticky;
  position: sticky;
  z-index: 3;
}
.pln-summary-table thead th {
  top: 0;
}

.pln-group-table-container .pln-thead-row-1 > th {
  top: 0;
  height: 36px;
  height: var(--pln-head-row-h);
  box-sizing: border-box;
}
.pln-group-table-container .pln-thead-row-2 > th {
  top: 36px;
  top: var(--pln-head-row-h);
}

/* pinned columns: Split | Del | BOM Item */
.pln-group-table-container .pln-sticky-col {
  position: -webkit-sticky;
  position: sticky;
  z-index: 2;
}
.pln-group-table-container thead .pln-sticky-col {
  z-index: 4;
  background: #0f3460;
  background: var(--pln-head-bg);
}
.pln-group-table-container tbody .pln-sticky-col {
  background: #fff;
}
.pln-group-table-container tbody tr.pln-row-even .pln-sticky-col {
  background: #f7f9fc;
  background: var(--pln-row-even-bg);
}

.pln-sticky-col-1 {
  left: 0;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.pln-sticky-col-2 {
  left: 44px;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.pln-sticky-col-3 {
  left: 88px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  box-shadow: 2px 0 0 #e3e7ee;
  box-shadow: 2px 0 0 var(--pln-line);
}

/* BOM cell: name + color stacked instead of one wide tag */
.pln-bom-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}
.pln-bom-cell-name {
  font-weight: 600;
  color: #1f2a3c;
  color: var(--pln-ink);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pln-bom-cell-sub {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-yarn-color-chip {
  font-size: 11px;
  padding: 0 6px;
  border-radius: 8px;
  background: #fdf3e1;
  color: #8a6420;
}

/* ---------- summary table extras ---------- */
.pln-col-check {
  width: 36px;
}
.pln-row-selected > td {
  background: #eef3fb !important;
  background: var(--pln-selected-bg) !important;
}

.pln-actions-cell {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.pln-icon-only-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pln-mini-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pln-stage-pill {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  color: var(--stage-color);
  border: 1px solid var(--stage-color);
  white-space: nowrap;
  min-width: 74px;
  text-align: center;
}
.pln-mini-progress {
  display: grid;
  grid-template-columns: repeat(4, 22px);
  grid-gap: 3px;
  gap: 3px;
}
.pln-mini-progress-track {
  height: 6px;
  background: #e8ebf0;
  border-radius: 3px;
  overflow: hidden;
}
.pln-mini-progress-fill {
  height: 100%;
}

/* ---------- group panel header ---------- */
.pln-panel-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pln-group-meta {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
  font-weight: 400;
}

/* ---------- pagination ---------- */
.pln-pagination {
  display: flex;
  justify-content: flex-end;
  padding: 8px 4px;
}

/* ---------- footer ---------- */
.pln-footer-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #e3e7ee;
  border-top: 1px solid var(--pln-line);
}
.pln-footer-note {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- drawer title ---------- */
.pln-drawer-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pln-drawer-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- cost strip (combined-order overview) ---------- */
.pln-cost-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
  font-size: 13px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-cost-strip strong {
  color: #1f2a3c;
  color: var(--pln-ink);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ---------- budget-status bar in group headers ---------- */
.pln-status-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}
.pln-status-bar-outer {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: #e8ebf0;
}
.pln-status-bar-segment {
  height: 100%;
}
.pln-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-status-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pln-status-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ---------- progress drawer ---------- */
.pln-progress-steps-wrap {
  margin: 12px 0 16px;
}
.pln-progress-cell {
  min-width: 120px;
}

/* ---------- rows without a supplier ---------- */
.pln-unmapped-chip {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  padding: 0 6px;
  border-radius: 8px;
  background: #fdf3e1;
  color: #8a6420;
  white-space: nowrap;
}
.pln-bom-cell .pln-unmapped-chip {
  margin-left: 0;
}
.pln-bom-cell-sub {
  white-space: normal;
  line-height: 1.3;
}

.pln-sticky-col-0 {
  left: 0;
  width: 40px;
  min-width: 40px;
  z-index: 3;
}
.pln-sticky-col-1 {
  left: 40px;
}
.pln-sticky-col-2 {
  left: calc(40px + W1);
}
.pln-sticky-col-3 {
  left: calc(40px + W1 + W2);
}

.pln-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
}

/* ============================================================
   TrimProcessGroupList - scoped classnames (prefix: tgrp-)
   Mirrors FabProcessGroupList's grp- styling so both list screens
   look/feel identical.
   ============================================================ */

.tgrp-page-wrap {
  padding: 8px 4px;
}

.tgrp-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tgrp-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f3460;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tgrp-table-container {
  overflow-x: auto;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 6px;
  background: #fafbfd;
}

.tgrp-table {
  width: 100%;
  border-collapse: collapse;
}

.tgrp-th {
  background: #0f3460;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
  border: 1px solid #16457c;
}

.tgrp-td {
  border: 1px solid #e6e8ee;
  padding: 7px 10px;
  font-size: 12.5px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.tgrp-row-even {
  background: #f2f5fa;
}

.tgrp-trim-name {
  font-weight: 600;
  color: #0f3460;
  display: inline-flex;
  align-items: center;
}

.tgrp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid #0f3460;
  background: #ffffff;
  color: #0f3460;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.tgrp-icon-btn:hover {
  background: #0f3460;
  color: #ffffff;
}

.tgrp-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f3460;
  font-weight: 600;
  flex-wrap: wrap;
}

/* ============================================================
   TrimProcessPlanningScreenCombMP - scoped classnames (prefix: trn-)
   Mirrors FabProcessPlanningScreenCombMP.css (pln- prefix) so both
   combined-order screens look consistent.
   ============================================================ */

.trn-page-wrap {
  padding: 8px 4px;
  position: relative;
}

.trn-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.trn-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f3460;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trn-header-actions {
  display: flex;
  gap: 8px;
}

/* --------------------- Loading overlay --------------------- */
.trn-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
}

/* --------------------- Overview dashboard --------------------- */
.trn-overview-section {
  margin-bottom: 16px;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.trn-stat-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fafafa;
}

.trn-stat-card-label {
  font-size: 12px;
  color: #8792a2;
}

.trn-stat-card-value {
  font-size: 20px;
  font-weight: 700;
}

/* --------------------- Summary table --------------------- */
.trn-summary-section {
  margin-bottom: 16px;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 10px;
  background: #fafbfd;
}

.trn-summary-table-container {
  overflow-x: auto;
}

.trn-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.trn-summary-th {
  background: #0f3460;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
  border: 1px solid #16457c;
}

.trn-summary-td {
  border: 1px solid #e6e8ee;
  padding: 6px 10px;
  font-size: 12.5px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.trn-summary-row-even {
  background: #f2f5fa;
}

.trn-summary-item-name {
  font-weight: 600;
  color: #0f3460;
  margin-right: 6px;
}

.trn-unmapped-tag {
  font-size: 10px;
}

.trn-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid #0f3460;
  background: #ffffff;
  color: #0f3460;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.trn-icon-btn:hover {
  background: #0f3460;
  color: #ffffff;
}

.trn-icon-btn.trn-icon-btn-details {
  border-color: #679728;
  color: #679728;
}
.trn-icon-btn.trn-icon-btn-details:hover {
  background: #679728;
  color: #fff;
}

.trn-icon-btn.trn-icon-btn-settings {
  border-color: #c09337;
  color: #c09337;
}
.trn-icon-btn.trn-icon-btn-settings:hover {
  background: #c09337;
  color: #fff;
}

.trn-icon-btn.trn-icon-btn-progress {
  border-color: #6c5ce7;
  color: #6c5ce7;
}
.trn-icon-btn.trn-icon-btn-progress:hover {
  background: #6c5ce7;
  color: #fff;
}

/* --------------------- Grouped-by-trim collapse --------------------- */
.trn-group-collapse {
  background: transparent;
  border: none;
}

.trn-group-panel {
  margin-bottom: 10px;
  border: 1px solid #dde3ee !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.trn-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
}

.trn-panel-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trn-panel-icon-badge {
  background: #0f3460;
  color: #fff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trn-panel-process-name {
  font-weight: 600;
  color: #0f3460;
  font-size: 13.5px;
}

.trn-panel-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.trn-stat-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 90px;
}

.trn-stat-label {
  font-size: 10.5px;
  color: #8792a2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.trn-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: #0f3460;
}

/* --------------------- Editable process table --------------------- */
.trn-table-container {
  overflow-x: auto;
  padding: 6px 4px 8px 4px;
}

.trn-table {
  width: 100%;
  border-collapse: collapse;
}

.trn-th {
  background: #eef2f8;
  color: #0f3460;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 8px;
  border: 1px solid #dde3ee;
  text-align: center;
  white-space: nowrap;
}

.trn-td {
  border: 1px solid #eceff5;
  padding: 5px 6px;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}

.trn-row-even {
  background: #f8f9fc;
}

.trn-input,
.trn-select {
  min-width: 90px;
}

.trn-bom-tag {
  font-size: 10.5px;
  white-space: normal;
  text-align: left;
  display: block;
}

.trn-item-cell {
  min-width: 150px;
  text-align: left;
}

.trn-identity-tags {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.trn-identity-tag {
  font-size: 9.5px;
  line-height: 14px;
  padding: 0 4px;
  margin: 0;
}

/* --------------------- Footer --------------------- */
.trn-footer-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid #dde3ee;
  padding: 10px 4px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* --------------------- Drawers --------------------- */
.trn-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f3460;
  font-weight: 600;
}

.trn-settings-block-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f3460;
  margin: 4px 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trn-empty-note {
  text-align: center;
  color: #8792a2;
  padding: 20px 0;
  font-size: 12.5px;
}

/* ============================================================
   ApexCharts containers
   ============================================================ */

.trn-apex-overview {
  display: flex;
  align-items: center;
  justify-content: center;
}

.trn-apex-gauge-grid {
  margin: 12px 0 6px 0;
}

.trn-apex-donut-wrap {
  cursor: default;
}

.trn-status-lazy-hint {
  font-size: 10.5px;
  color: #9aa3b2;
  font-style: italic;
  padding: 4px 0;
}

.trn-panel-status-wrap {
  min-width: 220px;
  max-width: 260px;
}

/* ==========================================================
   Append to TrimProcessPlanningScreen.css AND
   TrimProcessPlanningScreenCombMP.css
   (same rules as the fabric additions + status bar / progress /
   unmapped chip, which the trim stylesheets did not have)
   ========================================================== */

:root {
  --pln-ink: #1f2a3c;
  --pln-muted: #5c6778;
  --pln-line: #e3e7ee;
  --pln-row-even-bg: #f7f9fc; /* match your existing .pln-row-even background */
  --pln-selected-bg: #eef3fb;
  --pln-head-bg: #0f3460; /* match your existing .pln-th background */
  --pln-head-row-h: 36px; /* height of the first group-table header row */
}

/* ---------- toolbar ---------- */
.pln-toolbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 10px 0;
  background: #fff;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-radius: 6px;
}
.pln-toolbar-search {
  width: 280px;
}
.pln-toolbar-select {
  min-width: 150px;
}
.pln-toolbar-select-wide {
  min-width: 220px;
  max-width: 320px;
}
.pln-toolbar-spacer {
  flex: 1 1;
}
.pln-toolbar-count {
  color: #5c6778;
  color: var(--pln-muted);
  font-size: 12px;
  white-space: nowrap;
}

.pln-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: #2980b9;
  cursor: pointer;
  font-size: 13px;
}
.pln-link-btn:hover {
  text-decoration: underline;
}
.pln-link-btn:focus-visible,
.pln-stage-card:focus-visible,
.pln-section-toggle:focus-visible,
.pln-icon-only-btn:focus-visible {
  outline: 2px solid #2980b9;
  outline-offset: 2px;
}

/* ---------- stage cards (overview) ---------- */
.pln-stage-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}
.pln-stage-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-left: 4px solid var(--stage-color);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.pln-stage-card:hover {
  background: #fafbfd;
}
.pln-stage-card.is-active {
  background: #eef3fb;
  background: var(--pln-selected-bg);
  box-shadow: inset 0 0 0 1px var(--stage-color);
}
.pln-stage-card-label {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-stage-card-count {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--stage-color);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.pln-stage-card-meta {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

@media (max-width: 900px) {
  .pln-stage-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- section heads ---------- */
.pln-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 6px;
}
.pln-section-toggle,
.pln-section-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #1f2a3c;
  color: var(--pln-ink);
  background: none;
  border: 0;
  padding: 0;
}
.pln-section-toggle {
  cursor: pointer;
}
.pln-section-hint {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- scroll-contained tables with sticky header ---------- */
.pln-summary-table-container,
.pln-group-table-container {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-radius: 4px;
}
.pln-summary-table thead th,
.pln-group-table-container thead th {
  position: -webkit-sticky;
  position: sticky;
  z-index: 3;
}
.pln-summary-table thead th {
  top: 0;
}

.pln-group-table-container .pln-thead-row-1 > th {
  top: 0;
  height: 36px;
  height: var(--pln-head-row-h);
  box-sizing: border-box;
}
.pln-group-table-container .pln-thead-row-2 > th {
  top: 36px;
  top: var(--pln-head-row-h);
}

/* pinned columns: Split | Del | BOM Item */
.pln-group-table-container .pln-sticky-col {
  position: -webkit-sticky;
  position: sticky;
  z-index: 2;
}
.pln-group-table-container thead .pln-sticky-col {
  z-index: 4;
  background: #0f3460;
  background: var(--pln-head-bg);
}
.pln-group-table-container tbody .pln-sticky-col {
  background: #fff;
}
.pln-group-table-container tbody tr.pln-row-even .pln-sticky-col {
  background: #f7f9fc;
  background: var(--pln-row-even-bg);
}

.pln-sticky-col-1 {
  left: 0;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.pln-sticky-col-2 {
  left: 44px;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.pln-sticky-col-3 {
  left: 88px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  box-shadow: 2px 0 0 #e3e7ee;
  box-shadow: 2px 0 0 var(--pln-line);
}

/* BOM cell: name + color stacked instead of one wide tag */
.pln-bom-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}
.pln-bom-cell-name {
  font-weight: 600;
  color: #1f2a3c;
  color: var(--pln-ink);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pln-bom-cell-sub {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-yarn-color-chip {
  font-size: 11px;
  padding: 0 6px;
  border-radius: 8px;
  background: #fdf3e1;
  color: #8a6420;
}

/* ---------- summary table extras ---------- */
.pln-col-check {
  width: 36px;
}
.pln-row-selected > td {
  background: #eef3fb !important;
  background: var(--pln-selected-bg) !important;
}

.pln-actions-cell {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.pln-icon-only-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pln-mini-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pln-stage-pill {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  color: var(--stage-color);
  border: 1px solid var(--stage-color);
  white-space: nowrap;
  min-width: 74px;
  text-align: center;
}
.pln-mini-progress {
  display: grid;
  grid-template-columns: repeat(4, 22px);
  grid-gap: 3px;
  gap: 3px;
}
.pln-mini-progress-track {
  height: 6px;
  background: #e8ebf0;
  border-radius: 3px;
  overflow: hidden;
}
.pln-mini-progress-fill {
  height: 100%;
}

/* ---------- group panel header ---------- */
.pln-panel-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pln-group-meta {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
  font-weight: 400;
}

/* ---------- pagination ---------- */
.pln-pagination {
  display: flex;
  justify-content: flex-end;
  padding: 8px 4px;
}

/* ---------- footer ---------- */
.pln-footer-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #e3e7ee;
  border-top: 1px solid var(--pln-line);
}
.pln-footer-note {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- drawer title ---------- */
.pln-drawer-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pln-drawer-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- cost strip (combined-order overview) ---------- */
.pln-cost-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
  font-size: 13px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-cost-strip strong {
  color: #1f2a3c;
  color: var(--pln-ink);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ---------- budget-status bar in group headers ---------- */
.pln-status-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}
.pln-status-bar-outer {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: #e8ebf0;
}
.pln-status-bar-segment {
  height: 100%;
}
.pln-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-status-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pln-status-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ---------- progress drawer ---------- */
.pln-progress-steps-wrap {
  margin: 12px 0 16px;
}
.pln-progress-cell {
  min-width: 120px;
}

/* ---------- rows without a supplier ---------- */
.pln-unmapped-chip {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  padding: 0 6px;
  border-radius: 8px;
  background: #fdf3e1;
  color: #8a6420;
  white-space: nowrap;
}
.pln-bom-cell .pln-unmapped-chip {
  margin-left: 0;
}
.pln-bom-cell-sub {
  white-space: normal;
  line-height: 1.3;
}

.pln-sticky-col-0 {
  left: 0;
  width: 40px;
  min-width: 40px;
  z-index: 3;
}
.pln-sticky-col-1 {
  left: 40px;
}
.pln-sticky-col-2 {
  left: calc(40px + W1);
}
.pln-sticky-col-3 {
  left: calc(40px + W1 + W2);
}

.pln-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
}

/* ============================================================
   EmbProcessPlanningScreen - scoped classnames (prefix: epln-)
   Mirrors TrimProcessPlanningScreen's tpln- styling (which itself mirrors
   FabProcessPlanningScreen's pln- styling) so all three dashboards
   look/feel identical.
   ============================================================ */

.epln-page-wrap {
  padding: 8px 4px;
  position: relative;
}

.epln-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.epln-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f3460;
  display: flex;
  align-items: center;
  gap: 8px;
}

.epln-header-actions {
  display: flex;
  gap: 8px;
}

/* --------------------- Loading overlay --------------------- */
.epln-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
}

/* --------------------- Overall progress overview --------------------- */
.epln-overview-section {
  margin-bottom: 20px;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.epln-overview-stat-row {
  margin-bottom: 4px;
}

.epln-stat-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fafafa;
}

.epln-stat-card-label {
  font-size: 12px;
  color: #8792a2;
}

.epln-stat-card-value {
  font-size: 22px;
  font-weight: 700;
}

.epln-overview-table {
  width: 100%;
  border-collapse: collapse;
}

/* --------------------- Progress bars --------------------- */
.epln-progress-steps-wrap {
  margin: 16px 0 20px 0;
}

.epln-progress-bars-wrap {
  margin-bottom: 10px;
}

.epln-progress-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: #555b66;
  margin-bottom: 2px;
}

.epln-progress-cell {
  display: inline-block;
  width: 110px;
}

/* --------------------- Summary table (BOM items) --------------------- */
.epln-summary-section {
  margin-bottom: 18px;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 10px;
  background: #fafbfd;
}

.epln-summary-table-container {
  overflow-x: auto;
}

.epln-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.epln-summary-th {
  background: #0f3460;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
  border: 1px solid #16457c;
}

.epln-summary-td {
  border: 1px solid #e6e8ee;
  padding: 6px 10px;
  font-size: 12.5px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.epln-summary-row-even {
  background: #f2f5fa;
}

.epln-summary-item-name {
  font-weight: 600;
  color: #0f3460;
}

.epln-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid #0f3460;
  background: #ffffff;
  color: #0f3460;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.epln-icon-btn:hover {
  background: #0f3460;
  color: #ffffff;
}

.epln-icon-btn.epln-icon-btn-rolls {
  border-color: #679728;
  color: #679728;
}
.epln-icon-btn.epln-icon-btn-rolls:hover {
  background: #679728;
  color: #fff;
}

.epln-icon-btn.epln-icon-btn-settings {
  border-color: #c09337;
  color: #c09337;
}
.epln-icon-btn.epln-icon-btn-settings:hover {
  background: #c09337;
  color: #fff;
}

.epln-icon-btn.epln-icon-btn-progress {
  border-color: #6c5ce7;
  color: #6c5ce7;
}
.epln-icon-btn.epln-icon-btn-progress:hover {
  background: #6c5ce7;
  color: #fff;
}

/* --------------------- Grouped-by-process collapse --------------------- */
.epln-group-collapse {
  background: transparent;
  border: none;
}

.epln-group-panel {
  margin-bottom: 10px;
  border: 1px solid #dde3ee !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.epln-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
}

.epln-panel-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.epln-panel-step-badge {
  background: #0f3460;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.epln-panel-process-name {
  font-weight: 600;
  color: #0f3460;
  font-size: 13.5px;
}

.epln-panel-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.epln-stat-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 90px;
}

.epln-stat-label {
  font-size: 10.5px;
  color: #8792a2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.epln-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: #0f3460;
}

/* --------------------- Budget-status breakdown bar --------------------- */
.epln-panel-status-wrap {
  min-width: 220px;
  max-width: 320px;
}

.epln-status-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.epln-status-bar-outer {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: #eceff5;
}

.epln-status-bar-segment {
  height: 100%;
  transition: width 0.2s ease-in-out;
}

.epln-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.epln-status-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: #555b66;
  white-space: nowrap;
}

.epln-status-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* --------------------- Editable process table --------------------- */
.epln-table-container {
  overflow-x: auto;
  padding: 6px 4px 10px 4px;
}

.epln-table {
  width: 100%;
  border-collapse: collapse;
}

.epln-th {
  background: #eef2f8;
  color: #0f3460;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 8px;
  border: 1px solid #dde3ee;
  text-align: center;
  white-space: nowrap;
}

.epln-td {
  border: 1px solid #eceff5;
  padding: 5px 6px;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}

.epln-row-even {
  background: #f8f9fc;
}

.epln-input,
.epln-select {
  min-width: 90px;
}

.epln-bom-tag {
  font-size: 10.5px;
  white-space: normal;
  text-align: left;
  display: block;
}

/* --------------------- Footer --------------------- */
.epln-footer-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid #dde3ee;
  padding: 10px 4px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* --------------------- Drawers --------------------- */
.epln-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f3460;
  font-weight: 600;
}

.epln-settings-block-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f3460;
  margin: 10px 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.epln-empty-note {
  text-align: center;
  color: #8792a2;
  padding: 20px 0;
  font-size: 12.5px;
}

/* ==========================================================
   Append to EmbProcessPlanningScreen.css AND
   EmbProcessPlanningScreenCombMP.css
   (same rules as the trim additions: toolbar, stage cards, sticky
   table, status bar, progress cells, "no supplier" chip)
   ========================================================== */

:root {
  --pln-ink: #1f2a3c;
  --pln-muted: #5c6778;
  --pln-line: #e3e7ee;
  --pln-row-even-bg: #f7f9fc; /* match your existing .pln-row-even background */
  --pln-selected-bg: #eef3fb;
  --pln-head-bg: #0f3460; /* match your existing .pln-th background */
  --pln-head-row-h: 36px; /* height of the first group-table header row */
}

/* ---------- toolbar ---------- */
.pln-toolbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 10px 0;
  background: #fff;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-radius: 6px;
}
.pln-toolbar-search {
  width: 280px;
}
.pln-toolbar-select {
  min-width: 150px;
}
.pln-toolbar-select-wide {
  min-width: 220px;
  max-width: 320px;
}
.pln-toolbar-spacer {
  flex: 1 1;
}
.pln-toolbar-count {
  color: #5c6778;
  color: var(--pln-muted);
  font-size: 12px;
  white-space: nowrap;
}

.pln-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: #2980b9;
  cursor: pointer;
  font-size: 13px;
}
.pln-link-btn:hover {
  text-decoration: underline;
}
.pln-link-btn:focus-visible,
.pln-stage-card:focus-visible,
.pln-section-toggle:focus-visible,
.pln-icon-only-btn:focus-visible {
  outline: 2px solid #2980b9;
  outline-offset: 2px;
}

/* ---------- stage cards (overview) ---------- */
.pln-stage-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}
.pln-stage-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-left: 4px solid var(--stage-color);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.pln-stage-card:hover {
  background: #fafbfd;
}
.pln-stage-card.is-active {
  background: #eef3fb;
  background: var(--pln-selected-bg);
  box-shadow: inset 0 0 0 1px var(--stage-color);
}
.pln-stage-card-label {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-stage-card-count {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--stage-color);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.pln-stage-card-meta {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

@media (max-width: 900px) {
  .pln-stage-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- section heads ---------- */
.pln-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 6px;
}
.pln-section-toggle,
.pln-section-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #1f2a3c;
  color: var(--pln-ink);
  background: none;
  border: 0;
  padding: 0;
}
.pln-section-toggle {
  cursor: pointer;
}
.pln-section-hint {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- scroll-contained tables with sticky header ---------- */
.pln-summary-table-container,
.pln-group-table-container {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-radius: 4px;
}
.pln-summary-table thead th,
.pln-group-table-container thead th {
  position: -webkit-sticky;
  position: sticky;
  z-index: 3;
}
.pln-summary-table thead th {
  top: 0;
}

.pln-group-table-container .pln-thead-row-1 > th {
  top: 0;
  height: 36px;
  height: var(--pln-head-row-h);
  box-sizing: border-box;
}
.pln-group-table-container .pln-thead-row-2 > th {
  top: 36px;
  top: var(--pln-head-row-h);
}

/* pinned columns: Split | Del | BOM Item */
.pln-group-table-container .pln-sticky-col {
  position: -webkit-sticky;
  position: sticky;
  z-index: 2;
}
.pln-group-table-container thead .pln-sticky-col {
  z-index: 4;
  background: #0f3460;
  background: var(--pln-head-bg);
}
.pln-group-table-container tbody .pln-sticky-col {
  background: #fff;
}
.pln-group-table-container tbody tr.pln-row-even .pln-sticky-col {
  background: #f7f9fc;
  background: var(--pln-row-even-bg);
}

.pln-sticky-col-1 {
  left: 0;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.pln-sticky-col-2 {
  left: 44px;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.pln-sticky-col-3 {
  left: 88px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  box-shadow: 2px 0 0 #e3e7ee;
  box-shadow: 2px 0 0 var(--pln-line);
}

/* BOM cell: name + color stacked instead of one wide tag */
.pln-bom-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}
.pln-bom-cell-name {
  font-weight: 600;
  color: #1f2a3c;
  color: var(--pln-ink);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pln-bom-cell-sub {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-yarn-color-chip {
  font-size: 11px;
  padding: 0 6px;
  border-radius: 8px;
  background: #fdf3e1;
  color: #8a6420;
}

/* ---------- summary table extras ---------- */
.pln-col-check {
  width: 36px;
}
.pln-row-selected > td {
  background: #eef3fb !important;
  background: var(--pln-selected-bg) !important;
}

.pln-actions-cell {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.pln-icon-only-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pln-mini-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pln-stage-pill {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  color: var(--stage-color);
  border: 1px solid var(--stage-color);
  white-space: nowrap;
  min-width: 74px;
  text-align: center;
}
.pln-mini-progress {
  display: grid;
  grid-template-columns: repeat(4, 22px);
  grid-gap: 3px;
  gap: 3px;
}
.pln-mini-progress-track {
  height: 6px;
  background: #e8ebf0;
  border-radius: 3px;
  overflow: hidden;
}
.pln-mini-progress-fill {
  height: 100%;
}

/* ---------- group panel header ---------- */
.pln-panel-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pln-group-meta {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
  font-weight: 400;
}

/* ---------- pagination ---------- */
.pln-pagination {
  display: flex;
  justify-content: flex-end;
  padding: 8px 4px;
}

/* ---------- footer ---------- */
.pln-footer-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #e3e7ee;
  border-top: 1px solid var(--pln-line);
}
.pln-footer-note {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- drawer title ---------- */
.pln-drawer-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pln-drawer-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- cost strip (combined-order overview) ---------- */
.pln-cost-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
  font-size: 13px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-cost-strip strong {
  color: #1f2a3c;
  color: var(--pln-ink);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ---------- budget-status bar in group headers ---------- */
.pln-status-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}
.pln-status-bar-outer {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: #e8ebf0;
}
.pln-status-bar-segment {
  height: 100%;
}
.pln-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-status-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pln-status-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ---------- progress drawer ---------- */
.pln-progress-steps-wrap {
  margin: 12px 0 16px;
}
.pln-progress-cell {
  min-width: 120px;
}

/* ---------- rows without a supplier ---------- */
.pln-unmapped-chip {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  padding: 0 6px;
  border-radius: 8px;
  background: #fdf3e1;
  color: #8a6420;
  white-space: nowrap;
}
.pln-bom-cell .pln-unmapped-chip {
  margin-left: 0;
}
.pln-bom-cell-sub {
  white-space: normal;
  line-height: 1.3;
}

.pln-sticky-col-0 {
  left: 0;
  width: 40px;
  min-width: 40px;
  z-index: 3;
}
.pln-sticky-col-1 {
  left: 40px;
} /* was 0 */
.pln-sticky-col-2 {
  left: calc(40px + W1);
} /* was W1 */
.pln-sticky-col-3 {
  left: calc(40px + W1 + W2);
} /* was W1 + W2 */

.pln-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
}

/* ============================================================
   EmbProcessPlanningScreenCombMP - scoped classnames (prefix: emb-)
   Mirrors TrimProcessPlanningScreenCombMP.css (trn- prefix) /
   FabProcessPlanningScreenCombMP.css (pln- prefix) so all three combined
   process-planning screens look/feel identical.
   ============================================================ */

.emb-page-wrap {
  padding: 8px 4px;
  position: relative;
}

.emb-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.emb-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f3460;
  display: flex;
  align-items: center;
  gap: 8px;
}

.emb-header-actions {
  display: flex;
  gap: 8px;
}

/* --------------------- Loading overlay --------------------- */
.emb-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
}

/* --------------------- Overview dashboard --------------------- */
.emb-overview-section {
  margin-bottom: 16px;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.emb-stat-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 14px;
  background: #fafafa;
}

.emb-stat-card-label {
  font-size: 12px;
  color: #8792a2;
}

.emb-stat-card-value {
  font-size: 20px;
  font-weight: 700;
}

/* --------------------- Summary table --------------------- */
.emb-summary-section {
  margin-bottom: 16px;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 10px;
  background: #fafbfd;
}

.emb-summary-table-container {
  overflow-x: auto;
}

.emb-summary-table {
  width: 100%;
  border-collapse: collapse;
}

.emb-summary-th {
  background: #0f3460;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
  border: 1px solid #16457c;
}

.emb-summary-td {
  border: 1px solid #e6e8ee;
  padding: 6px 10px;
  font-size: 12.5px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.emb-summary-row-even {
  background: #f2f5fa;
}

.emb-summary-item-name {
  font-weight: 600;
  color: #0f3460;
  margin-right: 6px;
}

.emb-unmapped-tag {
  font-size: 10px;
}

.emb-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid #0f3460;
  background: #ffffff;
  color: #0f3460;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.emb-icon-btn:hover {
  background: #0f3460;
  color: #ffffff;
}

.emb-icon-btn.emb-icon-btn-details {
  border-color: #679728;
  color: #679728;
}
.emb-icon-btn.emb-icon-btn-details:hover {
  background: #679728;
  color: #fff;
}

.emb-icon-btn.emb-icon-btn-settings {
  border-color: #c09337;
  color: #c09337;
}
.emb-icon-btn.emb-icon-btn-settings:hover {
  background: #c09337;
  color: #fff;
}

.emb-icon-btn.emb-icon-btn-progress {
  border-color: #6c5ce7;
  color: #6c5ce7;
}
.emb-icon-btn.emb-icon-btn-progress:hover {
  background: #6c5ce7;
  color: #fff;
}

/* --------------------- Grouped-by-embellishment collapse --------------------- */
.emb-group-collapse {
  background: transparent;
  border: none;
}

.emb-group-panel {
  margin-bottom: 10px;
  border: 1px solid #dde3ee !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.emb-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 10px;
}

.emb-panel-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.emb-panel-icon-badge {
  background: #0f3460;
  color: #fff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.emb-panel-process-name {
  font-weight: 600;
  color: #0f3460;
  font-size: 13.5px;
}

.emb-panel-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.emb-stat-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 90px;
}

.emb-stat-label {
  font-size: 10.5px;
  color: #8792a2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.emb-stat-value {
  font-size: 13px;
  font-weight: 700;
  color: #0f3460;
}

/* --------------------- Editable process table --------------------- */
.emb-table-container {
  overflow-x: auto;
  padding: 6px 4px 8px 4px;
}

.emb-table {
  width: 100%;
  border-collapse: collapse;
}

.emb-th {
  background: #eef2f8;
  color: #0f3460;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 8px;
  border: 1px solid #dde3ee;
  text-align: center;
  white-space: nowrap;
}

.emb-td {
  border: 1px solid #eceff5;
  padding: 5px 6px;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}

.emb-row-even {
  background: #f8f9fc;
}

.emb-input,
.emb-select {
  min-width: 90px;
}

.emb-bom-tag {
  font-size: 10.5px;
  white-space: normal;
  text-align: left;
  display: block;
}

.emb-item-cell {
  min-width: 150px;
  text-align: left;
}

.emb-identity-tags {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.emb-identity-tag {
  font-size: 9.5px;
  line-height: 14px;
  padding: 0 4px;
  margin: 0;
}

/* --------------------- Footer --------------------- */
.emb-footer-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid #dde3ee;
  padding: 10px 4px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* --------------------- Drawers --------------------- */
.emb-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f3460;
  font-weight: 600;
}

.emb-settings-block-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f3460;
  margin: 4px 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.emb-empty-note {
  text-align: center;
  color: #8792a2;
  padding: 20px 0;
  font-size: 12.5px;
}

/* ============================================================
   ApexCharts containers
   ============================================================ */

.emb-apex-overview {
  display: flex;
  align-items: center;
  justify-content: center;
}

.emb-apex-gauge-grid {
  margin: 12px 0 6px 0;
}

.emb-apex-donut-wrap {
  cursor: default;
}

.emb-status-lazy-hint {
  font-size: 10.5px;
  color: #9aa3b2;
  font-style: italic;
  padding: 4px 0;
}

.emb-panel-status-wrap {
  min-width: 220px;
  max-width: 260px;
}

/* ==========================================================
   Append to EmbProcessPlanningScreen.css AND
   EmbProcessPlanningScreenCombMP.css
   (same rules as the trim additions: toolbar, stage cards, sticky
   table, status bar, progress cells, "no supplier" chip)
   ========================================================== */

:root {
  --pln-ink: #1f2a3c;
  --pln-muted: #5c6778;
  --pln-line: #e3e7ee;
  --pln-row-even-bg: #f7f9fc; /* match your existing .pln-row-even background */
  --pln-selected-bg: #eef3fb;
  --pln-head-bg: #0f3460; /* match your existing .pln-th background */
  --pln-head-row-h: 36px; /* height of the first group-table header row */
}

/* ---------- toolbar ---------- */
.pln-toolbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 10px 0;
  background: #fff;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-radius: 6px;
}
.pln-toolbar-search {
  width: 280px;
}
.pln-toolbar-select {
  min-width: 150px;
}
.pln-toolbar-select-wide {
  min-width: 220px;
  max-width: 320px;
}
.pln-toolbar-spacer {
  flex: 1 1;
}
.pln-toolbar-count {
  color: #5c6778;
  color: var(--pln-muted);
  font-size: 12px;
  white-space: nowrap;
}

.pln-link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: #2980b9;
  cursor: pointer;
  font-size: 13px;
}
.pln-link-btn:hover {
  text-decoration: underline;
}
.pln-link-btn:focus-visible,
.pln-stage-card:focus-visible,
.pln-section-toggle:focus-visible,
.pln-icon-only-btn:focus-visible {
  outline: 2px solid #2980b9;
  outline-offset: 2px;
}

/* ---------- stage cards (overview) ---------- */
.pln-stage-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}
.pln-stage-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-left: 4px solid var(--stage-color);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.pln-stage-card:hover {
  background: #fafbfd;
}
.pln-stage-card.is-active {
  background: #eef3fb;
  background: var(--pln-selected-bg);
  box-shadow: inset 0 0 0 1px var(--stage-color);
}
.pln-stage-card-label {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-stage-card-count {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--stage-color);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.pln-stage-card-meta {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

@media (max-width: 900px) {
  .pln-stage-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- section heads ---------- */
.pln-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 6px;
}
.pln-section-toggle,
.pln-section-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #1f2a3c;
  color: var(--pln-ink);
  background: none;
  border: 0;
  padding: 0;
}
.pln-section-toggle {
  cursor: pointer;
}
.pln-section-hint {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- scroll-contained tables with sticky header ---------- */
.pln-summary-table-container,
.pln-group-table-container {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid #e3e7ee;
  border: 1px solid var(--pln-line);
  border-radius: 4px;
}
.pln-summary-table thead th,
.pln-group-table-container thead th {
  position: -webkit-sticky;
  position: sticky;
  z-index: 3;
}
.pln-summary-table thead th {
  top: 0;
}

.pln-group-table-container .pln-thead-row-1 > th {
  top: 0;
  height: 36px;
  height: var(--pln-head-row-h);
  box-sizing: border-box;
}
.pln-group-table-container .pln-thead-row-2 > th {
  top: 36px;
  top: var(--pln-head-row-h);
}

/* pinned columns: Split | Del | BOM Item */
.pln-group-table-container .pln-sticky-col {
  position: -webkit-sticky;
  position: sticky;
  z-index: 2;
}
.pln-group-table-container thead .pln-sticky-col {
  z-index: 4;
  background: #0f3460;
  background: var(--pln-head-bg);
}
.pln-group-table-container tbody .pln-sticky-col {
  background: #fff;
}
.pln-group-table-container tbody tr.pln-row-even .pln-sticky-col {
  background: #f7f9fc;
  background: var(--pln-row-even-bg);
}

.pln-sticky-col-1 {
  left: 0;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.pln-sticky-col-2 {
  left: 44px;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}
.pln-sticky-col-3 {
  left: 88px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  box-shadow: 2px 0 0 #e3e7ee;
  box-shadow: 2px 0 0 var(--pln-line);
}

/* BOM cell: name + color stacked instead of one wide tag */
.pln-bom-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}
.pln-bom-cell-name {
  font-weight: 600;
  color: #1f2a3c;
  color: var(--pln-ink);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pln-bom-cell-sub {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-yarn-color-chip {
  font-size: 11px;
  padding: 0 6px;
  border-radius: 8px;
  background: #fdf3e1;
  color: #8a6420;
}

/* ---------- summary table extras ---------- */
.pln-col-check {
  width: 36px;
}
.pln-row-selected > td {
  background: #eef3fb !important;
  background: var(--pln-selected-bg) !important;
}

.pln-actions-cell {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.pln-icon-only-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pln-mini-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pln-stage-pill {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  color: var(--stage-color);
  border: 1px solid var(--stage-color);
  white-space: nowrap;
  min-width: 74px;
  text-align: center;
}
.pln-mini-progress {
  display: grid;
  grid-template-columns: repeat(4, 22px);
  grid-gap: 3px;
  gap: 3px;
}
.pln-mini-progress-track {
  height: 6px;
  background: #e8ebf0;
  border-radius: 3px;
  overflow: hidden;
}
.pln-mini-progress-fill {
  height: 100%;
}

/* ---------- group panel header ---------- */
.pln-panel-title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pln-group-meta {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
  font-weight: 400;
}

/* ---------- pagination ---------- */
.pln-pagination {
  display: flex;
  justify-content: flex-end;
  padding: 8px 4px;
}

/* ---------- footer ---------- */
.pln-footer-bar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #e3e7ee;
  border-top: 1px solid var(--pln-line);
}
.pln-footer-note {
  font-size: 12px;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- drawer title ---------- */
.pln-drawer-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pln-drawer-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: #5c6778;
  color: var(--pln-muted);
}

/* ---------- cost strip (combined-order overview) ---------- */
.pln-cost-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
  font-size: 13px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-cost-strip strong {
  color: #1f2a3c;
  color: var(--pln-ink);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ---------- budget-status bar in group headers ---------- */
.pln-status-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}
.pln-status-bar-outer {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: #e8ebf0;
}
.pln-status-bar-segment {
  height: 100%;
}
.pln-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: #5c6778;
  color: var(--pln-muted);
}
.pln-status-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pln-status-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ---------- progress drawer ---------- */
.pln-progress-steps-wrap {
  margin: 12px 0 16px;
}
.pln-progress-cell {
  min-width: 120px;
}

/* ---------- rows without a supplier ---------- */
.pln-unmapped-chip {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  padding: 0 6px;
  border-radius: 8px;
  background: #fdf3e1;
  color: #8a6420;
  white-space: nowrap;
}
.pln-bom-cell .pln-unmapped-chip {
  margin-left: 0;
}
.pln-bom-cell-sub {
  white-space: normal;
  line-height: 1.3;
}

.pln-sticky-col-0 {
  left: 0;
  width: 40px;
  min-width: 40px;
  z-index: 3;
}
.pln-sticky-col-1 {
  left: 40px;
} /* was 0 */
.pln-sticky-col-2 {
  left: calc(40px + W1);
} /* was W1 */
.pln-sticky-col-3 {
  left: calc(40px + W1 + W2);
} /* was W1 + W2 */

.pln-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
}

/* ============================================================
   EmbProcessGroupList - scoped classnames (prefix: egrp-)
   Mirrors TrimProcessGroupList's tgrp- styling (and FabProcessGroupList's
   grp- styling) so all three list screens look/feel identical.
   ============================================================ */

.egrp-page-wrap {
  padding: 8px 4px;
}

.egrp-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.egrp-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #0f3460;
  display: flex;
  align-items: center;
  gap: 8px;
}

.egrp-table-container {
  overflow-x: auto;
  border: 1px solid #e6e8ee;
  border-radius: 8px;
  padding: 6px;
  background: #fafbfd;
}

.egrp-table {
  width: 100%;
  border-collapse: collapse;
}

.egrp-th {
  background: #0f3460;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
  border: 1px solid #16457c;
}

.egrp-td {
  border: 1px solid #e6e8ee;
  padding: 7px 10px;
  font-size: 12.5px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.egrp-row-even {
  background: #f2f5fa;
}

.egrp-emb-name {
  font-weight: 600;
  color: #0f3460;
  display: inline-flex;
  align-items: center;
}

.egrp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid #0f3460;
  background: #ffffff;
  color: #0f3460;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.egrp-icon-btn:hover {
  background: #0f3460;
  color: #ffffff;
}

.egrp-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f3460;
  font-weight: 600;
  flex-wrap: wrap;
}

.q-fab-trims-emb-edit {
  margin-top: 50%;
}
.q-fab-trims-emb-refr {
  margin-top: 45%;
}
.q-btn-container {
  margin: 10px 0 0 0;
}
.q-table-td-wdth {
  min-width: 18vw;
}
.q-expandable-sub-heading {
  /* padding: 5px; */
  font-size: 0.85rem;
  font-weight: bold;
}
.q-tax-td {
  display: block;
}

.q-text-box {
  width: 100%;
}

.q-buyer-details-container {
  width: 96%;
  margin: 0 0 2px 0;
}

.q-radio-div {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-right: 5px;
}

.q-table {
  border-radius: 5px;
  overflow-y: auto;
  padding: 0 0 6px 0;
  overflow-x: auto;
  max-height: 50vh;
  margin: 5px;
}
.ob-info-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  min-height: 52px;
  padding: 4px 4px;
  background: #f5f8fc;
  border: 1px solid #dce6f1;
  border-radius: 6px;
  box-sizing: border-box;
}

.ob-info-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  background: #fff;
  border: 1px solid #dce6f1;
  border-radius: 20px;
  white-space: nowrap;
}

.ob-info-tag__label {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
}

.ob-info-tag__value {
  font-size: 11px;
  font-weight: 600;
  color: #0f3460;
}

.ob-info-action {
  margin-left: auto;
}
.q-table-fab {
  border-radius: 5px;
  overflow-y: auto;
  padding: 0 0 6px 0;
  overflow-x: auto;
  max-height: 70vh;
  margin: 5px;
}

.q-table-costing td {
  vertical-align: middle;
  font-size: 0.625rem;
}

.q-table-heading-lables {
  margin-top: 0px;
  font-size: 11px;
  margin-bottom: 1px;
  color: black;
  padding: 0.25em 0;
  border: 1px solid #5fbfcb66;
  background-color: #5fbfcb66;
  border-radius: 5px;
  min-width: 100px;
  height: 24px;
}

.q-prod-table-td {
  border-spacing: 5px;
  border-radius: 2px;
  text-align: center;
  background: #f6f6f6;
}

.q-text-input {
  border-radius: 5px;
  height: 24px;
  font-size: 0.625rem;
  width: 100%;
  text-align: center;
}
.q-modal-body-trims {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-column-gap: 10px;
  column-gap: 10px;
  margin: 10px;
  grid-row-gap: 10px;
  row-gap: 10px;
  max-height: 60vh;
  min-height: 150px;
  overflow-y: auto;
  padding: 10px;
}

.q-grid-col-span-body {
  overflow-y: auto;
  overflow-x: auto;
  max-height: 60vh;
}
.q-modal-size-table {
  margin: 12px 0 0 0;
}
.q-total-div {
  display: grid;
  grid-template-columns: 1fr 0.1fr;
  grid-column-gap: 5px;
  column-gap: 5px;
  grid-row-gap: 10px;
  row-gap: 10px;
  padding-left: 3px;
  border-radius: 5px;
  padding: 5px;
  width: -webkit-fit-content;
  width: fit-content;
}

.q-label-disabled {
  cursor: not-allowed;
  background-color: light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3));
  color: light-dark(rgb(84, 84, 84), rgb(170, 170, 170));
  border-color: rgba(118, 118, 118, 0.3);
}
.q-deleted-row {
  color: red;
}

.q-money-prop {
  color: #ffb500;
  font-size: 0.9rem;
}

.q-section-div {
  box-shadow: rgba(0, 0, 0, 0.18) 0px 2px 4px;
  border-radius: 5px;
  padding: 5px;
  margin-bottom: 5px;
}
.q-add-btn-size-grp-div {
  padding: 5px 0px 0px 0px;
}

.quote-target-cost-container {
  display: flex;
  /* justify-content: center; */
  overflow-x: auto;
  overflow-y: auto;
}

.q-component-div {
  display: flex;
  align-items: center;
}

.q-col-span-garment-clr {
  grid-column: 3 / 5;
}
.target-price-div {
  width: 10%;
}
.q-price-div {
  display: flex;
  gap: 10px;
}
.q-common-td {
  border-radius: 2px;
  text-align: center;
  min-width: 4vw;
  max-width: 10vw;
  background: #ffffff;
  border-right: 1.5px solid #e3e3f0;
}
.q-col-width-number {
  min-width: 4vw;
}
.q-col-width-process {
  min-width: 21vw;
}
.q-col-width-uom {
  min-width: 2.5vw;
}
.q-col-width-source-form {
  max-width: 8vw;
  min-width: 8vw;
  background: #f6f6f6;
}
.q-expandable-total-div {
  margin-left: auto;
  display: grid;
  grid-template-columns: 0.1fr 1fr;
  grid-column-gap: 5px;
  column-gap: 5px;
  grid-row-gap: 10px;
  row-gap: 10px;
  padding: 0 0 0 6px;
  border-radius: 5px;
  box-shadow: 0 0 25px 0 #5fbfcb66 inset;
  width: -webkit-fit-content;
  width: fit-content;
}

.q-expandable-total {
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 5px;
}
.q-component-tab {
  display: flex;
  justify-content: space-between;
}

.q-proc-modal-edit {
  display: flex;
}
.q-sum-bold {
  font-weight: BOLDER;
}
.q-img {
  width: 100%;
  object-fit: contain;
  max-height: 150px;
}
.q-margin-fbtn {
  margin-top: 2.5%;
}
.q-main-wrapper {
  height: 89vh;
}
.q-main-row {
  padding-top: 2px;
  height: 100%;
  overflow: hidden;
}
.q-data-col {
  height: 87vh;
  overflow: auto;
}
.q-tbl-col {
  height: 86vh;
  overflow: auto;
}
.sty-tbl-col {
  height: 90%;
  overflow: auto;
}

.q-modal-ver-comp-div {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-column-gap: 10px;
  column-gap: 10px;
  margin: 10px;
  grid-row-gap: 10px;
  row-gap: 10px;
  overflow-y: auto;
  padding: 10px;
}

/* Buyer Target Cost Card — shrink-to-fit, don't span full width */
.q-buyer-target-cost-wrapper {
  display: inline-flex;
  width: -webkit-fit-content;
  width: fit-content;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  margin: 0 0 12px 0;
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.q-buyer-target-cost-wrapper .q-money-prop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e8f8ee;
  color: #22a352;
  font-size: 12px;
  flex-shrink: 0;
}

.q-buyer-target-cost-wrapper .q-target-cost-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.q-buyer-target-cost-wrapper .q-expandable-total {
  font-size: 9px;
  font-weight: 600;
  color: #9aa3b2;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.q-buyer-target-cost-wrapper .prod-std-element-size {
  width: 88px;
}

.q-buyer-target-cost-wrapper .prod-std-txt {
  height: 22px;
  font-size: 11px;
  font-weight: 500;
  color: #4a5468;
  background-color: #fafbfc;
  border: 1px solid #edf0f4;
  border-radius: 4px;
  padding: 0 6px;
}

.q-buyer-target-cost-wrapper .prod-std-txt[disabled] {
  background-color: #fafbfc !important;
  color: #4a5468 !important;
  opacity: 1;
  cursor: default;
}

.q-buyer-target-cost-wrapper .ant-input {
  height: 22px;
  font-size: 11px;
  padding: 2px 6px;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .q-buyer-target-cost-wrapper {
    flex-wrap: wrap;
    gap: 10px;
  }
} /* ==================================================================== */
/* Quote edit page - same pattern as the Style page                     */
/* header · step bar · section menu · one section at a time             */
/* qe-* classes only. No control heights are changed.                   */
/* ==================================================================== */
.qe-page {
  --qe-navy: #0f3460;
  --qe-navy-2: #1b4b85;
  --qe-navy-soft: #e8eef7;
  --qe-navy-line: #c9d6ea;
  --qe-ink: #0f172a;
  --qe-text: #334155;
  --qe-muted: #64748b;
  --qe-faint: #94a3b8;
  --qe-line: #e2e8f0;
  --qe-line-2: #eef2f7;
  --qe-soft: #f6f8fb;
  --qe-ok: #16a34a;
  --qe-ok-soft: #e8f7ee;
  --qe-warn: #b45309;
  --qe-warn-soft: #fff7e6;
  --qe-warn-line: #fcd9a0;
  --qe-radius: 12px;
  --qe-step-h: 64px;
  --qe-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.05);

  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--qe-text);
}

/* ---------------------------------------------------------------- */
/* 1. Header: brand + actions, summary when away from Quote details  */
/* ---------------------------------------------------------------- */
.qe-hdr {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 6px;
  background: #fff;
  border: 1px solid var(--qe-line);
  border-top: 3px solid var(--qe-navy);
  border-radius: var(--qe-radius);
  box-shadow: var(--qe-shadow);
}
.qe-hdr__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.qe-hdr__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.qe-hdr__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--qe-navy-2), var(--qe-navy));
  color: #fff;
  font-size: 14px;
  box-shadow: 0 3px 8px rgba(15, 52, 96, 0.25);
}
.qe-hdr__heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.2;
}
.qe-hdr__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--qe-ink);
}
.qe-hdr__sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--qe-muted);
}
.qe-hdr__actions {
  margin-left: auto;
}
.qe-hdr__actions .ant-tag {
  -webkit-margin-end: 4px;
          margin-inline-end: 4px;
  border-radius: 7px;
}

.qe-hdr__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--qe-line-2);
}
.qe-sum {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 10px;
  background: var(--qe-soft);
  border: 1px solid var(--qe-line);
  border-radius: 10px;
}
.qe-sum__title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--qe-navy);
}
.qe-sum__items {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
}
.qe-sum__item {
  font-size: 12px;
  color: var(--qe-text);
  white-space: nowrap;
}
.qe-sum__item b {
  color: var(--qe-ink);
  font-weight: 700;
}

/* ---------------------------------------------------------------- */
/* 2. Step bar                                                       */
/* ---------------------------------------------------------------- */
.qe-step {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid var(--qe-line);
  border-left: 4px solid var(--qe-navy);
  border-radius: var(--qe-radius);
  box-shadow: var(--qe-shadow);
}
.qe-step__main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.qe-step__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--qe-ink);
}
.qe-step__prog {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  margin-left: auto;
  font-size: 12px;
  color: var(--qe-muted);
}
.qe-step__prog b {
  font-size: 13px;
  color: var(--qe-ink);
}
.qe-step__bar {
  height: 5px;
  overflow: hidden;
  background: var(--qe-line-2);
  border-radius: 99px;
}
.qe-step__bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--qe-ok), #22c55e);
  border-radius: 99px;
  transition: width 0.3s ease;
}
.qe-step__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* chips */
.qe-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.qe-chip.is-ok {
  background: var(--qe-ok-soft);
  border-color: #bfe8cd;
  color: var(--qe-ok);
}
.qe-chip.is-todo {
  background: var(--qe-warn-soft);
  border-color: var(--qe-warn-line);
  color: var(--qe-warn);
}
.qe-chip.is-lock,
.qe-chip.is-open {
  background: var(--qe-soft);
  border-color: var(--qe-line);
  color: var(--qe-muted);
}
.qe-chip--lg {
  padding: 5px 12px;
  font-size: 12.5px;
}

/* buttons used by the step bar / empty state */
.qe-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--qe-line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--qe-navy);
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
.qe-btn:hover:not(:disabled) {
  border-color: var(--qe-navy-line);
  background: var(--qe-navy-soft);
}
.qe-btn:disabled {
  color: var(--qe-faint);
  cursor: not-allowed;
}
.qe-btn.is-primary {
  background: var(--qe-navy);
  border-color: var(--qe-navy);
  color: #fff;
  box-shadow: 0 3px 10px rgba(15, 52, 96, 0.25);
}
.qe-btn.is-primary:hover:not(:disabled) {
  background: var(--qe-navy-2);
  border-color: var(--qe-navy-2);
}
.qe-btn.is-primary:disabled {
  background: #9aa8bb;
  border-color: #9aa8bb;
  box-shadow: none;
}
.qe-btn.is-warn {
  background: var(--qe-warn-soft);
  border-color: var(--qe-warn-line);
  color: var(--qe-warn);
}
.qe-btn.is-warn:hover {
  background: #ffefd2;
  border-color: #f6c46d;
}
.qe-btn__more {
  font-weight: 600;
}
.qe-btn:focus-visible,
.qe-nav__item:focus-visible,
.qe-nav__rail:focus-visible {
  outline: 2px solid var(--qe-navy);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- */
/* 3. Body: section menu + main                                      */
/* ---------------------------------------------------------------- */
.qe-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  grid-gap: 12px;
  gap: 12px;
}
.qe-body.is-rail {
  grid-template-columns: 64px minmax(0, 1fr);
}
.qe-main {
  min-width: 0;
  margin-bottom: 15px;
}

.qe-nav {
  position: -webkit-sticky;
  position: sticky;
  top: var(--qe-step-h);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px;
  background: #fff;
  border: 1px solid var(--qe-line);
  border-radius: var(--qe-radius);
  box-shadow: var(--qe-shadow);
  height: 74vh;
}
.qe-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 8px 8px;
}
.qe-nav__title {
  font-size: 14px;
  font-weight: 800;
  color: var(--qe-ink);
}
.qe-nav__rail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--qe-line);
  border-radius: 8px;
  background: #fff;
  color: var(--qe-muted);
  cursor: pointer;
}
.qe-nav__rail:hover {
  color: var(--qe-navy);
  border-color: var(--qe-navy-line);
}
.qe-nav__sec {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 0 6px;
  border-top: 1px solid var(--qe-line-2);
}
.qe-nav__group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 4px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qe-muted);
}
.qe-nav__cnt {
  padding: 1px 8px;
  border-radius: 99px;
  background: var(--qe-warn-soft);
  font-size: 11.5px;
  font-style: normal;
  letter-spacing: 0;
  color: var(--qe-warn);
}
.qe-nav__cnt.is-done {
  background: var(--qe-ok-soft);
  color: var(--qe-ok);
}
.qe-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--qe-text);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.qe-nav__item:hover {
  background: var(--qe-navy-soft);
  color: var(--qe-navy);
}
.qe-nav__item.is-active {
  background: linear-gradient(135deg, var(--qe-navy-2), var(--qe-navy));
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 52, 96, 0.3);
}
.qe-nav__item.is-locked:not(.is-active) {
  color: var(--qe-faint);
}
.qe-nav__ico {
  display: inline-flex;
  width: 18px;
  justify-content: center;
  flex-shrink: 0;
  font-style: normal;
  font-size: 15px;
}
.qe-nav__lbl {
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qe-nav__st {
  display: inline-flex;
  flex-shrink: 0;
  font-style: normal;
}
.qe-nav__st.is-ok {
  color: var(--qe-ok);
  font-size: 16px;
}
.qe-nav__item.is-active .qe-nav__st.is-ok {
  color: #4ade80;
}
.qe-nav__st.is-todo {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}
.qe-nav__st.is-lock {
  font-size: 11px;
  color: var(--qe-faint);
}

/* rail (collapsed menu): icons only */
.qe-body.is-rail .qe-nav {
  align-items: center;
  padding: 10px 6px;
}
.qe-body.is-rail .qe-nav__top {
  padding: 0 0 6px;
}
.qe-body.is-rail .qe-nav__title,
.qe-body.is-rail .qe-nav__group,
.qe-body.is-rail .qe-nav__lbl,
.qe-body.is-rail .qe-nav__st {
  display: none;
}
.qe-body.is-rail .qe-nav__sec {
  width: 100%;
  align-items: center;
}
.qe-body.is-rail .qe-nav__item {
  justify-content: center;
  width: 44px;
  padding: 11px 0;
}

/* ---------------------------------------------------------------- */
/* 4. Section panes (only the selected one is shown)                 */
/* ---------------------------------------------------------------- */
.qe-pane.is-off {
  display: none;
}
.qe-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--qe-line);
  border-radius: var(--qe-radius);
  box-shadow: var(--qe-shadow);
}
.qe-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border-bottom: 1px solid var(--qe-line);
  border-radius: var(--qe-radius) var(--qe-radius) 0 0;
}
.qe-card__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--qe-navy-soft);
  color: var(--qe-navy);
  font-size: 13px;
}
.qe-card__titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.qe-card__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--qe-ink);
}
.qe-card__hint {
  font-size: 12px;
  color: var(--qe-muted);
}
.qe-card__side {
  margin-left: auto;
}
.qe-card__head > .qe-badge {
  margin-left: auto;
}
.qe-badge {
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--qe-navy);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.qe-card__body {
  min-width: 0;
  padding: 12px 14px;
  min-height: 61vh;
}

/* form: titled groups with a field grid */
.qe-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.qe-grp__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.qe-grp__head::after {
  content: "";
  flex: 1 1;
  height: 1px;
  background: var(--qe-line);
}
.qe-grp__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--qe-navy);
  color: #fff;
  font-size: 12px;
}
.qe-grp__title {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qe-navy);
}
.qe-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: row dense;
  align-items: start;
  grid-gap: 10px 14px;
  gap: 10px 14px;
}
.qe-f {
  min-width: 0;
}
.qe-f--wide {
  grid-column: span 2;
}
.qe-form .q-buyer-details-container,
.qe-form .common-input-label-container {
  margin: 0;
}
.qe-form .prod-std-lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--qe-text);
}
.qe-form .aster-risk-Icon {
  color: #ef4444;
}

/* Quote details: the style image is a cell of the Style grid (right
   column, 4 rows high) so the fields fill the space around it */
.qe-details {
  display: block;
}
.qe-f--img {
  grid-column: -2 / -1;
  grid-row: span 4;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.qe-img__lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--qe-text);
}
.qe-img__box {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: var(--qe-soft);
  border: 1.5px dashed var(--qe-navy-line);
  border-radius: 10px;
}
.qe-img__box .ant-image {
  display: block;
  width: 100%;
}
.qe-img__box .q-img {
  display: block;
  width: 100%;
  max-height: 210px;
  object-fit: contain;
  border-radius: 8px;
}

/* empty / locked state */
.qe-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 16px;
  border-style: dashed;
  text-align: center;
}
.qe-empty__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--qe-navy-soft);
  color: var(--qe-navy);
  font-size: 18px;
}
.qe-empty__title {
  font-size: 16px;
  font-weight: 800;
  color: var(--qe-ink);
}
.qe-empty__text {
  max-width: 440px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--qe-muted);
}

/* ---------------------------------------------------------------- */
/* 5. Responsive                                                     */
/* ---------------------------------------------------------------- */
@media (max-width: 1399.98px) {
  .qe-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1199.98px) {
  .qe-body,
  .qe-body.is-rail {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .qe-body .qe-nav {
    align-items: center;
    padding: 10px 6px;
  }
  .qe-body .qe-nav__title,
  .qe-body .qe-nav__group,
  .qe-body .qe-nav__lbl,
  .qe-body .qe-nav__st,
  .qe-body .qe-nav__rail {
    display: none;
  }
  .qe-body .qe-nav__sec {
    width: 100%;
    align-items: center;
  }
  .qe-body .qe-nav__item {
    justify-content: center;
    width: 44px;
    padding: 11px 0;
  }
  .qe-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .qe-f--img {
    grid-row: span 3;
  }
  .qe-step__prog {
    margin-left: 0;
  }
}
@media (max-width: 767.98px) {
  .qe-hdr {
    position: static;
  }
  .qe-body,
  .qe-body.is-rail {
    grid-template-columns: minmax(0, 1fr);
  }
  .qe-body .qe-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
  }
  .qe-body .qe-nav__top {
    display: none;
  }
  .qe-body .qe-nav__sec {
    flex-direction: row;
    width: auto;
    padding: 0;
    border: 0;
  }
  .qe-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .qe-f--wide,
  .qe-f--img {
    grid-column: auto;
    grid-row: auto;
  }
  .qe-step {
    position: static;
  }
  .qe-nav {
    max-height: none;
  }
  .qe-step__nav {
    width: 100%;
  }
}

/* pack costing tables are kept mounted but shown only with "Pack summary" */
.qe-hide {
  display: none;
}
/* longer menu: let it scroll inside the sticky box */
.qe-nav {
  max-height: calc(100vh - var(--qe-step-h) - 11px);
  overflow-y: auto;
}

/* ---- collapsible menu groups ---- */
.qe-nav__group {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.qe-nav__group:hover {
  color: var(--qe-navy);
}
.qe-nav__group > span {
  flex: 1 1;
}
.qe-nav__cnt {
  margin-right: 6px;
}
.qe-nav__chev {
  flex-shrink: 0;
  font-size: 10px;
  transition: transform 0.2s;
}
.qe-nav__sec.is-closed .qe-nav__chev {
  transform: rotate(-90deg);
}
/* a closed group still shows the item that is open */
.qe-nav__item.is-hid {
  display: none;
}

/* ---- component picker for the cost sheet (menu) ---- */
.qe-nav__comp {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0 6px 4px;
}
.qe-nav__comp span {
  font-size: 11px;
  font-weight: 700;
  color: var(--qe-muted);
}
.qe-nav__comp select {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--qe-line);
  border-radius: 8px;
  background: var(--qe-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--qe-ink);
}
.qe-nav__comp select:focus-visible {
  outline: 2px solid var(--qe-navy);
  outline-offset: 1px;
}
.qe-body.is-rail .qe-nav__comp {
  display: none;
}
.qe-badge--soft {
  background: var(--qe-navy-soft);
  color: var(--qe-navy);
}
.qe-card__head > .qe-badge + .qe-badge {
  margin-left: 0;
}

/* while the page switches section (low priority update) */
.qe-main.is-pending {
  opacity: 0.6;
  transition: opacity 0.15s;
}
/* ==================================================================== */
/* Quote - additional costs (tabs), pack summary, collar/cuff process   */
/* New qx-* rules only. Navy #0f3460, no !important, no control heights */
/* ==================================================================== */
.qx-addons,
.qx-pack-summary,
.qx-proc {
  --qx-navy: #0f3460;
  --qx-navy-2: #1b4b85;
  --qx-navy-soft: #e8eef7;
  --qx-navy-line: #c9d6ea;
  --qx-ink: #0f172a;
  --qx-text: #334155;
  --qx-muted: #64748b;
  --qx-line: #e2e8f0;
  --qx-line-2: #eef2f7;
  --qx-soft: #eff3f9 !important;
}

/* ---------------------------------------------------------------- */
/* 1. Selected additional cost group (picked in the page menu)       */
/* ---------------------------------------------------------------- */
.qx-cpanel {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
}
.qx-cpanel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 11px 16px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border-bottom: 1px solid var(--qx-line);
  border-radius: 12px 12px 0 0;
}
.qx-cpanel__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--qx-ink);
}
.qx-cpanel__totals .qx-totals__item {
  padding: 4px 10px;
  background: #fff;
  border-color: var(--qx-navy-line);
}
.qx-cpanel__totals .qx-totals__val {
  font-weight: 800;
}
.qx-cpanel__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px 16px;
}
/* Summary group: navy header, the final numbers stand out */
.qx-cpanel--sum {
  border-color: var(--qx-navy);
}
.qx-cpanel--sum .qx-cpanel__head {
  background: linear-gradient(135deg, var(--qx-navy-2), var(--qx-navy));
  border-bottom-color: var(--qx-navy);
}
.qx-cpanel--sum .qx-cpanel__title {
  color: #fff;
}
.qx-cpanel--sum .qx-cpanel__totals .qx-totals__item {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}
.qx-cpanel--sum .qx-cpanel__totals .qx-totals__lbl {
  color: rgba(255, 255, 255, 0.75);
}
.qx-cpanel--sum .qx-cpanel__totals .qx-totals__val {
  color: #fff;
}

/* ---------------------------------------------------------------- */
/* 2. Content inside a group                                         */
/* ---------------------------------------------------------------- */
/* refresh / add cost type buttons sit above the table on the right */
.qx-addons .qx-table-wrap > .labl-align-link {
  display: flex;
  justify-content: flex-start;
  padding: 8px 10px;
  background: rgb(15, 52, 96);
  border-bottom: 1px solid var(--qx-line);
}
.qx-addons .q-table-costing td .ant-select,
.qx-addons .q-table-costing td .ant-input,
.qx-addons .q-table-costing td .ant-input-number {
  width: 100%;
}
.qx-addons .q-table-costing td:first-child {
  font-weight: 600;
  color: var(--qx-ink);
}
.qx-addons .q-btn-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.qx-addons .q-buyer-details-container {
  margin: 0;
}
.qx-addons .prod-std-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--qx-text);
}

/* summary: the two "without / with incentives" boxes */
.qx-addons .qx-kpi-group {
  height: 100%;
  margin: 0;
  padding: 12px 14px 14px;
  background: var(--qx-soft);
  border: 1px solid var(--qx-line);
  border-top: 3px solid var(--qx-navy);
  border-radius: 12px;
}
.qx-addons .qx-kpi-group > .ant-row:first-child {
  margin-bottom: 8px;
}
.qx-addons .qx-kpi-group > .ant-row:first-child .prod-std-lbl {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--qx-navy);
}
.qx-addons .qx-kpi-group input {
  font-weight: 700;
  color: var(--qx-ink);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.qx-addons .ant-table-wrapper {
  margin-top: 4px;
}
.qx-addons .ant-table {
  border: 1px solid var(--qx-line);
  border-radius: 10px;
  overflow: hidden;
}
.qx-addons .ant-table-thead > tr > th {
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  color: var(--qx-text);
}

/* ---------------------------------------------------------------- */
/* 3. Pack costing summary (two tables side by side)                 */
/* ---------------------------------------------------------------- */
.qx-pack-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  grid-gap: 14px;
  gap: 14px;
  margin-top: 14px;
}
.qx-pack-summary .qx-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
  overflow: hidden;
}
.qx-pack-summary .qx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border-bottom: 1px solid var(--qx-line);
}
.qx-pack-summary .qx-head__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--qx-ink);
}
.qx-pack-summary .ant-table-wrapper {
  padding: 10px;
}
.qx-pack-summary .ant-table-thead > tr > th {
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  color: var(--qx-text);
}
.qx-pack-summary .ant-table-tbody > tr > td {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- */
/* 4. Collar / cuff process route table                              */
/* ---------------------------------------------------------------- */
.qx-proc {
  overflow-x: auto;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
  background: #fff;
}
.qx-proc__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.qx-proc__table .common-table-th {
  padding: 8px 10px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--qx-line);
  border-right: 1px solid var(--qx-line-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--qx-text);
  text-align: left;
  white-space: nowrap;
  border-left: 1px solid #e9d1d1;
}
.qx-proc__table tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--qx-line-2);
  vertical-align: middle;
}
.qx-proc__table tbody tr:hover > td {
  background: #f8fafc;
}
.qx-proc__table td .ant-select,
.qx-proc__table td .ant-input {
  width: 100%;
  min-width: 90px;
}
.qx-proc__total > td {
  background: var(--qx-navy-soft);
  font-weight: 800;
  color: var(--qx-navy);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- */
/* 5. Responsive                                                     */
/* ---------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .qx-pack-summary {
    grid-template-columns: minmax(0, 1fr);
  }
  .qx-addons .qx-kpi-group {
    margin-bottom: 8px;
  }
}
@media (max-width: 575.98px) {
  .qx-cpanel__head {
    padding: 10px 12px;
  }
  .qx-cpanel__body {
    padding: 12px;
  }
}

/* keep the two summary boxes top-aligned and equal height */
.qx-addons .ant-row:has(> .ant-col > .qx-kpi-group) {
  align-items: stretch;
}
/* ==================================================================== */
/* Quote costing - "cost sheet" layout                                   */
/* New qx-* classes only. Existing classes (common-table-*, q-table ...) */
/* are restyled only inside .qx-cost, so other screens are untouched.    */
/* ==================================================================== */

.qx-cost {
  --qx-navy: #0f3460;
  --qx-navy-2: #1b4b85;
  --qx-navy-soft: #e8eef7;
  --qx-ink: #0f172a;
  --qx-text: #334155;
  --qx-muted: #64748b;
  --qx-line: #e2e8f0;
  --qx-line-2: #eef2f7;
  --qx-soft: #f6f8fb;

  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  color: var(--qx-text);
}

/* ---------------------------------------------------------------- */
/* 1. Viewing bar                                                    */
/* ---------------------------------------------------------------- */
.qx-view {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 18px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--qx-line);
  border-left: 4px solid var(--qx-navy);
  border-radius: 12px;
}
.qx-view__title {
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qx-navy);
}
.qx-view__pick {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 170px;
  margin: 0;
}
.qx-view__lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--qx-muted);
}
.qx-view__select {
  width: 100%;
  min-width: 170px;
}
.qx-view__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.qx-stat {
  display: flex;
  flex-direction: column;
  min-width: 110px;
  padding: 6px 12px;
  background: var(--qx-soft);
  border: 1px solid var(--qx-line);
  border-radius: 8px;
}
.qx-stat__lbl {
  font-size: 11px;
  color: var(--qx-muted);
}
.qx-stat__val {
  font-size: 15px;
  font-weight: 700;
  color: var(--qx-ink);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.qx-stat__val small {
  margin-right: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--qx-muted);
}
.qx-stat--strong {
  background: var(--qx-navy);
  border-color: var(--qx-navy);
}
.qx-stat--strong .qx-stat__lbl,
.qx-stat--strong .qx-stat__val small {
  color: rgba(255, 255, 255, 0.75);
}
.qx-stat--strong .qx-stat__val {
  color: #fff;
}

/* ---------------------------------------------------------------- */
/* 2. Cost sheet matrix                                              */
/* ---------------------------------------------------------------- */
.qx-costing {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.qx-sheet {
  background: #fff;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
  overflow: hidden;
}
.qx-sheet__cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--qx-line);
}
.qx-sheet__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--qx-ink);
}
.qx-sheet__hint {
  font-size: 12px;
  color: var(--qx-muted);
}
.qx-sheet__scroll {
  overflow-x: auto;
}
.qx-sheet__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.qx-sheet__table thead th {
  padding: 8px 12px;
  background: var(--qx-soft);
  border-bottom: 1px solid var(--qx-line);
  font-size: 12px;
  font-weight: 600;
  color: var(--qx-muted);
  text-align: right;
  white-space: nowrap;
}
.qx-sheet__table thead th.qx-sheet__corner {
  text-align: left;
}
.qx-sheet__table tbody td,
.qx-sheet__table tbody th {
  padding: 3px 6px;
  border-bottom: 1px solid var(--qx-line-2);
  text-align: right;
}
.qx-sheet__table tbody tr:last-child td,
.qx-sheet__table tbody tr:last-child th {
  border-bottom: 0;
}
.qx-sheet__name {
  text-align: left;
  font-weight: 600;
}
.qx-sheet__table tbody th.qx-sheet__name {
  text-align: left;
}
.qx-sheet__name button {
  padding: 6px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--qx-ink);
  cursor: pointer;
  white-space: nowrap;
}
.qx-sheet__table tbody tr.is-row > th,
.qx-sheet__table tbody tr.is-row > td {
  background: #f5f8fc;
}
.qx-sheet__table tbody tr.is-row .qx-sheet__name button {
  color: var(--qx-navy);
}
.qx-cell {
  width: 100%;
  min-width: 84px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--qx-text);
  text-align: right;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.qx-cell:hover {
  background: var(--qx-navy-soft);
}
.qx-cell.is-on {
  background: var(--qx-navy);
  border-color: var(--qx-navy);
  color: #fff;
  font-weight: 600;
}
.qx-cell:focus-visible,
.qx-sheet__name button:focus-visible,
.qx-seg__btn:focus-visible {
  outline: 2px solid var(--qx-navy);
  outline-offset: 1px;
}
.qx-sheet__totcol {
  padding-right: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--qx-ink);
  white-space: nowrap;
}
.qx-sheet__table tfoot th,
.qx-sheet__table tfoot td {
  padding: 8px 14px;
  background: var(--qx-soft);
  border-top: 1px solid var(--qx-line);
  font-size: 13px;
  font-weight: 700;
  color: var(--qx-ink);
  text-align: right;
}
.qx-sheet__table tfoot th {
  text-align: left;
}

/* ---------------------------------------------------------------- */
/* 3. Detail panel (item table of the selected cell)                 */
/* ---------------------------------------------------------------- */
.qx-detail {
  background: #fff;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
  min-width: 0;
}
.qx-detail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--qx-line);
}
.qx-detail__crumb {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.qx-detail__piece {
  font-size: 14px;
  font-weight: 700;
  color: var(--qx-ink);
}
.qx-detail__sep {
  color: var(--qx-muted);
}
.qx-detail__cat {
  font-size: 14px;
  font-weight: 700;
  color: var(--qx-navy);
}
.qx-detail__cost {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--qx-navy-soft);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--qx-navy);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.qx-detail__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  min-width: 0;
}

/* sub filters: Production / Packing trims, Panel / Roll / Bit / Garment */
.qx-seg {
  display: flex;
  gap: 4px;
  width: -webkit-fit-content;
  width: fit-content;
  max-width: 100%;
  padding: 3px;
  overflow-x: auto;
  background: #f6f8fb;
  background: var(--qx-soft, #f6f8fb);
  border: 1px solid #e2e8f0;
  border: 1px solid var(--qx-line, #e2e8f0);
  border-radius: 10px;
}
.qx-seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  color: var(--qx-muted, #64748b);
  white-space: nowrap;
  cursor: pointer;
}
.qx-seg__btn.is-active {
  background: #fff;
  color: #0f3460;
  color: var(--qx-navy, #0f3460);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.qx-seg__ico {
  display: inline-flex;
}

/* item tables inside the detail panel */
.qx-cost .qx-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--qx-line);
  border-radius: 10px;
}
.qx-cost .qx-table-wrap .qx-table-title {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--qx-line);
  font-size: 13px;
  font-weight: 700;
  color: var(--qx-ink);
}
.qx-cost .qx-table-wrap table.q-table-costing {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.qx-cost .qx-table-wrap .common-table-th {
  padding: 8px 10px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--qx-line);
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  text-align: left;
  white-space: nowrap;
  border-left: 1px solid #e9d1d1;
}
.qx-cost .qx-table-wrap td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--qx-line-2);
  font-size: 13px;
  vertical-align: middle;
}
.qx-cost .qx-table-wrap .common-table-row.even-row > td {
  background: #fafbfd;
}
.qx-cost .qx-table-wrap .common-table-row:hover > td {
  background: #f3f6fb;
}
.qx-cost .qx-detail__body td.q-sum-bold {
  padding: 6px 10px;
  background: #f8fafc;
  font-weight: 600;
  color: var(--qx-ink);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* totals pills (used by the additional cost screens in a later step) */
.qx-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qx-totals__item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 2px 10px;
  background: #f6f8fb;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.qx-totals__lbl {
  font-size: 11px;
  color: #64748b;
}
.qx-totals__val {
  font-size: 13px;
  color: #0f3460;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767.98px) {
  .qx-view__stats {
    margin-left: 0;
  }
  .qx-view__pick,
  .qx-view__select {
    min-width: 140px;
  }
}

/* keep long item names readable */
.qx-cost .qx-table-wrap td.q-table-td-wdth {
  min-width: 220px;
}

/* ==================================================================== */
/* Quote - additional costs (tabs), pack summary, collar/cuff process   */
/* New qx-* rules only. Navy #0f3460, no !important, no control heights */
/* ==================================================================== */
.qx-addons,
.qx-pack-summary,
.qx-proc {
  --qx-navy: #0f3460;
  --qx-navy-2: #1b4b85;
  --qx-navy-soft: #e8eef7;
  --qx-navy-line: #c9d6ea;
  --qx-ink: #0f172a;
  --qx-text: #334155;
  --qx-muted: #64748b;
  --qx-line: #e2e8f0;
  --qx-line-2: #eef2f7;
  --qx-soft: #f6f8fb;
}

/* ---------------------------------------------------------------- */
/* 1. Selected additional cost group (picked in the page menu)       */
/* ---------------------------------------------------------------- */
.qx-cpanel {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
}
.qx-cpanel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 11px 16px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border-bottom: 1px solid var(--qx-line);
  border-radius: 12px 12px 0 0;
}
.qx-cpanel__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--qx-ink);
}
.qx-cpanel__totals .qx-totals__item {
  padding: 4px 10px;
  background: #fff;
  border-color: var(--qx-navy-line);
}
.qx-cpanel__totals .qx-totals__val {
  font-weight: 800;
}
.qx-cpanel__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px 16px;
}
/* Summary group: navy header, the final numbers stand out */
.qx-cpanel--sum {
  border-color: var(--qx-navy);
}
.qx-cpanel--sum .qx-cpanel__head {
  background: linear-gradient(135deg, var(--qx-navy-2), var(--qx-navy));
  border-bottom-color: var(--qx-navy);
}
.qx-cpanel--sum .qx-cpanel__title {
  color: #fff;
}
.qx-cpanel--sum .qx-cpanel__totals .qx-totals__item {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}
.qx-cpanel--sum .qx-cpanel__totals .qx-totals__lbl {
  color: rgba(255, 255, 255, 0.75);
}
.qx-cpanel--sum .qx-cpanel__totals .qx-totals__val {
  color: #fff;
}

/* ---------------------------------------------------------------- */
/* 2. Content inside a group                                         */
/* ---------------------------------------------------------------- */
/* refresh / add cost type buttons sit above the table on the right */
.qx-addons .qx-table-wrap > .labl-align-link {
  display: flex;
  justify-content: flex-start;
  padding: 8px 10px;
  background: rgb(15, 52, 96);
  border-bottom: 1px solid var(--qx-line);
}
.qx-addons .q-table-costing td .ant-select,
.qx-addons .q-table-costing td .ant-input,
.qx-addons .q-table-costing td .ant-input-number {
  width: 100%;
  min-width: 120px;
}
.qx-addons .q-table-costing td:first-child {
  font-weight: 600;
  color: var(--qx-ink);
}
.qx-addons .q-btn-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.qx-addons .q-buyer-details-container {
  margin: 0;
}
.qx-addons .prod-std-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--qx-text);
}

/* summary: the two "without / with incentives" boxes */
.qx-addons .qx-kpi-group {
  height: 100%;
  margin: 0;
  padding: 12px 14px 14px;
  background: var(--qx-soft);
  border: 1px solid var(--qx-line);
  border-top: 3px solid var(--qx-navy);
  border-radius: 12px;
}
.qx-addons .qx-kpi-group > .ant-row:first-child {
  margin-bottom: 8px;
}
.qx-addons .qx-kpi-group > .ant-row:first-child .prod-std-lbl {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--qx-navy);
}
.qx-addons .qx-kpi-group input {
  font-weight: 700;
  color: var(--qx-ink);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.qx-addons .ant-table-wrapper {
  margin-top: 4px;
}
.qx-addons .ant-table {
  border: 1px solid var(--qx-line);
  border-radius: 10px;
  overflow: hidden;
}
.qx-addons .ant-table-thead > tr > th {
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  color: var(--qx-text);
}

/* ---------------------------------------------------------------- */
/* 3. Pack costing summary (two tables side by side)                 */
/* ---------------------------------------------------------------- */
.qx-pack-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  grid-gap: 14px;
  gap: 14px;
  margin-top: 14px;
}
.qx-pack-summary .qx-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
  overflow: hidden;
}
.qx-pack-summary .qx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border-bottom: 1px solid var(--qx-line);
}
.qx-pack-summary .qx-head__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--qx-ink);
}
.qx-pack-summary .ant-table-wrapper {
  padding: 10px;
}
.qx-pack-summary .ant-table-thead > tr > th {
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  color: var(--qx-text);
}
.qx-pack-summary .ant-table-tbody > tr > td {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- */
/* 4. Collar / cuff process route table                              */
/* ---------------------------------------------------------------- */
.qx-proc {
  overflow-x: auto;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
  background: #fff;
}
.qx-proc__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.qx-proc__table .common-table-th {
  padding: 8px 10px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--qx-line);
  border-right: 1px solid var(--qx-line-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--qx-text);
  text-align: left;
  white-space: nowrap;
  border-left: 1px solid #e9d1d1;
}
.qx-proc__table tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--qx-line-2);
  vertical-align: middle;
}
.qx-proc__table tbody tr:hover > td {
  background: #f8fafc;
}
.qx-proc__table td .ant-select,
.qx-proc__table td .ant-input {
  width: 100%;
  min-width: 90px;
}
.qx-proc__total > td {
  background: var(--qx-navy-soft);
  font-weight: 800;
  color: var(--qx-navy);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- */
/* 5. Responsive                                                     */
/* ---------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .qx-pack-summary {
    grid-template-columns: minmax(0, 1fr);
  }
  .qx-addons .qx-kpi-group {
    margin-bottom: 8px;
  }
}
@media (max-width: 575.98px) {
  .qx-cpanel__head {
    padding: 10px 12px;
  }
  .qx-cpanel__body {
    padding: 12px;
  }
}

/* keep the two summary boxes top-aligned and equal height */
.qx-addons .ant-row:has(> .ant-col > .qx-kpi-group) {
  align-items: stretch;
}

/* ==================================================================== */
/* Cost sheet viewing: chips for colour / size / pack, back link,        */
/* quick component switch                                                */
/* ==================================================================== */
.qx-view__pickers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1 1 420px;
}
.qx-cost .qx-view__pick {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.qx-cost .qx-view__lbl {
  flex-shrink: 0;
  width: 108px;
}
.qx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qx-chip {
  padding: 4px 12px;
  border: 1px solid #d5deea;
  border-radius: 99px;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.qx-chip:hover {
  border-color: #0f3460;
  color: #0f3460;
}
.qx-chip.is-on {
  background: #0f3460;
  border-color: #0f3460;
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 52, 96, 0.25);
}
.qx-chip:focus-visible,
.qx-back:focus-visible {
  outline: 2px solid #0f3460;
  outline-offset: 2px;
}
.qx-back {
  padding: 4px 12px;
  border: 1px solid #c9d6ea;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f3460;
  cursor: pointer;
}
.qx-back:hover {
  background: #e8eef7;
}
.qx-detail__comps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.qx-detail__comps-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}
@media (max-width: 767.98px) {
  .qx-cost .qx-view__pick {
    flex-direction: column;
    align-items: flex-start;
  }
  .qx-cost .qx-view__lbl {
    width: auto;
  }
}

/* ---- grouped picker: pack groups row + items of the selected group ---- */
.qx-pick2 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.qx-gchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid #d5deea;
  border-radius: 8px;
  background: #f6f8fb;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}
.qx-gchip em {
  padding: 0 6px;
  border-radius: 99px;
  background: #e2e8f0;
  font-size: 11px;
  font-style: normal;
  color: #64748b;
}
.qx-gchip:hover {
  border-color: #0f3460;
  color: #0f3460;
}
.qx-gchip.is-on {
  background: #e8eef7;
  border-color: #0f3460;
  color: #0f3460;
  box-shadow: inset 0 0 0 1px #0f3460;
}
.qx-gchip.is-on em {
  background: #0f3460;
  color: #fff;
}
.qx-gchip:focus-visible {
  outline: 2px solid #0f3460;
  outline-offset: 2px;
}
.qx-view__none {
  color: #94a3b8;
}
/* labels sit on the first line of their chips */
.qx-cost .qx-view__pick {
  align-items: flex-start;
}
.qx-cost .qx-view__lbl {
  padding-top: 5px;
}

/* ==================================================================== */
/* One-line pickers (colour / size / pack): a scrolling strip            */
/* ==================================================================== */
.qx-cost .qx-view {
  align-items: center;
}
.qx-cost .qx-view__pick {
  align-items: center;
}
.qx-cost .qx-view__lbl {
  padding-top: 0;
}
.qx-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  padding: 3px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.qx-strip__track {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.qx-strip__track::-webkit-scrollbar {
  display: none;
}
.qx-strip .qx-chip {
  flex: 0 0 auto;
  padding: 4px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  color: #475569;
  box-shadow: none;
}
.qx-strip .qx-chip:hover {
  background: #fff;
  color: #0f3460;
}
.qx-strip .qx-chip.is-on {
  background: #0f3460;
  color: #fff;
  box-shadow: 0 1px 4px rgba(15, 52, 96, 0.3);
}
.qx-strip .qx-chip .segment-container {
  display: inline;
}
/* arrows + count only when the options do not fit in one line */
.qx-strip__arrow,
.qx-strip__count {
  display: none;
}

.qx-strip.is-over .qx-strip__count {
  display: inline-block;
  flex: 0 0 auto;
  padding: 1px 7px;
  border-radius: 99px;
  background: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}
.qx-strip__arrow:focus-visible {
  outline: 2px solid #0f3460;
  outline-offset: 1px;
}
.qx-strip.is-over .qx-strip__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  width: 25px;
  height: 25px;

  border: 1px solid #d5deea;
  border-radius: 50%;
  background: #fff;

  font-size: 26px;
  font-weight: 600;
  line-height: 1;

  color: #0f3460;
  cursor: pointer;
  padding: 0;
  align-self: center;
  padding-bottom: 4px;
}
.qx-strip.is-over .qx-strip__arrow:disabled {
  color: #cbd5e1;
  cursor: default;
}
/* ==================================================================== */
/* Quote - additional costs (tabs), pack summary, collar/cuff process   */
/* New qx-* rules only. Navy #0f3460, no !important, no control heights */
/* ==================================================================== */
.qx-addons,
.qx-pack-summary,
.qx-proc {
  --qx-navy: #0f3460;
  --qx-navy-2: #1b4b85;
  --qx-navy-soft: #e8eef7;
  --qx-navy-line: #c9d6ea;
  --qx-ink: #0f172a;
  --qx-text: #334155;
  --qx-muted: #64748b;
  --qx-line: #e2e8f0;
  --qx-line-2: #eef2f7;
  --qx-soft: #f6f8fb;
}

/* ---------------------------------------------------------------- */
/* 1. Selected additional cost group (picked in the page menu)       */
/* ---------------------------------------------------------------- */
.qx-cpanel {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
}
.qx-cpanel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 11px 16px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border-bottom: 1px solid var(--qx-line);
  border-radius: 12px 12px 0 0;
}
.qx-cpanel__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--qx-ink);
}
.qx-cpanel__totals .qx-totals__item {
  padding: 4px 10px;
  background: #fff;
  border-color: var(--qx-navy-line);
}
.qx-cpanel__totals .qx-totals__val {
  font-weight: 800;
}
.qx-cpanel__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px 16px;
}
/* Summary group: navy header, the final numbers stand out */
.qx-cpanel--sum {
  border-color: var(--qx-navy);
}
.qx-cpanel--sum .qx-cpanel__head {
  background: linear-gradient(135deg, var(--qx-navy-2), var(--qx-navy));
  border-bottom-color: var(--qx-navy);
}
.qx-cpanel--sum .qx-cpanel__title {
  color: #fff;
}
.qx-cpanel--sum .qx-cpanel__totals .qx-totals__item {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}
.qx-cpanel--sum .qx-cpanel__totals .qx-totals__lbl {
  color: rgba(255, 255, 255, 0.75);
}
.qx-cpanel--sum .qx-cpanel__totals .qx-totals__val {
  color: #fff;
}

/* ---------------------------------------------------------------- */
/* 2. Content inside a group                                         */
/* ---------------------------------------------------------------- */
/* refresh / add cost type buttons sit above the table on the right */
.qx-addons .qx-table-wrap > .labl-align-link {
  display: flex;
  justify-content: flex-start;
  padding: 8px 10px;
  background: rgb(15, 52, 96);
  border-bottom: 1px solid var(--qx-line);
}
.qx-addons .q-table-costing td .ant-select,
.qx-addons .q-table-costing td .ant-input,
.qx-addons .q-table-costing td .ant-input-number {
  width: 100%;
  min-width: 120px;
}
.qx-addons .q-table-costing td:first-child {
  font-weight: 600;
  color: var(--qx-ink);
}
.qx-addons .q-btn-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.qx-addons .q-buyer-details-container {
  margin: 0;
}
.qx-addons .prod-std-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--qx-text);
}

/* summary: the two "without / with incentives" boxes */
.qx-addons .qx-kpi-group {
  height: 100%;
  margin: 0;
  padding: 12px 14px 14px;
  background: var(--qx-soft);
  border: 1px solid var(--qx-line);
  border-top: 3px solid var(--qx-navy);
  border-radius: 12px;
}
.qx-addons .qx-kpi-group > .ant-row:first-child {
  margin-bottom: 8px;
}
.qx-addons .qx-kpi-group > .ant-row:first-child .prod-std-lbl {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--qx-navy);
}
.qx-addons .qx-kpi-group input {
  font-weight: 700;
  color: var(--qx-ink);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.qx-addons .ant-table-wrapper {
  margin-top: 4px;
}
.qx-addons .ant-table {
  border: 1px solid var(--qx-line);
  border-radius: 10px;
  overflow: hidden;
}
.qx-addons .ant-table-thead > tr > th {
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  color: var(--qx-text);
}

/* ---------------------------------------------------------------- */
/* 3. Pack costing summary (two tables side by side)                 */
/* ---------------------------------------------------------------- */
.qx-pack-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  grid-gap: 14px;
  gap: 14px;
  margin-top: 14px;
}
.qx-pack-summary .qx-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
  overflow: hidden;
}
.qx-pack-summary .qx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border-bottom: 1px solid var(--qx-line);
}
.qx-pack-summary .qx-head__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--qx-ink);
}
.qx-pack-summary .ant-table-wrapper {
  padding: 10px;
}
.qx-pack-summary .ant-table-thead > tr > th {
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  color: var(--qx-text);
}
.qx-pack-summary .ant-table-tbody > tr > td {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- */
/* 4. Collar / cuff process route table                              */
/* ---------------------------------------------------------------- */
.qx-proc {
  overflow-x: auto;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
  background: #fff;
}
.qx-proc__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.qx-proc__table .common-table-th {
  padding: 8px 10px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--qx-line);
  border-right: 1px solid var(--qx-line-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--qx-text);
  text-align: left;
  white-space: nowrap;
  border-left: 1px solid #e9d1d1;
}
.qx-proc__table tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--qx-line-2);
  vertical-align: middle;
}
.qx-proc__table tbody tr:hover > td {
  background: #f8fafc;
}
.qx-proc__table td .ant-select,
.qx-proc__table td .ant-input {
  width: 100%;
  min-width: 90px;
}
.qx-proc__total > td {
  background: var(--qx-navy-soft);
  font-weight: 800;
  color: var(--qx-navy);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- */
/* 5. Responsive                                                     */
/* ---------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .qx-pack-summary {
    grid-template-columns: minmax(0, 1fr);
  }
  .qx-addons .qx-kpi-group {
    margin-bottom: 8px;
  }
}
@media (max-width: 575.98px) {
  .qx-cpanel__head {
    padding: 10px 12px;
  }
  .qx-cpanel__body {
    padding: 12px;
  }
}

/* keep the two summary boxes top-aligned and equal height */
.qx-addons .ant-row:has(> .ant-col > .qx-kpi-group) {
  align-items: stretch;
}

/* ==================================================================== */
/* Cost sheet viewing: chips for colour / size / pack, back link,        */
/* quick component switch                                                */
/* ==================================================================== */
.qx-view__pickers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1 1 420px;
}
.qx-cost .qx-view__pick {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.qx-cost .qx-view__lbl {
  flex-shrink: 0;
  width: 108px;
}
.qx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qx-chip {
  padding: 4px 12px;
  border: 1px solid #d5deea;
  border-radius: 99px;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.qx-chip:hover {
  border-color: #0f3460;
  color: #0f3460;
}
.qx-chip.is-on {
  background: #0f3460;
  border-color: #0f3460;
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 52, 96, 0.25);
}
.qx-chip:focus-visible,
.qx-back:focus-visible {
  outline: 2px solid #0f3460;
  outline-offset: 2px;
}
.qx-back {
  padding: 4px 12px;
  border: 1px solid #c9d6ea;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f3460;
  cursor: pointer;
}
.qx-back:hover {
  background: #e8eef7;
}
.qx-detail__comps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.qx-detail__comps-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}
@media (max-width: 767.98px) {
  .qx-cost .qx-view__pick {
    flex-direction: column;
    align-items: flex-start;
  }
  .qx-cost .qx-view__lbl {
    width: auto;
  }
}

/* ---- grouped picker: pack groups row + items of the selected group ---- */
.qx-pick2 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.qx-gchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid #d5deea;
  border-radius: 8px;
  background: #f6f8fb;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}
.qx-gchip em {
  padding: 0 6px;
  border-radius: 99px;
  background: #e2e8f0;
  font-size: 11px;
  font-style: normal;
  color: #64748b;
}
.qx-gchip:hover {
  border-color: #0f3460;
  color: #0f3460;
}
.qx-gchip.is-on {
  background: #e8eef7;
  border-color: #0f3460;
  color: #0f3460;
  box-shadow: inset 0 0 0 1px #0f3460;
}
.qx-gchip.is-on em {
  background: #0f3460;
  color: #fff;
}
.qx-gchip:focus-visible {
  outline: 2px solid #0f3460;
  outline-offset: 2px;
}
.qx-view__none {
  color: #94a3b8;
}
/* labels sit on the first line of their chips */
.qx-cost .qx-view__pick {
  align-items: flex-start;
}
.qx-cost .qx-view__lbl {
  padding-top: 5px;
}

/* ==================================================================== */
/* Quote - additional costs (tabs), pack summary, collar/cuff process   */
/* New qx-* rules only. Navy #0f3460, no !important, no control heights */
/* ==================================================================== */
.qx-addons,
.qx-pack-summary,
.qx-proc {
  --qx-navy: #0f3460;
  --qx-navy-2: #1b4b85;
  --qx-navy-soft: #e8eef7;
  --qx-navy-line: #c9d6ea;
  --qx-ink: #0f172a;
  --qx-text: #334155;
  --qx-muted: #64748b;
  --qx-line: #e2e8f0;
  --qx-line-2: #eef2f7;
  --qx-soft: #f6f8fb;
}

/* ---------------------------------------------------------------- */
/* 1. Selected additional cost group (picked in the page menu)       */
/* ---------------------------------------------------------------- */
.qx-cpanel {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
}
.qx-cpanel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 11px 16px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border-bottom: 1px solid var(--qx-line);
  border-radius: 12px 12px 0 0;
}
.qx-cpanel__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--qx-ink);
}
.qx-cpanel__totals .qx-totals__item {
  padding: 4px 10px;
  background: #fff;
  border-color: var(--qx-navy-line);
}
.qx-cpanel__totals .qx-totals__val {
  font-weight: 800;
}
.qx-cpanel__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px 16px;
}
/* Summary group: navy header, the final numbers stand out */
.qx-cpanel--sum {
  border-color: var(--qx-navy);
}
.qx-cpanel--sum .qx-cpanel__head {
  background: linear-gradient(135deg, var(--qx-navy-2), var(--qx-navy));
  border-bottom-color: var(--qx-navy);
}
.qx-cpanel--sum .qx-cpanel__title {
  color: #fff;
}
.qx-cpanel--sum .qx-cpanel__totals .qx-totals__item {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}
.qx-cpanel--sum .qx-cpanel__totals .qx-totals__lbl {
  color: rgba(255, 255, 255, 0.75);
}
.qx-cpanel--sum .qx-cpanel__totals .qx-totals__val {
  color: #fff;
}

/* ---------------------------------------------------------------- */
/* 2. Content inside a group                                         */
/* ---------------------------------------------------------------- */
/* refresh / add cost type buttons sit above the table on the right */
.qx-addons .qx-table-wrap > .labl-align-link {
  display: flex;
  justify-content: flex-start;
  padding: 8px 10px;
  background: rgb(15, 52, 96);
  border-bottom: 1px solid var(--qx-line);
}
.qx-addons .q-table-costing td .ant-select,
.qx-addons .q-table-costing td .ant-input,
.qx-addons .q-table-costing td .ant-input-number {
  width: 100%;
  min-width: 120px;
}
.qx-addons .q-table-costing td:first-child {
  font-weight: 600;
  color: var(--qx-ink);
}
.qx-addons .q-btn-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.qx-addons .q-buyer-details-container {
  margin: 0;
}
.qx-addons .prod-std-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--qx-text);
}

/* summary: the two "without / with incentives" boxes */
.qx-addons .qx-kpi-group {
  height: 100%;
  margin: 0;
  padding: 12px 14px 14px;
  background: var(--qx-soft);
  border: 1px solid var(--qx-line);
  border-top: 3px solid var(--qx-navy);
  border-radius: 12px;
}
.qx-addons .qx-kpi-group > .ant-row:first-child {
  margin-bottom: 8px;
}
.qx-addons .qx-kpi-group > .ant-row:first-child .prod-std-lbl {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--qx-navy);
}
.qx-addons .qx-kpi-group input {
  font-weight: 700;
  color: var(--qx-ink);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.qx-addons .ant-table-wrapper {
  margin-top: 4px;
}
.qx-addons .ant-table {
  border: 1px solid var(--qx-line);
  border-radius: 10px;
  overflow: hidden;
}
.qx-addons .ant-table-thead > tr > th {
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  color: var(--qx-text);
}

/* ---------------------------------------------------------------- */
/* 3. Pack costing summary (two tables side by side)                 */
/* ---------------------------------------------------------------- */
.qx-pack-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  grid-gap: 14px;
  gap: 14px;
  margin-top: 14px;
}
.qx-pack-summary .qx-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
  overflow: hidden;
}
.qx-pack-summary .qx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  border-bottom: 1px solid var(--qx-line);
}
.qx-pack-summary .qx-head__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--qx-ink);
}
.qx-pack-summary .ant-table-wrapper {
  padding: 10px;
}
.qx-pack-summary .ant-table-thead > tr > th {
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  color: var(--qx-text);
}
.qx-pack-summary .ant-table-tbody > tr > td {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- */
/* 4. Collar / cuff process route table                              */
/* ---------------------------------------------------------------- */
.qx-proc {
  overflow-x: auto;
  border: 1px solid var(--qx-line);
  border-radius: 12px;
  background: #fff;
}
.qx-proc__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.qx-proc__table .common-table-th {
  padding: 8px 10px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--qx-line);
  border-right: 1px solid var(--qx-line-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--qx-text);
  text-align: left;
  white-space: nowrap;
  border-left: 1px solid #e9d1d1;
}
.qx-proc__table tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--qx-line-2);
  vertical-align: middle;
}
.qx-proc__table tbody tr:hover > td {
  background: #f8fafc;
}
.qx-proc__table td .ant-select,
.qx-proc__table td .ant-input {
  width: 100%;
  min-width: 90px;
}
.qx-proc__total > td {
  background: var(--qx-navy-soft);
  font-weight: 800;
  color: var(--qx-navy);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- */
/* 5. Responsive                                                     */
/* ---------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .qx-pack-summary {
    grid-template-columns: minmax(0, 1fr);
  }
  .qx-addons .qx-kpi-group {
    margin-bottom: 8px;
  }
}
@media (max-width: 575.98px) {
  .qx-cpanel__head {
    padding: 10px 12px;
  }
  .qx-cpanel__body {
    padding: 12px;
  }
}

/* keep the two summary boxes top-aligned and equal height */
.qx-addons .ant-row:has(> .ant-col > .qx-kpi-group) {
  align-items: stretch;
}

/* ==================================================================== */
/* Cost sheet viewing: chips for colour / size / pack, back link,        */
/* quick component switch                                                */
/* ==================================================================== */
.qx-view__pickers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1 1 420px;
}
.qx-cost .qx-view__pick {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.qx-cost .qx-view__lbl {
  flex-shrink: 0;
  width: 108px;
}
.qx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qx-chip {
  padding: 4px 12px;
  border: 1px solid #d5deea;
  border-radius: 99px;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.qx-chip:hover {
  border-color: #0f3460;
  color: #0f3460;
}
.qx-chip.is-on {
  background: #0f3460;
  border-color: #0f3460;
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 52, 96, 0.25);
}
.qx-chip:focus-visible,
.qx-back:focus-visible {
  outline: 2px solid #0f3460;
  outline-offset: 2px;
}
.qx-back {
  padding: 4px 12px;
  border: 1px solid #c9d6ea;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f3460;
  cursor: pointer;
}
.qx-back:hover {
  background: #e8eef7;
}
.qx-detail__comps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.qx-detail__comps-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}
@media (max-width: 767.98px) {
  .qx-cost .qx-view__pick {
    flex-direction: column;
    align-items: flex-start;
  }
  .qx-cost .qx-view__lbl {
    width: auto;
  }
}

/* ---------- QE TableSelect override ---------- */

/* ==================================================================== */
/* Viewing bar - compact. Paste at the END of QuoteWorkspace.css        */
/* ==================================================================== */

/* colour / size / pack labels come wrapped in the app's own
   .segment-container (made for antd tabs, it adds padding/height) -
   inside our chips it must behave like plain text */
.qx-cost .qx-strip .qx-chip .segment-container {
  display: inline;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  line-height: inherit;
  color: inherit;
}

/* chips: small, one line */
.qx-cost .qx-strip {
  align-items: center;
  padding: 5px;
}
.qx-cost .qx-strip__track {
  align-items: center;
}
.qx-cost .qx-strip .qx-chip {
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 3px 10px;
  font-size: 12px;
  line-height: 1.4;
}

/* pickers on the left, figures on the right - the figures never drop
   to a new line on desktop */
.qx-cost .qx-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  grid-gap: 8px 14px;
  gap: 8px 14px;
  padding: 8px 12px;
}
.qx-cost .qx-view__pickers {
  gap: 6px;
}

@media (max-width: 991.98px) {
  .qx-cost .qx-view {
    grid-template-columns: minmax(0, 1fr);
  }
  .qx-cost .qx-view__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==================================================================== */
/* Viewing bar - figures moved below the pickers (QxViewBar with the    */
/* stats outside .qx-view). Paste at the END of QuoteWorkspace.css,     */
/* after the previous block.                                            */
/* ==================================================================== */

/* pickers use the full width */
.qx-cost .qx-view {
  display: flex;
  grid-template-columns: none;
  padding: 8px 12px;
}
.qx-cost .qx-view__pickers {
  flex: 1 1 auto;
  width: 100%;
}

/* figures: one compact line under the pickers, on the right */
.qx-cost > .qx-view__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin: -6px 0 0;
}
.qx-cost > .qx-view__stats .qx-stat {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 7px;
}
.qx-cost > .qx-view__stats .qx-stat__lbl {
  font-size: 13px;
  white-space: nowrap;
}
.qx-cost > .qx-view__stats .qx-stat__val {
  font-size: 16px;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .qx-cost > .qx-view__stats {
    justify-content: flex-start;
    margin-top: 0;
  }
}

/* ==================================================================== */
/* Guided tours of the quote screen (antd Tour, rootClassName="qe-tour") */
/* Paste at the END of QuoteEditLayout.css                               */
/* ==================================================================== */
.ant-tour.qe-tour {
  width: 400px;
  max-width: calc(100vw - 32px);
}

.ant-tour.qe-tour .ant-tour-inner {
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.18);
}
.ant-tour.qe-tour .ant-tour-header {
  padding: 14px 16px 4px;
}
.ant-tour.qe-tour .ant-tour-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.ant-tour.qe-tour .ant-tour-description {
  padding: 4px 16px 8px;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
}
.ant-tour.qe-tour .qe-tour-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}
.ant-tour.qe-tour .qe-tour-list li::marker {
  color: #0f3460;
}
.ant-tour.qe-tour .qe-tour-list b {
  font-weight: 700;
  color: #0f3460;
}
.ant-tour.qe-tour .ant-tour-footer {
  padding: 8px 16px 14px;
}
.ant-tour.qe-tour .ant-tour-indicator-active {
  background: #0f3460;
}
.ant-tour.qe-tour .ant-tour-buttons .ant-btn-primary {
  background: #0f3460;
  border-color: #0f3460;
}
.ant-tour.qe-tour .ant-tour-buttons .ant-btn-primary:hover {
  background: #1b4b85;
  border-color: #1b4b85;
}
/* long tours: the step dots wrap */
.ant-tour.qe-tour .ant-tour-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  max-width: 200px;
}
.ant-tour.qe-tour .ant-tour-indicator {
  width: 6px;
  height: 6px;
  margin: 0;
}

/* ==================================================================== */
/* Summary & profit - "Price at a glance" charts (QuoteSummaryCharts)    */
/* Paste at the END of QuoteWorkspace.css                                */
/* ==================================================================== */
.qs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  background: #f6f8fb;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.qs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.qs-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}
.qs-hint {
  font-size: 12px;
  color: #64748b;
}
.qs-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: #e8eef7;
  border-radius: 9px;
}
.qs-switch__btn {
  padding: 4px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}
.qs-switch__btn.is-on {
  background: #0f3460;
  color: #fff;
  box-shadow: 0 1px 4px rgba(15, 52, 96, 0.3);
}
.qs-switch__btn:focus-visible {
  outline: 2px solid #0f3460;
  outline-offset: 2px;
}

/* KPI tiles */
.qs-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
}
.qs-kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0f3460;
  border-radius: 10px;
}
.qs-kpi__lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
}
.qs-kpi__val {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qs-kpi__sub {
  font-size: 11.5px;
  color: #64748b;
}
.qs-kpi--good {
  border-left-color: #16a34a;
}
.qs-kpi--good .qs-kpi__val {
  color: #15803d;
}
.qs-kpi--bad {
  border-left-color: #dc2626;
}
.qs-kpi--bad .qs-kpi__val,
.qs-kpi--bad .qs-kpi__sub {
  color: #b91c1c;
}

/* chart cards */
.qs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}
.qs-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.qs-card__title {
  font-size: 13px;
  font-weight: 700;
  color: #0f3460;
}
.qs-empty {
  padding: 40px 0;
  font-size: 13px;
  text-align: center;
  color: #94a3b8;
}

@media (max-width: 1199.98px) {
  .qs-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767.98px) {
  .qs-grid,
  .qs-kpis {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* ==================================================================== */
/* Item tables: total row + Total Tax / Total strip                     */
/* Paste at the END of QuoteWorkspace.css                                */
/* ==================================================================== */

/* total row inside fabric / trim tables - the amount sits under the
   "Total Cost" column, its label in the column before */
.qx-cost .qx-table-wrap tr.qx-total-row > td {
  padding: 8px 10px;
  background: #eef3fa;
  border-top: 2px solid #c9d6ea;
  border-bottom: 0;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.qx-cost .qx-table-wrap tr.qx-total-row > td.q-sum-bold:not(:last-child) {
  text-align: right;
}
.qx-cost .qx-table-wrap tr.qx-total-row > td:last-child {
  color: #0f3460;
}

/* Total Tax / Total / % strip under trims and embellishment */
.qx-cost .qx-sum-strip {
  margin: 0 0 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #c9d6ea;
  border-radius: 10px;
  overflow: hidden;
}
.qx-cost .qx-sum-strip td {
  padding: 7px 14px;
  border: 0;
  background: #fff;
  font-size: 13px;
  white-space: nowrap;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.qx-cost .qx-sum-strip td + td {
  border-left: 1px solid #e2e8f0;
}
.qx-cost .qx-sum-strip td:nth-child(odd) {
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
}
.qx-cost .qx-sum-strip td:nth-child(even) {
  font-weight: 800;
  color: #0f3460;
}

/* price slab column - fabric / trim / emb / collar-cuff process tables */
.q-slab-td {
  min-width: 200px;
  width: 200px;
}
.q-slab-td .q-slab-select,
.q-slab-td .ant-select {
  width: 100%;
  max-width: 100%;
}

/* price slab column - fabric / trim / emb / collar-cuff process tables */
.q-slab-td {
  min-width: 200px;
  width: 200px;
}
/* price slab column - fabric / trim / emb / collar-cuff process tables */
.q-slab-td {
  min-width: 200px;
  width: 200px;
}
.q-slab-td .q-slab-select,
.q-slab-td .ant-select {
  width: 100%;
  max-width: 100%;
}

.dv-root {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #f4f6f9;
  padding: 20px;
  border-radius: 14px;
}

/* ---------- toolbar ---------- */
.dv-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.dv-toolbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}
.dv-toolbar-count {
  background: #1e293b;
  color: #fff;
  border-radius: 20px;
  font-weight: 600;
  border: none;
}
.dv-search-icon {
  opacity: 0.5;
}

/* ---------- summary strip ---------- */
.dv-summary-row {
  margin-bottom: 18px;
}
.dv-summary-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
}
.dv-summary-pill-count {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 0 7px;
  font-size: 12px;
}

/* ---------- card list ---------- */
.dv-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dv-card {
  border-radius: 12px !important;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.06),
    0 1px 2px rgba(15, 23, 42, 0.04);
  border: 1px solid #eef0f4 !important;
}

.dv-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.dv-card-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.dv-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dv-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dv-card-title-text {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}
.dv-section-tag {
  background: #ede9fe;
  color: #6d28d9;
  border: none;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 1px 9px;
}
.dv-card-subtitle {
  margin-top: 4px;
}
.dv-count-tag {
  background: #f1f5f9;
  color: #475569;
  border: none;
  font-weight: 600;
  border-radius: 20px;
  flex-shrink: 0;
}

/* ---------- location chips ---------- */
.dv-location-chips {
  display: inline-flex;
}
.dv-chip {
  font-size: 12px;
  border-radius: 6px;
  padding: 2px 8px;
  margin: 0;
}
.dv-chip-resolved {
  background: #f1f5f9;
  color: #334155;
}
.dv-chip-unresolved {
  background: #fff7e6;
  color: #b45309;
  border: 1px dashed #fcd34d !important;
}

/* ---------- nested level blocks ---------- */
.dv-level-block {
  background: #fafbfc;
  border: 1px solid #eef0f4;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.dv-level-block:last-child {
  margin-bottom: 0;
}
.dv-level-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.dv-level-name {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.dv-level-empty {
  font-size: 12.5px;
  color: #94a3b8;
  font-style: italic;
  padding: 4px 2px;
}

.dv-level-rows {
  display: flex;
  flex-direction: column;
}

/* ---------- change rows ---------- */
.dv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 1px dashed #eef0f4;
  gap: 12px;
  flex-wrap: wrap;
}
.dv-row:last-child {
  border-bottom: none;
}

.dv-row-key {
  font-size: 13px;
  color: #475569;
  font-weight: 600;
  display: flex;
  align-items: center;
  min-width: 110px;
}
.dv-row-key-icon {
  opacity: 0.45;
  margin-right: 4px;
}

.dv-row-values {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dv-pill {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-weight: 600;
}
.dv-pill-old {
  background: #fef2f2;
  color: #b91c1c;
  text-decoration: line-through;
  -webkit-text-decoration-color: rgba(185, 28, 28, 0.4);
          text-decoration-color: rgba(185, 28, 28, 0.4);
}
.dv-pill-new {
  background: #f0fdf4;
  color: #15803d;
}
.dv-pill-up {
  background: #ecfdf5;
  color: #047857;
}
.dv-pill-down {
  background: #fff1f2;
  color: #be123c;
}
.dv-pill-empty {
  background: #f1f5f9;
  color: #94a3b8;
  font-style: italic;
}
.dv-row-arrow {
  color: #cbd5e1;
}

.dv-null {
  color: #9aa0a6;
}

.dv-trend {
  font-size: 10px;
  margin-left: 1px;
}
.dv-trend-up {
  color: #059669;
}
.dv-trend-down {
  color: #e11d48;
}

@media (max-width: 640px) {
  .dv-row {
    flex-direction: row;
  }
  .dv-row-key {
    min-width: 90px;
  }
}

.pcsp-empty {
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  color: #6b7280;
}

.pcsp-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pcsp-group {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Fab header */
.pcsp-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #f3f4f6;
  padding: 12px 16px;
}

.pcsp-group-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.pcsp-group-title span {
  color: #9ca3af;
  font-weight: 400;
}

.pcsp-badge {
  display: inline-block;
  margin-top: 4px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
}

.pcsp-total {
  text-align: right;
}

.pcsp-total-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.pcsp-total-value {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

/* Color chips */
.pcsp-color-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
}

.pcsp-chip {
  border-radius: 6px;
  background: #f9fafb;
  color: #4b5563;
  font-size: 12px;
  padding: 4px 8px;
}

/* Process groups */
.pcsp-process-list {
  border-top: 1px solid #f3f4f6;
}

.pcsp-process {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
}

.pcsp-process:last-child {
  border-bottom: none;
}

.pcsp-process-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.pcsp-process-summary::-webkit-details-marker {
  display: none;
}

.pcsp-process-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pcsp-chevron {
  display: inline-block;
  color: #9ca3af;
  font-size: 12px;
  transition: transform 0.15s ease;
}

.pcsp-process[open] .pcsp-chevron {
  transform: rotate(90deg);
}

.pcsp-process-name {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}

.pcsp-process-stats-inline {
  display: none;
  gap: 16px;
  font-size: 12px;
  color: #6b7280;
}

@media (min-width: 640px) {
  .pcsp-process-stats-inline {
    display: flex;
  }
}

/* Mobile stat grid */
.pcsp-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px;
  gap: 8px;
  margin-top: 12px;
}

@media (min-width: 640px) {
  .pcsp-stat-grid {
    display: none;
  }
}

.pcsp-stat {
  border-radius: 6px;
  background: #f9fafb;
  padding: 6px 8px;
}

.pcsp-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.pcsp-stat-value {
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
}

/* Steps */
.pcsp-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pcsp-step-chip {
  border-radius: 4px;
  background: #f9fafb;
  color: #4b5563;
  font-size: 12px;
  padding: 4px 8px;
}

/* Order contribution table */
.pcsp-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
}

.pcsp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

.pcsp-table thead {
  background: #f9fafb;
  color: #6b7280;
}

.pcsp-table th,
.pcsp-table td {
  padding: 8px 12px;
}

.pcsp-table th {
  font-weight: 500;
}

.pcsp-table tbody tr {
  border-top: 1px solid #f3f4f6;
}

.pcsp-table .pcsp-col-right {
  text-align: right;
}

.pcsp-view-btn {
  padding: 4px 14px;
  border-radius: 6px;
  border: 1px solid #d9d9d9;
  border: 1px solid var(--pcsp-border, #d9d9d9);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}
.pcsp-view-btn:hover {
  border-color: #1677ff;
  color: #1677ff;
}
.pcsp-route {
  color: #8c8c8c;
  font-weight: 400;
}

.pcsp-material-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.pcsp-material-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.pcsp-material-chip {
  font-size: 12px;
  background: #f0f0f0;
  border-radius: 4px;
  padding: 2px 8px;
}
.pcsp-material-group-total {
  margin-left: auto;
  font-size: 12px;
  color: #595959;
}
.pcsp-view-btn {
  padding: 4px 14px;
  border-radius: 6px;
  border: 1px solid #d9d9d9;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}
.pcsp-view-btn:hover {
  border-color: #1677ff;
  color: #1677ff;
}
.pcsp-route {
  color: #8c8c8c;
  font-weight: 400;
}

/* =====================================================================
   Chat module — all classes are prefixed with "cx-" so they no longer
   leak into the rest of the app (old names like .content / .message /
   .collapse / .form were global and clashed with other screens).
   ===================================================================== */

:root {
  --cx-primary: #10335f;
  --cx-primary-soft: #e8eef7;
  --cx-accent: #1f6feb;
  --cx-bg: #f4f6fa;
  --cx-surface: #ffffff;
  --cx-border: #e4e8ef;
  --cx-text: #1c2533;
  --cx-muted: #7a8699;
  --cx-mine: #10335f;
  --cx-mine-text: #ffffff;
  --cx-theirs: #ffffff;
  --cx-online: #12b76a;
  --cx-offline: #c3cad5;
  --cx-danger: #e5484d;
  --cx-radius: 14px;
  --cx-font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
}

/* Plain divs/buttons don't inherit antd's font, which showed as a serif
   font in the screenshot. Force one consistent font everywhere in chat. */
.cx-modal,
.cx-thread,
.oc-modal {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  font-family: var(--cx-font);
}
.cx-modal button,
.cx-modal input,
.cx-modal textarea,
.cx-thread button,
.cx-thread input,
.cx-thread textarea {
  font-family: inherit;
}

/* ------------------------------- shell ------------------------------- */
.cx-modal-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

.cx-modal {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 60vw;
  min-width: min(640px, 96vw);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  background: var(--cx-surface);
  border-radius: 14px;
  border-radius: var(--cx-radius);
  box-shadow:
    0 18px 48px rgba(16, 51, 95, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e4e8ef;
  border: 1px solid var(--cx-border);
  overflow: hidden;
  pointer-events: auto;
  animation: cx-pop 0.18s ease-out;
  color: #1c2533;
  color: var(--cx-text);
  font-size: 13px;
}

.cx-modal.is-dragging {
  -webkit-user-select: none;
          user-select: none;
  box-shadow: 0 24px 60px rgba(16, 51, 95, 0.28);
}

@keyframes cx-pop {
  from {
    opacity: 0;
    transform: translateY(-48%) scale(0.98);
  }
  to {
    opacity: 1;
  }
}

.cx-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  background: linear-gradient(90deg, #10335f, #1b4c86);
  background: linear-gradient(90deg, var(--cx-primary), #1b4c86);
  color: #fff;
  cursor: grab;
  touch-action: none;
  flex-shrink: 0;
}
.cx-modal.is-dragging .cx-modal-header {
  cursor: grabbing;
}

.cx-drag-icon {
  opacity: 0.6;
  flex-shrink: 0;
}

.cx-modal-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.cx-conn {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #12b76a;
  background: var(--cx-online);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.cx-conn.is-off {
  background: #f5a524;
  animation: cx-blink 1s infinite;
}
@keyframes cx-blink {
  50% {
    opacity: 0.3;
  }
}

.cx-modal-policy {
  flex: 1 1;
  min-width: 0;
  font-size: 11px;
  font-style: italic;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cx-modal-actions {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.cx-modal-header .cx-icon-btn {
  color: #fff;
}
.cx-modal-header .cx-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Chat body keeps the original 58vh height */
.cx-body {
  display: flex;
  height: 58vh;
  min-height: 0;
  background: #f4f6fa;
  background: var(--cx-bg);
}

.cx-no-socket {
  height: 58vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #7a8699;
  color: var(--cx-muted);
  text-align: center;
  padding: 16px;
}

/* ------------------------------ buttons ------------------------------ */
.cx-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #7a8699;
  color: var(--cx-muted);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.cx-icon-btn:hover {
  background: #e8eef7;
  background: var(--cx-primary-soft);
  color: #10335f;
  color: var(--cx-primary);
}
.cx-icon-btn--primary {
  background: #10335f;
  background: var(--cx-primary);
  color: #fff;
}
.cx-icon-btn--primary:hover {
  background: #1b4c86;
  color: #fff;
}

/* ------------------------------ sidebar ------------------------------ */
.cx-sidebar {
  width: 20vw;
  min-width: 220px;
  max-width: 320px;
  flex-shrink: 0;
  background: #ffffff;
  background: var(--cx-surface);
  border-right: 1px solid #e4e8ef;
  border-right: 1px solid var(--cx-border);
  transition:
    width 0.2s ease,
    min-width 0.2s ease;
  min-height: 0;
}
.cx-sidebar.is-collapsed {
  width: 68px;
  min-width: 68px;
}

.cx-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.cx-sidebar-top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 6px;
}
.cx-sidebar-inner.is-collapsed .cx-sidebar-top {
  justify-content: center;
}

.cx-search {
  position: relative;
  flex: 1 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.cx-search input {
  width: 100%;
  height: 32px;
  border: 1px solid #e4e8ef;
  border: 1px solid var(--cx-border);
  border-radius: 8px;
  background: #f4f6fa;
  background: var(--cx-bg);
  padding: 0 28px 0 30px;
  font-size: 12px;
  outline: none;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.cx-search input:focus {
  border-color: #1f6feb;
  border-color: var(--cx-accent);
  background: #fff;
}
.cx-search-icon {
  position: absolute;
  left: 10px;
  color: #7a8699;
  color: var(--cx-muted);
}
.cx-search-clear {
  position: absolute;
  right: 6px;
  border: none;
  background: transparent;
  color: #7a8699;
  color: var(--cx-muted);
  cursor: pointer;
  display: flex;
  padding: 2px;
}

.cx-tabs {
  display: flex;
  gap: 4px;
  margin: 4px 10px 6px;
  padding: 3px;
  background: #f4f6fa;
  background: var(--cx-bg);
  border-radius: 10px;
}
.cx-tabs.is-vertical {
  flex-direction: column;
  align-items: center;
  margin: 4px 8px 8px;
}
.cx-tab {
  position: relative;
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #7a8699;
  color: var(--cx-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.cx-tabs.is-vertical .cx-tab {
  width: 44px;
  height: 40px;
  flex: none;
}
.cx-tab:hover {
  color: #10335f;
  color: var(--cx-primary);
}
.cx-tab.is-active {
  background: #fff;
  color: #10335f;
  color: var(--cx-primary);
  box-shadow: 0 1px 3px rgba(16, 51, 95, 0.12);
}
.cx-tab-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e5484d;
  background: var(--cx-danger);
  color: #fff;
  font-size: 10px;
  line-height: 18px;
  text-align: center;
}
.cx-tabs.is-vertical .cx-tab-badge {
  position: absolute;
  top: 0;
  right: 0;
}

.cx-contact-list {
  flex: 1 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 6px 10px;
}

.cx-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  outline: none;
}
.cx-contact:hover,
.cx-contact:focus-visible {
  background: #f4f6fa;
  background: var(--cx-bg);
}
.cx-contact.is-active {
  background: #e8eef7;
  background: var(--cx-primary-soft);
}
.cx-contact.is-active .cx-contact-name {
  color: #10335f;
  color: var(--cx-primary);
}
.cx-contact.is-collapsed {
  justify-content: center;
  padding: 6px 0;
}

.cx-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
}
.cx-avatar-wrap .ant-avatar {
  font-weight: 600;
  font-size: 13px;
}
.cx-presence {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c3cad5;
  background: var(--cx-offline);
  border: 2px solid #fff;
}
.cx-presence.is-online {
  background: #12b76a;
  background: var(--cx-online);
}
.cx-avatar-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e5484d;
  background: var(--cx-danger);
  color: #fff;
  font-size: 9px;
  line-height: 16px;
  text-align: center;
  border: 1.5px solid #fff;
}

.cx-contact-body {
  flex: 1 1;
  min-width: 0;
}
.cx-contact-name {
  font-size: 13px;
  font-weight: 600;
  color: #1c2533;
  color: var(--cx-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cx-contact.has-unread .cx-contact-name {
  font-weight: 700;
}
.cx-contact-sub {
  font-size: 11px;
  color: #7a8699;
  color: var(--cx-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cx-unread-pill {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #1f6feb;
  background: var(--cx-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}

.cx-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 8px;
  color: #7a8699;
  color: var(--cx-muted);
}

.cx-add-modal {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cx-add-list {
  max-height: 45vh;
  overflow-y: auto;
}

/* -------------------------------- main -------------------------------- */
.cx-main {
  flex: 1 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cx-welcome {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #7a8699;
  color: var(--cx-muted);
}
.cx-welcome h4 {
  margin: 12px 0 4px;
  color: #1c2533;
  color: var(--cx-text);
  font-size: 16px;
}
.cx-welcome p {
  margin: 0;
  max-width: 280px;
  font-size: 12px;
}
.cx-welcome-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8eef7;
  background: var(--cx-primary-soft);
  color: #10335f;
  color: var(--cx-primary);
}

.cx-thread {
  position: relative;
  flex: 1 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f4f6fa;
  background: var(--cx-bg);
  color: #1c2533;
  color: var(--cx-text);
  font-size: 13px;
}

/* Compact single-row header */
.cx-chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 10px;
  background: #ffffff;
  background: var(--cx-surface);
  border-bottom: 1px solid #e4e8ef;
  border-bottom: 1px solid var(--cx-border);
  flex-shrink: 0;
}
.cx-chat-header .cx-avatar-wrap .ant-avatar {
  font-size: 12px;
}
.cx-chat-header-info {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}
.cx-chat-header-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 18px;
  color: #1c2533;
  color: var(--cx-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}
.cx-chat-header-sub {
  font-size: 11px;
  line-height: 15px;
  color: #7a8699;
  color: var(--cx-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}
/* Order modal: the group list is always visible, so no back arrow */
.cx-chat-header.is-order .cx-back-btn {
  display: none;
}
.cx-chat-header.is-order {
  padding-left: 14px;
}

.cx-messages {
  flex: 1 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cx-load-more {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}
.cx-load-more button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e4e8ef;
  border: 1px solid var(--cx-border);
  background: #fff;
  color: #10335f;
  color: var(--cx-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 14px;
  cursor: pointer;
}
.cx-load-more button:disabled {
  opacity: 0.7;
  cursor: default;
}

.cx-empty-thread {
  margin: auto;
}

.cx-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 6px;
}
.cx-divider::before,
.cx-divider::after {
  content: "";
  flex: 1 1;
  height: 1px;
  background: #dfe4ec;
}
.cx-divider span {
  display: inline-block;
  background: #e3e8f0;
  color: #56637a;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 16px;
  padding: 2px 10px;
  border-radius: 10px;
  white-space: nowrap;
}
.cx-divider--unread::before,
.cx-divider--unread::after {
  background: #bcd7fb;
}
.cx-divider--unread {
  transition: opacity 0.4s ease;
}
.cx-divider--unread.is-fading {
  opacity: 0;
}
.cx-divider--unread span {
  background: #e1f0ff;
  color: #1f6feb;
  color: var(--cx-accent);
}

/* ------------------------------ bubbles ------------------------------ */
.cx-row {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
}
.cx-row.is-mine {
  flex-direction: row-reverse;
}

.cx-bubble {
  position: relative;
  max-width: min(72%, 520px);
  min-width: 60px;
  padding: 6px 10px 5px;
  border-radius: 14px;
  background: #ffffff;
  background: var(--cx-theirs);
  color: #1c2533;
  color: var(--cx-text);
  box-shadow: 0 1px 1.5px rgba(16, 51, 95, 0.08);
  border-bottom-left-radius: 4px;
  overflow-wrap: anywhere;
  transition: box-shadow 0.2s;
}
.cx-row.is-mine .cx-bubble {
  background: #10335f;
  background: var(--cx-mine);
  color: #ffffff;
  color: var(--cx-mine-text);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 4px;
}
.cx-row.is-highlight .cx-bubble {
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.45);
}

.cx-bubble-sender {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
}
.cx-bubble-text {
  display: flow-root; /* contains the floated time */
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.cx-bubble-text p {
  margin: 0;
}

/* Time sits on the last line of text when it fits (WhatsApp style) */
.cx-bubble-meta {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 6px -2px -2px 12px;
  font-size: 10px;
  line-height: 1;
  color: #7a8699;
  color: var(--cx-muted);
  white-space: nowrap;
}

/* @mentions: the whole name is one highlighted token */
.cx-mention {
  font-weight: 600;
  color: #1f6feb;
  color: var(--cx-accent);
  background: rgba(31, 111, 235, 0.1);
  border-radius: 4px;
  padding: 0 3px;
  white-space: nowrap;
}
.cx-row.is-mine .cx-mention {
  color: #cfe6ff;
  background: rgba(255, 255, 255, 0.16);
}
.cx-reply-text .cx-mention {
  padding: 0 2px;
}
.cx-row.is-mine .cx-bubble-meta {
  color: rgba(255, 255, 255, 0.7);
}
.cx-tick {
  font-size: 11px;
}
.cx-tick.is-read {
  color: #4ade80;
}
.cx-row.is-theirs .cx-tick.is-read {
  color: #0e9f6e;
}

.cx-quote {
  margin: 2px 0 4px;
  padding: 4px 8px;
  border-left: 3px solid #1f6feb;
  border-left: 3px solid var(--cx-accent);
  border-radius: 6px;
  background: rgba(16, 51, 95, 0.06);
  cursor: pointer;
  max-height: 64px;
  overflow: hidden;
}
.cx-row.is-mine .cx-quote {
  background: rgba(255, 255, 255, 0.14);
  border-left-color: #8ec5ff;
}
.cx-quote-name {
  font-size: 11px;
  font-weight: 700;
  color: #1f6feb;
  color: var(--cx-accent);
}
.cx-row.is-mine .cx-quote-name {
  color: #b9dcff;
}
.cx-quote-text {
  font-size: 12px;
  opacity: 0.85;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cx-quote-text p {
  margin: 0;
}

.cx-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}
.cx-row:hover .cx-actions {
  opacity: 1;
}
.cx-actions button {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #7a8699;
  color: var(--cx-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.cx-actions button:hover {
  color: #10335f;
  color: var(--cx-primary);
}
@media (hover: none) {
  .cx-actions {
    opacity: 0.8;
  }
}

.cx-scroll-bottom {
  position: absolute;
  right: 18px;
  bottom: 96px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #e4e8ef;
  border: 1px solid var(--cx-border);
  background: #fff;
  color: #10335f;
  color: var(--cx-primary);
  box-shadow: 0 4px 12px rgba(16, 51, 95, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}
.cx-scroll-badge {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #1f6feb;
  background: var(--cx-accent);
  color: #fff;
  font-size: 10px;
  line-height: 18px;
}

.cx-offline-banner {
  background: #fff7e6;
  color: #ad6800;
  font-size: 11px;
  text-align: center;
  padding: 4px 8px;
  border-top: 1px solid #ffe7ba;
}

/* ------------------------------ composer ------------------------------ */
.cx-composer {
  flex-shrink: 0;
  background: #ffffff;
  background: var(--cx-surface);
  border-top: 1px solid #e4e8ef;
  border-top: 1px solid var(--cx-border);
  padding: 8px 10px 4px;
}

.cx-reply-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 6px 6px 6px 10px;
  background: #f4f6fa;
  background: var(--cx-bg);
  border-left: 3px solid #1f6feb;
  border-left: 3px solid var(--cx-accent);
  border-radius: 8px;
}
.cx-reply-icon {
  color: #1f6feb;
  color: var(--cx-accent);
  flex-shrink: 0;
}
.cx-reply-body {
  flex: 1 1;
  min-width: 0;
}
.cx-reply-name {
  font-size: 11px;
  font-weight: 700;
  color: #1f6feb;
  color: var(--cx-accent);
}
.cx-reply-text {
  font-size: 12px;
  color: #1c2533;
  color: var(--cx-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cx-reply-text p {
  margin: 0;
  display: inline;
}

.cx-composer-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.cx-composer-row.is-disabled {
  opacity: 0.6;
}

.cx-input-wrap {
  position: relative;
  flex: 1 1;
  min-width: 0;
}
.cx-input-wrap .cx-input,
.cx-input-wrap .ant-input,
.cx-input-wrap .ant-mentions {
  width: 100%;
  border-radius: 18px;
  background: #f4f6fa;
  background: var(--cx-bg);
  border: 1px solid #e4e8ef;
  border: 1px solid var(--cx-border);
  font-size: 13px;
}
.cx-input-wrap .ant-input,
.cx-input-wrap .ant-mentions > textarea {
  padding: 7px 14px;
  line-height: 1.4;
  resize: none;
}
.cx-input-wrap .ant-mentions > textarea {
  background: transparent;
}
.cx-input-wrap .ant-input:focus,
.cx-input-wrap .ant-mentions-focused {
  background: #fff;
  border-color: #1f6feb;
  border-color: var(--cx-accent);
  box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.12);
}

.cx-counter {
  position: absolute;
  right: 12px;
  top: -16px;
  font-size: 10px;
  color: #7a8699;
  color: var(--cx-muted);
}
.cx-counter.is-over {
  color: #e5484d;
  color: var(--cx-danger);
  font-weight: 700;
}

.cx-send {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: #10335f;
  background: var(--cx-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.12s,
    background 0.15s,
    opacity 0.15s;
}
.cx-send:hover:not(:disabled) {
  background: #1b4c86;
  transform: scale(1.06);
}
.cx-send:active:not(:disabled) {
  transform: scale(0.94);
}
.cx-send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cx-composer-hint {
  font-size: 10px;
  color: #7a8699;
  color: var(--cx-muted);
  text-align: center;
  padding-top: 3px;
}

.cx-emoji-grid {
  display: grid;
  grid-template-columns: repeat(7, 32px);
  grid-gap: 2px;
  gap: 2px;
}
.cx-emoji-grid button {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 18px;
  border-radius: 6px;
  cursor: pointer;
}
.cx-emoji-grid button:hover {
  background: #f4f6fa;
  background: var(--cx-bg);
}

/* ---------------------------- help / read ---------------------------- */
.cx-help-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cx-help-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e4e8ef;
  border: 1px solid var(--cx-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.cx-help-item span {
  flex: 1 1;
}
.cx-help-item:hover {
  background: #f4f6fa;
  background: var(--cx-bg);
  border-color: #cdd6e4;
}

.cx-read-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.cx-read-details ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.cx-read-details li {
  font-size: 13px;
  padding: 2px 0;
}
.cx-read-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.cx-read-none {
  margin: 6px 0 0;
  color: #7a8699;
  color: var(--cx-muted);
  font-size: 12px;
}

/* ----------------------------- scrollbars ----------------------------- */
.cx-messages::-webkit-scrollbar,
.cx-contact-list::-webkit-scrollbar {
  width: 6px;
}
.cx-messages::-webkit-scrollbar-thumb,
.cx-contact-list::-webkit-scrollbar-thumb {
  background: #cfd6e2;
  border-radius: 3px;
}

/* ---------------------------- AI Assistant ---------------------------- */
.cx-ai-avatar.ant-avatar {
  background: #0f3460;
  color: #fff;
}
.cx-contact--ai .cx-contact-sub {
  color: #0f3460;
  opacity: 0.75;
}
.cx-contact--ai.is-active {
  background: rgba(15, 52, 96, 0.1);
}
.cx-contact--ai.is-active .cx-contact-name {
  color: #0f3460;
}
.cx-ai-separator {
  height: 1px;
  margin: 4px 8px 6px;
  background: #e4e8ef;
  background: var(--cx-border);
}

/* ---------------------- AI Assistant: chat thread ---------------------- */
.cx-ai-welcome {
  margin: auto;
  max-width: 420px;
  padding: 16px;
  text-align: center;
  color: #7a8699;
  color: var(--cx-muted);
}
.cx-ai-welcome h4 {
  margin: 10px 0 4px;
  font-size: 15px;
  color: #1c2533;
  color: var(--cx-text);
}
.cx-ai-welcome p {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
}
.cx-ai-welcome-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 52, 96, 0.1);
  color: #0f3460;
}
.cx-ai-starters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.cx-ai-starter {
  border: 1px solid rgba(15, 52, 96, 0.25);
  background: #fff;
  color: #0f3460;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.cx-ai-starter:hover {
  background: rgba(15, 52, 96, 0.08);
  border-color: #0f3460;
}

.cx-ai-thinking {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7a8699;
  color: var(--cx-muted);
  font-size: 12px;
  font-style: italic;
}
.cx-ai-dots {
  display: inline-flex;
  gap: 3px;
}
.cx-ai-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0f3460;
  opacity: 0.3;
  animation: cx-ai-dot 1.2s infinite ease-in-out;
}
.cx-ai-dots i:nth-child(2) {
  animation-delay: 0.2s;
}
.cx-ai-dots i:nth-child(3) {
  animation-delay: 0.4s;
}

/* ------------------------ AI Assistant: cards ------------------------ */
.cx-bubble.has-ai-card {
  max-width: min(92%, 560px);
  width: 100%;
}
.cx-aic-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.cx-aic {
  border: 1px solid #e4e8ef;
  border: 1px solid var(--cx-border);
  border-left: 3px solid #0f3460;
  border-radius: 10px;
  background: #fbfcfe;
  padding: 8px 10px;
  font-size: 12px;
  white-space: normal;
}
.cx-aic-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cx-aic-title {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-weight: 600;
  color: #1c2533;
  color: var(--cx-text);
}
.cx-aic-order {
  color: #0f3460;
}
.cx-aic-open {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e4e8ef;
  border: 1px solid var(--cx-border);
  border-radius: 6px;
  background: #fff;
  color: #0f3460;
  cursor: pointer;
}
.cx-aic-open:hover {
  background: rgba(15, 52, 96, 0.08);
}
.cx-aic-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
  color: #7a8699;
  color: var(--cx-muted);
  font-size: 11px;
}
.cx-aic-ship {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-weight: 600;
}
.cx-aic-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 10px;
}
.cx-aic-badge.is-ok {
  background: #e7f8ef;
  color: #067647;
}
.cx-aic-badge.is-soon {
  background: #fff4e5;
  color: #b54708;
}
.cx-aic-badge.is-late {
  background: #fdecec;
  color: #b42318;
}
.cx-aic-stages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 4px 14px;
  gap: 4px 14px;
  margin-top: 8px;
}
.cx-aic-stage .ant-progress {
  margin: 0;
  font-size: 11px;
}
.cx-aic-stage.is-focus .cx-aic-stage-label {
  color: #0f3460;
  font-weight: 700;
}
.cx-aic-stage-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
}
.cx-aic-stage-label {
  color: #1c2533;
  color: var(--cx-text);
}
.cx-aic-stage-num {
  color: #7a8699;
  color: var(--cx-muted);
  white-space: nowrap;
}
.cx-aic-tna {
  margin-top: 6px;
  color: #1c2533;
  color: var(--cx-text);
}
.cx-aic-overdue {
  color: #b42318;
  font-weight: 600;
}
.cx-aic-signals {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.cx-aic-signals li {
  position: relative;
  padding-left: 14px;
  line-height: 1.5;
}
.cx-aic-signals li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7a8699;
  background: var(--cx-muted);
}
.cx-aic-signals li.is-high::before {
  background: #d92d20;
}
.cx-aic-signals li.is-medium::before {
  background: #f79009;
}
.cx-aic-signals li.is-info::before {
  background: #0f3460;
}
.cx-aic-nodata {
  margin-top: 6px;
  font-size: 11px;
  color: #7a8699;
  color: var(--cx-muted);
  font-style: italic;
}

/* "which order?" list */
.cx-aic--choices {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cx-aic-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #e4e8ef;
  border: 1px solid var(--cx-border);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.cx-aic-choice:hover:not(:disabled) {
  background: rgba(15, 52, 96, 0.06);
  border-color: #0f3460;
}
.cx-aic-choice:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.cx-aic-choice-no {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #0f3460;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cx-aic-choice-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 12px;
  color: #1c2533;
  color: var(--cx-text);
}
.cx-aic-choice-body span {
  font-size: 11px;
  color: #7a8699;
  color: var(--cx-muted);
}

/* ------------------- AI Assistant: card details + list ------------------- */
.cx-aic-stage-status {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  color: #7a8699;
  color: var(--cx-muted);
}
.cx-aic-stage-status.is-done {
  color: #067647;
}
.cx-aic-stage-status.is-in_progress {
  color: #0f3460;
}
.cx-aic-stage-status.is-not_applicable {
  font-weight: 400;
  font-style: italic;
}

.cx-aic-more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
  padding: 2px 8px 2px 4px;
  border: 1px solid rgba(15, 52, 96, 0.25);
  border-radius: 12px;
  background: #fff;
  color: #0f3460;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.cx-aic-more:hover {
  background: rgba(15, 52, 96, 0.08);
}
.cx-aic-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.cx-aic-section-title {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #0f3460;
}
.cx-aic-note {
  margin-top: 4px;
  font-size: 11px;
  color: #7a8699;
  color: var(--cx-muted);
}

/* small tables inside cards */
.cx-aic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.cx-aic-table th {
  padding: 3px 6px;
  text-align: left;
  font-weight: 600;
  color: #7a8699;
  color: var(--cx-muted);
  border-bottom: 1px solid #e4e8ef;
  border-bottom: 1px solid var(--cx-border);
  white-space: nowrap;
}
.cx-aic-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #eef1f6;
  color: #1c2533;
  color: var(--cx-text);
  vertical-align: top;
}
.cx-aic-table tr:last-child td {
  border-bottom: none;
}
.cx-aic-table td.is-bad {
  color: #b42318;
  font-weight: 700;
}

/* label / value grid */
.cx-aic-kv {
  display: grid;
  grid-template-columns: -webkit-max-content 1fr;
  grid-template-columns: max-content 1fr;
  grid-gap: 2px 12px;
  gap: 2px 12px;
  font-size: 11.5px;
}
.cx-aic-kv span {
  color: #7a8699;
  color: var(--cx-muted);
}
.cx-aic-kv b {
  font-weight: 600;
  color: #1c2533;
  color: var(--cx-text);
}
.cx-aic-kv b.is-warn {
  color: #b54708;
}

.cx-aic-ok {
  color: #067647;
  font-weight: 600;
}
.cx-aic-blocked {
  color: #b42318;
  font-weight: 600;
  cursor: help;
  border-bottom: 1px dotted #b42318;
}

/* multi-order table card */
.cx-aic-badge.is-ready {
  background: #e8eef7;
  color: #0f3460;
}
.cx-aic-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: #7a8699;
  color: var(--cx-muted);
}
.cx-aic-table-wrap {
  margin-top: 8px;
  max-height: 320px;
  overflow: auto;
}
.cx-aic-orders th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: #fbfcfe;
}
.cx-aic-orders td {
  vertical-align: middle;
}
.cx-aic-pct {
  text-align: right;
  white-space: nowrap;
}
.cx-aic-link {
  padding: 0;
  border: none;
  background: none;
  color: #0f3460;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cx-aic-link:disabled {
  color: #7a8699;
  color: var(--cx-muted);
  cursor: not-allowed;
}
.cx-aic-row-sub {
  font-size: 10.5px;
  color: #7a8699;
  color: var(--cx-muted);
  white-space: nowrap;
}

/* ============ AI Assistant: formatted reply, typing, "did you mean", resize ============ */

/* ---------- formatted reply text (AI chat only) ---------- */
.cx-bubble.is-ai-reply {
  max-width: min(92%, 560px);
}
.cx-bubble-text.is-ai-text {
  white-space: normal;
}
.cx-bubble-text.is-ai-text .cx-bubble-meta {
  float: none;
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}
.cx-ait {
  font-size: 13px;
  line-height: 1.55;
  color: #1c2533;
  color: var(--cx-text);
  word-break: break-word;
}
.cx-ait.is-typing {
  cursor: pointer;
}
.cx-ait-head {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f3460;
  margin-bottom: 2px;
}
.cx-ait-head + .cx-ait-p {
  color: #7a8699;
  color: var(--cx-muted);
}
.cx-ait-title {
  margin: 2px 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f3460;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cx-ait-title::after {
  content: "";
  flex: 1 1;
  height: 1px;
  background: #e4e8ef;
  background: var(--cx-border);
}
.cx-ait-gap {
  height: 8px;
}
.cx-ait-p {
  margin: 0;
}
.cx-ait-ul,
.cx-ait-ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.cx-ait-ul li {
  position: relative;
  padding-left: 14px;
  margin: 2px 0;
}
.cx-ait-ul li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0f3460;
  opacity: 0.55;
}
.cx-ait-ol li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 3px 0;
}
.cx-ait-no {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: rgba(15, 52, 96, 0.1);
  color: #0f3460;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cx-ait-b {
  font-weight: 700;
  color: #0f3460;
}
.cx-ait-b.is-bad {
  color: #c62828;
}
.cx-ait-b.is-warn {
  color: #b26a00;
}
.cx-ait-b.is-good {
  color: #2e7d32;
}
.cx-ait-caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: 2px;
  vertical-align: text-bottom;
  border-radius: 1px;
  background: #0f3460;
  animation: cx-ait-blink 0.9s steps(2, start) infinite;
}
@keyframes cx-ait-blink {
  to {
    visibility: hidden;
  }
}

/* cards appear after the typing ends */
.cx-bubble.is-ai-reveal .cx-aic-wrap {
  animation: cx-aic-in 0.35s ease-out both;
}
@keyframes cx-aic-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cx-ait-caret,
  .cx-bubble.is-ai-reveal .cx-aic-wrap {
    animation: none;
  }
}

/* ---------- "Did you mean ...?" card ---------- */
.cx-aic--suggest {
  border-left-color: #b26a00;
}
.cx-aic-suggest-head {
  font-size: 11px;
  color: #7a8699;
  color: var(--cx-muted);
  margin-bottom: 6px;
}
.cx-aic-suggest-head s {
  color: #c62828;
  font-weight: 600;
}
.cx-aic-suggest-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cx-aic-suggest {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #e4e8ef;
  border: 1px solid var(--cx-border);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  font-size: 12px;
  color: #1c2533;
  color: var(--cx-text);
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.cx-aic-suggest:hover:not(:disabled) {
  background: rgba(15, 52, 96, 0.06);
  border-color: #0f3460;
}
.cx-aic-suggest:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.cx-aic-suggest-label {
  flex: 1 1;
  min-width: 0;
  font-weight: 600;
}
.cx-aic-suggest-kind {
  flex-shrink: 0;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(15, 52, 96, 0.08);
  color: #0f3460;
  font-size: 10px;
  font-weight: 600;
}

/* ---------- resizable chat window ---------- */
.cx-modal.is-sized .cx-body {
  box-sizing: border-box;
  height: var(--cx-body-h);
}
.cx-resize {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  z-index: 5;
  cursor: nesw-resize;
  touch-action: none;
  border-bottom-left-radius: inherit;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.cx-resize::before {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-left: 2px solid #0f3460;
  border-bottom: 2px solid #0f3460;
  border-bottom-left-radius: 3px;
}
.cx-resize:hover {
  opacity: 1;
}
body.cx-resizing,
body.cx-resizing * {
  cursor: nesw-resize;
  -webkit-user-select: none;
          user-select: none;
}
.cx-aic-scope {
  padding: 1px 8px;
  border-radius: 10px;
  background: rgba(15, 52, 96, 0.08);
  color: #0f3460;
  font-weight: 600;
}
.cx-aic-details.is-scoped {
  padding-top: 8px;
  border-top: 1px dashed #e4e8ef;
  border-top: 1px dashed var(--cx-border);
}

@keyframes cx-ai-dot {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* ============ AI Assistant: full-screen view (top-menu robot button) ============ */

/* top-menu button: matches a plain icon button; adjust size to your menu */
.cx-ai-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.cx-ai-launch:hover {
  background: rgba(15, 52, 96, 0.08);
  color: #0f3460;
}

/* the screen */
.cx-ai-full {
  position: fixed;
  inset: 0;
  z-index: 1100; /* above the app menu and Ant Design modals (1000) */
  display: flex;
  flex-direction: column;
  background: #f7f8fb;
  animation: cx-ai-full-in 0.18s ease-out;
}
@keyframes cx-ai-full-in {
  from {
    opacity: 0;
    transform: scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.cx-ai-full-bar {
  flex-shrink: 0;
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #e6e9f0;
}
.cx-ai-full-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cx-ai-full-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f3460;
  line-height: 1.2;
}
.cx-ai-full-sub {
  font-size: 11.5px;
  color: #6b7486;
}
.cx-ai-full-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cx-ai-full-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e6e9f0;
  border-radius: 16px;
  background: #fff;
  color: #0f3460;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.cx-ai-full-btn:hover:not(:disabled) {
  border-color: #0f3460;
  background: rgba(15, 52, 96, 0.05);
}
.cx-ai-full-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.cx-ai-full-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #4a5368;
  cursor: pointer;
}
.cx-ai-full-close:hover {
  background: rgba(15, 52, 96, 0.08);
  color: #0f3460;
}
.cx-ai-full-body {
  flex: 1 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* the conversation: one centred column, like a chat app */
.cx-thread.is-ai-full {
  flex: 1 1;
  min-height: 0;
  height: 100%;
  background: transparent;
}
.cx-thread.is-ai-full .cx-messages {
  padding: 28px max(20px, calc((100% - 860px) / 2)) 16px;
  background: transparent;
}
.cx-thread.is-ai-full .cx-composer {
  padding: 12px max(20px, calc((100% - 860px) / 2)) 18px;
  background: transparent;
  border-top: none;
}
.cx-thread.is-ai-full .cx-input-wrap {
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 52, 96, 0.08);
}

/* your questions: small bubble on the right; answers: full width, no bubble */
.cx-thread.is-ai-full .cx-bubble.is-ai-reply {
  max-width: 100%;
  width: 100%;
  background: transparent;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}
.cx-thread.is-ai-full .cx-ait {
  font-size: 14.5px;
  line-height: 1.65;
}
.cx-thread.is-ai-full .cx-ait-head {
  font-size: 15.5px;
}
.cx-thread.is-ai-full .cx-aic {
  background: #fff;
}

/* empty screen */
.cx-thread.is-ai-full .cx-ai-welcome {
  max-width: 640px;
  margin: 8vh auto 0;
}
.cx-thread.is-ai-full .cx-ai-welcome h4 {
  font-size: 22px;
  color: #0f3460;
}
.cx-thread.is-ai-full .cx-ai-starters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-gap: 8px;
  gap: 8px;
}
.cx-thread.is-ai-full .cx-ai-starter {
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .cx-ai-full-bar {
    padding: 0 12px;
  }
  .cx-ai-full-btn span {
    display: none;
  }
}

/* ---------- one reply answering several questions ("### part" in the text) ---------- */
.cx-ait-part {
  margin: 14px 0 4px;
  padding: 6px 10px;
  border-left: 3px solid #0f3460;
  border-radius: 0 6px 6px 0;
  background: rgba(15, 52, 96, 0.06);
  font-size: 12px;
  font-weight: 700;
  color: #0f3460;
}
.cx-ait-part:first-child {
  margin-top: 0;
}

/* full view: room for the whole KPI label */
.cx-thread.is-ai-full .cx-aic-kpis {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

/* ============ AI Assistant: factory report card (production, fabric, cutting, tasks) ============ */
.cx-aic--report {
  border-left-color: #0f3460;
}
.cx-aic-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  grid-gap: 6px;
  gap: 6px;
  margin: 8px 0 4px;
}
.cx-aic-kpi {
  padding: 6px 8px;
  border: 1px solid #e4e8ef;
  border: 1px solid var(--cx-border);
  border-top: 3px solid #0f3460;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}
.cx-aic-kpi.is-good {
  border-top-color: #2e7d32;
}
.cx-aic-kpi.is-warn {
  border-top-color: #b26a00;
}
.cx-aic-kpi.is-bad {
  border-top-color: #c62828;
}
.cx-aic-kpi-value {
  font-size: 15px;
  font-weight: 700;
  color: #0f3460;
  line-height: 1.2;
  white-space: nowrap;
}
.cx-aic-kpi.is-good .cx-aic-kpi-value {
  color: #2e7d32;
}
.cx-aic-kpi.is-warn .cx-aic-kpi-value {
  color: #b26a00;
}
.cx-aic-kpi.is-bad .cx-aic-kpi-value {
  color: #c62828;
}
.cx-aic-kpi-unit {
  margin-left: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #7a8699;
  color: var(--cx-muted);
}
.cx-aic-kpi-label {
  margin-top: 2px;
  font-size: 10.5px;
  color: #7a8699;
  color: var(--cx-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cx-aic-report-table th.is-num,
.cx-aic-report-table td.is-num {
  text-align: right;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.cx-aic-report-table td.is-bad {
  color: #c62828;
  font-weight: 600;
}
.cx-aic-report-table tr.is-warn td:first-child {
  box-shadow: inset 3px 0 0 #b26a00;
}
.cx-aic-report-table tr.is-good td:first-child {
  box-shadow: inset 3px 0 0 #2e7d32;
}
.cx-aic-report-table tr.is-bad td:first-child {
  box-shadow: inset 3px 0 0 #c62828;
}

/* ----------------------------- responsive ----------------------------- */
@media (max-width: 1100px) {
  .cx-sidebar {
    min-width: 200px;
  }
  .cx-bubble {
    max-width: 80%;
  }
}

/* Phones / small tablets: full screen, one pane at a time */
@media (max-width: 767px) {
  .cx-modal {
    inset: 8px !important;
    width: auto;
    min-width: 0;
    max-height: none;
    transform: none !important;
    border-radius: 12px;
    animation: none;
  }
  .cx-modal-header {
    cursor: default;
  }
  .cx-modal-policy {
    display: none;
  }

  .cx-body,
  .cx-no-socket {
    height: auto;
    flex: 1 1;
  }

  .cx-sidebar,
  .cx-sidebar.is-collapsed {
    width: 100%;
    max-width: none;
    min-width: 0;
    border-right: none;
  }
  .cx-main {
    display: none;
  }
  .cx-body.has-conversation .cx-sidebar {
    display: none;
  }
  .cx-body.has-conversation .cx-main {
    display: flex;
  }

  .cx-bubble {
    max-width: 85%;
  }
  .cx-composer-hint {
    display: none;
  }
  .cx-scroll-bottom {
    bottom: 76px;
  }
}

/* ---------- modal shell ---------- */
.oc-modal .ant-modal-content {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}
.oc-modal .ant-modal-header {
  margin: 0;
  padding: 14px 20px;
  border-bottom: 1px solid #eef0f3;
  background: #fff;
}
.oc-modal .ant-modal-body {
  padding: 0;
}
.oc-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 24px;
}
.oc-title-text {
  font-size: 16px;
  font-weight: 600;
  color: #10335f;
  margin-right: 4px;
}
.oc-chip {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f1f4f8;
  color: #475467;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oc-chip-main {
  background: #e6eefb;
  color: #10335f;
}

/* ---------- layout ---------- */
.oc-layout {
  display: flex;
  height: 70vh;
  min-height: 420px;
}

/* ---------- sidebar ---------- */
.oc-sidebar {
  width: 280px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: #fafbfc;
  border-right: 1px solid #eef0f3;
  min-height: 0;
}
.oc-sidebar-head {
  padding: 14px 14px 10px;
}
.oc-sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #344054;
  margin-bottom: 10px;
}
.oc-count {
  font-size: 11px;
  font-weight: 600;
  background: #e6eefb;
  color: #10335f;
  border-radius: 999px;
  padding: 0 8px;
  line-height: 18px;
}
.oc-search {
  border-radius: 8px;
}
.oc-list {
  flex: 1 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 8px 12px;
}
.oc-center {
  display: flex;
  justify-content: center;
  padding-top: 40px;
}
.oc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin-bottom: 4px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  outline: none;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.oc-item:hover,
.oc-item:focus-visible {
  background: #f0f3f8;
}
.oc-item-active,
.oc-item-active:hover {
  background: #e6eefb;
  border-color: #c7d7f2;
}
.oc-item-body {
  flex: 1 1;
  min-width: 0;
}
.oc-item-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #1d2939;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.oc-item-unread .oc-item-name {
  font-weight: 700;
}
.oc-item-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 11.5px;
  color: #98a2b3;
}
.oc-unread {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #1f6feb;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  flex: none;
}

/* ---------- main chat area ---------- */
.oc-main {
  flex: 1 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f4f6fa;
  position: relative;
}
/* the shared MessagePage (.cx-thread) fills the panel */
.oc-main .cx-thread {
  flex: 1 1;
  min-height: 0;
}

/* ---------- empty state ---------- */
.oc-empty {
  margin: auto;
  text-align: center;
  color: #667085;
  padding: 24px;
}
.oc-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e6eefb;
  color: #10335f;
  display: flex;
  align-items: center;
  justify-content: center;
}
.oc-empty h4 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #1d2939;
}
.oc-empty p {
  margin: 0;
  font-size: 12.5px;
}

/* ---------- small screens: one pane at a time ---------- */
@media (max-width: 768px) {
  .oc-layout {
    height: 80vh;
    min-height: 0;
  }
  .oc-sidebar {
    width: 100%;
    border-right: none;
  }
  .oc-main {
    display: none;
  }
  .oc-layout.has-conversation .oc-sidebar {
    display: none;
  }
  .oc-layout.has-conversation .oc-main {
    display: flex;
  }
  /* show the back arrow again so users can return to the group list */
  .oc-main .cx-chat-header.is-order .cx-back-btn {
    display: inline-flex;
  }
  .oc-main .cx-chat-header.is-order {
    padding-left: 10px;
  }
}

.crt-po-select-item-container {
  grid-template-columns: 1fr 1fr;
  display: grid;
  grid-column-gap: 10px;
  column-gap: 10px;
}
.crt-po-cascader-input {
  width: 215px;
}

.po-tbl-col {
  height: 100%;
  margin: 0.5% 0 0 21%;
}
.po-details-table {
  height: 69.1vh;
  overflow: auto;
}
.crt-details-container {
  position: absolute;
  top: 65px;
}

.crt-lbl {
  border-radius: 2px;
  text-align: center;
  min-width: 8vw;
  max-width: 10vw;
  font-weight: bold;
  color: #0f3460;
  font-weight: bold;
}

.crt-po-material-btn {
  margin: 0 0 6px 0;
}
.crt-po-details-container {
  height: 79vh;
  padding: 8px;
  overflow: auto;
  position: absolute;
  margin-top: 50px;
  background: white;
  max-width: 270px;

  border-right: 1px solid #e2e8f0;
}

.po-tabs .ant-tabs-tab {
  padding: 0 2.3vw;
  width: 3vw;
  margin: 0 !important;
}

/* ── Header ───────────────────────────────────────────── */
.pom-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.07),
    0 0 0 1px rgba(0, 0, 0, 0.03);
  padding: 0 20px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 200;
  border-radius: 10px;
}

.pom-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pom-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0f3460, #2872cc);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
  flex-shrink: 0;
}

.pom-brand-text {
  line-height: 1.1;
}
.pom-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.3px;
}
.pom-brand-sub {
  font-size: 11px;
  font-weight: 400;
  color: #9ca3af;
  letter-spacing: 0.2px;
}

.pom-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pom-header-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #eef2ff;
  border: 1px solid #0f3460;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #0f3460;
}

.pom-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: none;
  border-radius: 10px;
  background: #4f46e5;
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
  white-space: nowrap;
}
.pom-add-btn:hover {
  background: #3730a3;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}

/* ── Summary Stats Row ────────────────────────────────── */
.pom-stats-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-gap: 10px;
  gap: 10px;
  margin: 10px;
}

.pom-stat-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.07),
    0 0 0 1px rgba(0, 0, 0, 0.03);
  transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.pom-stat-card:hover {
  box-shadow: 10px;
  transform: translateY(-1px);
}

.pom-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.pom-stat-icon--total {
  background: #eef2ff;
  color: #4f46e5;
}
.pom-stat-icon--created {
  background: #e0f2fe;
  color: #0284c7;
}
.pom-stat-icon--issued {
  background: #d1fae5;
  color: #059669;
}
.pom-stat-icon--pending {
  background: #fef3c7;
  color: #d97706;
}
.pom-stat-icon--rejected {
  background: rgb(253, 240, 237);
  color: #f6927c;
}
.pom-stat-icon--close {
  background: #fbeeef;
  color: #e11d48;
}
.pom-stat-icon--cancelled {
  background: #eef0f6;
  color: #6b7280;
}

.pom-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  font-family: "JetBrains Mono", monospace;
  line-height: 1;
}
.pom-stat-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  margin-top: 3px;
}

/* NOTE: .po-info-card is fully self-labeled (see "PO Info Card" section
   further down) — no external .pom-col-headers row is used with it.
   .pom-col-label kept for any other tables still using a header row. */
.pom-col-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.pom-style-text {
  font-size: 12px;
  color: #6b7280;
  font-weight: 400;
  padding-left: 10px;
  max-width: 240px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

----------------------------------

/* ── Page Body ────────────────────────────────────────── */
.pom-body {
  padding: 24px 28px;
  max-width: 1600px;
}

/* ── Filter Bar ───────────────────────────────────────── */
.pom-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pom-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pom-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1.5px solid transparent;
  font-family: "Outfit", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.pom-pill .pill-n {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
}

.pom-pill--all {
  background: #eef0f6;
  border-color: #d1d5db;
  color: #374151;
}

.pom-pill--all.on {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.pom-pill--all.on .pill-n {
  background: rgba(255, 255, 255, 0.15);
}

.pom-pill--created {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4f46e5;
}

.pom-pill--created.on {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

.pom-pill--open {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #7c3aed;
}

.pom-pill--open.on {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.pom-pill--issued {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #059669;
}

.pom-pill--issued.on {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.pom-pill--rejected {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #d97706;
}

.pom-pill--rejected.on {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

.pom-pill--close {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #e11d48;
}

.pom-pill--close.on {
  background: #e11d48;
  border-color: #e11d48;
  color: #fff;
}

.pom-pill--partial {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #d97706;
}
.pom-pill--partial.on {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

.pom-pill--fulfilled {
  background: #ccfbf1;
  border-color: #5eead4;
  color: #0d9488;
}
.pom-pill--fulfilled.on {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}

.pom-pill--billing {
  background: #cffafe;
  border-color: #67e8f9;
  color: #0891b2;
}
.pom-pill--billing.on {
  background: #0891b2;
  border-color: #0891b2;
  color: #fff;
}

.pom-pill--cancelled {
  background: #eef0f6;
  border-color: #d1d5db;
  color: #6b7280;
}

.pom-pill--cancelled.on {
  background: #6b7280;
  border-color: #6b7280;
  color: #fff;
}

.pom-pill:not(.on):hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.pom-pill svg {
  color: inherit;
  fill: currentColor;
  flex-shrink: 0;
}

.pom-pill.on svg {
  color: #fff;
  fill: #fff;
}

.pom-pill--drafted {
  background: #fef0eb;
  border-color: #fdc5aa;
  color: #c2440a;
}
.pom-pill--drafted.on {
  background: #c2440a;
  border-color: #c2440a;
  color: #fff;
}

.pom-pill--submitted {
  background: #e8f4f7;
  border-color: #9fd0db;
  color: #1a7a92;
}
.pom-pill--submitted.on {
  background: #1a7a92;
  border-color: #1a7a92;
  color: #fff;
}

.pom-pill--reopened {
  background: #e8eff8;
  border-color: #9dbcd9;
  color: #2563a8;
}
.pom-pill--reopened.on {
  background: #2563a8;
  border-color: #2563a8;
  color: #fff;
}

.pom-pill--confirmed {
  background: #e6faf3;
  border-color: #7dd9b5;
  color: #0a7a52;
}
.pom-pill--confirmed.on {
  background: #0a7a52;
  border-color: #0a7a52;
  color: #fff;
}

.pom-pill--consumption-done {
  background: #e0f7fb;
  border-color: #67d4e8;
  color: #0779a0;
}
.pom-pill--consumption-done.on {
  background: #0779a0;
  border-color: #0779a0;
  color: #fff;
}

.pom-pill--planning-done {
  background: #e3f2fd;
  border-color: #90c9f9;
  color: #1565c0;
}
.pom-pill--planning-done.on {
  background: #1565c0;
  border-color: #1565c0;
  color: #fff;
}

.pom-pill--order-inprogress {
  background: #fff4e6;
  border-color: #ffb74d;
  color: #b85c00;
}
.pom-pill--order-inprogress.on {
  background: #b85c00;
  border-color: #b85c00;
  color: #fff;
}

.pom-pill--mrp-inprogress {
  background: #f5eafa;
  border-color: #ce93d8;
  color: #7b1fa2;
}
.pom-pill--mrp-inprogress.on {
  background: #7b1fa2;
  border-color: #7b1fa2;
  color: #fff;
}

.pom-pill--order-completed {
  background: #e8f5e9;
  border-color: #81c784;
  color: #2e7d32;
}
.pom-pill--order-completed.on {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}

.pom-pill--processing {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #4338ca;
}

.pom-pill--processing.on {
  background: #4338ca;
  border-color: #4338ca;
  color: #fff;
}

.pom-pill--onhold {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.pom-pill--onhold.on {
  background: #c2410c;
  border-color: #c2410c;
  color: #fff;
}

.pom-pill--pending {
  background: #fefce8;
  border-color: #fde047;
  color: #a16207;
}

.pom-pill--pending.on {
  background: #a16207;
  border-color: #a16207;
  color: #fff;
}

.pom-pill--inactive {
  background: #fdf0ee;
  border-color: #f5c4bb;
  color: #c0392b;
}
.pom-pill--inactive.on {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}

/* ── PO Card Grid ─────────────────────────────────────── */
.pom-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Individual PO Card ───────────────────────────────── */
.pom-po-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.07),
    0 0 0 1px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.pom-po-card:hover {
  box-shadow:
    0 12px 32px rgba(79, 70, 229, 0.12),
    0 0 0 1px rgba(79, 70, 229, 0.08);
  border-color: #c7d2fe;
}

.pom-po-card.expanded {
  border-color: #c7d2fe;
  box-shadow:
    0 12px 32px rgba(79, 70, 229, 0.12),
    0 0 0 1px rgba(79, 70, 229, 0.08);
}

/* ═══════════════════════════════════════════════════════
   PO Info Card — fully self-labeled, no external header row
   ═══════════════════════════════════════════════════════ */

.po-info-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.po-info-card:hover {
  border-color: #c7d2fe;
  box-shadow:
    0 10px 28px rgba(79, 70, 229, 0.1),
    0 0 0 1px rgba(79, 70, 229, 0.06);
}
.po-info-card.expanded {
  border-color: #c7d2fe;
  box-shadow:
    0 10px 28px rgba(79, 70, 229, 0.1),
    0 0 0 1px rgba(79, 70, 229, 0.06);
}

/* ── Top strip: identity + actions ── */
.po-info-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  cursor: pointer;
  background: #ffffff;
  transition: background 0.18s;
}
.po-info-top:hover {
  background: #fafbff;
}
.po-info-card.expanded .po-info-top {
  background: #eef2ff;
  border-bottom: 1px solid #c7d2fe;
}

.po-info-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.po-info-id-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.po-info-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  color: #4f46e5;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.po-info-spacer {
  flex: 1 1;
}

.po-info-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Divider between top strip and field body ── */
.po-info-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 0 20px;
}
.po-info-card.expanded .po-info-divider {
  display: none; /* the top strip already has its own border in expanded state */
}

/* ── Field body: self-labeled grid, wraps freely, no fixed columns ── */
.po-info-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  grid-gap: 16px 20px;
  gap: 16px 20px;
  padding: 14px 20px 16px 20px;
}

.po-info-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.po-info-label {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
}

.po-info-value {
  font-size: 12.5px;
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.po-info-value.mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: #6b7280;
}

.po-info-value.muted {
  color: #9ca3af;
  font-weight: 400;
}

/* A field that needs more room (e.g. supplier name, order chips) can span 2 tracks */
.po-info-field--wide {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .po-info-field--wide {
    grid-column: span 1;
  }
}

.po-card-header {
  grid-template-columns: 36px 36px 80px 111px 110px 130px 130px 130px 200px 140px 140px 140px 140px 140px;
}

.grn-card-header {
  grid-template-columns: 36px 36px 111px 110px 110px 110px 200px 130px 130px 130px 130px 130px 130px 130px 130px 130px 130px 130px;
}

.po-header.po-card-header {
  width: -webkit-max-content;
  width: max-content;
  flex-shrink: 0;
}

/* Expand Toggle */
.pom-expand-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1.5px solid #d1d5db;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.pom-expand-btn:hover {
  border-color: #4f46e5;
  color: #4f46e5;
  background: #eef2ff;
}

.pom-po-card.expanded .pom-expand-btn {
  border-color: #4f46e5;
  color: #4f46e5;
  background: #eef2ff;
}

.pom-expand-icon {
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.pom-po-card.expanded .pom-expand-icon {
  transform: rotate(90deg);
}

/* PO Number */
.pom-po-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  color: #4f46e5;
  letter-spacing: -0.2px;
}

.pom-po-num-label {
  font-size: 10px;
  font-weight: 500;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

/* Type + PoType column */
.pom-card-types {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Type Chip */
.pom-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  width: -webkit-fit-content;
  width: fit-content;
}

.pom-type-chip--1 {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #7dd3fc;
}

.pom-type-chip--2 {
  background: #ede9fe;
  color: #7c3aed;
  border: 1px solid #c4b5fd;
}

.pom-potype-text {
  font-size: 12px;
  color: #6b7280;
  font-weight: 400;
  padding-left: 10px;
}

.order-box {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}
/* Order No */
.pom-order-chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  font-weight: 500;
  color: #374151;
  background: #eef0f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 3px 8px;
  overflow-wrap: anywhere;
}

.pom-no-order {
  color: #9ca3af;
  font-size: 12px;
}

/* Status Badge */
.pom-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1px;
  width: -webkit-fit-content;
  width: fit-content;
  white-space: nowrap;
}

.pom-status--created {
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #c7d2fe;
}

.pom-status--issued {
  background: #d1fae5;
  color: #059669;
  border: 1px solid #6ee7b7;
}

.pom-status--fulfilled {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.pom-status--partial {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fcd34d;
}

.pom-status--rejected {
  background: #ffe4e6;
  color: #e11d48;
  border: 1px solid #fda4af;
}

/* User Cell */
.pom-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pom-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.pom-avatar--a {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.pom-avatar--b {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
}

.pom-avatar--c {
  background: linear-gradient(135deg, #059669, #10b981);
}

.pom-avatar--d {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.pom-avatar--e {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
}

.pom-avatar--f {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
}

.pom-user-info {
  min-width: 0;
}

.pom-user-name {
  font-size: 12.5px;
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grn-user {
  max-width: 100px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.grn-user-name {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12.5px;
  font-weight: 500;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  max-width: 90px;
}

.pom-user-role {
  font-size: 10.5px;
  color: #9ca3af;
}

/* Date cell */
.pom-date {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
}

/* View Action */
.pom-view-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.pom-view-btn:hover {
  border-color: #4f46e5;
  color: #4f46e5;
  background: #eef2ff;
}

/* ── Expanded Items Panel ─────────────────────────────── */
.pom-items-panel {
  background: #f8f9fc;
  border-top: 1px solid #c7d2fe;
  padding: 20px 24px 20px 72px;
  animation: slideDown 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pom-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pom-items-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #4f46e5;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.pom-items-badge {
  background: #4f46e5;
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}

/* Items as cards inside expanded panel */
.pom-item-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pom-item-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr 90px 120px 120px 120px;
  grid-gap: 12px;
  gap: 12px;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.pom-item-card:hover {
  border-color: #c7d2fe;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.07),
    0 0 0 1px rgba(0, 0, 0, 0.03);
}

.pom-item-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 10px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pom-item-desc-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pom-item-desc {
  font-size: 12.5px;
  color: #374151;
  font-weight: 400;
  line-height: 1.4;
}

.pom-item-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pom-item-col-label {
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pom-item-col-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 600;
}

.pom-item-col-val--total {
  color: #111827;
}

.pom-item-col-val--received {
  color: #059669;
}

.pom-item-col-val--remaining {
  color: #d97706;
}

.pom-uom-chip {
  display: inline-block;
  background: #eef0f6;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  max-width: -webkit-fit-content;
  max-width: fit-content;
}

/* Progress bar inside item card */
.pom-item-progress-wrap {
  grid-column: 1 / -1;
  padding-top: 2px;
}

.pom-item-progress-track {
  height: 4px;
  background: #eef0f6;
  border-radius: 4px;
  overflow: hidden;
}

.pom-item-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Empty items */
.pom-items-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #9ca3af;
  background: #ffffff;
  border: 1.5px dashed #e5e7eb;
  border-radius: 14px;
  padding: 18px 20px;
}

/* ── Pagination ───────────────────────────────────────── */
.pom-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0 0 18px 18px;
  border-top: 1px solid #e5e7eb;
}

.pom-pag-info {
  font-size: 12.5px;
  color: #6b7280;
  font-weight: 500;
}

.pom-pag-info strong {
  color: #111827;
}

.pom-pag-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pom-pag-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.pom-pag-btn:hover {
  border-color: #4f46e5;
  color: #4f46e5;
  background: #eef2ff;
}

.pom-pag-btn.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

.pom-pag-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
/* CELL */
.grn-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.grn-label {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.grn-value {
  font-size: 12.5px;
  color: #111827;
  font-weight: 500;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.grn-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.grn-label {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
}

.grn-value {
  font-size: 12.5px;
  color: #111827;
  font-weight: 500;
  word-break: break-word;
}

.pom-expand-icon.open {
  transform: rotate(90deg);
}

/* Expand rotation */
.pom-expand-icon.rotated {
  transform: rotate(90deg);
}

.grn-style-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  min-width: 0;
}
.grn-style-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 11px;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grn-style-more {
  border: 1px dashed #cbd5e1;
  background: transparent;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #1d4ed8;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  transition: all 0.13s;
  white-space: nowrap;
}
.grn-style-more:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.pom-stats-row {
  grid-template-columns: repeat(2, 1fr);
}

/* View toggle */
.grn-view-toggle {
  display: flex;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}
.grn-view-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
}
.grn-view-btn.active {
  background: #1e3a5f;
  color: #fff;
}
.grn-view-btn:not(.active):hover {
  background: #f1f5f9;
  color: #475569;
}

/* Pagination */
.grn-pagination-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── PO Card ────────────────────────────────────────────── */
.grn-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grn-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  transition:
    box-shadow 0.18s,
    border-color 0.18s;
}
.grn-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.09);
  border-color: #cbd5e1;
}
.grn-card.grn-card--expanded {
  border-color: #1e3a5f;
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.12);
}

/* Card Top Row */
.grn-card-top {
  display: flex;
  align-items: stretch;
  min-height: 72px;
}

/* Left accent bar */
.grn-card-accent {
  width: 4px;
  flex-shrink: 0;
  background: #e2e8f0;
  border-radius: 14px 0 0 0;
  transition: background 0.18s;
}
.grn-card--expanded .grn-card-accent {
  background: #1e3a5f;
}

/* Expand button column */
.grn-card-toggle {
  display: flex;
  align-items: center;
  padding: 0 10px;
  flex-shrink: 0;
}
.grn-expand-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #94a3b8;
  transition: all 0.18s;
  flex-shrink: 0;
}
.grn-expand-btn:hover {
  border-color: #1e3a5f;
  color: #1e3a5f;
  background: #eff6ff;
}
.grn-card--expanded .grn-expand-btn {
  border-color: #1e3a5f;
  color: #1e3a5f;
  background: #dbeafe;
}
.grn-expand-icon {
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.grn-card--expanded .grn-expand-icon {
  transform: rotate(90deg);
}

/* Eye / GRN button column */
.grn-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 4px;
  flex-shrink: 0;
}
.grn-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  transition: all 0.15s;
}
.grn-icon-btn:hover {
  border-color: #1e3a5f;
  color: #1e3a5f;
  background: #eff6ff;
}

.grn-grn-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  height: 30px;
  border-radius: 7px;
  border: none;
  background: #1e3a5f;
  color: #fff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: background 0.15s;
  white-space: nowrap;
}
.grn-grn-btn:hover {
  background: #163055;
}

/* Divider */
.grn-card-divider {
  width: 1px;
  background: #f1f5f9;
  margin: 12px 0;
  flex-shrink: 0;
}

/* ── Card Data Fields Grid ──────────────────────────────── */
/* Main info section: fills remaining width */
.grn-card-main {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 16px 12px 8px;
  min-width: 0;
}

.grn-card-row1 {
  display: grid;
  grid-template-columns:
    minmax(110px, 1fr)
    minmax(120px, 1fr)
    minmax(100px, 0.8fr)
    minmax(130px, 1.2fr)
    minmax(120px, 1fr)
    2fr
    minmax(130px, 1fr);
  grid-gap: 0;
  gap: 0;
  align-items: start;
}

/* BOTTOM ROW: meta info */
.grn-card-row2 {
  display: grid;
  grid-template-columns:
    minmax(120px, 1fr)
    minmax(130px, 1fr)
    minmax(160px, 1.5fr)
    minmax(160px, 1.5fr);
  grid-gap: 0;
  gap: 0;
  align-items: start;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #f1f5f9;
}

/* Each field cell */
.grn-field {
  padding: 0 12px 0 0;
  min-width: 0;
}
.grn-field-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 4px;
  white-space: nowrap;
}
.grn-field-value {
  font-size: 12.5px;
  font-weight: 500;
  color: #1e293b;
  min-width: 0;
}
/* Styles field allows wrapping */
.grn-field--styles .grn-field-value {
  font-size: 11.5px;
  line-height: 1.5;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* PO Number link style */
.grn-po-num {
  font-family: "Fira Code", monospace;
  font-size: 13px;
  font-weight: 600;
  color: #1e3a5f;
  cursor: pointer;
}
.grn-po-num:hover {
  text-decoration: underline;
}

/* Buyer name */
.grn-buyer-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
}

/* Order chip */
.grn-order-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 5px;
  padding: 2px 8px;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  font-weight: 500;
  color: #0369a1;
}

/* GRN No chip */
.grn-grn-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f5f3ff;
  border: 1px solid #c4b5fd;
  border-radius: 5px;
  padding: 2px 8px;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  font-weight: 500;
  color: #5b21b6;
}

/* Type chip */
.grn-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
}
.grn-type-chip--material {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
}
.grn-type-chip--process {
  background: #f5f3ff;
  border: 1px solid #c4b5fd;
  color: #5b21b6;
}

/* Date text */
.grn-date-text {
  font-family: "Fira Code", monospace;
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

/* ── GRN Extra Fields (GRN view) ─────────────────────────── */
.grn-card-row1--grn {
  display: grid;
  grid-template-columns: repeat(9, minmax(120px, 1fr));
}
.grn-card-row2--grn {
  grid-template-columns: repeat(8, minmax(120px, 1fr));
}

/* Shipment / Warehouse / Supplier pills */
.grn-info-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: #475569;
  max-width: -webkit-fit-content;
  max-width: fit-content;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* ── Expanded Items Panel ───────────────────────────────── */
.grn-items-panel {
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 16px 20px 20px 62px;
  animation: grn-slide-in 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.po-tabs-row {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0px 4px;
}

.po-tabs-row::-webkit-scrollbar {
  display: none;
}

.po-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: none;
  background: transparent;
  font-size: 17px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}

.po-tab:hover {
  color: #0f172a;
  background: #eef2ff;
  border-radius: 6px 6px 0 0;
}

.po-tab.active {
  color: #0f3460;
  border-bottom-color: #0f3460;
}

.section-title-po {
  font-size: 13px;
  font-weight: bold;
  padding-top: 5px;
  color: #0f3460;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ═══════════════════════════════════════════════════════
   PO Row Card — actions rail + self-aligned two-row field grid
   (matches: expand/view/GRN rail on the left, fields auto-aligned
   into two rows on the right, e.g. Buyer sits above Status,
   PO Number sits above Created By, and so on)
   ═══════════════════════════════════════════════════════ */

.po2-card {
  display: flex;
  flex-direction: column; /* stack po2-grid on top, ItemsPanel below — NOT side by side */
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.po2-card:hover {
  border-color: #c7d2fe;
  box-shadow:
    0 10px 28px rgba(79, 70, 229, 0.1),
    0 0 0 1px rgba(79, 70, 229, 0.06);
}
.po2-card.expanded {
  border-color: #c7d2fe;
  box-shadow:
    0 10px 28px rgba(79, 70, 229, 0.1),
    0 0 0 1px rgba(79, 70, 229, 0.06);
}

/* whole card = actions rail + field grid, side by side */
.po2-grid {
  display: flex;
  align-items: stretch;
  width: 100%;
}

/* ── Left rail: expand + view on top, GRN button below ── */
.po2-actions-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px 18px;
  border-right: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.po2-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.po2-grn-row {
  display: flex;
}

.po2-grn-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: none;
  background: #0f3460;
  color: #fff;
  border-radius: 8px;
  padding: 7px 8px 7px 14px;
  font-family: "Outfit", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background 0.15s;
}
.po2-grn-btn:hover {
  background: #0a2647;
}
.po2-grn-plus {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Right side: self-aligned field grid ──
   grid-auto-flow: column fills column 1 top-to-bottom, then column 2, etc,
   so fields placed in this order automatically stack in pairs:
   Buyer/Status, PO Number/Created By, Type/Updated By, PO Type/Created At,
   Order No/Updated At, then Styles, Supplier, Delivery Date (row-1 only,
   row 2 left empty under them via an empty .po2-cell) */
.po2-content {
  flex: 1 1;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-column-gap: 34px;
  column-gap: 34px;
  grid-row-gap: 16px;
  row-gap: 16px;
  align-items: start;
  padding: 16px 22px;
  min-width: 0;
  overflow-x: auto;
}

.po2-row {
  display: contents; /* row wrapper is semantic only; grid placement is via auto-flow column */
}

.po2-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 60px;
  white-space: nowrap;
}

.po2-cell--empty {
  min-width: 0;
}

.po2-label {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.po2-value {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
}

.po2-value.mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: #6b7280;
}

.po2-value.muted {
  color: #9ca3af;
  font-weight: 400;
}

/* Type chip (Process / Material) reuses pom-type-chip colors */
.po2-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  width: -webkit-fit-content;
  width: fit-content;
}
.po2-type-chip--1 {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #7dd3fc;
}
.po2-type-chip--2 {
  background: #ede9fe;
  color: #7c3aed;
  border: 1px solid #c4b5fd;
}

/* Status chip */
.po2-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  width: -webkit-fit-content;
  width: fit-content;
  border: 1px solid transparent;
}
.po2-status-chip--fulfilled {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.po2-status-chip--created {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #c7d2fe;
}
.po2-status-chip--issued {
  background: #d1fae5;
  color: #059669;
  border-color: #6ee7b7;
}
.po2-status-chip--partial {
  background: #fef3c7;
  color: #d97706;
  border-color: #fcd34d;
}
.po2-status-chip--rejected {
  background: #ffe4e6;
  color: #e11d48;
  border-color: #fda4af;
}

/* Supplier / no-value chip */
.po2-info-chip {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
  width: -webkit-fit-content;
  width: fit-content;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Created/Updated by avatar + name */
.po2-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.po2-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  flex-shrink: 0;
  letter-spacing: 0.2px;
}
.po2-user-name {
  font-size: 12.5px;
  font-weight: 500;
  color: #1f2937;
  white-space: nowrap;
}

.po2-items-panel {
  border-top: 1px solid #c7d2fe;
  background: #f8f9fc;
  animation: slideDown 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
  .po2-items-panel {
    padding: 16px;
  }
}
@media (min-width: 1400px) {
  .po-tabs-row {
    gap: 18px;
    padding: 0 5px;
  }

  .crt-po-details-container {
    max-width: 305px;
  }

  .po-tab {
    font-size: 16px;
    padding: 10px 17px;
    gap: 15px;
  }
}

@media (max-width: 1200px) {
  .po-tab {
    font-size: 16px;
    padding: 8px 18px;
  }
}

@media (max-width: 992px) {
  .po-tabs-row {
    gap: 8px;
    padding: 0 4px;
  }

  .po-tab {
    font-size: 15px;
    padding: 7px 5px;
  }
}

@media (max-width: 768px) {
  .po-tabs-row {
    gap: 6px;
    padding: 0 2px;
  }

  .po-tab {
    font-size: 14px;
    padding: 6px 4px;
    gap: 4px;
  }
}

@media screen and (max-width: 1700) and (min-width: 1450) {
  .crt-po-details-container {
    max-width: 200px;
  }
}

@keyframes grn-slide-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1280px) {
  .grn-card-row1--grn {
    grid-template-columns: repeat(8, minmax(120px, 1fr));
  }
}

@media (max-width: 1024px) {
  .grn-body {
    padding: 16px;
  }
  .grn-filter-bar {
    padding: 12px 16px;
  }
  .grn-module-nav,
  .grn-sub-nav {
    padding: 0 16px;
  }
  .grn-card-row1 {
    grid-template-columns: 110px 120px 100px 130px 120px 1fr 140px;
    gap: 0;
  }
  .grn-card-row2 {
    grid-template-columns: 110px 120px 190px 190px;
  }
  .grn-card-row2--grn {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .grn-card-row1 {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .grn-card-row2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .grn-card-row1 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    row-gap: 10px;
  }
  .grn-card-row1 .grn-field--styles {
    grid-column: 1 / -1;
  }

  .grn-card-row2 {
    grid-template-columns: 1fr 1fr;
    row-gap: 10px;
  }
}

/* ── POM responsive: self-labeled card reflows, no squeeze ──── */
@media (max-width: 900px) {
  .pom-header {
    padding: 0 16px;
  }

  .pom-module-tabs {
    padding: 0 16px;
  }

  .pom-body {
    padding: 16px;
  }

  .pom-col-headers {
    display: none;
  }

  .po-info-top {
    padding: 12px 16px;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .po-info-spacer {
    flex-basis: 100%;
    height: 0;
    flex-grow: 0;
  }

  .po-info-divider {
    margin: 0 16px;
  }

  .po-info-body {
    grid-template-columns: 1fr 1fr;
    padding: 12px 16px 14px 16px;
    gap: 12px 16px;
  }

  .po-info-field--wide {
    grid-column: 1 / -1;
  }

  .pom-item-card {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
  }

  .pom-item-desc-wrap {
    grid-column: 1 / -1;
  }

  .pom-item-progress-wrap {
    grid-column: 1 / -1;
  }

  .pom-items-panel {
    padding: 16px;
  }

  .pom-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .pom-header-stat {
    display: none;
  }

  .pom-filter-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .pom-stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .pom-stat-card {
    padding: 12px 14px;
    gap: 10px;
  }

  .pom-stat-value {
    font-size: 20px;
  }

  .pom-brand-sub {
    display: none;
  }

  .pom-module-tab {
    padding: 0 12px;
    font-size: 12.5px;
  }

  .pom-add-btn span {
    display: none;
  }

  .po-info-body {
    grid-template-columns: 1fr;
  }

  .pom-item-card {
    grid-template-columns: 1fr;
  }

  .pom-pagination {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 900px) {
  .pom-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .pom-stats-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .po-card-header,
  .grn-card-header {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .grn-card-row1,
  .grn-card-row1--grn {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .grn-card-row2,
  .grn-card-row2--grn {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .po2-content {
    column-gap: 24px;
  }
}

@media (max-width: 768px) {
  .grn-card-row1,
  .grn-card-row2,
  .grn-card-row1--grn,
  .grn-card-row2--grn {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  /* Stack the actions rail above the fields, and let the two-row
     field grid become a simple wrapping list instead of columns */
  .po2-grid {
    flex-direction: column;
  }

  .po2-actions-col {
    flex-direction: row;
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid #f1f5f9;
    padding: 12px 16px;
  }

  .po2-grn-row {
    flex: 1 1;
    max-width: 140px;
  }

  .po2-content {
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 14px;
    column-gap: 16px;
    padding: 14px 16px;
    overflow-x: visible;
  }

  .po2-row {
    display: contents;
  }
}
.crt-po-select-item-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.crt-po-select-item-container > div {
  position: relative; /* anchor for the popup when using getPopupContainer */
}

.crt-po-cascader-input {
  width: 100%;
}

/* Each column scrolls on its own with a fixed height */
.crt-po-cascader-popup .ant-cascader-menu {
  height: 240px;
  min-width: 160px;
  max-width: 220px;
  overflow-y: auto;
}

/* Let the whole popup scroll sideways instead of overflowing the modal */
.crt-po-cascader-popup .ant-cascader-menus {
  max-width: 460px;
  overflow-x: auto;
}
.crt-po-select-item-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.crt-po-select-item-container > div {
  position: relative; /* anchor for the popup when using getPopupContainer */
}

.crt-po-cascader-input {
  width: 100%;
}

/* Each column scrolls on its own with a fixed height */
.crt-po-cascader-popup .ant-cascader-menu {
  height: 240px;
  min-width: 160px;
  max-width: 220px;
  overflow-y: auto;
}

/* Let the whole popup scroll sideways instead of overflowing the modal */
.crt-po-cascader-popup .ant-cascader-menus {
  max-width: 460px;
  overflow-x: auto;
}

.po-page {
  --po-font: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --po-navy: #0f3460;
  --po-accent: #2f6fed;
  --po-accent-soft: #eaf1ff;
  --po-danger: #e5484d;
  --po-bg: #f4f6fb;
  --po-card: #ffffff;
  --po-border: #e3e8f2;
  --po-text: #1f2a44;
  --po-muted: #6b768c;
  --po-radius: 14px;
  --po-radius-sm: 10px;
  --po-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);

  --po-card-h: 79vh !important;

  width: 100%;
  color: var(--po-text);
  background: var(--po-bg);
  padding: 1px 1px 2px;
  box-sizing: border-box;
}
.po-page *,
.po-page *::before,
.po-page *::after {
  box-sizing: border-box;
}

.po-page,
.po-page *:not(svg):not(path):not(.anticon) {
  font-family: var(--po-font);
}

/* ---------------------------------------------------------
   2. Page layout + equal fixed card height
   --------------------------------------------------------- */
/* row that holds the left + right cards */
.po-page .po-body-row,
.po-page .ant-row:has(> .po-col-left) {
  margin-top: 0;
  margin-bottom: 0;
  row-gap: 0; /* no vertical gutter */
  align-items: flex-start; /* beats .ant-row-top / middle */
}
.po-page .po-col-left,
.po-page .po-col-right {
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: none;
  min-height: 0;
  min-width: 0;
  overflow: visible;
}

.po-page .po-side-card,
.po-page .po-main-card {
  flex: none;
  width: 100%;
  min-width: 0;
  height: var(--po-card-h);
  max-height: none;
}

.po-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 5px 7px;
  margin-bottom: 4px;
  background: var(--po-card);
  border: 1px solid var(--po-border);
  border-radius: var(--po-radius);
  box-shadow: var(--po-shadow);
}
.po-header__left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.po-header__logo {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--po-navy), var(--po-accent));
  box-shadow: 0 6px 14px rgba(47, 111, 237, 0.35);
}
.po-page .po-header__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--po-navy);
  text-transform: uppercase;
}
.po-page .po-header__subtitle {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--po-muted);
}
.po-header__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.po-header__utils {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
  margin-left: 2px;
  border-left: 1px solid var(--po-border);
}
.po-header__actions .ant-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--po-radius-sm);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.po-header__actions .ant-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 52, 96, 0.18);
}

/* ---------------------------------------------------------
   4. Left details card
   --------------------------------------------------------- */
.po-page .po-side-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto; /* scrollbar only if content is taller than the card */
  margin: 0;
  padding: 14px 12px 16px;
  background: linear-gradient(180deg, #f5f8ff 0, #ffffff 160px);
  border: 1px solid var(--po-border);
  border-radius: var(--po-radius);
  box-shadow: var(--po-shadow);
}
.po-page .po-side-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--po-navy), var(--po-accent));
}

/* step switcher: icon-only, the active tab shows its label */
.po-page .po-tabs-row {
  display: flex;
  flex: none;
  flex-wrap: nowrap;
  justify-content: stretch;
  gap: 4px;
  width: 100%;
  padding: 4px;
  margin: 0;
  background: var(--po-bg);
  border-radius: 12px;
}
.po-page .po-tab {
  flex: 1 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--po-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: all 0.18s ease;
}
.po-page .po-tab svg {
  flex: none;
  font-size: 17px;
}
.po-page .po-tab span {
  display: none;
}
.po-page .po-tab.active {
  flex: 2 1;
  background: #fff;
  color: var(--po-accent);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.1);
}
.po-page .po-tab.active span {
  display: inline;
}
.po-page .po-tab:hover:not(.active) {
  color: var(--po-navy);
  background: rgba(255, 255, 255, 0.7);
}

/* big section title (GENERAL / To / Bill To / Shipping) */
.po-page .section-title-po {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 14px 0 6px;
  padding: 2px 0 2px 10px;
  border: 0;
  border-left: 3px solid var(--po-accent);
  font-size: 14px;
  font-weight: 700;
  color: var(--po-navy);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.po-page .section-title-po .ant-row {
  flex-wrap: nowrap;
}

/* group headings inside the card: icon + label + divider line */
.po-page .po-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--po-navy);
}
.po-page .po-group-title svg {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 6px;
  border-radius: 8px;
  color: var(--po-accent);
  background: var(--po-accent-soft);
}
.po-page .po-group-title::after {
  content: "";
  flex: 1 1;
  height: 1px;
  background: var(--po-border);
}

/* field labels */
.po-page .fp-label {
  display: block;
  width: 100%;
  margin: 0 0 5px;
  padding: 0;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #5f6b82;
}
.po-page .aster-risk-Icon {
  color: var(--po-danger);
  font-size: 9px;
  vertical-align: top;
  margin-left: 2px;
}

.po-page .ant-select {
  width: 100%;
}
.po-page .ant-select-single .ant-select-selector {
  align-items: center;
}
.po-page .textbox-input-common {
  width: 100%;
  display: block;
}
.po-page .ant-select:not(.ant-select-disabled):hover .ant-select-selector,
.po-page .ant-input:hover,
.po-page .textbox-input-common:hover {
  border-color: #b7c6e6;
}
.po-page .ant-select-focused .ant-select-selector,
.po-page .ant-input:focus,
.po-page .textbox-input-common:focus {
  border-color: var(--po-accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.14);
  outline: none;
}
.po-page .ant-select-status-error .ant-select-selector {
  border-color: var(--po-danger);
}
.po-page .ant-input::placeholder,
.po-page .ant-select-selection-placeholder {
  color: #a3adc0;
}
.po-page .ant-input[readonly] {
  background: #f1f5fb;
  border-style: dashed;
  color: #3d4a63;
  font-weight: 500;
}

.po-page .po-main-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--po-card);
  border: 1px solid var(--po-border);
  border-radius: var(--po-radius);
  box-shadow: var(--po-shadow);
}
.po-page .td-tabs-row {
  display: flex;
  flex: none;
  justify-content: flex-start;
  gap: 4px;
  padding: 6px 14px 0;
  margin: 0;
  background: #fff;
  box-shadow: none;
  border-radius: 0;
  border-bottom: 1px solid var(--po-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.po-page .td-tabs-row::-webkit-scrollbar {
  display: none;
}
.po-page .td-tab {
  position: relative;
  padding: 12px 18px;
  border: 0;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--po-muted);
  cursor: pointer;
  white-space: nowrap;
}
.po-page .td-tab:hover {
  color: var(--po-navy);
}
.po-page .td-tab.active {
  color: var(--po-accent);
}
.po-page .td-tab.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--po-accent);
}
.po-page .po-main-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 5px;
  overflow-y: auto;
}

.po-page .po-main-body .sub-header-container {
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.po-page .crt-po-material-btn {
  display: flex;
  justify-content: flex-start;
}
.po-page .crt-po-material-btn .ant-btn {
  height: 36px;
  border-radius: var(--po-radius-sm);
  font-weight: 600;
}
.po-page .common-header {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--po-navy);
}

/* ---------------------------------------------------------
   8. Misc
   --------------------------------------------------------- */
.po-page .ant-pagination .ant-pagination-item-active {
  background: var(--po-navy);
  border-color: var(--po-navy);
}
.po-page .ant-pagination .ant-pagination-item-active a {
  color: #fff;
}
.po-page .ant-float-btn {
  box-shadow: 0 8px 20px rgba(15, 52, 96, 0.28);
}

/* ---------------------------------------------------------
   9. Responsive / print   (keep these LAST)
   --------------------------------------------------------- */

/* < 1200px: table columns cannot fit → horizontal scroll inside the table */
@media (max-width: 1199px) {
  .po-page .po-details-table {
    overflow-x: auto;
  }
  .po-page .po-details-table table {
    min-width: 960px;
  }
}

/* < 992px: stack the cards, height follows content */
@media (max-width: 991px) {
  .po-page .po-body-row,
  .po-page .ant-row:has(> .po-col-left) {
    row-gap: 12px !important;
  }
  .po-page .po-side-card,
  .po-page .po-main-card {
    height: auto;
    min-height: 0;
  }
  .po-page .po-side-card,
  .po-page .po-main-body {
    overflow: visible;
  }
}

/* phones */
@media (max-width: 767px) {
  .po-page {
    padding: 8px;
  }
  .po-header {
    position: static;
    padding: 10px 12px;
  }
  .po-page .po-header__title {
    font-size: 15px;
  }
  .po-header__actions {
    width: 100%;
    justify-content: flex-start;
  }
  .po-header__utils {
    border-left: 0;
    padding-left: 0;
  }
  .po-page .td-tab {
    padding: 10px 12px;
  }
  .po-page .po-main-body {
    padding: 10px;
  }
}

@media print {
  .po-page .po-side-card,
  .po-page .po-main-card {
    height: auto;
  }
  .po-header__actions,
  .po-page .po-tabs-row {
    display: none !important;
  }
}

/* ------ items table styling -------------*/
/* ==========================================================
   PO Items Table – modern theme
   Everything is scoped to .po-table.po-table (doubled class
   for specificity) so it wins over global / wrapper styles.
   ========================================================== */
/* ------ items table styling -------------*/
/* ==========================================================
   PO Items Table – modern theme
   Everything is scoped to .po-table.po-table (doubled class
   for specificity) so it wins over global / wrapper styles.
   ========================================================== */

.po-table {
  --po-navy: #17325f;
  --po-blue: #2563eb;
  --po-blue-soft: #eef4ff;
  --po-ink: #1b2640;
  --po-ink-soft: #5b6985;
  --po-ink-faint: #97a2b8;
  --po-line: #e6ebf3;
  --po-line-strong: #d3dbe8;
  --po-stripe: #fafbfe;
  --po-field: #f5f7fb;
  --po-cmpy-head: #2a5298;
  --po-cmpy-cell: #f4f8ff;
  --po-note-border: #0f172a; /* Additional-notes border colour */
}

.po-table.po-table {
  background: #fff;
  border: 1px solid var(--po-line) !important;
  border-radius: 14px !important;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.05),
    0 12px 28px -12px rgba(16, 24, 40, 0.12);
  overflow: hidden;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.po-table.po-table .ant-table,
.po-table.po-table .ant-table-container,
.po-table.po-table .ant-table-content,
.po-table.po-table .ant-table-wrapper {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

/* ---------- Font reset ---------- */
.po-table.po-table th,
.po-table.po-table td,
.po-table.po-table input,
.po-table.po-table textarea,
.po-table.po-table label,
.po-table.po-table .ant-btn {
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* ---------- Header ---------- */
.po-table.po-table .ant-table-thead > tr > th {
  background: var(--po-navy) !important;
  color: #fff !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1.35;
  border: none !important;
  border-right: 1px solid rgba(255, 255, 255, 0.22) !important;
  -webkit-border-end: 1px solid rgba(255, 255, 255, 0.22) !important;
          border-inline-end: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-bottom: 3px solid var(--po-blue) !important;
}

.po-table.po-table .ant-table-thead > tr > th::before {
  display: none !important;
}

.po-table.po-table .ant-table-thead > tr > th *,
.po-table.po-table .ant-table-thead .ant-table-column-title {
  color: #fff !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
}

.po-table.po-table .ant-table-thead > tr > th:last-child {
  border-right: none !important;
  -webkit-border-end: none !important;
          border-inline-end: none !important;
}

.po-table.po-table .ant-table-thead > tr > th.po-col-cmpy {
  background: var(--po-cmpy-head) !important;
}

/* ---------- Body ---------- */
.po-table.po-table .ant-table-tbody > tr > td {
  background: #fff !important;
  color: var(--po-ink) !important;
  font-size: 12px !important;
  vertical-align: top;
  border: none !important;
  border-right: 1px solid #dfe6f2 !important;
  -webkit-border-end: 1px solid #dfe6f2 !important;
          border-inline-end: 1px solid #dfe6f2 !important;
  border-bottom: 1px solid #dfe6f2 !important;
  transition: background 0.15s ease;
}

.po-table.po-table .ant-table-tbody > tr > td:last-child {
  border-right: none !important;
  -webkit-border-end: none !important;
          border-inline-end: none !important;
}

.po-table.po-table .ant-table-tbody > tr:nth-child(even) > td {
  background: var(--po-stripe) !important;
}

.po-table.po-table .ant-table-tbody > tr:hover > td {
  background: var(--po-blue-soft) !important;
}

/* Converted-currency cells */
.po-table.po-table .ant-table-tbody > tr > td.po-col-cmpy {
  background: var(--po-cmpy-cell) !important;
  color: #36507f !important;
  border-left: 1px solid #cfdcf3 !important;
}

.po-table.po-table .ant-table-tbody > tr:hover > td.po-col-cmpy {
  background: #e4eeff !important;
}

/* Amount columns */
.po-table.po-table .ant-table-tbody > tr > td.po-col-amount {
  font-weight: 700 !important;
  color: var(--po-navy) !important;
}

.po-table.po-table td .ant-input,
.po-table.po-table td .ant-input-number,
.po-table.po-table td .ant-input-affix-wrapper,
.po-table.po-table td textarea {
  border-radius: 4px !important;
  font-size: 11px !important;
}

.po-table.po-table td .ant-input-number {
  width: 100%;
}

.po-table.po-table td .ant-input-number input {
  border: none !important;
  box-shadow: none !important;
  text-align: right;
  min-height: 32px;
}

.po-table.po-table td textarea:focus,
.po-table.po-table td .ant-input-number-focused {
  border-color: var(--po-blue) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

.po-table.po-table td .ant-input-number-disabled input {
  background: transparent !important;
}

.po-table.po-table .po-desc {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.po-table.po-table .po-desc textarea {
  border: 1px solid var(--po-line-strong) !important;
  border-radius: 8px !important;
  padding: 7px 10px !important;
  line-height: 1.45;
}

/* Main description: read-only look */
.po-table.po-table .po-desc > *:first-child textarea,
.po-table.po-table .po-desc > textarea:first-child {
  background: var(--po-field) !important;
  font-weight: 500;
  color: var(--po-ink) !important;
  cursor: default;
}

/* ---------- Additional notes (bordered) ----------
   Border goes on the textarea only. If the className lands on a
   wrapper instead, the wrapper gets no border (avoids a double box). */
.po-table.po-table .po-desc .po-desc__note:not(textarea),
.po-table.po-table .po-desc > *:last-child:not(textarea) {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
}

.po-table.po-table .po-desc textarea.po-desc__note,
.po-table.po-table .po-desc .po-desc__note textarea,
.po-table.po-table .po-desc > textarea:last-child,
.po-table.po-table .po-desc > *:last-child textarea {
  border: 1px solid var(--po-note-border) !important;
  border-radius: 8px !important;
  background: #fff !important;
  padding: 7px 10px !important;
  font-size: 12px !important;
  color: var(--po-ink) !important;
  box-shadow: none !important;
  resize: none !important;
}

.po-table.po-table .po-desc textarea.po-desc__note:focus,
.po-table.po-table .po-desc .po-desc__note textarea:focus,
.po-table.po-table .po-desc > *:last-child textarea:focus {
  border-color: var(--po-blue) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.po-table.po-table .po-desc .ant-input-affix-wrapper {
  border: 1px solid var(--po-note-border) !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
}

.po-table.po-table .po-desc .ant-input-affix-wrapper textarea,
.po-table.po-table .po-desc .ant-input-affix-wrapper input {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 3px 0 !important;
}

.po-table.po-table .po-desc__note-prefix {
  font-size: 11px;
  font-weight: 600;
  color: var(--po-ink-faint);
}

.po-table.po-table .po-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.po-table.po-table .po-stack > div {
  line-height: 22px;
}

.po-table.po-table .po-stack--right {
  align-items: flex-end;
}

.po-table.po-table .po-muted {
  color: var(--po-ink-faint) !important;
}

.po-table.po-table .po-design-btn.ant-btn {
  color: var(--po-blue);
  border-radius: 8px;
}

.po-table.po-table .po-design-btn.ant-btn:hover {
  background: var(--po-blue-soft) !important;
}

.po-table.po-table .ant-table-summary td,
.po-table.po-table .ant-table-summary th {
  background: #eef3fc !important;
  border: none !important;
  border-top: 2px solid var(--po-navy) !important;
  border-right: 1px solid #d3dcee !important;
  -webkit-border-end: 1px solid #d3dcee !important;
          border-inline-end: 1px solid #d3dcee !important;
  vertical-align: middle;
}

.po-table.po-table .ant-table-summary td:last-child {
  border-right: none !important;
  -webkit-border-end: none !important;
          border-inline-end: none !important;
}

.po-table.po-table .po-summary-label {
  font-family: var(--po-font) !important;
  font-size: 13px;
  font-weight: 600;
  color: var(--po-ink-soft);
}

.po-table.po-table .po-summary-qty {
  display: inline-block;
  font-family: var(--po-font) !important;
  font-size: 14px;
  font-weight: 700;
  color: var(--po-navy);
}

.po-table.po-table .po-summary-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  white-space: nowrap;
}

.po-table.po-table .po-summary-total span {
  font-family: var(--po-font) !important;
}

.po-table.po-table .po-summary-total__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--po-ink-faint);
}

.po-table.po-table .po-summary-total__primary {
  font-size: 13px;
  font-weight: 700;
  color: var(--po-navy);
}

.po-table.po-table .po-summary-total__secondary {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--po-cmpy-head);
}

.po-table.po-table .ant-table-content::-webkit-scrollbar,
.po-table.po-table .ant-table-body::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.po-table.po-table .ant-table-content::-webkit-scrollbar-thumb,
.po-table.po-table .ant-table-body::-webkit-scrollbar-thumb {
  background: #c3cde0;
  border-radius: 8px;
}

.po-table.po-table .ant-table-content::-webkit-scrollbar-track,
.po-table.po-table .ant-table-body::-webkit-scrollbar-track {
  background: #f1f4fa;
}

/* ==========================================================
   SUMMARY – one cell per column, consistent font
   ========================================================== */
.po-table.po-table .ant-table-summary,
.po-table.po-table .ant-table-summary * {
  font-family: var(--po-font) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  padding: 0;
  margin: 0;
}

.po-table.po-table .po-summary-total--center {
  align-items: center;
}

.po-table.po-table .po-summary-qty {
  font-size: 13px;
  font-weight: 700;
  color: var(--po-navy);
}

.po-table.po-table .ant-table-thead > tr > th .anticon,
.po-table.po-table .ant-table-thead > tr > th .anticon-search,
.po-table.po-table .ant-table-thead > tr > th .ant-table-filter-trigger,
.po-table.po-table .ant-table-thead > tr > th .ant-btn,
.po-table.po-table .ant-table-thead > tr > th button {
  color: #fff !important;
}

.po-table.po-table .ant-table-thead > tr > th svg,
.po-table.po-table .ant-table-thead > tr > th svg path {
  color: #fff !important;
  fill: #fff !important;
}

.po-table.po-table .ant-table-thead > tr > th .ant-table-filter-trigger.active,
.po-table.po-table .ant-table-thead > tr > th .anticon-search.active {
  color: #7fb0ff !important;
}

.po-table.po-table .ant-table-filter-trigger svg {
  stroke: #fff;
}

/* ===== Page ===== */
.de-page {
  margin: 0 auto;
  padding: 0 12px 10px;
}

.pom-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #0f3460;
}

/* ===== Sections ===== */
.de-section {
  margin-bottom: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.de-section-head {
  padding: 8px 14px;
  border-bottom: 1px solid #f0f1f3;
}
.de-section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.de-section-body {
  padding: 14px;
}

/* ===== Driver info layout: fields | uploads ===== */
.de-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-gap: 20px;
  gap: 20px;
  align-items: start;
}
.de-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  grid-gap: 12px;
  gap: 12px;
}
.de-span-2 {
  grid-column: span 2;
}

/* ===== Fields ===== */
.de-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.de-label {
  font-size: 12px;
  font-weight: 500;
  color: #4b5563;
}
.de-field .ant-input,
.de-field .ant-select,
.de-field .ant-picker,
.de-field input.de-input {
  width: 100% !important;
}
.de-date {
  padding: 0.5px 11px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  font-size: smaller;
}
.de-date:focus {
  outline: none;
  border-color: #4096ff;
  box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
}
.de-error-text {
  font-size: 11px;
  line-height: 1.2;
  color: #dc2626;
}
.de-field-error .de-date {
  border-color: #dc2626;
}
.de-check {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding-top: 18px;
}

/* ===== Photo + license (right column) ===== */
.de-docs {
  display: flex;
  gap: 12px;
  padding-left: 20px;
  border-left: 1px solid #eef0f3;
}
.de-doc {
  width: 170px;
}
.de-upload {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 150px;
  padding: 8px;
  /* no fixed height / overflow:hidden, so the delete control is never clipped */
  overflow: visible;
  border: 1.5px dashed #c7cdd6;
  border-radius: 8px;
  background: #f8fafc;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.de-upload:hover {
  border-color: #0f3460;
  background: #f1f5fb;
}
.de-field-error .de-upload {
  border-color: #dc2626;
  background: #fef2f2;
}

/* previews stay small and contained */
.de-upload img,
.de-upload canvas,
.de-upload embed,
.de-upload iframe,
.de-upload object {
  display: block;
  max-width: 100% !important;
  max-height: 130px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  border-radius: 4px;
}

/* hide FileUploader's own delete control; we render a cross button instead */
.de-upload [class*="delete" i],
.de-upload [class*="remove" i],
.de-upload [class*="trash" i] {
  display: none !important;
}

/* cross button, top-right corner of the preview */
.de-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(31, 41, 55, 0.75);
  color: #fff;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}
.de-clear:hover {
  background: #dc2626;
  transform: scale(1.1);
}
.de-clear:focus-visible {
  outline: 2px solid #4096ff;
  outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .de-info {
    grid-template-columns: minmax(0, 1fr);
  }
  .de-docs {
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid #eef0f3;
  }
}
@media (max-width: 575px) {
  .de-docs {
    flex-direction: column;
  }
  .de-doc {
    width: 100%;
  }
  .de-span-2 {
    grid-column: span 1;
  }
}

.cs-comments {
  --cs-navy: #17325f;
  --cs-blue: #2563eb;
  --cs-ink: #1b2640;
  --cs-ink-soft: #5b6985;
  --cs-ink-faint: #97a2b8;
  --cs-line: #e6ebf3;
  --cs-line-strong: #d3dbe8;
  --cs-font:
    "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;

  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 2px 10px;
  font-family: var(--cs-font);
}

/* ---------- Card ---------- */
.cs-comments .cs-comment-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px 14px 22px;
  background: #fff;
  border: 1px solid var(--cs-line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
  transition:
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

/* Left accent bar */
.cs-comments .cs-comment-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--cs-blue), var(--cs-navy));
}

.cs-comments .cs-comment-card:hover {
  border-color: var(--cs-line-strong);
  box-shadow: 0 8px 20px -10px rgba(16, 24, 40, 0.18);
  transform: translateY(-1px);
}

/* ---------- Header ---------- */
.cs-comments .cs-comment-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* the empty <div></div> placeholder takes no space */
.cs-comments .cs-comment-header > div:empty {
  display: none;
}

.cs-comments .cs-comment-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--cs-ink-faint);
  white-space: nowrap;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* small clock icon before the date */
.cs-comments .cs-comment-time::before {
  content: "";
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%2397a2b8%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Ccircle cx=%2712%27 cy=%2712%27 r=%279%27/%3E%3Cpath d=%27M12 7v5l3 2%27/%3E%3C/svg%3E")
    center / contain no-repeat;
}

/* ---------- Body ---------- */
.cs-comments .cs-comment-body {
  padding: 0;
}

.cs-comments .cs-comment-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--cs-ink);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.cs-comments .cs-comment-footer {
  display: flex;
  align-items: center;
  padding-top: 10px;
  border-top: 1px dashed var(--cs-line);
}

.cs-comments .cs-comment-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cs-ink);
}

/* round navy user avatar before "Commented By:" (CSS only) */
.cs-comments .cs-comment-user::before {
  content: "";
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27white%27%3E%3Ccircle cx=%2712%27 cy=%278%27 r=%274%27/%3E%3Cpath d=%27M4 21c0-4.4 3.6-8 8-8s8 3.6 8 8z%27/%3E%3C/svg%3E")
      center / 12px no-repeat,
    var(--cs-navy);
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .cs-comments .cs-comment-card {
    padding: 12px 14px 12px 18px;
  }
}

/* ==========================================================
   PO Comments – card list
   ========================================================== */

.po-comments {
  --pc-navy: #17325f;
  --pc-blue: #2563eb;
  --cs-navy: #17325f;
  --cs-blue: #2563eb;
  --pc-blue-soft: #eef4ff;
  --pc-ink: #1b2640;
  --pc-ink-soft: #5b6985;
  --pc-ink-faint: #97a2b8;
  --pc-line: #e6ebf3;
  --pc-line-strong: #d3dbe8;
  --pc-font:
    "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;

  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 2px 10px;
  font-family: var(--pc-font);
}

/* ---------- Card ---------- */
.po-comments .po-comment-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px 14px 20px;
  background: #fff;
  border: 1px solid var(--pc-line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
  transition:
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

/* Left accent bar */
.po-comments .po-comment-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--cs-blue), var(--cs-navy));
}

.po-comments .po-comment-card--general::before {
  background: var(--pc-line-strong);
  background: linear-gradient(180deg, var(--cs-blue), var(--cs-navy));
}

.po-comments .po-comment-card:hover {
  border-color: var(--pc-line-strong);
  box-shadow: 0 8px 20px -10px rgba(16, 24, 40, 0.18);
  transform: translateY(-1px);
}

/* ---------- Header ---------- */
.po-comments .po-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
}

.po-comments .po-comment-type {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  background: var(--pc-blue-soft);
  color: var(--pc-navy);
  border: 1px solid #d6e4ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.po-comments .po-comment-time {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--pc-ink-faint);
  white-space: nowrap;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ---------- Body ---------- */
.po-comments .po-comment-body {
  padding: 0;
}

.po-comments .po-comment-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--pc-ink);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.po-comments .po-comment-footer {
  display: flex;
  align-items: center;
  padding-top: 10px;
  border-top: 1px dashed var(--pc-line);
}

.po-comments .po-comment-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--pc-ink-soft);
}

.po-comments .po-comment-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pc-navy);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.po-comments .po-comment-user__label {
  color: var(--pc-ink-faint);
}

.po-comments .po-comment-user__name {
  font-weight: 600;
  color: var(--pc-ink);
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .po-comments .po-comment-card {
    padding: 12px 14px 12px 16px;
  }

  .po-comments .po-comment-header {
    flex-wrap: wrap;
  }
}

.grn-inner-container {
  width: 98%;
  display: grid;
  grid-template-columns: 25% 25% 25% 25%;
  grid-row-gap: 5px;
  row-gap: 5px;
  grid-column-gap: 10px;
  column-gap: 10px;
}
.grn-tbl-col {
  height: 100%;
  margin: 0.2% 0 0 21%;
}
.grn-details-container {
  position: absolute;
  top: 65px;
  overflow: auto;
  max-height: 86vh;
}
.grn-doc-container {
  height: 41vh;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 5px;
  background: #f7faff;
}
.grn-mat-details {
  height: 73vh;
  overflow-y: auto;
}

.grn-table-container {
  padding: 5px;
  margin: 5px 0 0 0%;
  overflow-y: auto;
  max-height: 53vh;
}

.grn-rolls-text-box-input {
  height: 24px;
  width: 100%;
  border: 1px solid rgb(201, 200, 200);
  border-radius: 5px;
  text-align: center;
  font-size: 0.625rem;
  font-weight: bold;
}

.grn-material-list {
  max-height: 40vh;
  overflow-x: auto;
}

.grn-lot-spec-image-holder {
  align-items: center;
  display: flex;
  width: 100%;
  text-align: center;
  height: 100px;
}

.grn-lot-image {
  height: 50px;
  width: 50px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.grn-lot-file-embed {
  height: 50px;
  width: 50px;
  margin: 5px;
  border-radius: 8px;
  border: 1px solid #3e5888;
}

.grn-lot-image-lbl {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.grn-lot-img-name {
  padding: 0px;
  margin: 0px;
  cursor: pointer;
}

.order-modal-body {
  padding: 12px;
  overflow-y: auto;
}

.order-modal-item {
  padding: 8px;
  border-radius: 8px;
  background: #f9fafb;
  margin-bottom: 6px;
  display: flex;
  font-size: 12px;
  gap: 6px;
  align-items: center;
}

.mat-grn-table {
  overflow-x: auto;
  width: 100%;
  max-height: 95%;
}

.grn-panel-header {
  background: linear-gradient(90deg, #1c2e52 0%, #2a4070 100%);
  border-radius: 10px 10px 0px 0px;
  padding: 5px 10px 5px 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 3px solid rgba(255, 255, 255, 0.08);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  gap: 2px;
  z-index: 900;
}

.grn-panel-header .panel-title {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0;
}

/* =====================================================================
   GrnDetails.css  -  GRN details tab (all classes prefixed `grx-`)
   Modern, soft-card UI. Import once:  import "./GrnDetails.css";
   ===================================================================== */

.grx-page {
  --grx-ink: #0f172a;
  --grx-ink-2: #334155;
  --grx-muted: #64748b;
  --grx-faint: #94a3b8;
  --grx-line: #e6eaf1;
  --grx-line-2: #eef1f6;
  --grx-field: #f6f8fb;
  --grx-surface: #ffffff;
  --grx-brand: #0f3460;
  --grx-brand-soft: #eaf0fa;
  --grx-brand-ring: rgba(15, 52, 96, 0.14);
  --grx-danger: #e11d48;
  --grx-radius: 16px;
  --grx-radius-md: 12px;
  --grx-radius-sm: 10px;
  --grx-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px -14px rgba(15, 23, 42, 0.16);
  --grx-h: 36px;

  width: 100%;
  color: var(--grx-ink);
}

.grx-layout {
  margin: 0 !important;
  row-gap: 8px;
}

.grx-side-col,
.grx-main-col {
  min-width: 0;
}

/* ===================================================================
   LEFT PANEL
   =================================================================== */
.grx-side {
  margin-top: 8px;
  background: var(--grx-surface);
  border: 1px solid var(--grx-line);
  border-radius: var(--grx-radius);
  box-shadow: var(--grx-shadow);
  overflow: hidden;
}

.grx-side__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #0f3460 0%, #1d4f8f 100%);
  border-bottom: 0;
}

.grx-side__status {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

.grx-side__action {
  flex: 0 0 auto;
}

.grx-side__body {
  container-type: inline-size;
  container-name: grx-side;
  height: 69vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px 14px 18px;
  scrollbar-width: thin;
  scrollbar-color: #0f3460 transparent;
}

.grx-side__body::-webkit-scrollbar {
  width: 6px;
}
.grx-side__body::-webkit-scrollbar-thumb {
  background: #cfd6e2;
  border-radius: 6px;
}

/* ---------- field grid (sized by the panel itself) ---------- */
.grx-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 12px 10px;
  gap: 12px 10px;
  align-items: start;
}

@container grx-side (max-width: 219px) {
  .grx-fields {
    grid-template-columns: 1fr;
  }
}

@container grx-side (min-width: 720px) {
  .grx-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 16px;
  }
}

.grx-field {
  min-width: 0;
}

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

/* ---------- group titles ---------- */
.grx-group-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grx-brand);
  background: linear-gradient(90deg, #e3ecf9 0%, #f3f7fc 100%);
  border-left: 3px solid var(--grx-brand);
  border-radius: 8px;
}

.grx-group-title:first-child {
  margin-top: 12px;
}

/* ---------- labels ---------- */
.grx-field__inner {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.grx-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--grx-ink-2);
  white-space: nowrap;
}

.grx-field__inner > .grx-label {
  margin-bottom: 0;
}

.grx-required {
  font-size: 7px;
  color: var(--grx-danger);
  margin-left: 1px;
}

.grx-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---------- upload dropzones ---------- */
.grx-upload {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 92px;
  padding: 8px;
  text-align: center;
  background: var(--grx-field);
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--grx-radius-md);
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.grx-upload:hover {
  border-color: var(--grx-brand);
  background: var(--grx-brand-soft);
}

.grx-upload--disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.grx-upload__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.grx-upload__icon {
  box-sizing: content-box;
  padding: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  color: var(--grx-brand) !important;
}

.grx-upload__text {
  padding: 6px 4px 0;
  font-size: 11px;
  line-height: 1.3;
  color: var(--grx-muted);
}

.grx-upload__trigger {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.grx-upload__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.grx-upload__img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
}

.grx-upload__fileicon {
  color: var(--grx-brand);
  cursor: pointer;
}

.grx-upload__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  color: var(--grx-danger);
  background: #fff;
  border: 1px solid var(--grx-line);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    background 0.12s ease;
}

.grx-upload__remove:hover {
  transform: scale(1.08);
  background: #fff1f3;
}

/* ---------- documents ---------- */
.grx-docs {
  background: var(--grx-surface);
  border: 1px solid var(--grx-line);
  border-radius: var(--grx-radius-md);
  overflow: hidden;
}

.grx-docs__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: linear-gradient(135deg, #e3ecf9 0%, #f3f7fc 100%);
  border-bottom: 1px solid var(--grx-line);
}

.grx-docs__head .grx-label {
  margin: 0;
}

.grx-docs__add {
  margin: 0;
}

.grx-docs__body {
  overflow-x: auto;
  max-width: 100%;
}

.grx-docs__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* ===================================================================
   RIGHT PANEL
   =================================================================== */
.grx-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 76.5vh;
  margin-top: 8px;
  padding: 4px 16px 16px;
  background: var(--grx-surface);
  border: 1px solid var(--grx-line);
  border-radius: var(--grx-radius);
  box-shadow: var(--grx-shadow);
}

.grx-section {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  height: 100%;
}

.grx-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
}

.grx-materials {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

/* ---------- table ---------- */
.grx-table-wrap {
  width: 100%;
  max-height: calc(78.5vh - 130px);
  overflow: auto;
  background: var(--grx-surface);
  border: 1px solid var(--grx-line);
  border-radius: var(--grx-radius-md);
  scrollbar-width: thin;
  scrollbar-color: #0f3460 transparent;
  -webkit-overflow-scrolling: touch;
}

.grx-table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.grx-table-wrap::-webkit-scrollbar-thumb {
  background: #cfd6e2;
  border-radius: 8px;
}

.grx-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  color: var(--grx-ink);
}

.grx-th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 12px;
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #ffffff;
  background: #0f3460;
  border-bottom: 2px solid #1d4f8f;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.grx-th.gr-img,
.grx-td.grx-td--image {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  box-sizing: border-box;
}

.grx-td.grx-td--image img {
  width: 100px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.grx-th--compact {
  padding: 6px 8px;
  text-transform: none;
  letter-spacing: 0;
}

.grx-th--wrap {
  white-space: normal;
}

.grx-th--action {
  width: 40px;
}

.grx-td {
  padding: 10px 12px;
  vertical-align: middle;
  color: var(--grx-ink);
  background: var(--grx-surface);
  border-bottom: 1px solid #d9e0ec;
  font-size: 10px;
  font-weight: 500;
  border-right: 1px solid #e3e8f1;
  transition: background 0.12s ease;
}

.grx-table .grx-th:last-child,
.grx-table .grx-td:last-child {
  border-right: 0;
}

.grx-table tbody .grx-tr:last-child .grx-td {
  border-bottom: 0;
}

/* subtle zebra striping + clear hover */
.grx-table tbody .grx-tr:nth-child(even) > .grx-td {
  background: #f9fbfd;
}

.grx-table tbody .grx-tr:hover > .grx-td {
  background: #eaf0fa;
}

.grx-tr--alt > .grx-td {
  background: var(--grx-surface);
}

/* sticky first column (Code) so it stays visible on horizontal scroll */
.grx-table thead .grx-th:first-child {
  left: 0;
  z-index: 4;
}

.grx-table .grx-td--code {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 96px;
  font-weight: 700;
  color: var(--grx-brand);
  box-shadow: 2px 0 4px -2px rgba(15, 23, 42, 0.12);
}

.grx-td--image {
  width: 64px;
  min-width: 64px;
}

.grx-td--image img {
  display: block;
  max-width: 52px;
  max-height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--grx-line);
}

.grx-td--fabric {
  min-width: 150px;
  max-width: 220px;
}

.grx-td--desc {
  min-width: 180px;
  max-width: 260px;
  line-height: 1.45;
  color: var(--grx-ink-2);
  word-break: break-word;
}

.grx-td--color {
  min-width: 80px;
  max-width: 140px;
  word-break: break-word;
}

.grx-td--num {
  text-align: right;
  white-space: nowrap;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.grx-td--negative {
  color: var(--grx-danger);
  font-weight: 700;
}

.grx-td--center {
  text-align: center;
}

.grx-td--check,
.grx-td--details {
  white-space: nowrap;
}

.grx-td--qty-input {
  width: 100px;
  min-width: 90px;
}

.grx-td--supqty {
  width: 118px;
  min-width: 104px;
}

/* ---------- comments ---------- */
.grx-comments__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.grx-comments__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--grx-ink);
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1399px) {
  .grx-table-wrap {
    max-height: calc(78.5vh - 120px);
  }
}

@media (max-width: 1199px) {
  .grx-th,
  .grx-td {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Tablets: left panel stacks above the table */
@media (max-width: 991px) {
  .grx-side__body {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .grx-main {
    min-height: auto;
  }

  .grx-table-wrap {
    max-height: 70vh;
  }
}

/* Phones */
@media (max-width: 767px) {
  .grx-side__body {
    padding: 4px 12px 16px;
  }

  .grx-main {
    padding: 4px 10px 12px;
    border-radius: 14px;
  }

  .grx-table {
    font-size: 12px;
  }

  .grx-upload {
    min-height: 84px;
  }
}

@media (max-width: 480px) {
  .grx-th {
    font-size: 10px;
    padding: 9px 8px;
  }
  .grx-td {
    padding: 8px;
  }
}

@media print {
  .grx-side__body,
  .grx-table-wrap {
    height: auto;
    max-height: none;
    overflow: visible;
  }
}

.wareHouse-qr-Code-container {
  display: grid;
  justify-content: center;
  align-items: center;
  justify-items: center;
  align-content: space-around;
}

.warehouse-sub-input-container {
  display: grid;
  grid-template-columns: 1fr 0.5fr;
  padding: 0 0 0 10px;
}
.common-qr {
  white-space: nowrap;
}

/* ==========================================================================
   TrimsDetails – scoped styles (all selectors prefixed with `trims-`)
   Matches the existing ERP theme: navy header (#1c2f5e), accent (#0f3460).
   ========================================================================== */

:root {
  --trims-navy: #1c2f5e;
  --trims-accent: #0f3460;
  --trims-accent-soft: #eaf1fb;
  --trims-border: #dbe3ef;
  --trims-surface: #ffffff;
  --trims-surface-alt: #f6f8fc;
  --trims-row-even: #f8fafd;
  --trims-row-hover: #eaf1fb;
  --trims-text: #1f2937;
  --trims-muted: #6b7280;
  --trims-radius: 10px;
}

/* ---------- Summary strip (read-only figures at the top of the drawer) ---------- */
.trims-summary {
  padding: 14px 14px 8px;
  margin-bottom: 4px;
  border: 1px solid #dbe3ef;
  border: 1px solid var(--trims-border);
  border-radius: 10px;
  border-radius: var(--trims-radius);
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f6f8fc 100%
  );
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    var(--trims-surface-alt) 100%
  );
  box-shadow: 0 1px 2px rgba(15, 52, 96, 0.06);
}

/* read-only figures look like values, not greyed-out dead inputs */
.trims-summary .ant-input[disabled],
.trims-summary .ant-input-disabled,
.trims-summary textarea[disabled] {
  background: #f1f5fb;
  color: #1f2937;
  color: var(--trims-text);
  font-weight: 600;
  border-color: #e3e9f3;
  cursor: default;
}

/* ---------- Bundles (collapse) ---------- */
.trims-bundles {
  margin: 14px 0 0;
}

.trims-bundles .ant-collapse {
  border-radius: 10px;
  border-radius: var(--trims-radius);
  overflow: hidden;
}

.trims-bundles .ant-collapse-content > .ant-collapse-content-box {
  padding: 14px !important;
  background: #ffffff;
  background: var(--trims-surface);
}

/* ---------- Lot toolbar (count / qty / add / bulk status) ---------- */
.trims-lot-toolbar {
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid #dbe3ef;
  border: 1px solid var(--trims-border);
  border-radius: 10px;
  border-radius: var(--trims-radius);
  background: #f6f8fc;
  background: var(--trims-surface-alt);
}

/* ---------- Bulk print strip ---------- */
.trims-bulk-print {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 12px 0 10px;
  padding: 8px 12px;
  border: 1px dashed #dbe3ef;
  border: 1px dashed var(--trims-border);
  border-radius: 10px;
  border-radius: var(--trims-radius);
  background: #fbfcfe;
  font-size: 12px;
}

.trims-bulk-print-label {
  font-weight: 700;
  color: #1c2f5e;
  color: var(--trims-navy);
}

.trims-chip-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 12px;
  border-radius: 999px;
  background: #eaf1fb;
  background: var(--trims-accent-soft);
  border: 1px solid #d3e1f5;
}

.trims-chip-caption {
  font-weight: 600;
  color: #0f3460;
  color: var(--trims-accent);
  margin-right: 2px;
}

.trims-chip-tag {
  color: #6b7280;
  color: var(--trims-muted);
  font-size: 11px;
  font-weight: 600;
}

/* ---------- Table ---------- */
.trims-table-wrap {
  max-height: 60vh;
  overflow: auto;
  border: 1px solid #dbe3ef;
  border: 1px solid var(--trims-border);
  border-radius: 10px;
  border-radius: var(--trims-radius);
  background: #ffffff;
  background: var(--trims-surface);
  contain: content;
}

.trims-table {
  width: -webkit-max-content;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  color: #1f2937;
  color: var(--trims-text);
}

/* Header: dark navy with white text. The selectors are deliberately
   specific so they beat `.common-table-th` / `.grn-table-container th`
   from Grn.css (that is what made the header text invisible before). */
.trims-table.grn-table-container thead tr th,
.trims-table.grn-table-container thead tr th.common-table-th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 10px 10px;
  text-align: left;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: #1c2f5e;
  background: var(--trims-navy);
  border: 0;
  border-bottom: 2px solid #12224a;
  box-shadow: none;
}

.trims-table.grn-table-container thead tr th:first-child {
  border-top-left-radius: 0;
}

.trims-table.grn-table-container tbody tr td,
.trims-table.grn-table-container tbody tr td.common-table-td,
.trims-table.grn-table-container tbody tr td.common-table-sn-td {
  padding: 6px 8px;
  vertical-align: middle;
  color: #1f2937;
  color: var(--trims-text);
  background: #ffffff;
  background: var(--trims-surface);
  border: 0;
  border-bottom: 1px solid #e9eef6;
}

.trims-table.grn-table-container tbody tr.trims-row-even td {
  background: #f8fafd;
  background: var(--trims-row-even);
}

.trims-table.grn-table-container tbody tr:hover td {
  background: #eaf1fb;
  background: var(--trims-row-hover);
}

.trims-table.grn-table-container tbody tr.trims-row-inactive td {
  color: #6b7280;
  color: var(--trims-muted);
}

.trims-sn {
  width: 48px;
  text-align: center !important;
  color: #6b7280 !important;
  color: var(--trims-muted) !important;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.trims-cell-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.trims-cell-trims {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

/* ---------- Radio (storage type) – single compact line ---------- */
.trims-table .ant-radio-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  white-space: nowrap;
}

.trims-table .ant-radio-wrapper {
  margin: 0;
  font-size: 12px;
}

/* ---------- Tags ---------- */
.trims-table .ant-tag {
  margin: 0;
  border-radius: 999px;
  padding: 0 10px;
  font-weight: 600;
}

/* Lightweight replacement for <Disable/> on every cell:
   same visual (0.7 opacity) and blocks interaction, with zero extra React work */
.trims-muted {
  opacity: 0.7;
  pointer-events: none;
  -webkit-user-select: none;
          user-select: none;
}

/* ---------- Pagination footer ---------- */
.trims-pagination {
  display: flex;
  justify-content: flex-end;
  padding: 12px 4px 2px;
}

/* ---------- Split drawer ---------- */
.trims-split-table {
  width: 100%;
  margin-top: 6px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #dbe3ef;
  border: 1px solid var(--trims-border);
  border-radius: 10px;
  border-radius: var(--trims-radius);
  overflow: hidden;
}

.trims-split-table th {
  padding: 8px 10px;
  text-align: left;
  color: #fff;
  background: #1c2f5e;
  background: var(--trims-navy);
}

.trims-split-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #e9eef6;
  vertical-align: middle;
}

/* ---------- Offscreen label printer host ---------- */
.trims-offscreen {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

@media (max-width: 768px) {
  .trims-table-wrap {
    max-height: 55vh;
  }
  .trims-cell-trims {
    max-width: 160px;
  }
}

/* Header */
.trims-table.grn-table-container thead tr th,
.trims-table.grn-table-container thead tr th.common-table-th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 10px 10px;
  text-align: left;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: #1c2f5e;
  background: var(--trims-navy);
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.14); /* soft column divider */
  border-bottom: 2px solid #12224a;
  box-shadow: none;
}

.trims-table.grn-table-container thead tr th:last-child {
  border-right: 0;
}

/* Body: light grid (horizontal + vertical) */
.trims-table.grn-table-container tbody tr td,
.trims-table.grn-table-container tbody tr td.common-table-td,
.trims-table.grn-table-container tbody tr td.common-table-sn-td {
  padding: 6px 8px;
  vertical-align: middle;
  color: #1f2937;
  color: var(--trims-text);
  background: #ffffff;
  background: var(--trims-surface);
  border: 0;
  border-right: 1px solid var(--trims-grid);
  border-bottom: 1px solid var(--trims-grid);
}

.trims-table.grn-table-container tbody tr td:last-child {
  border-right: 0;
}

.trims-table.grn-table-container tbody tr:last-child td {
  border-bottom: 0;
}
/* Styles for the lightweight native cells used inside PacketRow */

.trims-table .trims-cell-input {
  width: 100%;
  min-width: 120px;
  height: 30px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  color: #1f2937;
  color: var(--trims-text, #1f2937);
  background: #fff;
  border: 1px solid #d5deeb;
  border-radius: 6px;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.trims-table .trims-cell-input::placeholder {
  font-weight: 400;
  color: #a3acb9;
}
.trims-table .trims-cell-input:hover {
  border-color: #9db4d6;
}
.trims-table .trims-cell-input:focus {
  border-color: #0f3460;
  border-color: var(--trims-accent, #0f3460);
  box-shadow: 0 0 0 2px rgba(15, 52, 96, 0.12);
}
.trims-table .trims-cell-input:disabled,
.trims-table .trims-cell-input[readonly] {
  background: #f1f4f9;
  color: #475569;
  border-color: #e3e9f3;
  cursor: not-allowed;
}
.trims-table input[name="trims_qty"],
.trims-table input[name="trims_secondary_qty"] {
  min-width: 110px;
  text-align: right;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* native select */
.trims-native-select {
  width: 100%;
  min-width: 150px;
  height: 30px;
  padding: 0 8px;
  font-size: 11px;
  color: #1f2937;
  color: var(--trims-text, #1f2937);
  background: #fff;
  border: 1px solid #d5deeb;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}
.trims-native-select:focus {
  border-color: #0f3460;
  border-color: var(--trims-accent, #0f3460);
  box-shadow: 0 0 0 2px rgba(15, 52, 96, 0.12);
}
.trims-native-select:disabled {
  background: #f1f4f9;
  cursor: not-allowed;
}

/* storage type radios */
.trims-radio-group {
  display: flex;
  gap: 12px;
  white-space: nowrap;
}
.trims-radio {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  cursor: pointer;
}
.trims-radio input,
.trims-checkbox {
  accent-color: #0f3460;
  accent-color: var(--trims-accent, #0f3460);
  cursor: pointer;
}

/* icon buttons (print / split / history / delete) */
.trims-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  color: #0f3460;
  color: var(--trims-accent, #0f3460);
  background: #fff;
  border: 1px solid #d5deeb;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.trims-icon-btn:hover:not(:disabled) {
  background: #eaf1fb;
  background: var(--trims-accent-soft, #eaf1fb);
  border-color: #0f3460;
  border-color: var(--trims-accent, #0f3460);
}
.trims-icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.trims-icon-btn--danger {
  color: #c62828;
}
.trims-icon-btn--danger:hover:not(:disabled) {
  background: #fdecec;
  border-color: #c62828;
}
.trims-icon-btn-plus {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* status pills */
.trims-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
}
.trims-pill--active {
  color: #1b7a3a;
  background: #e8f6ed;
  border-color: #bfe5cb;
}
.trims-pill--inactive {
  color: #b42318;
  background: #fdecea;
  border-color: #f5c2bd;
}

/* progressive-render indicator row */
.trims-loading-row {
  padding: 10px !important;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  color: var(--trims-muted, #6b7280);
  background: #fbfcfe !important;
}

/* ItemSelectModal.css */
.item-select-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 8px 0 16px;
}

.item-select-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

/* Bigger cascader popup */
.item-select-cascader-popup .ant-cascader-menu {
  min-width: 220px;
  max-width: 320px;
  height: 300px; /* taller columns */
  overflow-y: auto;
}

.item-select-cascader-popup .ant-cascader-menu-item {
  padding: 10px 14px;
  white-space: normal; /* long names wrap instead of getting cut */
  line-height: 1.4;
}

/* Bigger color dropdown */
.item-select-color-popup .ant-select-item {
  padding: 10px 14px;
  min-height: 40px;
}

/* Make sure dropdowns sit above the modal */
.item-select-cascader-popup,
.item-select-color-popup {
  z-index: 2000 !important;
}

.owv-wrap {
  --owv-navy: #10335f;
  --owv-pass: #52c41a;
  --owv-rework: #faad14;
  --owv-reject: #ff4d4f;
  --owv-waiting: #13c2c2;
  --owv-border: #e8ecf2;
  --owv-border-soft: #eef0f3;
  --owv-text: #1f2937;
  --owv-sub: #667085;
  --owv-muted: #98a2b3;
  --owv-bg: #f6f8fb;
  --owv-radius: 12px;
  font-size: 12px;
  color: var(--owv-text);
}

/* ---------- summary KPI cards ---------- */

.owv-kpi {
  position: relative;
  height: 100%;
  padding: 10px 12px 8px;
  background: #fff;
  border: 1px solid var(--owv-border);
  border-top: 3px solid var(--c);
  border-radius: var(--owv-radius);
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.04);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
  cursor: default;
}
.owv-kpi:hover {
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}
.owv-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.owv-kpi-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--owv-sub);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.owv-kpi-value {
  margin-top: 2px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--c);
}
.owv-kpi-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c) 12%, #fff);
}
.owv-kpi-rate {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.owv-kpi-rate .ant-progress {
  flex: 1 1;
  margin: 0;
  line-height: 1;
}
.owv-kpi-rate-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--c);
  min-width: 38px;
  text-align: right;
}
.owv-kpi-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
}

/* ---------- toolbar ---------- */

.owv-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 10px;
}
.owv-toolbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--owv-text);
}
.owv-toolbar-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--owv-navy);
}
.owv-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- order collapse ---------- */

.owv-wrap .owv-collapse {
  background: transparent;
  border: 0;
}
.owv-wrap .owv-collapse > .ant-collapse-item {
  background: #fff;
  border: 1px solid var(--owv-border) !important;
  border-radius: var(--owv-radius) !important;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(16, 51, 95, 0.05);
}
.owv-wrap .owv-collapse > .ant-collapse-item > .ant-collapse-header {
  padding: 12px 16px;
  align-items: center;
  background: linear-gradient(90deg, #eef4ff 0%, #ffffff 75%);
  border-left: 4px solid var(--owv-navy);
}
.owv-wrap .owv-collapse > .ant-collapse-item > .ant-collapse-content {
  border-top: 1px solid var(--owv-border);
}
.owv-wrap
  .owv-collapse
  > .ant-collapse-item
  > .ant-collapse-content
  > .ant-collapse-content-box {
  padding: 14px;
  background: var(--owv-bg);
}

.owv-order-head {
  width: 100%;
}
.owv-order-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.owv-order-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.owv-order-no {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  color: var(--owv-navy);
}
.owv-order-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.owv-order-bar {
  margin-top: 10px;
  max-width: 560px;
}

/* ---------- style block ---------- */

.owv-style {
  background: #fff;
  border: 1px solid var(--owv-border);
  border-radius: var(--owv-radius);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}
.owv-style:last-child {
  margin-bottom: 0;
}
.owv-style-top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.owv-img {
  width: 108px;
  height: 108px;
  flex: 0 0 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--owv-border);
  border-radius: 12px;
  background: var(--owv-bg);
}
.owv-img .ant-image {
  display: flex;
  align-items: center;
  justify-content: center;
}
.owv-style-info {
  flex: 1 1 300px;
  min-width: 0;
}
.owv-style-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.owv-style-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--owv-text);
  word-break: break-word;
}
.owv-style-code {
  padding: 1px 8px;
  border-radius: 6px;
  background: #eef4ff;
  color: var(--owv-navy);
  font-size: 11px;
  font-weight: 600;
}

.owv-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-gap: 8px 18px;
  gap: 8px 18px;
  padding: 8px 12px;
  background: var(--owv-bg);
  border: 1px solid var(--owv-border-soft);
  border-radius: 10px;
}
.owv-label {
  margin-bottom: 1px;
  font-size: 10px;
  font-weight: 500;
  color: var(--owv-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.owv-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--owv-text);
  word-break: break-word;
}

/* buyer strip - sits below the style details */
.owv-buyer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 7px 12px;
  background: #fff8e6;
  border: 1px solid #ffe7ba;
  border-left: 3px solid var(--owv-rework);
  border-radius: 10px;
}
.owv-buyer-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: #d48806;
}
.owv-buyer .owv-label {
  color: #ad6800;
  margin: 0;
}
.owv-buyer .owv-value {
  font-size: 13px;
  font-weight: 700;
}

.owv-style-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.owv-style-bar {
  margin-top: 10px;
}
.owv-style-table {
  margin-top: 14px;
}

/* ---------- outcome bar ---------- */

.owv-bar {
  display: flex;
  width: 100%;
  overflow: hidden;
  background: #f0f0f0;
}
.owv-bar-seg {
  height: 100%;
  transition: width 0.3s ease;
}

/* ---------- metric chip ---------- */

.owv-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--c) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 22%, #fff);
  cursor: default;
}
.owv-chip-label {
  font-size: 11px;
  color: var(--owv-sub);
}
.owv-chip-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--c);
}

/* ---------- count pill in table ---------- */

.owv-count {
  display: inline-block;
  min-width: 32px;
  padding: 1px 9px;
  border-radius: 10px;
  font-weight: 600;
  cursor: default;
  background: color-mix(in srgb, var(--c) 11%, #fff);
  color: var(--c);
}
.owv-count.is-zero {
  background: transparent;
  color: #d0d5dd;
}

/* ---------- tooltip body ---------- */

.owv-tip {
  min-width: 150px;
}
.owv-tip-title {
  font-weight: 600;
  margin-bottom: 2px;
}
.owv-tip-desc {
  font-size: 11px;
  opacity: 0.85;
  margin-bottom: 3px;
}
.owv-tip-line {
  font-size: 12px;
}
.owv-tip-pct {
  font-size: 11px;
  opacity: 0.85;
}

/* ---------- table ---------- */

.owv-wrap .ant-table-wrapper .ant-table {
  border-radius: 10px;
  overflow: hidden;
}
.owv-wrap .ant-table-thead > tr > th {
  background: #f1f4f9 !important;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 8px !important;
  text-align: center !important;
}
.owv-wrap .ant-table-tbody > tr > td {
  padding: 7px 8px !important;
  font-size: 12px;
}
.owv-wrap .ant-table-tbody > tr:hover > td {
  background: #f8faff !important;
}
.owv-wrap .ant-table-tbody > tr.color-start > td {
  border-top: 2px solid #9da9bb !important;
}
.owv-wrap .ant-table-summary td {
  background: #e9f1ff !important;
  font-weight: 700;
  color: var(--owv-navy);
  padding: 8px !important;
}

.owv-color-cell-name {
  font-weight: 700;
  color: var(--owv-text);
}
.owv-color-cell-sub {
  font-size: 10px;
  color: var(--owv-muted);
}

.owv-rate {
  min-width: 70px;
}
.owv-rate-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--c);
}
.owv-rate .ant-progress {
  margin: 0;
  line-height: 1;
}

/* ---------- empty ---------- */

.owv-empty {
  margin-top: 8px;
  border-radius: var(--owv-radius);
}
.owv-empty .ant-empty {
  margin: 40px 0;
}

/* ---------- responsive ---------- */

@media (max-width: 768px) {
  .owv-img {
    width: 84px;
    height: 84px;
    flex-basis: 84px;
  }
  .owv-order-chips {
    width: 100%;
  }
  .owv-wrap .owv-collapse > .ant-collapse-item > .ant-collapse-header {
    padding: 10px 12px;
  }
}

/* ---------- frozen header + total row ---------- */
.owv-wrap .ant-table-thead > tr > th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 3;
}
.owv-wrap .ant-table-header {
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.06);
  position: relative;
  z-index: 3;
}
.owv-wrap .ant-table-summary {
  box-shadow: 0 -2px 6px rgba(16, 24, 40, 0.08);
}
.owv-wrap .ant-table-summary td {
  border-top: 2px solid #9da9bb !important;
}
.owv-wrap .ant-table-body {
  scrollbar-width: thin;
  scrollbar-color: #cfd6e2 transparent;
}

.qcx-muted {
  color: #98a2b3;
  font-size: 12px;
}

/* ---------- main screen ---------- */
.qcx-tabs {
  margin-top: 8px;
}
.qcx-tabs .ant-tabs-nav {
  margin-bottom: 8px;
}
.qcx-panel {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 8px;
  padding: 10px 12px;
}
.qcx-style {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.qcx-style-img {
  width: 72px;
  display: flex;
  justify-content: center;
}
.qcx-style-info {
  min-width: 220px;
  flex: 1 1;
}
.qcx-style-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.qcx-style-switch {
  margin-bottom: 8px;
}
.qcx-color-name {
  font-weight: 700;
  color: #101828;
}
.qcx-color-start > td {
  border-top: 2px solid #d0d5dd !important;
}

/* ---------- tables ---------- */
.qcx-table .ant-table {
  font-size: 12px;
  background: transparent;
}
.qcx-table .ant-table-thead > tr > th {
  background: #f2f4f7 !important;
  color: #475467;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 8px;
  white-space: nowrap;
}
.qcx-table .ant-table-tbody > tr > td {
  padding: 6px 8px;
}
.qcx-table .ant-table-tbody > tr:hover > td {
  background: #f5faff !important;
}

/* ---------- single drawer: info bar + parts rail + detail pane ---------- */
.qcx-d {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  min-height: 420px;
}
.qcx-d-info {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #f9fafb;
  border: 1px solid #eaecf0;
  border-radius: 8px;
  font-size: 12px;
  color: #667085;
  margin-bottom: 10px;
}
.qcx-d-info b {
  color: #101828;
  margin-left: 3px;
}
.qcx-d-body {
  flex: 1 1;
  min-height: 0;
  display: flex;
  gap: 12px;
}

.qcx-rail {
  width: 270px;
  flex: none;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qcx-rail-title {
  font-size: 12px;
  font-weight: 700;
  color: #344054;
}
.qcx-part {
  text-align: left;
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font: inherit;
}
.qcx-part:hover {
  border-color: #84adff;
}
.qcx-part.is-active {
  border-color: #2e6cf6;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2e6cf6 inset;
}
.qcx-part-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.qcx-part-nums {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 600;
}

.qcx-detail {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #eaecf0;
  border-radius: 8px;
  background: #fff;
}
.qcx-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #eaecf0;
  flex-wrap: wrap;
}
.qcx-detail-scroll {
  flex: 1 1;
  min-height: 0;
  overflow: auto;
}

/* defects + images */
.qcx-defects {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.qcx-defect {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.qcx-imgs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.qcx-imgs .ant-image-img {
  border: 1px solid #eaecf0;
}

/* back button + header left side */
.qcx-detail-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qcx-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: #2e6cf6;
  border-color: #bfd7ff;
  background: #eff6ff;
}
.qcx-back:hover {
  color: #1f54c9 !important;
  border-color: #84adff !important;
}

.qcx-muted {
  color: #98a2b3;
  font-size: 12px;
}

.bsx {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* info bar */
.bsx-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 8px 12px;
  background: #f9fafb;
  border: 1px solid #eaecf0;
  border-radius: 8px;
  font-size: 12px;
  color: #667085;
}
.bsx-info b {
  color: #101828;
  margin-left: 3px;
}
.bsx-info-count {
  margin-left: auto;
}

/* filters */
.bsx-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 10px 12px;
  background: #fbfcfe;
  border: 1px solid #eaecf0;
  border-radius: 8px;
}
.bsx-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bsx-filter > label {
  font-size: 11px;
  font-weight: 700;
  color: #0f3460;
}
.bsx-filter-end {
  margin-left: auto;
}

/* legend */
.bsx-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 11px;
  text-transform: uppercase;
  color: #667085;
}
.bsx-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* tick / cross */
.bsx-mark {
  font-size: 17px;
  vertical-align: middle;
}
.bsx-mark.is-ok {
  color: #52c41a;
}
.bsx-mark.is-no {
  color: #ff4d4f;
}
.bsx-dash {
  color: #c0c6d0;
}
.bsx-hover {
  display: inline-block;
  padding: 2px 10px;
  cursor: help;
}

/* main table header */
.bsx-table .ant-table {
  font-size: 12px;
}
.bsx-table .ant-table-thead > tr > th {
  background: #eef1f8 !important;
  color: #0f3460;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  padding: 10px 8px;
}
.bsx-table .ant-table-thead > tr > th.bsx-group {
  background: #0f3460 !important;
  color: #fff;
}
.bsx-table .ant-table-tbody > tr > td {
  padding: 12px 8px;
}
.bsx-table .ant-table-thead > tr > th.bsx-group-start,
.bsx-table .ant-table-tbody > tr > td.bsx-group-start {
  border-left: 2px solid #0f3460 !important;
}

/* bundles done row */
.bsx-table .bsx-summary > td {
  background: #fafbfd;
  padding: 10px 8px;
}

/* bundle cell */
.bsx-bundle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #101828;
}
.bsx-caret {
  display: inline-flex;
  font-size: 11px;
  color: #0f3460;
}
.bsx-caret.is-disabled {
  visibility: hidden;
}
.bsx-pill {
  display: inline-block;
  min-width: 42px;
  padding: 2px 10px;
  border-radius: 10px;
  background: #eef1f8;
  color: #0f3460;
  font-weight: 700;
}
.bsx-ok-text {
  color: #52c41a;
}
.bsx-no-text {
  color: #ff4d4f;
}
.bsx-table .ant-table-tbody > tr.bsx-row-open > td {
  background: #eff6ff;
}

/* part name header + its count columns */
.bsx-table .ant-table-thead > tr > th.bsx-part-head {
  background: #dfe6f3 !important;
  font-size: 12px;
  padding: 7px 8px;
}
.bsx-table .ant-table-thead > tr > th {
  white-space: nowrap;
}
.bsx-table .bsx-summary > td.bsx-group-start {
  border-left: 2px solid #0f3460 !important;
}

/* collapsible pieces */
.bsx-table .ant-table-tbody > tr.ant-table-expanded-row > td {
  background: #f7f9fc !important;
  padding: 0;
}
.bsx-pieces {
  padding: 12px 16px 14px 40px;
  cursor: default;
}
.bsx-pieces-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0f3460;
}
.bsx-pieces-title span {
  font-weight: 400;
}
.bsx-pieces .bsx-sub-table .ant-table {
  margin: 0 !important;
}
.bsx-pieces .bsx-sub-table .ant-table-thead > tr > th {
  background: #e4e9f4 !important;
  color: #0f3460;
  padding: 7px 8px;
}
.bsx-pieces .bsx-sub-table .ant-table-tbody > tr > td {
  background: #fff;
  padding: 6px 8px;
}
.bsx-piece {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bsx-piece .ant-tag {
  margin: 0;
}
.bsx-piece-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.bsx-piece-actions .ant-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}
.bsx-defect-link {
  white-space: nowrap;
  color: #cf1322;
  font-size: 11px;
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}
.bsx-unchecked {
  color: #98a2b3;
  font-size: 11px;
}
.bsx-defect-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bsx-msg {
  padding: 10px;
  text-align: center;
}
.bsx-msg.is-error {
  color: #ff4d4f;
}

/* hover popover */
.bsx-pop {
  min-width: 190px;
  font-size: 12px;
}
.bsx-pop.is-wide {
  min-width: 240px;
  max-width: 360px;
  max-height: 300px;
  overflow: auto;
}
.bsx-line {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 2px 0;
}
.bsx-line.is-sub {
  padding-left: 12px;
  color: #667085;
}
/* defect images */
.qcx-defect {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.qcx-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qcx-imgs .ant-image-img {
  border: 1px solid #eaecf0;
}

/* history modal table */
.qcx-table .ant-table {
  font-size: 12px;
}
.qcx-table .ant-table-thead > tr > th {
  background: #f2f4f7 !important;
  font-size: 11px;
}
.qcx-muted {
  color: #98a2b3;
  font-size: 12px;
}

.bsx {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* info bar */
.bsx-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 8px 12px;
  background: #f9fafb;
  border: 1px solid #eaecf0;
  border-radius: 8px;
  font-size: 12px;
  color: #667085;
}
.bsx-info b {
  color: #101828;
  margin-left: 3px;
}
.bsx-info-count {
  margin-left: auto;
}

/* filters */
.bsx-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 10px 12px;
  background: #fbfcfe;
  border: 1px solid #eaecf0;
  border-radius: 8px;
}
.bsx-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bsx-filter > label {
  font-size: 11px;
  font-weight: 700;
  color: #0f3460;
}
.bsx-filter-end {
  margin-left: auto;
}

/* legend */
.bsx-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 11px;
  text-transform: uppercase;
  color: #667085;
}
.bsx-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* tick / cross */
.bsx-mark {
  font-size: 17px;
  vertical-align: middle;
}
.bsx-mark.is-ok {
  color: #52c41a;
}
.bsx-mark.is-no {
  color: #ff4d4f;
}
.bsx-dash {
  color: #c0c6d0;
}
.bsx-hover {
  display: inline-block;
  padding: 2px 10px;
  cursor: help;
}

/* main table header */
.bsx-table .ant-table {
  font-size: 12px;
}
.bsx-table .ant-table-thead > tr > th {
  background: #eef1f8 !important;
  color: #0f3460;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  padding: 10px 8px;
}
.bsx-table .ant-table-tbody > tr > td {
  padding: 12px 8px;
}
.bsx-table .ant-table-thead > tr > th.bsx-group-start,
.bsx-table .ant-table-tbody > tr > td.bsx-group-start {
  border-left: 2px solid #0f3460 !important;
}

/* bundle cell */
.bsx-bundle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #101828;
}
.bsx-caret {
  display: inline-flex;
  font-size: 11px;
  color: #0f3460;
}
.bsx-caret.is-disabled {
  visibility: hidden;
}
.bsx-ok-text {
  color: #52c41a;
}
.bsx-no-text {
  color: #ff4d4f;
}
.bsx-table .ant-table-tbody > tr.bsx-row-open > td {
  background: #eff6ff;
}

/* part name header */
.bsx-table .ant-table-thead > tr > th.bsx-part-head {
  background: #0f3460 !important;
  color: #fff;
  font-size: 12px;
  padding: 9px 8px;
}

/* count column headers */
.bsx-table .ant-table-thead > tr > th {
  white-space: nowrap;
}
/* collapsible pieces */
.bsx-table .ant-table-tbody > tr.ant-table-expanded-row > td {
  background: #f7f9fc !important;
  padding: 0;
}
.bsx-pieces {
  padding: 12px 16px 14px 40px;
  cursor: default;
}
.bsx-pieces-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0f3460;
}
.bsx-pieces-title span {
  font-weight: 400;
}
.bsx-pieces .bsx-sub-table .ant-table {
  margin: 0 !important;
}
.bsx-pieces .bsx-sub-table .ant-table-thead > tr > th {
  background: #e4e9f4 !important;
  color: #0f3460;
  padding: 7px 8px;
}
.bsx-pieces .bsx-sub-table .ant-table-tbody > tr > td {
  background: #fff;
  padding: 6px 8px;
}
.bsx-piece {
  display: flex;
  flex-wrap: wrap; /* long status text moves the buttons to a new line */
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
}
.bsx-piece .ant-tag {
  margin: 0;
}
.bsx-piece-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bsx-piece-actions .ant-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}
.bsx-defect-link {
  white-space: nowrap;
  color: #cf1322;
  font-size: 11px;
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}
.bsx-unchecked {
  color: #98a2b3;
  font-size: 11px;
}
.bsx-defect-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bsx-sub-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}
.bsx-msg {
  padding: 10px;
  text-align: center;
}
.bsx-msg.is-error {
  color: #ff4d4f;
}

/* hover popover */
.bsx-pop {
  min-width: 190px;
  font-size: 12px;
}
.bsx-pop.is-wide {
  min-width: 240px;
  max-width: 360px;
  max-height: 300px;
  overflow: auto;
}
.bsx-line {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 2px 0;
}
.bsx-line.is-sub {
  padding-left: 12px;
  color: #667085;
}
/* defect images */
.qcx-defect {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.qcx-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qcx-imgs .ant-image-img {
  border: 1px solid #eaecf0;
}

/* history modal table */
.qcx-table .ant-table {
  font-size: 12px;
}
.qcx-table .ant-table-thead > tr > th {
  background: #f2f4f7 !important;
  font-size: 11px;
}

.counts-table {
  margin-left: auto;
  margin-right: auto;
  padding: 10px;
}

.spec-alw .ant-checkbox-checked .ant-checkbox-inner {
  background-color: #518bd3;
  border-color: #ffffff;
}

.style-viewer__top {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.style-viewer__image {
  width: 140px;
  height: 140px;
  border-radius: 10px;
  background: #f8f8f8;
  border: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.style-viewer__placeholder {
  opacity: 0.5;
}

.style-viewer__title h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #222;
}

.style-viewer__title span {
  display: block;
  margin-top: 6px;
  color: #777;
  font-size: 15px;
}

.style-viewer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.style-viewer__card {
  padding: 16px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #ececec;
  transition: 0.2s ease;
  margin: 10px;
}

.style-viewer__card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.style-viewer__card-title {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.style-viewer__card-value {
  font-size: 12px;
  font-weight: 500;
  color: #222;
  word-break: break-word;
}

.qc-table-process {
  border-radius: 5px;
  margin-top: 10px;
}

.qc-text-input {
  border: 1px solid rgb(201, 200, 200);
  border-radius: 5px;
  height: 24px;
  font-size: 11px;
  width: 100%;
  text-align: center;
}

/* QcEdit.css - styles for the reworked Fabric QC edit page */

.qce-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 16px 80px;
}

/* ---------- Page header ---------- */
.qce-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(90deg, #ffffff 0%, #f3f7ff 100%);
  border-bottom: 1px solid #e6ecf5;
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.08);
}
.qce-header-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}
.qce-header-text {
  min-width: 0;
}
.qce-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #1f2d4d;
  line-height: 1.2;
}
.qce-header-title svg {
  color: #1677ff;
}
.qce-header-sub {
  max-width: 420px;
  font-size: 12px;
  color: #8c8c8c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qce-header-status {
  display: flex;
  align-items: center;
  align-self: flex-end;
}
.qce-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 768px) {
  .qce-header {
    padding: 8px 12px;
  }
  .qce-header-actions {
    width: 100%;
  }
  .qce-header-sub {
    max-width: 220px;
  }
  .qce-page {
    padding: 12px 10px 80px;
  }
}

/* ---------- Time / summary strip ---------- */
.qce-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}
@media (max-width: 992px) {
  .qce-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .qce-stats {
    grid-template-columns: 1fr;
  }
}

.qce-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-left-width: 4px;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.qce-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 18px;
}
.qce-stat-label {
  font-size: 12px;
  color: #8c8c8c;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.qce-stat-value {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  color: #262626;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.qce-stat-blue {
  border-left-color: #1677ff;
}
.qce-stat-blue .qce-stat-icon {
  background: #e6f4ff;
  color: #1677ff;
}
.qce-stat-orange {
  border-left-color: #fa8c16;
}
.qce-stat-orange .qce-stat-icon {
  background: #fff7e6;
  color: #fa8c16;
}
.qce-stat-green {
  border-left-color: #52c41a;
}
.qce-stat-green .qce-stat-icon {
  background: #f6ffed;
  color: #52c41a;
}
.qce-stat-red {
  border-left-color: #f5222d;
}
.qce-stat-red .qce-stat-icon {
  background: #fff1f0;
  color: #f5222d;
}

/* ---------- Section cards ---------- */
.qce-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  height: 100%;
}
.qce-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.qce-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #262626;
}
.qce-card-icon {
  display: inline-flex;
  align-items: center;
  color: #1677ff;
  font-size: 17px;
}
.qce-card-body {
  padding: 16px;
}

/* ---------- Form bits ---------- */
.qce-lbl {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #595959;
}
.qce-lbl-action {
  display: inline-flex;
  align-items: center;
}
.qce-row-gap {
  margin-top: 12px;
}
.qce-sub-title {
  margin: 4px 0 10px;
  padding-left: 8px;
  border-left: 3px solid #1677ff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #8c8c8c;
}
.qce-sub-title:not(:first-child) {
  margin-top: 18px;
}

/* ---------- Tables ---------- */
.qce-sn {
  font-weight: 600;
  color: #8c8c8c;
}
.qce-muted {
  color: #bfbfbf;
}
.qce-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qce-card .ant-table-thead > tr > th {
  background: #fafafa;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.qce-summary td {
  background: #fafafa;
  font-weight: 600;
}

/* ---------- Compact time pills (inside Roll Info header) ---------- */
.qce-time-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.qce-time-pills .qce-stat {
  gap: 8px;
  padding: 4px 12px 4px 8px;
  border-left-width: 1px;
  border-radius: 999px;
  box-shadow: none;
}
.qce-time-pills .qce-stat-icon {
  width: 26px;
  height: 26px;
  font-size: 14px;
}
.qce-time-pills .qce-stat-label {
  font-size: 10px;
  line-height: 1;
}
.qce-time-pills .qce-stat-value {
  font-size: 14px;
  line-height: 1.2;
}

/* ---------- Table header colors ---------- */
.qce-table .ant-table-thead > tr > th {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-color: rgba(255, 255, 255, 0.18) !important;
}
.qce-table .ant-table-thead > tr > th::before {
  display: none !important;
}
.qce-table-defect .ant-table-thead > tr > th {
  background: linear-gradient(180deg, #0f3460 0%, #19549c 100%) !important;
}
.qce-table-width .ant-table-thead > tr > th {
  background: linear-gradient(180deg, #0f3460 0%, #19549c 100%) !important;
}
.qce-table .ant-table-tbody > tr.qce-row-alt > td {
  background: #f7f9ff;
}
.qce-table .ant-table-tbody > tr:hover > td {
  background: #eef3ff !important;
}
.qce-table .ant-table-tbody > tr > td {
  padding: 8px;
}
.qce-table .ant-input,
.qce-table .ant-select {
  width: 100%;
}
.qce-summary td {
  background: #f0f5ff !important;
  color: #1d39c4;
}

/* Cut Plan Configuration
   Layout and spacing only. Control heights are left to antd so
   Select, InputNumber and Button all line up on their own. */

.cpc {
  --cpc-line: #e4e7eb;
  --cpc-soft: #f7f8fa;
  --cpc-muted: #6b7480;
  --cpc-accent: #2f6fd6;

  padding: 0 16px 16px;
}

/* ---------- tabs header ---------- */

.cpc-tabs > .ant-tabs-nav {
  margin-bottom: 12px;
}

.cpc-tab-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cpc-actions {
  display: flex;
  gap: 8px;
}

/* ---------- panels ---------- */

.cpc-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cpc-panel {
  max-width: 900px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--cpc-line);
  border-left: 3px solid var(--cpc-accent);
  border-radius: 4px;
}

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

.cpc-panel-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.cpc-panel-note {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--cpc-muted);
}

.cpc-empty {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--cpc-muted);
  background: var(--cpc-soft);
  border-radius: 4px;
}

/* ---------- fields ---------- */

.cpc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-gap: 12px 16px;
  gap: 12px 16px;
}

.cpc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cpc-label {
  font-size: 12px;
  color: var(--cpc-muted);
}

/* Controls fill their cell width — width only, never height */
.cpc .ant-select,
.cpc .ant-input-number,
.cpc .ant-input-number-group-wrapper {
  width: 100%;
}

.cpc .cpc-addon-select {
  width: 110px;
}

/* ---------- approval levels ---------- */

.cpc-levels {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cpc-level {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cpc-level-no {
  flex-shrink: 0;
  width: 56px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cpc-accent);
}

.cpc .cpc-level-select {
  flex: 1 1;
  min-width: 0;
}

/* ---------- tables ---------- */

.cpc-table-wrap {
  overflow-x: auto;
}

.cpc-table {
  width: 100%;
  max-width: 600px;
  border-collapse: collapse;
}

.cpc-table th {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  color: var(--cpc-muted);
  background: var(--cpc-soft);
  border-bottom: 1px solid var(--cpc-line);
  white-space: nowrap;
}

.cpc-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--cpc-line);
  vertical-align: middle;
}

.cpc-table tbody tr:last-child td {
  border-bottom: none;
}

.cpc-col-plies {
  width: 140px;
}

.cpc-col-action {
  width: 48px;
}

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

/* Bundle matrix */
.cpc-matrix th:not(:first-child) {
  width: 130px;
  text-align: center;
}

.cpc-matrix tbody tr:hover td {
  background: var(--cpc-soft);
}

.cpc-dash {
  color: #c4c9d0;
}

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  .cpc {
    padding: 0 10px 10px;
  }
  .cpc-panel {
    padding: 12px;
  }
  .cpc-level {
    flex-wrap: wrap;
  }
  .cpc .cpc-level-select {
    flex-basis: 100%;
  }
}

.tanda-add-btn-container {
  margin: 10px;
}

.tanda-edit-process-mainContainer {
  display: grid;
}
.tanda-drag-delete {
  display: flex;
  align-content: center;
  align-items: center;
  min-width: 0vw;
  max-width: 4vw;
}

/* ==============================
   TIME AND ACTION (T&A) — CSS
   ============================== */

/* ---- Variables ---- */
:root {
  --purple-dark: #0f3460;
  --purple-mid: #12396a;
  --purple-light: #1e5495;
  --purple-header: #0f3460;
  --accent-green: #2ecc6a;
  --accent-red: #e53935;
  --accent-gold: #f5a623;
  --bg-main: #f0f2f7;
  --bg-card: #ffffff;
  --bg-table-alt: #f2f5f8;
  --border-color: #d9d9d9;
  --border-input: #c2c2d6;
  --text-primary: #1a1a2e;
  --text-secondary: #555577;
  --text-muted: #999;
  --row-hover: #f0f4ff;
  --drag-bg: #ede7f6;
  --shadow-card: 0 2px 16px rgba(90, 30, 140, 0.08);
  --shadow-btn: 0 2px 8px rgba(90, 30, 140, 0.25);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-main: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.even-row td {
  background: #f2f5f8;
  background: var(--bg-table-alt);
}

/* ---- Main Card ---- */
.tna-card {
  margin: 16px 20px;
  background: #ffffff;
  background: var(--bg-card);
  border-radius: 12px;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 16px rgba(90, 30, 140, 0.08);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid #e8e8f0;
}

/* ---- Filter Bar ---- */
.tna-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  padding: 16px 16px;
  border-bottom: 1px solid #eeeef5;
  background: #fdfcff;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-label-tanda {
  font-size: 10.5px;
  font-weight: 600;
  color: #1a1a2e;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.required {
  color: #e53935;
  color: var(--accent-red);
  margin-left: 2px;
}

.buyer-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Process Section ---- */
.process-section {
  padding: 0;
}

.process-header {
  padding: 12px 20px 8px;
  border-bottom: 1px solid #eeeef5;
}

.process-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f3460;
  color: var(--purple-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tna-table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 280px);
  -webkit-overflow-scrolling: touch;
}

.tna-table-wrapper::-webkit-scrollbar-track {
  background: #f0eef8;
}

/* ---- Table ---- */
.tna-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  table-layout: auto;
}

/* ---- Header Row ---- */
.tna-thead-row {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
}

.tna-th {
  background: #0f3460;
  background: var(--purple-dark);
  color: #fff;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  border-right: 1.5px solid rgb(255 255 255 / 38%);
  letter-spacing: 0.2px;
}

.tna-th:first-child {
  border-radius: 0;
}

.tna-th .required {
  color: #f5a623;
  color: var(--accent-gold);
}

.th-content {
  display: flex;
  align-items: center;
  gap: 4px;
}

.th-icon {
  opacity: 0.7;
  font-size: 10px;
}

.th-arrows {
  opacity: 0.5;
  font-size: 10px;
  margin-left: 2px;
}

.drag-col {
  width: 47px;
  min-width: 47px;
}
.action-col {
  width: 30px;
  min-width: 30px;
}
.step-col {
  width: 44px;
  min-width: 44px;
  text-align: center;
}
.divider-col {
  width: 6px;
  min-width: 6px;
}
.divider-th {
  background: #3d1260;
  width: 6px;
  min-width: 6px;
  padding: 0;
}

.tna-row {
  background: #ffffff;
  background: var(--bg-card);
  transition: background 0.15s;
  border-bottom: 1px solid #eeeef5;
}

.tna-row:hover {
  background: #f0f4ff;
  background: var(--row-hover);
}

.tna-td {
  padding: 5px 5px;
  vertical-align: middle;
  border-right: 1.5px solid #eeeef5;
  min-width: 5vw;
  max-width: 10vw;
  overflow-wrap: break-word;
}

.group-end {
  border-right: 2px solid #2356a8;
}

.tna-td-center {
  text-align: center;
}

/* ---- Step Number ---- */
.step-cell {
  padding: 2px;
  text-align: center;
}

.step-number {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #555577;
  color: var(--text-secondary);
  min-width: 22px;
  text-align: center;
}

.common-red-color-tanda {
  border: 2px solid #c1d7f3;
  background-color: #d3e3f7;
}

.divider-cell {
  background: #e8dff5;
  width: 6px !important;
  min-width: 6px !important;
  padding: 0 !important;
}

/* ---- Add Row Area ---- */
.add-row-area {
  padding: 10px 16px;
  border-top: 1px solid #eeeef5;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .tna-card {
    margin: 10px 8px;
  }

  .tna-filters {
    padding: 12px 12px;
    gap: 12px;
  }

  .filter-group {
    min-width: 130px;
  }

  .buyer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .buyer-select {
    min-width: 140px !important;
  }

  .topbar-title {
    font-size: 14px;
  }

  .tna-th {
    font-size: 10px;
    padding: 7px 5px;
  }

  .tna-td {
    padding: 4px 3px;
  }
}

@media (max-width: 600px) {
  .tna-topbar {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tna-filters {
    flex-direction: column;
    gap: 10px;
  }

  .filter-group {
    width: 100%;
  }

  .buyer-select,
  .activity-input,
  .lead-days-input,
  .calc-lead-input {
    width: 100% !important;
  }

  .refresh-btn span,
  .create-btn span {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
  }
}

/* ---- Animation: Row Appear ---- */
@keyframes rowFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.color-lab-dip-del {
  font-size: 25px;
  font-weight: 600;
  display: flex;
  border: none;
  outline: none;
  cursor: pointer;
  color: white;
  border-radius: 5px;
  justify-content: center;
  align-items: center;
  border: 1px solid #edf2fa;
  background: #edf2fa;
  margin-left: 10px;
}
.color-lab-dip-img {
  margin: 10px 0 0 5px;
  font-size: 20px;
  height: 30px;
  width: 30px;
}
.color-lab-dip-card-div {
  padding: 5px;
  border-radius: 8px;
  margin: 5px;
  background-color: #ffff;
  box-shadow:
    0px 2px 4px rgba(0, 0, 0, 0.1),
    0px 4px 8px rgba(0, 0, 0, 0.15);
}

.color-lab-dip-card-heading-container {
  display: flex;
}

.color-lab-dip-supplier-select {
  width: 40%;
  margin: 0 0 5px 0;
}

.color-lab-dip-swatch-approve {
  display: flex;
  align-items: center;
  margin-top: 2vh;
  justify-content: space-between;
  width: 120px;
}
.color-lab-dip-swatch-approve-checkBox {
  margin: 0px 0 0 5px;
}
.color-lab-dip-embed {
  overflow: hidden;
}

.color-lab-dip-swatch-file-image {
  display: grid;
  width: 100%;
}
.color-lab-dip-swatch-image-Upload {
  text-align: center;
}

.color-lab-dip-file-input-uploader {
  border: 2px dashed #ccc;
  text-align: center;
  height: 100px;
  border-radius: 5px;
  margin: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px;
}
.color-lab-dip-file-input-label {
  height: 200px;
}

.color-lab-dip-swatch-img {
  width: 120px;
  height: 120px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  object-fit: cover;
  object-position: center;

  border-radius: 8px;
  cursor: pointer;

  display: block;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.color-lab-dip-card-heading {
  display: flex;
  justify-content: space-between;
  padding: 1px 5px 1px 1px;
  margin: 0;
  width: 100%;
  white-space: nowrap;
  font-weight: 700;
  font-size: 11px;
  border-radius: 4px 4px 0 0;
  color: rgb(201, 200, 200);
  /* height: 30px; */
  align-items: center;
}

.color-lab-dip-upload-label {
  display: flex;
  justify-content: center;
  align-items: center;
}

.approval-config-wrapper {
  width: 100%;
  height: 83vh;

  display: flex;
  flex-direction: column;

  background: #f7f9fc;
  border: 1px solid #e3e8ef;
  border-radius: 10px;

  overflow: hidden;
}

.approval-config-header {
  min-height: 64px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 10px 18px;

  background: #ffffff;
  border-bottom: 1px solid #e6eaf0;
}

.approval-header-left {
  display: flex;
  align-items: center;
  gap: 11px;
}

.approval-header-icon {
  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 9px;

  background: #eef3f9;
  color: #0f3460;

  font-size: 20px;
}

.approval-main-title {
  margin: 0;

  color: #1f2937;

  font-size: 15px;
  font-weight: 700;
}

.approval-main-subtitle {
  margin: 2px 0 0;

  color: #8a94a6;

  font-size: 11px;
}

.approval-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.approval-workflow-area {
  flex: 1 1;

  padding: 10px;

  overflow: auto;
}

/* scrollbar */

.approval-workflow-area::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.approval-workflow-area::-webkit-scrollbar-track {
  background: transparent;
}

.approval-workflow-area::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.approval-workflow-area::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.approval-level-wrapper {
  margin-bottom: 18px;

  background: #ffffff;

  border: 1px solid #e1e7ef;
  border-radius: 10px;

  box-shadow: 0 2px 7px rgba(15, 52, 96, 0.04);

  overflow: hidden;
}

/* =====================================================
   LEVEL HEADER
===================================================== */

.approval-level-header {
  min-height: 48px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 7px 12px;

  background: #fafbfd;

  border-bottom: 1px solid #edf0f4;
}

.approval-level-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.approval-level-number {
  width: 27px;
  height: 27px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 7px;

  background: #0f3460;
  color: #ffffff;

  font-size: 11px;
  font-weight: 700;
}

.approval-level-name {
  color: #344054;

  font-size: 12px;
  font-weight: 700;
}

.approval-level-description {
  margin-top: 1px;

  color: #98a2b3;

  font-size: 10px;
}

/* =====================================================
   APPROVER CONTENT
===================================================== */

.approval-level-content {
  display: flex;
  align-items: stretch;

  gap: 9px;

  padding: 13px;

  overflow-x: auto;
}

.approval-level-content::-webkit-scrollbar {
  height: 5px;
}

.approval-level-content::-webkit-scrollbar-thumb {
  background: #d0d7e2;
  border-radius: 10px;
}

/* =====================================================
   APPROVER CARD
===================================================== */

.approval-card-wrapper {
  position: relative;

  width: 230px;
  min-width: 230px;

  padding: 9px;

  background: #ffffff;

  border: 1px solid #dfe5ed;
  border-radius: 9px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.approval-card-wrapper:hover {
  border-color: #b9c8da;

  box-shadow: 0 4px 12px rgba(15, 52, 96, 0.08);

  transform: translateY(-1px);
}

/* =====================================================
   CARD TOP
===================================================== */

.approval-card-top {
  height: 22px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 4px;
}

.approval-card-number {
  width: 21px;
  height: 21px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #f0f4f8;
  color: #64748b;

  font-size: 10px;
  font-weight: 700;
}

/* =====================================================
   CARD ICON
===================================================== */

.approval-card-icon-wrapper {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 3px auto 6px;

  border-radius: 10px;

  background: #eef3f9;
}

.approval-card-icon {
  color: #0f3460;

  font-size: 22px;
}

/* =====================================================
   DROPDOWN
===================================================== */

.approval-step-card {
  width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  margin: 0;
}

.approval-step-header {
  display: none;
}

.approval-step-body {
  display: block;
  padding: 0;
}

.approval-form-field {
  width: 100%;
  min-width: 0;
  margin-bottom: 8px;
}

.approval-value-field {
  width: 100%;
}

.approval-form-label {
  margin-bottom: 4px;

  color: #475467;

  font-size: 10px;
  font-weight: 600;
}

.approval-modern-select {
  width: 100%;
}

.approval-modern-select .ant-select-selector {
  height: 34px;
  min-height: 34px;

  padding: 0 9px;

  border: 1px solid #d0d5dd;
  border-radius: 6px;

  background: #ffffff;

  box-shadow: none;
}

.approval-modern-select .ant-select-selection-placeholder {
  color: #98a2b3;

  font-size: 10px;
}

.approval-modern-select .ant-select-selection-item {
  color: #344054;

  font-size: 10px;
  font-weight: 500;
}

.approval-modern-select:hover .ant-select-selector {
  border-color: #0f3460;
}

.approval-modern-select.ant-select-focused .ant-select-selector {
  border-color: #0f3460;

  box-shadow: 0 0 0 2px rgba(15, 52, 96, 0.07);
}

/* =====================================================
   CONNECTOR
===================================================== */

.approval-and-connector {
  width: 34px;
  min-width: 34px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.approval-and-connector span {
  padding: 4px 7px;

  border: 1px solid #dbe2ea;
  border-radius: 12px;

  background: #f8fafc;

  color: #7b8798;

  font-size: 8px;
  font-weight: 700;
}

/* =====================================================
   ADD APPROVER
===================================================== */

.approval-add-card {
  width: 150px;
  min-width: 150px;

  min-height: 150px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 12px;

  border: 1px dashed #b8c4d3;
  border-radius: 9px;

  background: #fbfcfe;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.approval-add-card:hover {
  border-color: #0f3460;
  background: #f5f8fc;

  transform: translateY(-1px);
}

.approval-add-icon {
  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 7px;

  border-radius: 50%;

  background: #eef3f9;
  color: #0f3460;

  font-size: 20px;
}

.approval-add-title {
  color: #344054;

  font-size: 11px;
  font-weight: 700;
}

.approval-add-subtitle {
  margin-top: 3px;

  color: #98a2b3;

  font-size: 9px;
}

/* =====================================================
   ADD LEVEL
===================================================== */

.approval-add-level {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 10px;

  padding: 13px;

  border: 1px dashed #b9c6d6;
  border-radius: 9px;

  background: #ffffff;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.approval-add-level:hover {
  border-color: #0f3460;

  background: #f8fafc;
}

.approval-add-level-icon {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 7px;

  background: #eef3f9;
  color: #0f3460;

  font-size: 19px;
  font-weight: 500;
}

.approval-add-level-title {
  color: #344054;

  font-size: 11px;
  font-weight: 700;

  text-align: left;
}

.approval-add-level-subtitle {
  margin-top: 2px;

  color: #98a2b3;

  font-size: 9px;

  text-align: left;
}

/* =====================================================
   SUPERVISOR
===================================================== */

.approval-supervisor-box {
  min-height: 42px;

  display: flex;
  align-items: center;

  gap: 7px;

  padding: 5px 7px;

  border: 1px solid #d0d5dd;
  border-radius: 6px;

  background: #f8fafc;
}

.supervisor-icon {
  width: 27px;
  height: 27px;
  min-width: 27px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 6px;

  background: #eaf0f7;
  color: #0f3460;

  font-size: 14px;
}

.supervisor-content {
  flex: 1 1;
}

.supervisor-title {
  color: #344054;

  font-size: 10px;
  font-weight: 600;
}

.supervisor-description {
  display: none;
}

.supervisor-check {
  width: 18px;
  height: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #e8f5ee;
  color: #16803c;

  font-size: 9px;
}

/* =====================================================
   EMPTY STATE
===================================================== */

.approval-empty-box {
  height: 34px;

  display: flex;
  align-items: center;

  gap: 5px;

  padding: 0 8px;

  border: 1px dashed #cbd5e1;
  border-radius: 6px;

  background: #f8fafc;

  color: #98a2b3;

  font-size: 10px;
}

.approval-empty-icon {
  font-size: 13px;
}

/* =====================================================
   HIDE OLD FOOTER
===================================================== */

.approval-step-footer {
  display: none;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 768px) {
  .approval-config-header {
    padding: 10px 12px;
  }

  .approval-main-subtitle {
    display: none;
  }

  .approval-workflow-area {
    padding: 12px;
  }

  .approval-level-content {
    padding: 10px;
  }
}
/* ================================================================================== */
/* =========================================
   APPROVAL GRID
========================================= */

.approval-grid {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  grid-gap: 18px;

  gap: 18px;

  width: 100%;

  box-sizing: border-box;
}

.approval-grid-item {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* =========================================
   CARD
========================================= */

.approval-pro-card {
  --approval-color: #0f3460;

  position: relative;

  display: flex;
  align-items: stretch;

  width: 100%;
  height: 128px;

  box-sizing: border-box;

  overflow: hidden;

  background: #ffffff;

  border: 1px solid #e5e9ef;

  border-radius: 16px;

  cursor: pointer;

  box-shadow:
    0 2px 6px rgba(15, 52, 96, 0.04),
    0 8px 20px rgba(15, 52, 96, 0.05);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.approval-pro-card:hover {
  transform: translateY(-4px);

  border-color: var(--approval-color);

  box-shadow:
    0 6px 12px rgba(15, 52, 96, 0.06),
    0 16px 30px rgba(15, 52, 96, 0.12);
}

/* =========================================
   LEFT VISUAL
========================================= */

.approval-visual {
  position: relative;

  flex: 0 0 88px;

  width: 88px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--approval-color) 10%, #ffffff),
    color-mix(in srgb, var(--approval-color) 3%, #ffffff)
  );

  overflow: hidden;
}

.approval-visual::after {
  content: "";

  position: absolute;

  width: 75px;
  height: 75px;

  border-radius: 50%;

  background: color-mix(in srgb, var(--approval-color) 5%, transparent);

  bottom: -35px;
  right: -30px;
}

/* =========================================
   NUMBER
========================================= */

.approval-number {
  position: absolute;

  top: 9px;
  left: 11px;

  z-index: 2;

  font-size: 10px;

  font-weight: 700;

  letter-spacing: 1px;

  color: color-mix(in srgb, var(--approval-color) 55%, #ffffff);
}

/* =========================================
   ICON
========================================= */

.approval-icon {
  position: relative;

  z-index: 3;

  width: 50px;
  height: 50px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  background: var(--approval-color);

  color: #ffffff;

  font-size: 23px;

  box-shadow: 0 7px 16px
    color-mix(in srgb, var(--approval-color) 28%, transparent);

  transition:
    transform 0.25s ease,
    border-radius 0.25s ease;
}

.approval-pro-card:hover .approval-icon {
  transform: scale(1.08) rotate(-3deg);

  border-radius: 17px;
}

/* =========================================
   SEPARATOR
========================================= */

.approval-visual-line {
  position: absolute;

  top: 18px;
  right: 0;
  bottom: 18px;

  width: 1px;

  background: #e4e8ee;
}

/* =========================================
   CONTENT
========================================= */

.approval-content {
  flex: 1 1 auto;

  min-width: 0;

  display: flex;

  flex-direction: column;

  justify-content: center;

  padding: 18px 12px 18px 18px;

  box-sizing: border-box;
}

.approval-label {
  width: 100%;

  color: #172033;

  font-size: 15px;

  font-weight: 700;

  line-height: 1.35;

  overflow: hidden;

  display: -webkit-box;

  -webkit-line-clamp: 2;

  -webkit-box-orient: vertical;
}

.approval-status {
  display: flex;

  align-items: center;

  gap: 7px;

  margin-top: 11px;

  color: #8b95a5;

  font-size: 11px;

  font-weight: 500;

  white-space: nowrap;
}

.approval-status-dot {
  width: 7px;
  height: 7px;

  flex: 0 0 7px;

  border-radius: 50%;

  background: var(--approval-color);

  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--approval-color) 10%, transparent);
}

/* =========================================
   RIGHT ACTION
========================================= */

.approval-action {
  flex: 0 0 50px;

  width: 50px;

  display: flex;

  align-items: center;

  justify-content: center;

  border-left: 1px solid #edf0f4;

  background: #fafbfc;

  transition: background 0.25s ease;
}

.approval-action span {
  width: 29px;
  height: 29px;

  display: flex;

  align-items: center;

  justify-content: center;

  border-radius: 50%;

  background: #ffffff;

  color: #7b8494;

  font-size: 21px;

  line-height: 1;

  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.06);

  transition:
    transform 0.25s ease,
    color 0.25s ease;
}

.approval-pro-card:hover .approval-action {
  background: var(--approval-color);
}

.approval-pro-card:hover .approval-action span {
  transform: translateX(2px);

  color: var(--approval-color);
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1200px) {
  .approval-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .approval-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .approval-grid {
    grid-template-columns: 1fr;

    gap: 14px;
  }
}

/* ================================================================================== */
/* =========================================================
   APPROVAL DROPDOWN
========================================================= */

.approval-dropdown {
  width: 100%;
  padding: 8px 9px 10px;

  background: #ffffff;

  border: 1px solid #e3e7ed;
  border-radius: 7px;

  box-sizing: border-box;
}

/* =========================================================
   HEADER
========================================================= */

.approval-dropdown-heading {
  height: 22px;

  display: flex;
  align-items: center;

  gap: 6px;

  margin-bottom: 7px;

  border-bottom: 1px solid #f0f2f5;
  padding-bottom: 6px;
}

.approval-dropdown-step {
  width: 19px;
  height: 19px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 4px;

  background: #f1f4f8;
  color: #526173;

  font-size: 9px;
  font-weight: 700;
}

.approval-dropdown-title {
  color: #344054;

  font-size: 11px;
  font-weight: 600;
}

/* =========================================================
   FIELD
========================================================= */

.approval-dropdown-field {
  width: 100%;

  margin-bottom: 7px;
}

.approval-dropdown-field:last-child {
  margin-bottom: 0;
}

.approval-dropdown-field label {
  display: block;

  margin-bottom: 4px;

  color: #667085;

  font-size: 10px;
  font-weight: 500;
  line-height: 14px;
}

.approval-dropdown-field label span {
  margin-left: 2px;

  color: #d92d20;
}

/* =========================================================
   SELECT
========================================================= */

.approval-select {
  width: 100%;
  margin: 0;
}

.approval-select .ant-select-selector {
  padding: 0 9px;

  display: flex;
  align-items: center;

  background: #ffffff;

  border: 1px solid #d9dee7;
  border-radius: 5px;

  box-shadow: none;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.approval-select:hover .ant-select-selector {
  border-color: #9aa8b8;
}

.approval-select.ant-select-focused .ant-select-selector {
  border-color: #0f3460;

  box-shadow: 0 0 0 2px rgba(15, 52, 96, 0.06);
}

.approval-select .ant-select-selection-item {
  color: #344054;

  font-size: 10px;
  font-weight: 500;
}

.approval-select .ant-select-selection-placeholder {
  color: #98a2b3;

  font-size: 10px;
}

.approval-select .ant-select-arrow {
  color: #98a2b3;

  font-size: 10px;
}

/* =========================================================
   ERROR
========================================================= */

.approval-select.ant-select-status-error .ant-select-selector {
  border-color: #f04438;
}

/* =========================================================
   EMPTY STATE
========================================================= */

.approval-select-placeholder {
  height: 32px;

  display: flex;
  align-items: center;

  padding: 0 9px;

  border: 1px dashed #d9dee7;
  border-radius: 5px;

  background: #fafbfc;

  color: #98a2b3;

  font-size: 10px;
}

.approval-supervisor {
  height: 32px;

  display: flex;
  align-items: center;

  gap: 7px;

  padding: 0 8px;

  border: 1px solid #d9dee7;
  border-radius: 5px;

  background: #fafbfc;

  color: #475467;

  font-size: 10px;
  font-weight: 500;
}

.approval-supervisor-icon {
  width: 17px;
  height: 17px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #edf7f1;

  color: #24804a;

  font-size: 9px;
  font-weight: 700;
}
.approval-unit-selector {
  width: 220px;
  margin-bottom: 10px;
}

/* ===== ADDITIONAL CSS – append to your existing approval stylesheet ===== */

/* unit selector + unit tabs sit under the header, aligned with its padding */
.approval-config-wrapper > .approval-unit-selector {
  margin: 10px 18px 6px;
}

.approval-config-wrapper > .approval-unit-tabs {
  padding: 0 18px;
}

/* select + optional extra button (e.g. "Add New Department") */
.approval-scope-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* nested warehouse / department picker inside the workflow area */
.approval-child-scope {
  width: 100%;
}

.approval-child-scope .approval-unit-selector {
  margin: 0 0 8px;
}

.approval-child-scope .approval-unit-tabs {
  margin-bottom: 12px;
}

/* ant tabs inside the wrapper: tighter + matches the card look */
.approval-config-wrapper .ant-tabs {
  margin-bottom: 0;
}

.approval-config-wrapper .ant-tabs-nav {
  margin-bottom: 8px;
}

.approval-config-wrapper .ant-tabs-tab {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #667085;
}

.approval-config-wrapper .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: #0f3460;
}

.approval-config-wrapper .ant-tabs-ink-bar {
  background: #0f3460;
}

.approval-config-wrapper .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab {
  border: 1px solid #e1e7ef;
  border-radius: 7px 7px 0 0;
  background: #fafbfd;
}

.approval-config-wrapper .ant-tabs-card > .ant-tabs-nav .ant-tabs-tab-active {
  background: #ffffff;
  border-bottom-color: #ffffff;
}

/* the select above the tabs should not stretch full width */
.approval-unit-selector .approval-select {
  width: 220px;
}

.approval-unit-selector .approval-select .ant-select-selector {
  align-items: center;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  box-shadow: none;
}

.approval-unit-selector .approval-select:hover .ant-select-selector,
.approval-unit-selector
  .approval-select.ant-select-focused
  .ant-select-selector {
  border-color: #0f3460;
}

/* forward approver cards wrap when there are many */
.approval-level-content {
  flex-wrap: nowrap;
}

/* level header delete button spacing */
.approval-level-header .ant-btn {
  margin-left: 6px;
}

/* empty hint when nothing is selected yet */
.approval-empty-hint {
  height: auto;
  padding: 14px 12px;
  font-size: 11px;
}

@media (max-width: 768px) {
  .approval-config-wrapper > .approval-unit-selector {
    margin: 10px 12px 6px;
  }
  .approval-config-wrapper > .approval-unit-tabs {
    padding: 0 12px;
  }
  .approval-unit-selector .approval-select {
    width: 100%;
  }
}

.approval-history-container {
  padding: 14px;
  background: #f7f9fc;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
}
.approval-history-header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e6eaf0;
}

.approval-history-header-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #eef3f9;
  color: #0f3460;
  font-size: 18px;
}

.approval-history-title {
  margin: 0;
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
}

.approval-history-subtitle {
  margin: 2px 0 0;
  color: #8a94a6;
  font-size: 11px;
}

/* ---------- unit / group block ---------- */
.approval-history-unit {
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  box-shadow: 0 2px 7px rgba(15, 52, 96, 0.04);
  overflow: hidden;
}

.approval-history-unit:last-child {
  margin-bottom: 0;
}

.approval-history-unit-header {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 7px 14px;
  background: #0f3460;
  color: #ffffff;
}

.approval-history-unit-header p {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.approval-history-unit-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 14px;
}

.approval-history-unit-body {
  padding: 12px;
}

/* ---------- warehouse / department group ---------- */
.approval-history-scope {
  margin-bottom: 14px;
  padding: 10px;
  background: #fafbfd;
  border: 1px dashed #d0d7e2;
  border-radius: 9px;
}

.approval-history-scope:last-child {
  margin-bottom: 0;
}

.approval-history-scope-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 4px 10px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #ffffff;
  color: #344054;
  font-size: 11px;
  font-weight: 700;
}

.approval-history-scope-title span {
  color: #0f3460;
  font-weight: 600;
}

.approval-history-scope-title span::after {
  content: " -";
}

/* ---------- levels inside history ---------- */
.approval-history-unit .approval-level-wrapper:last-child,
.approval-history-scope .approval-level-wrapper:last-child {
  margin-bottom: 0;
}

/* read-only cards: no hover lift, dropdown cannot be changed */
.approval-card-readonly:hover {
  transform: none;
  box-shadow: none;
  border-color: #dfe5ed;
}

.approval-card-readonly .ant-select,
.approval-card-readonly .approval-dropdown {
  pointer-events: none;
}

.approval-card-readonly .ant-select-selector {
  background: #f8fafc !important;
}

.approval-card-readonly .ant-select-arrow {
  display: none;
}

/* empty states */
.approval-history-empty {
  height: auto;
  margin: 4px 0;
  padding: 12px;
  font-size: 11px;
}

.dv-root {
  background: #f4f6f9;
  padding: 20px;
  border-radius: 14px;
}

.dv-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.dv-toolbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}
.dv-toolbar-count {
  background: #1e293b;
  color: #fff;
  border-radius: 20px;
  font-weight: 600;
  border: none;
}

.dv-summary-row {
  margin-bottom: 18px;
}
.dv-summary-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
}
.dv-summary-pill-count {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 0 7px;
  font-size: 12px;
}

.dv-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dv-card {
  border-radius: 12px !important;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.06),
    0 1px 2px rgba(15, 23, 42, 0.04);
  border: 1px solid #eef0f4 !important;
}

.dv-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.dv-card-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.dv-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dv-card-title-text {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}
.dv-card-subtitle {
  margin-top: 4px;
}
.dv-count-tag {
  background: #f1f5f9;
  color: #475569;
  border: none;
  font-weight: 600;
  border-radius: 20px;
  flex-shrink: 0;
}

.dv-location-chips {
  display: inline-flex;
}
.dv-chip {
  font-size: 12px;
  border-radius: 6px;
  padding: 2px 8px;
  margin: 0;
}
.dv-chip-resolved {
  background: #f1f5f9;
  color: #334155;
}
.dv-chip-unresolved {
  background: #fff7e6;
  color: #b45309;
  border: 1px dashed #fcd34d !important;
}

.dv-level-block {
  background: #fafbfc;
  border: 1px solid #eef0f4;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.dv-level-block:last-child {
  margin-bottom: 0;
}
.dv-level-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.dv-level-name {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.dv-level-rows {
  display: flex;
  flex-direction: column;
}

.dv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 1px dashed #eef0f4;
  gap: 12px;
  flex-wrap: wrap;
}
.dv-row:last-child {
  border-bottom: none;
}

.dv-row-key {
  font-size: 13px;
  color: #475569;
  font-weight: 600;
  display: flex;
  align-items: center;
  min-width: 110px;
}

.dv-row-values {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dv-pill {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12.5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-weight: 600;
}
.dv-pill-old {
  background: #fef2f2;
  color: #b91c1c;
  text-decoration: line-through;
  -webkit-text-decoration-color: rgba(185, 28, 28, 0.4);
          text-decoration-color: rgba(185, 28, 28, 0.4);
}
.dv-pill-new {
  background: #f0fdf4;
  color: #15803d;
}
.dv-pill-up {
  background: #ecfdf5;
  color: #047857;
}
.dv-pill-down {
  background: #fff1f2;
  color: #be123c;
}
.dv-pill-empty {
  background: #f1f5f9;
  color: #94a3b8;
  font-style: italic;
}
.dv-row-arrow {
  color: #cbd5e1;
}

.dv-trend {
  font-size: 10px;
  margin-left: 1px;
}
.dv-trend-up {
  color: #059669;
}
.dv-trend-down {
  color: #e11d48;
}

@media (max-width: 640px) {
  .dv-row {
    flex-direction: row;
  }
  .dv-row-key {
    min-width: 90px;
  }
}

.readonly-field {
  display: flex;
  flex-direction: column;
}

.readonly-label {
  font-size: 0.8rem;
  font-weight: bold;
  color: #6a1e55;
}

.readonly-value {
  font-size: 0.7rem;
  color: #103460;
}

.approver-card-icon {
  background-color: #ffffff;
  color: #088395;
  font-size: 50px;
  justify-content: "center";
  align-items: center;
  align-self: center;
}
.approver-card-style {
  width: 190px;
  padding: 0;
  margin: 0;
}
.approver-inner-content-card {
  display: flex;
  justify-content: center;
  padding-top: 5px;
  padding-bottom: 5px;
}
.approver-card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5;
  padding-top: 13px;
  padding-left: 1px;
}
.approver-header-title {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  color: #535353;
}
.approver-list-items-card {
  padding: 0;
  margin: 0;
}

.approver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  grid-gap: 16px;
  gap: 16px;
  width: 100%;
  padding: 8px 2px 24px;
}

.approver-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 14px;
  color: #697382;
}

/* =========================================================
   CARD
========================================================= */

.premium-approver-card {
  --accent: #0f3460;
  --pending: #e5484d;
  --ink: #172033;
  --muted: #6b7482;

  position: relative;
  height: 178px;
  padding: 16px 16px 14px;

  display: flex;
  flex-direction: column;

  overflow: hidden;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;

  background: #ffffff;
  background: linear-gradient(
    145deg,
    #ffffff 0%,
    color-mix(in srgb, var(--accent) 3.5%, #ffffff) 100%
  );

  border: 1px solid #e5e9ef;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, #e5e9ef);
  border-radius: 16px;

  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 20px rgba(15, 23, 42, 0.05);

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

/* Left accent bar */
.premium-approver-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 5px 5px 0;
  background: var(--accent);
  transition: width 0.22s ease;
}

.premium-approver-card.has-pending::before {
  width: 5px;
}

.premium-approver-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 38%, #dfe4ea);
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.06),
    0 18px 36px color-mix(in srgb, var(--accent) 14%, transparent);
}

.premium-approver-card:active {
  transform: translateY(-1px) scale(0.99);
}

.premium-approver-card:focus-visible {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px #ffffff,
    0 0 0 5px var(--accent);
}

/* =========================================================
   TOP ROW
========================================================= */

.premium-card-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.premium-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 20px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, #ffffff);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--accent) 10%, transparent);
  transition:
    transform 0.22s ease,
    color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.premium-approver-card:hover .premium-icon,
.premium-approver-card:focus-visible .premium-icon {
  transform: scale(1.06);
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 7px 15px color-mix(in srgb, var(--accent) 25%, transparent);
}

/* =========================================================
   COUNT BADGE
========================================================= */

.approval-count-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
}

.approval-count-badge {
  position: relative;
  z-index: 2;
  min-width: 52px;
  height: 44px;
  padding: 0 12px;

  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  border-radius: 13px 13px 13px 4px;
  color: var(--accent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 13%, #ffffff),
    color-mix(in srgb, var(--accent) 7%, #ffffff)
  );
  border: 1px solid color-mix(in srgb, var(--accent) 24%, #ffffff);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 10%, transparent);

  transition:
    transform 0.22s ease,
    color 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

/* Nothing pending: quiet, neutral badge */
.premium-approver-card:not(.has-pending) .approval-count-badge {
  color: var(--muted);
  background: #f4f6f9;
  border-color: #e5e9ef;
  box-shadow: none;
}

.premium-approver-card.has-pending .approval-count-badge {
  box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 18%, transparent);
}

.premium-approver-card:hover .approval-count-badge,
.premium-approver-card:focus-visible .approval-count-badge {
  transform: translateY(-2px);
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 17px color-mix(in srgb, var(--accent) 28%, transparent);
}

.approval-count-number {
  display: block;
  font-size: 23px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.7px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   LIVE PENDING DOT
   Only transform + opacity are animated (GPU friendly).
========================================================= */

.approval-count-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  z-index: 5;

  width: 12px;
  height: 12px;
  border-radius: 50%;

  background: var(--pending);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(229, 72, 77, 0.4);
}

/* Expanding "ping" ring */
.approval-count-dot::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: var(--pending);
  opacity: 0.55;
  animation: live-ping 1.9s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes live-ping {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  75%,
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

/* =========================================================
   LIVE UPDATE FEEDBACK  (count just changed)
========================================================= */

/* Badge "bump" */
.premium-approver-card.is-updated .approval-count-badge {
  animation: count-bump 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Number rolls in from below (count went up) or above (went down) */
.approval-count-number.is-rolling {
  animation: count-roll-up 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.is-updated-down .approval-count-number.is-rolling {
  animation-name: count-roll-down;
}

/* One-shot glow ring around the whole card */
.premium-approver-card.is-updated {
  animation: card-flash 1.4s ease-out;
}

@keyframes count-bump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.16);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes count-roll-up {
  from {
    transform: translateY(70%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes count-roll-down {
  from {
    transform: translateY(-70%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes card-flash {
  0% {
    box-shadow:
      0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent),
      0 8px 20px rgba(15, 23, 42, 0.05);
  }
  100% {
    box-shadow:
      0 0 0 10px color-mix(in srgb, var(--accent) 0%, transparent),
      0 8px 20px rgba(15, 23, 42, 0.05);
  }
}

/* =========================================================
   MAIN CONTENT
========================================================= */

.premium-card-main {
  position: relative;
  z-index: 2;
  margin-top: 16px;
}

.premium-card-title {
  max-width: 92%;
  font-size: 14.5px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink);

  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.premium-card-subtitle {
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}

/* =========================================================
   FOOTER
========================================================= */

.premium-card-footer {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 10px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  border-top: 1px solid #edf0f3;
  border-top: 1px solid color-mix(in srgb, var(--accent) 10%, #edf0f3);

  font-size: 11.5px;
  font-weight: 600;
}

.premium-card-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pending-text {
  color: #c9313a; /* darker red = AA contrast on white */
  font-weight: 700;
}

.clear-text {
  color: #2f8f5b;
}

.premium-card-check {
  flex: 0 0 auto;
}

/* =========================================================
   ARROW
========================================================= */

.premium-card-arrow {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--accent) 15%, #ffffff);

  transition:
    transform 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.premium-approver-card:hover .premium-card-arrow,
.premium-approver-card:focus-visible .premium-card-arrow {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translate(2px, -2px);
}

/* =========================================================
   BACKGROUND GLOW
========================================================= */

.premium-card-glow {
  position: absolute;
  right: -35px;
  bottom: -45px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  pointer-events: none;
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.premium-approver-card:hover .premium-card-glow,
.premium-approver-card:focus-visible .premium-card-glow {
  transform: scale(1.25);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
}

.premium-approver-card.is-skeleton {
  cursor: default;
  pointer-events: none;
  background: linear-gradient(100deg, #f1f3f6 30%, #f8f9fb 50%, #f1f3f6 70%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s linear infinite;
}

.premium-approver-card.is-skeleton::before {
  display: none;
}

@keyframes skeleton-shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

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

  .premium-approver-card {
    height: auto;
    min-height: 168px;
  }
}

@media (hover: none) {
  .premium-approver-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .approval-count-dot::before,
  .premium-approver-card.is-updated,
  .premium-approver-card.is-updated .approval-count-badge,
  .approval-count-number.is-rolling,
  .premium-approver-card.is-skeleton {
    animation: none;
  }

  .premium-approver-card,
  .premium-icon,
  .approval-count-badge,
  .premium-card-arrow,
  .premium-card-glow {
    transition: none;
  }
}

.leaflet-control-attribution {
  display: none;
}

/* ==========================================================================
   Service.css (v4)
   Consistent control sizing, aligned labels, Mentions + Shared Users pair row.
   ========================================================================== */

.wo-page {
  --wo-ink: #14213d;
  --wo-ink-soft: #52607a;
  --wo-navy: #0f3460;
  --wo-teal: #0e6f8f;
  --wo-teal-soft: #e3f4f3;
  --wo-amber-soft: #fff4de;
  --wo-amber-ink: #8a5a00;
  --wo-red: #c0392b;
  --wo-canvas: #f2f5f9;
  --wo-surface: #ffffff;
  --wo-line: #e2e8f0;
  --wo-field-line: #d5dde9;
  --wo-field-h: 36px;
  --wo-radius-lg: 14px;
  --wo-radius-md: 10px;
  --wo-radius-sm: 8px;
  --wo-shadow:
    0 1px 2px rgba(20, 33, 61, 0.05), 0 6px 18px rgba(20, 33, 61, 0.05);

  min-height: 100%;
  background: var(--wo-canvas);
  color: var(--wo-ink);
  padding-bottom: 72px;
}

/* ---------- Header ------------------------------------------------------- */

.wo-header {
  background: var(--wo-surface);
  border-bottom: 1px solid var(--wo-line);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 1px 6px rgba(20, 33, 61, 0.06);
}

.wo-header__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.wo-header__mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--wo-navy), #1b5a9b);
  display: grid;
  place-items: center;
  flex: none;
}

.wo-header__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 650;
  color: var(--wo-ink);
}

.wo-header__sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--wo-ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wo-code-chip {
  background: var(--wo-teal-soft);
  color: var(--wo-teal);
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 12px;
  font-weight: 600;
}

.wo-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.wo-toolbar__divider {
  width: 1px;
  align-self: stretch;
  background: var(--wo-line);
  margin: 2px 4px;
}

.wo-toolbar__note {
  display: inline-flex;
  align-items: center;
}

/* ---------- Tabs --------------------------------------------------------- */

.wo-tabs {
  background: var(--wo-surface);
  border-bottom: 1px solid var(--wo-line);
  padding: 0 16px;
}

.wo-tab-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 550;
}

/* ---------- Body / sections --------------------------------------------- */

.wo-body {
  padding: 16px 20px 0;
  max-width: 1760px;
  margin: 0 auto;
}

.wo-section {
  background: var(--wo-surface);
  border: 1px solid var(--wo-line);
  border-radius: var(--wo-radius-lg);
  box-shadow: var(--wo-shadow);
  margin-bottom: 16px;
}

.wo-section__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--wo-line);
  border-radius: var(--wo-radius-lg) var(--wo-radius-lg) 0 0;
  background: #f8fafd;
}

.wo-section__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--wo-teal-soft);
  color: var(--wo-teal);
  flex: none;
}

.wo-section__title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--wo-ink);
}

.wo-section__aside {
  margin-left: auto;
}

.wo-section__body {
  padding: 18px 20px 20px;
}

/* ---------- Grid & fields ------------------------------------------------ */

.wo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  grid-gap: 16px 18px;
  gap: 16px 18px;
  align-items: start; /* label rows are normalised below, so top-align */
}

.wo-grid--sub {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.wo-cell {
  min-width: 0;
}

.wo-cell--wide {
  grid-column: span 2;
}

.wo-cell--full {
  grid-column: 1 / -1;
}

/* Mentions + Shared Users: always one row, two equal columns */
.wo-pair {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 16px 18px;
  gap: 16px 18px;
  align-items: center;
}

@media (max-width: 760px) {
  .wo-pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .wo-cell--wide {
    grid-column: span 1;
  }
}

.wo-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* every label row has the same height, with or without a refresh/new button */
.wo-field-head,
.wo-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
  min-width: 0;
}

.wo-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--wo-ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 24px;
  padding-left: 2px;
}

.wo-field > .wo-label {
  min-height: 24px;
}

.wo-required {
  color: var(--wo-red);
  font-weight: 700;
}

/* ---------- Unified controls (select / input / date / tree-select) ------ */

.wo-page .ant-select,
.wo-page .ant-picker,
.wo-page .ant-tree-select,
.wo-page .ant-cascader {
  width: 100%;
}

.wo-page .ant-select:not(.ant-select-multiple) .ant-select-selector,
.wo-page .ant-tree-select:not(.ant-select-multiple) .ant-select-selector {
  align-items: center;
}

.wo-page .ant-select-multiple .ant-select-selector {
  align-items: center;
}

.wo-page .ant-select-multiple .ant-select-selection-item {
  border-radius: 6px;
  background: var(--wo-teal-soft);
  border-color: transparent;
  color: var(--wo-teal);
  font-weight: 550;
}

.wo-page .ant-select-multiple.ant-select-disabled .ant-select-selection-item {
  background: var(--wo-teal-soft);
  color: var(--wo-teal);
}

.wo-textarea.ant-input,
.wo-textarea {
  border-radius: var(--wo-radius-sm);
  resize: vertical;
}

/* ---------- Files -------------------------------------------------------- */

.wo-files {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.wo-dropzone {
  border: 1.5px dashed #cfd8e5;
  border-radius: var(--wo-radius-md);
  background: #f8fafd;
  padding: 10px 12px;
  transition: all 0.15s ease;
}

.wo-dropzone:hover,
.wo-dropzone:focus-within {
  border-color: var(--wo-teal);
  background: var(--wo-teal-soft);
}

.wo-dropzone input[type="file"] {
  width: 100%;
  cursor: pointer;
}

.wo-strip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wo-strip__rail {
  flex: 1 1;
  min-width: 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px;
}

.wo-strip__empty {
  color: #8a95aa;
  font-size: 13px;
  padding: 8px 4px;
}

.wo-file {
  position: relative;
  flex: none;
  width: 92px;
  height: 78px;
  border: 1px solid var(--wo-line);
  border-radius: var(--wo-radius-md);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
}

.wo-file img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wo-file__name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 6px;
  font-size: 10.5px;
  color: #fff;
  background: rgba(20, 33, 61, 0.68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wo-file__tools {
  position: absolute;
  top: 3px;
  right: 3px;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 1px 3px;
}

/* ---------- Misc blocks -------------------------------------------------- */

.wo-table-wrap {
  border-radius: var(--wo-radius-md);
  overflow: hidden;
}

.wo-people-list {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}

.wo-people-card {
  border: 1px solid var(--wo-line);
  border-radius: var(--wo-radius-md);
  padding: 10px 14px;
  display: grid;
  grid-gap: 4px;
  gap: 4px;
  background: #fafcff;
}

.wo-fabric-card {
  border: 1px solid var(--wo-line);
  border-radius: var(--wo-radius-md);
  padding: 14px;
  background: #fafcff;
  margin-bottom: 12px;
}

.wo-notice {
  padding: 12px 14px;
  background: var(--wo-amber-soft);
  border: 1px solid #ffd28a;
  border-radius: var(--wo-radius-md);
  color: var(--wo-amber-ink);
  font-size: 14px;
  line-height: 1.5;
}

.wo-subtask-pick {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.wo-subtask-pick__item {
  border: 1px solid var(--wo-line);
  border-radius: var(--wo-radius-md);
  padding: 10px 12px;
}

/* ---------- Subtasks board ---------------------------------------------- */

.wo-board {
  padding: 16px 20px 0;
}

.wo-board__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 650;
  font-size: 15px;
}

.wo-board__count {
  background: var(--wo-teal);
  color: #fff;
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.wo-board__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 2px 2px 16px;
  align-items: flex-start;
}

.wo-board__empty {
  width: 100%;
  border: 1.5px dashed #cfd8e5;
  border-radius: var(--wo-radius-lg);
  background: var(--wo-surface);
  padding: 44px 16px;
  text-align: center;
  color: var(--wo-ink-soft);
}

.wo-board__empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--wo-teal-soft);
  color: var(--wo-teal);
}

.wo-subcard {
  flex: none;
  width: min(45vw, 720px);
  min-width: 340px;
  background: var(--wo-surface);
  border: 1px solid var(--wo-line);
  border-radius: var(--wo-radius-lg);
  box-shadow: var(--wo-shadow);
}

.wo-subcard__head {
  background: linear-gradient(135deg, var(--wo-navy), #1b5a9b);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--wo-radius-lg) var(--wo-radius-lg) 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.wo-subcard__head .wo-code-chip {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.wo-subcard__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 14px;
  min-width: 0;
  flex-wrap: wrap;
}

.wo-subcard__index {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.wo-subcard__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wo-subcard__tools .ant-checkbox-wrapper,
.wo-subcard__tools .ant-checkbox-wrapper span {
  color: #fff;
}

.wo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  -webkit-user-select: none;
          user-select: none;
}

.wo-pill--action {
  cursor: pointer;
}

.wo-pill--action:hover {
  background: rgba(255, 255, 255, 0.28);
}

.wo-iconbtn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
}

.wo-iconbtn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.wo-iconbtn--danger:hover {
  background: var(--wo-red);
}

.wo-subcard__body {
  padding: 18px;
}

.wo-subcard__desc {
  margin-top: 14px;
}

.wo-subcard__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--wo-line);
  background: #f8fafd;
  border-radius: 0 0 var(--wo-radius-lg) var(--wo-radius-lg);
  flex-wrap: wrap;
}

.wo-subcard__checks {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--wo-ink-soft);
}

.wo-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .wo-body,
  .wo-board {
    padding-left: 10px;
    padding-right: 10px;
  }
  .wo-subcard {
    width: 88vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wo-strip__rail {
    scroll-behavior: auto;
  }
  .wo-page * {
    transition: none !important;
  }
}

/* =========================================================
   Wrapper
   ========================================================= */
.task-hierarchy-wrapper {
  width: 100%;
  overflow-x: auto;
  padding: 1rem;
  background: #f8fafc;
  min-height: 340px;
}

/* =========================================================
   Task Node (Card)
   ========================================================= */
.task-node {
  position: relative;
  min-width: 220px;
  max-width: 240px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.task-node:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* =========================================================
   Header
   ========================================================= */
.task-header {
  padding: 8px 10px;
  background: #f1f5f9;
  border-bottom: 1px solid #e5e7eb;
}

.work-order-code {
  font-size: 9.5px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.task-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
}

/* =========================================================
   Meta Section
   ========================================================= */
.task-meta {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  line-height: 1.4;
}

.meta-label {
  color: #64748b;
  font-weight: 500;
  margin-right: 6px;
}

.meta-value {
  color: #0f172a;
  font-weight: 500;
  text-align: right;
}

.status-row {
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px dashed #e5e7eb;
}

/* =========================================================
   Current Task Highlight
   ========================================================= */
.current-task {
  border: 2px solid #2563eb;
}

.current-task .task-header {
  background: #eff6ff;
}

.current-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 9px;
  font-weight: 700;
  background: #2563eb;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* =========================================================
   PrimeReact OrganizationChart Overrides
   ========================================================= */

/* Reduce vertical distance between hierarchy levels */
.p-organizationchart-table {
  border-spacing: 0 0.65rem !important;
}

/* Reduce horizontal gap between sibling nodes */
.p-organizationchart-node-content {
  padding: 0 !important;
  margin: 0 6px !important;
  border: none !important;
}

/* Connector lines – thin & professional */
.p-organizationchart .p-organizationchart-line-down {
  width: 1px !important;
  background-color: #cbd5e1;
}

.p-organizationchart .p-organizationchart-line-left,
.p-organizationchart .p-organizationchart-line-right {
  height: 1px !important;
  background-color: #cbd5e1;
}

/* =========================================================
   Zoom Controls
   ========================================================= */
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.zoom-controls button {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  width: 32px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
}

.zoom-controls button:hover {
  background: #f1f5f9;
}

.zoom-controls span {
  font-size: 12px;
  min-width: 42px;
  text-align: center;
  color: #475569;
}

.zoom-controls button:last-child {
  padding: 0 10px;
  width: auto;
}

/* =========================================================
   Zoom Container
   ========================================================= */
.chart-zoom-container {
  transform-origin: top center;
  transition: transform 0.15s ease;
}

/* =========================================================
   Responsive Adjustments
   ========================================================= */
@media (max-width: 768px) {
  .task-node {
    min-width: 200px;
    max-width: 220px;
  }

  .task-name {
    font-size: 12.5px;
  }

  .meta-row {
    font-size: 11px;
  }
}

/* =========================================================
   Print
   ========================================================= */
@media print {
  .task-hierarchy-wrapper {
    background: #ffffff;
    padding: 0;
  }

  .task-node {
    box-shadow: none;
    border: 1px solid #000;
  }

  .task-node:hover {
    transform: none;
  }
}

.reassignment-hierarchy {
  --ra-user-color: #3b82f6;
  --ra-dept-color: #a855f7;
  --ra-border: #e5e7eb;
  --ra-text-muted: #6b7280;
  --ra-text: #1f2937;
  --ra-card-bg: #ffffff;

  font-family: inherit;
  max-width: 480px;
}

.reassignment-hierarchy__title {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ra-text);
}

.reassignment-hierarchy--empty {
  padding: 16px;
  border: 1px dashed var(--ra-border);
  border-radius: 8px;
  color: var(--ra-text-muted);
  font-size: 13px;
  text-align: center;
}

.reassignment-timeline {
  display: flex;
  flex-direction: column;
}

.reassignment-step {
  display: flex;
  gap: 12px;
}

.reassignment-step__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.reassignment-step__icon {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  z-index: 1;
}

.reassignment-step__icon--user {
  background: var(--ra-user-color);
}

.reassignment-step__icon--department {
  background: var(--ra-dept-color);
}

.reassignment-step__connector {
  flex: 1 1;
  width: 2px;
  background: var(--ra-border);
  margin: 2px 0;
}

.reassignment-step__card {
  flex: 1 1;
  padding: 10px 12px 12px 12px;
  margin-bottom: 14px;
  background: var(--ra-card-bg);
  border: 1px solid var(--ra-border);
  border-radius: 8px;
}

.reassignment-step__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--ra-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.reassignment-step__version {
  font-weight: 500;
  color: var(--ra-text-muted);
  text-transform: none;
  letter-spacing: normal;
}

.reassignment-step__change {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ra-text);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.reassignment-step__from {
  color: var(--ra-text-muted);
  text-decoration: line-through;
  -webkit-text-decoration-color: var(--ra-border);
          text-decoration-color: var(--ra-border);
}

.reassignment-step__to {
  font-weight: 600;
}

.reassignment-step__arrow {
  color: var(--ra-text-muted);
  flex-shrink: 0;
}

.reassignment-step__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ra-text-muted);
}

.reassignment-step__dot {
  opacity: 0.6;
}

.reassignment-step__comment {
  margin-top: 6px;
  font-size: 12px;
  font-style: italic;
  color: var(--ra-text-muted);
}

/* ── FuelRates.css ── */

/* Page wrapper */
.fuel-rates-page {
  width: 100%;
  padding: 24px 20px;
}

/* Header */
.fuel-rates-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.fuel-rates-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.fuel-rates-title-icon {
  margin-right: 8px;
  color: #1677ff;
}

.fuel-rates-subtitle {
  color: #8c8c8c;
  font-size: 13px;
  margin-top: 4px;
}

.fuel-rates-header-right {
  display: flex;
}

/* Active policy tag */
.fuel-rates-active-policy-tag {
  font-size: 11px;
  padding: 3px 10px;
}

/* Latest approved banner */
.fuel-rates-approved-banner {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #389e0d;
}

/* Card shared */
.fuel-rates-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  margin-bottom: 18px;
}

.fuel-rates-card-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 16px;
}

/* Version history card (no bottom margin needed at end of page) */
.fuel-rates-versions-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

/* Form actions row */
.fuel-rates-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.fuel-rates-add-btn {
  border-radius: 6px;
}

.fuel-rates-submit-btn {
  border-radius: 6px;
}

.fuel-rates-approve-btn {
  border-radius: 6px;
  margin-right: 10px;
}

.fuel-rates-reject-btn {
  border-radius: 6px;
}

/* Submitted banner */
.fuel-rates-submitted-banner {
  margin-top: 14px;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #ad6800;
}

/* ── FuelRow ── */

.fuel-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) 40px;
  grid-gap: 10px;
  gap: 10px;
  align-items: end;
  padding: 14px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  margin-bottom: 10px;
}

.fuel-row-label {
  font-size: 12px;
  font-weight: 500;
  color: #595959;
  margin-bottom: 5px;
  display: flex;
  gap: 3px;
}

.fuel-row-select {
  width: 100%;
}

.fuel-row-input-number {
  width: 100%;
}

.fuel-row-date {
  width: 100%;
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 14px;
  outline: none;
}

.fuel-row-remove-btn {
  margin-top: 22px;
  width: 36px;
  height: 32px;
  border-radius: 6px;
}

/* ── Version table ── */

.version-no-cell {
  font-weight: 700;
}

.version-latest-tag {
  font-size: 10px;
  margin-left: 6px;
}

.version-date-cell {
  color: #595959;
  font-size: 12px;
}

.version-view-btn {
  padding: 0;
}

/* ── VersionDetailModal ── */

.version-detail-status-row {
  margin-bottom: 10px;
}

/* ── Maintenance Configuration extras ── */

/* Maintenance row: 5 fields + remove button */
.maint-row {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) 40px;
}

/* Card header row (title + optional action link) */
.fuel-rates-card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

/* Icon inside maintenance card title */
.maint-title-icon {
  margin-right: 6px;
  color: #1677ff;
  vertical-align: middle;
}

/* Footer row inside a tab card: add-btn left, actions right */
.fuel-rates-tab-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.indent-separator td {
  border-bottom: 2px dashed #cfcfcf;
}

.if-header {
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.if-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.if-title {
  font-size: 17px;
  font-weight: 700;
  color: #153c6d;
  letter-spacing: -0.3px;
}

.if-title-icon {
  width: 32px;
  height: 32px;
  background: #153c6d;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}
.if-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.if-body::-webkit-scrollbar {
  width: 5px;
}
.if-body::-webkit-scrollbar-track {
  background: transparent;
}
.if-section {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #f0ddeb;
  box-shadow: 0 1px 4px rgba(92, 45, 130, 0.08);
  overflow: hidden;
  height: 100%;
}

.if-section-header {
  padding: 11px 20px;
  border-bottom: 1px solid #f0ddeb;
  background: #153c6d;
  display: flex;
  align-items: center;
  gap: 8px;
}

.if-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #ffff;
}

.if-section-icon {
  color: #ffff;
  display: flex;
  align-items: center;
}

.if-section-body {
  padding: 11px 20px;
}
.filter-bar {
  background: #ffffff;
  padding: 7px 27px;
  border-bottom: 1px solid ede8f5;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  box-shadow: 0 1px 4px rgba(92, 45, 130, 0.08);
}

/* ── Checkbox group ── */
.if-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.if-checkbox-label {
  font-size: 13px;
  font-weight: 600;
  color: #5a1847;
  letter-spacing: 0.1px;
}

/* ── Form Row ── */
.if-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  flex-direction: row;
}

.if-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1;
  min-width: 180px;
}
.if-field-yarn label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #9487a8;
}

.if-field label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #9487a8;
}

.if-field {
  border-color: #e2d8f0 !important;
  border-radius: 6px !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 13px !important;
  color: #1a1025 !important;
  min-height: 36px !important;
  background: #ffff !important;
  transition: all 0.2s !important;
}

.c-yes-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e8f5e9;
  color: #2e7d32;
  border: #a5d6a7;
  border-radius: 10px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 600;
}
.c-no-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffebee;
  color: #c62828;
  border: #c62828;
  border-radius: 10px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 600;
}

.if-field-select {
  width: 280px;
}

.page-header {
  margin-top: 4px;
  background: #ffffff;
  padding: 5px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: -webkit-sticky;
  position: sticky;
  box-shadow: 0 1px 4px rgba(92, 45, 130, 0.08);
  top: 0;
  border-radius: 10px;
  z-index: 100;
}

.filter-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #9487a8;
}

.status-card {
  padding: 5px;
  margin-top: 10px;
  margin-left: 10px;
  border-radius: 16px;
  box-shadow: "0 2px 10px rgba(0,0,0,0.04)";
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .if-panel {
    width: 100vw;
  }

  .if-body {
    padding: 16px;
    gap: 14px;
  }

  .if-header {
    padding: 13px 16px;
  }

  .if-field {
    min-width: calc(50% - 8px);
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: calc(50% - 8px);
  }

  .if-section-body {
    padding: 14px 16px;
  }
}

@media (max-width: 480px) {
  .if-field {
    min-width: 100%;
    flex: 0 0 100%;
  }

  .if-title {
    font-size: 15px;
  }
}

.lio-page {
  padding: 20px 24px;
  color: #1f2933;
}

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

.lio-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f3460;
}

.lio-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: #6b7280;
}

/* ---------- banner ---------- */
.lio-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: 8px;
  font-size: 14px;
}

.lio-banner-success {
  background: #e6f4ea;
  color: #1e6b34;
  border: 1px solid #b7dfc2;
}

.lio-banner-error {
  background: #fdecec;
  color: #a12626;
  border: 1px solid #f5c2c2;
}

.lio-banner-close {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}

.lio-empty {
  padding: 40px;
  text-align: center;
  color: #6b7280;
  background: #fff;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
}

/* ---------- cards ---------- */
.lio-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lio-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #0f3460;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(15, 52, 96, 0.06);
}

.lio-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.lio-card-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lio-lay-code {
  font-size: 16px;
  font-weight: 700;
  color: #0f3460;
}

.lio-chip {
  padding: 2px 10px;
  font-size: 12px;
  border-radius: 999px;
  background: #eef2f8;
  color: #0f3460;
}

.lio-chip-step {
  background: #0f3460;
  color: #fff;
}

.lio-requested {
  font-size: 12px;
  color: #6b7280;
}

.lio-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 10px 16px;
  gap: 10px 16px;
  margin-bottom: 12px;
  font-size: 14px;
}

.lio-meta > div {
  display: flex;
  flex-direction: column;
}

.lio-label {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.lio-reason {
  margin-bottom: 12px;
}

.lio-reason p {
  margin: 0;
  padding: 8px 10px;
  font-size: 14px;
  background: #f8fafc;
  border-radius: 6px;
}

/* ---------- pending lays table ---------- */
.lio-pending {
  margin-bottom: 12px;
}

.lio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.lio-table th,
.lio-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #edf0f4;
}

.lio-table th {
  font-weight: 600;
  color: #0f3460;
  background: #f3f6fb;
}

/* ---------- comment + actions ---------- */
.lio-comment {
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  resize: vertical;
  box-sizing: border-box;
}

.lio-comment:focus {
  outline: none;
  border-color: #0f3460;
  box-shadow: 0 0 0 2px rgba(15, 52, 96, 0.15);
}

.lio-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.lio-actions-right {
  display: flex;
  gap: 8px;
}

.lio-btn {
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
}

.lio-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lio-btn-primary {
  background: #0f3460;
  color: #fff;
}

.lio-btn-primary:hover:not(:disabled) {
  background: #0b2848;
}

.lio-btn-reject {
  background: #fff;
  color: #b42318;
  border-color: #f1b5b0;
}

.lio-btn-reject:hover:not(:disabled) {
  background: #fdecec;
}

.lio-btn-outline {
  background: #fff;
  color: #0f3460;
  border-color: #0f3460;
}

.lio-btn-link {
  padding: 0;
  background: transparent;
  color: #0f3460;
  text-decoration: underline;
}

/* ---------- history ---------- */
.lio-history {
  list-style: none;
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 13px;
  background: #f8fafc;
  border-radius: 6px;
}

.lio-history li {
  display: flex;
  gap: 10px;
  padding: 4px 0;
}

.lio-history-when {
  min-width: 150px;
  color: #6b7280;
}

@media (max-width: 900px) {
  .lio-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tiny-range-picker.ant-picker {
  height: 20px;
  font-size: 10px;
  padding: 0 4px;
}

.tiny-range-picker .ant-picker-input > input {
  font-size: 10px;
  padding: 0;
  height: 18px;
}

.tiny-range-picker .ant-picker-suffix {
  font-size: 10px;
  margin-left: 2px;
}

.tiny-range-picker .ant-picker-separator {
  font-size: 10px;
  margin: 0 2px;
}

.emp-details {
  display: flex;
  align-items: center;
  gap: 10px;
}

.emp-avatar-box {
  width: 35px;
  height: 35px;
  min-width: 35px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
}

.emp-avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #5b8def;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.emp-text {
  display: flex;
  flex-direction: column;
}

.emp-title {
  font-weight: 500;
  font-size: 14px;
}

.emp-code {
  font-size: 12px;
  color: #888;
}

.ocs-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* KPI cards */
.ocs-kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #eef0f4;
  border-left: 3px solid var(--c);
  border-radius: 10px;
}
.ocs-kpi-label {
  font-size: 11px;
  color: #667085;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.ocs-kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--c);
  line-height: 1.2;
}
.ocs-kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--c) 10%, #fff);
}

/* toolbar */
.ocs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ocs-toolbar-title {
  font-weight: 600;
  color: #10335f;
}
.ocs-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* chips */
.ocs-chips,
.ocs-order-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ocs-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: color-mix(in srgb, var(--c) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 25%, #fff);
}
.ocs-chip-label {
  color: #667085;
}
.ocs-chip-value {
  color: var(--c);
}

/* order header */
.ocs-collapse {
  background: transparent;
}
.ocs-collapse > .ant-collapse-item {
  background: #fff;
  border: 1px solid #e6e9ef !important;
  border-radius: 12px !important;
  margin-bottom: 12px;
  overflow: hidden;
}
.ocs-collapse .ant-collapse-header {
  align-items: center !important;
  background: #f8fafc;
}
.ocs-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}
.ocs-order-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ocs-order-no {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  color: #10335f;
}

/* style block */
.ocs-style {
  border: 1px solid #eef0f4;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.ocs-style:last-child {
  margin-bottom: 0;
}
.ocs-style-top {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
}
.ocs-img {
  width: 120px;
  min-width: 120px;
  height: 120px;
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ocs-style-info {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ocs-style-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ocs-style-name {
  font-size: 15px;
  font-weight: 700;
  color: #10335f;
}
.ocs-style-code {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 6px;
  background: #eef2f7;
  color: #475467;
}
.ocs-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  grid-gap: 8px 16px;
  gap: 8px 16px;
}
.ocs-label {
  font-size: 11px;
  color: #98a2b3;
  text-transform: uppercase;
}
.ocs-value {
  font-size: 13px;
  color: #1d2939;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* table */
.ocs-style-table .ant-table-thead > tr > th {
  font-size: 11px;
  background: #f8fafc;
}
.ocs-style-table .ant-table-thead > tr > th.ocs-group-head {
  background: #eef2f7;
  color: #10335f;
  font-weight: 700;
}
.ocs-style-table tr.color-start > td {
  border-top: 2px solid #e6e9ef;
}
.ocs-color-name {
  font-weight: 600;
  color: #10335f;
}
.ocs-color-sub {
  font-size: 11px;
  color: #98a2b3;
}
.ocs-ellipsis {
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .ocs-style-top {
    flex-direction: column;
  }
}

:root {
  --ep-primary: #0e7490;
  --ep-primary-lt: #ecfeff;
  --ep-accent: #f97316;
  --ep-success: #059669;
  --ep-danger: #ef4444;
  --ep-border: #e2e8f0;
  --ep-bg: #f1f5f9;
  --ep-white: #ffffff;
  --ep-text: #0f172a;
  --ep-muted: #64748b;
  --ep-table-head: #3b1f5e;
}

/* ── Root ─────────────────────────────────────────────── */
.ep-root {
  background: #f1f5f9;
  background: var(--ep-bg);
  min-height: 100vh;
  color: #0f172a;
  color: var(--ep-text);
}
.ep-main-form {
  padding: 16px 20px 48px;
  min-height: 82vh;
  height: 82vh;
  overflow-x: hidden;
  scrollbar-color: "#0f346e";
}

/* ── Topbar ───────────────────────────────────────────── */
.ep-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  background: var(--ep-white);
  padding: 0 24px;
  height: 50px;
  border-bottom: 1.5px solid #e2e8f0;
  border-bottom: 1.5px solid var(--ep-border);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.dept-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 4px;
  scrollbar-width: thin;
}

.dept-pill {
  flex: 0 0 auto;
  min-width: 168px;
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  padding: 10px 14px 12px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.dept-pill:hover {
  border-color: #2b4570;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(43, 69, 112, 0.1);
}
.emp-type-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  margin-bottom: 4px;
  scrollbar-width: thin;
}

.emp-type-pill {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid #d7deea;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(26, 35, 50, 0.05);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.emp-type-pill:hover {
  border-color: #2b4570;
  box-shadow: 0 4px 12px rgba(43, 69, 112, 0.12);
  transform: translateY(-1px);
}

.emp-type-pill--active {
  background: #2b4570;
  border-color: #2b4570;
  box-shadow: 0 4px 12px rgba(43, 69, 112, 0.25);
}

.emp-type-pill--active .emp-type-pill__name,
.emp-type-pill--active .emp-type-pill__count,
.emp-type-pill--active .emp-type-pill__icon {
  color: #ffffff !important;
}

.emp-type-pill__icon {
  color: #2b4570;
  display: flex;
  align-items: center;
}

.emp-type-pill__name {
  font-size: 12.5px;
  font-weight: 600;
  color: #1a2332;
  white-space: nowrap;
}

.emp-type-pill__count {
  font-size: 11.5px;
  font-weight: 700;
  color: #2b4570;
  background: #eef2fb;
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

.emp-type-pill--active .emp-type-pill__count {
  background: rgba(255, 255, 255, 0.2);
}
.dept-pill--active {
  border-color: #e8871e;
  background: #fff8ef;
}

.dept-pill__top {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
}

.dept-pill__name {
  flex: 1 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1a2332;
}

.dept-pill__count {
  font-weight: 500;
  color: #1c2f4d;
  font-size: 13px;
}

.dept-pill__bar-track {
  height: 4px;
  border-radius: 999px;
  background: #eef1f6;
  overflow: hidden;
}

.dept-pill__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2b4570, #e8871e);
  border-radius: 999px;
}

.emp-dir__filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(26, 35, 50, 0.04);
}

.emp-dir__search {
  flex: 1 1 150px;
  max-width: 200px;
}

.search-icon {
  color: #64748b;
}

.emp-dir__select {
  min-width: 168px;
}

.emp-dir__show-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  margin-left: auto;
  white-space: nowrap;
}

.type-tag {
  border: 1px solid #e5e9f0;
  background: #ffffff;
  color: #64748b;
  font-weight: 500;
}

.emp-dir__pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  padding: 12px 0;
  border-top: 1px solid #e5e9f0;
}

.pagination-label {
  font-size: 13px;
  color: #64748b;
  padding: 0 4px;
}

.page-size-select {
  min-width: 104px;
}

.emp-dir__empty {
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  padding: 48px 0;
}

.emp-dir__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.emp-dir__title {
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: #1c2f4d;
}

.emp-dir__subtitle {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.emp-dir__view-toggle {
  background: #ffffff;
  border: 1px solid #e5e9f0;
  padding: 3px;
}

.segmented-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 13px;
}
.emp-dir__table-wrap {
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 10px;
  overflow: hidden;
}

.emp-dir__table-wrap .ant-table-thead > tr > th {
  background: #f2f4f8;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.emp-dir__table-wrap .ant-table-tbody > tr {
  cursor: pointer;
}

.emp-dir__table-wrap .ant-table-tbody > tr:hover > td {
  background: #f7f9fc;
}

.mono-cell {
  font-size: 12.5px;
  color: #1c2f4d;
}

.name-cell {
  font-weight: 600;
  color: #1a2332;
}

.muted-dash {
  color: #c2c9d6;
}
.edit-btn-emp {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border: 1.5px solid #2b4570;
  background: #ffffff;
  color: #2b4570;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

.edit-btn-emp:hover {
  background: #2b4570;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(43, 69, 112, 0.3);
  transform: translateY(-1px);
}

.edit-btn-emp:active {
  transform: translateY(0) scale(0.96);
}

.edit-btn-emp:focus-visible {
  outline: 2px solid #2b4570;
  outline-offset: 2px;
}

.edit-btn-emp svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.emp-dir__grid {
  margin-bottom: 8px;
}

.emp-card {
  border-radius: 12px;
  border: 1px solid #e5e9f0;
  height: 100%;
  box-shadow: 0 1px 2px rgba(26, 35, 50, 0.04);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.emp-card:hover {
  box-shadow: 0 14px 28px rgba(26, 35, 50, 0.1);
  transform: translateY(-3px);
  border-color: #d7deea;
}

.emp-card .ant-card-body {
  padding: 16px;
  position: relative;
}

.emp-card__accent {
  height: 4px;
  margin: -16px -16px 14px;
  border-radius: 12px 12px 0 0;
}

.emp-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.emp-card__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.emp-card__identity-text {
  min-width: 0;
}

.emp-card__name {
  font-size: 15.5px;
  font-weight: 600;
  margin: 0;
  color: #1a2332;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-card__role {
  font-size: 12px;
  color: #64748b;
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-card__meta {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 3px;
}

.meta-divider {
  margin: 0 6px;
}

.section-label-emp {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8871e;
  margin-bottom: 8px;
}

.emp-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.dept-tag {
  border: 1px solid #e5e9f0;
  background: #f2f4f8;
  font-weight: 500;
}

.emp-card__divider {
  border-top: 1px dashed #e5e9f0;
  margin-bottom: 12px;
}

.emp-card__info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 7px 10px;
  gap: 7px 10px;
  margin-bottom: 14px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #1a2332;
  min-width: 0;
}

.info-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-item--full {
  grid-column: 1 / -1;
}

.info-icon {
  color: #1d1e1f;
  flex-shrink: 0;
}

.info-value--truncate {
  max-width: 100%;
}

.emp-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #e5e9f0;
  padding-top: 12px;
}

.ref-id {
  display: inline-flex;
  align-items: center;
  gap: 4px;

  font-size: 11px;
  color: #64748b;
}

@media (max-width: 992px) {
  .emp-dir {
    padding: 18px 16px 36px;
  }
  .emp-dir__filters {
    flex-direction: column;
    align-items: stretch;
  }
  .emp-dir__search,
  .emp-dir__select {
    max-width: none;
    width: 100%;
  }
  .emp-dir__show-all {
    margin-left: 0;
  }
}

@media (max-width: 576px) {
  .emp-dir__title {
    font-size: 21px;
  }
  .emp-dir__header {
    flex-direction: column;
    align-items: flex-start;
  }
  .dept-pill {
    min-width: 148px;
  }
}

.ep-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ep-logo-icon {
  font-size: 18px;
  color: #0e7490;
  color: var(--ep-primary);
  padding-right: 5px;
}
.ep-topbar-title {
  font-size: 15px;
  font-weight: 800;
  color: #0e7490;
  color: var(--ep-primary);
  letter-spacing: -0.3px;
}
.ep-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ep-topbar-btn.ant-btn {
  height: 30px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 7px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ep-btn-history.ant-btn {
  background: #0e7490;
  background: var(--ep-primary);
  color: #fff;
  border: none;
}
.ep-btn-history.ant-btn:hover {
  background: #0c6680 !important;
  color: #fff !important;
}
.ep-btn-edit.ant-btn {
  background: #1e293b;
  color: #fff;
  border: none;
}
.ep-btn-edit.ant-btn:hover {
  background: #334155 !important;
  color: #fff !important;
}

/* ── Stepper ──────────────────────────────────────────── */
.ep-stepper-wrap {
  background: #ffffff;
  background: var(--ep-white);
  border-bottom: 1.5px solid #e2e8f0;
  border-bottom: 1.5px solid var(--ep-border);
  overflow-x: auto;
  padding: 0 24px;
}

.ep-stepper {
  display: flex;
  align-items: center;
  min-width: -webkit-max-content;
  min-width: max-content;
  padding: 10px 0;
  gap: 0;
}

.ep-step {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 7px;
  font-family: inherit;
  position: relative;
  transition: background 0.14s;
}
.ep-step:hover {
  background: #f1f5f9;
}

.ep-step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: 2px solid #e2e8f0;
  border: 2px solid var(--ep-border);
  color: #64748b;
  color: var(--ep-muted);
  background: #fff;
  flex-shrink: 0;
  transition: all 0.2s;
}
.ep-step-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  color: var(--ep-muted);
  white-space: nowrap;
}
.ep-step-active .ep-step-icon {
  background: #0e7490;
  background: var(--ep-primary);
  border-color: #0e7490;
  border-color: var(--ep-primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.18);
}
.ep-step-active .ep-step-label {
  color: #0e7490;
  color: var(--ep-primary);
  font-weight: 800;
}
.employee-del-container {
  justify-content: center;
  display: flex;
}

.employee-img-container {
  height: 17vh;
  width: 150px;
}
.employe-file-input-label {
  border: 2px dashed #ccc;
  text-align: center;
  height: 160px;
  width: 160px;
  border-radius: 5px;
  padding: 5px;
}
.ep-step-done .ep-step-icon {
  background: #059669;
  background: var(--ep-success);
  border-color: #059669;
  border-color: var(--ep-success);
  color: #fff;
}
.ep-step-done .ep-step-label {
  color: #059669;
  color: var(--ep-success);
}

.ep-step-line {
  width: 28px;
  height: 2px;
  background: #e2e8f0;
  background: var(--ep-border);
  display: block;
  margin-left: 4px;
  flex-shrink: 0;
}
.ep-line-done {
  background: #059669;
  background: var(--ep-success);
}

/* ── Main ─────────────────────────────────────────────── */
.ep-main {
  padding: 16px 20px 48px;
}

.ep-content-area {
  background: #ffffff;
  background: var(--ep-white);
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  border: 1.5px solid var(--ep-border);
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

/* ── Nav row ──────────────────────────────────────────── */
.ep-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1.5px solid #e2e8f0;
  border-bottom: 1.5px solid var(--ep-border);
  background: #f8fafc;
}

.ep-nav-right {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.ep-tab-badge.ant-tag {
  font-size: 12.5px;
  font-weight: 800;
  padding: 3px 14px;
  border-radius: 20px;
  background: #ecfeff;
  background: var(--ep-primary-lt);
  color: #0e7490;
  color: var(--ep-primary);
  border: 1.5px solid #a5f3fc;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ep-nav-btn.ant-btn {
  height: 32px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12.5px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ep-btn-prev.ant-btn {
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border: 1.5px solid var(--ep-border);
  color: #475569;
}
.ep-btn-prev.ant-btn:hover:not(:disabled) {
  background: #e2e8f0 !important;
  color: #334155 !important;
}
.ep-btn-next.ant-btn {
  background: #f97316;
  background: var(--ep-accent);
  border: none;
  color: #fff;
}
.ep-btn-next.ant-btn:hover {
  background: #ea6c04 !important;
  color: #fff !important;
}
.ep-btn-submit.ant-btn {
  background: #059669;
  background: var(--ep-success);
  border: none;
  color: #fff;
  margin-left: 200px;
}

/* ── Tab content ──────────────────────────────────────── */
.ep-tab-content {
  display: flex;
  flex-direction: column;
}

/* ── Section card ─────────────────────────────────────── */
.ep-section-card {
  border-bottom: 1.5px solid #e2e8f0;
  border-bottom: 1.5px solid var(--ep-border);
}
.ep-section-card:last-child {
  border-bottom: none;
}

.ep-section-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  border-bottom: 1px solid var(--ep-border);
}
.ep-section-icon {
  font-size: 13px;
  color: #0e7490;
  color: var(--ep-primary);
  display: flex;
}
.ep-section-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #0e7490;
  color: var(--ep-primary);
  letter-spacing: -0.1px;
}

.ep-section-body {
  padding: 14px 20px 16px;
}

/* ── Field label + input ──────────────────────────────── */
.ep-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ep-field-label {
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.1px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
}
.ep-req {
  color: #ef4444;
  color: var(--ep-danger);
  font-size: 12px;
  line-height: 1;
}

/* All inputs compact */
.ep-input.ant-input,
.ep-input.ant-input-affix-wrapper {
  border-radius: 6px !important;
  border: 1.5px solid #e2e8f0 !important;
  border: 1.5px solid var(--ep-border) !important;
  height: 25px !important;
  font-size: 11px !important;
  font-family: inherit !important;
  padding: 0 8px !important;
}
.ep-input.ant-input-affix-wrapper {
  padding: 0 8px !important;
}
.ep-input.ant-input-affix-wrapper .ant-input {
  height: 28px !important;
  font-size: 11px !important;
}

.ep-input.ant-input:focus,
.ep-input.ant-input-affix-wrapper-focused {
  border-color: #0e7490 !important;
  border-color: var(--ep-primary) !important;
  box-shadow: 0 0 0 2px rgba(14, 116, 144, 0.12) !important;
}

.ep-datepicker {
  border-radius: 6px !important;
  border: 1.5px solid #e2e8f0 !important;
  border: 1.5px solid var(--ep-border) !important;
  font-size: 11px !important;
  font-family: inherit !important;
  padding: 0 8px !important;
  width: 180px !important;
  height: 26px !important;
}
.ep-datepicker.ant-picker:hover,
.ep-datepicker.ant-picker-focused {
  border-color: #0e7490 !important;
  border-color: var(--ep-primary) !important;
  box-shadow: 0 0 0 2px rgba(14, 116, 144, 0.12) !important;
}
.ep-datepicker .ant-picker-input > input {
  font-size: 11px !important;
  font-family: inherit !important;
}

.ep-select.ant-select .ant-select-selector {
  border-radius: 6px !important;
  border: 1.5px solid #e2e8f0 !important;
  border: 1.5px solid var(--ep-border) !important;
  display: flex !important;
  align-items: center !important;
  font-size: 11px !important;
  font-family: inherit !important;
  padding: 0 8px !important;
}
.ep-select.ant-select .ant-select-selection-item,
.ep-select.ant-select .ant-select-selection-placeholder {
  font-size: 11px !important;
  line-height: 28px !important;
}
.ep-select.ant-select-focused .ant-select-selector {
  border-color: #0e7490 !important;
  border-color: var(--ep-primary) !important;
  box-shadow: 0 0 0 2px rgba(14, 116, 144, 0.12) !important;
}

.ep-pfx {
  color: #64748b;
  color: var(--ep-muted);
  font-size: 12px;
}

/* ── Radio + Checkbox ─────────────────────────────────── */
.ep-radio-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 2px;
}
.ep-radio.ant-radio-wrapper {
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  font-family: inherit;
}
.ep-radio .ant-radio-checked .ant-radio-inner {
  border-color: #0e7490;
  border-color: var(--ep-primary);
  background: #0e7490;
  background: var(--ep-primary);
}

.ep-checkbox.ant-checkbox-wrapper {
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  font-family: inherit;
}
.ep-checkbox .ant-checkbox-checked .ant-checkbox-inner {
  background: #0e7490;
  background: var(--ep-primary);
  border-color: #0e7490;
  border-color: var(--ep-primary);
}

/* ── Inline checks row (ESI / PF / Vehicle / DL) ─────── */
.ep-check-inline-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 6px 0 2px;
}

.ep-check-col {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ep-check-field-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ── Inline radio block (Sex / Marital status row) ────── */
.ep-inline-checks-row {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: wrap;
}

.ep-inline-radio-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ep-inline-label {
  white-space: nowrap;
}

/* Avatar upload compact */
.ep-avatar-upload.ant-upload-picture-card-wrapper
  .ant-upload.ant-upload-select {
  width: 54px !important;
  height: 54px !important;
  border-radius: 8px !important;
  border: 1.5px dashed #e2e8f0 !important;
  border: 1.5px dashed var(--ep-border) !important;
  margin: 0 !important;
}
.ep-upload-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: #64748b;
  color: var(--ep-muted);
}

/* ── Same-as checkbox row ─────────────────────────────── */
.ep-same-row {
  margin-bottom: 10px;
}

/* ── Upload buttons ───────────────────────────────────── */
.ep-upload-text-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1.5px dashed #e2e8f0;
  border: 1.5px dashed var(--ep-border);
  background: #f8fafc;
  color: #64748b;
  color: var(--ep-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition:
    border-color 0.14s,
    color 0.14s;
  white-space: nowrap;
}
.ep-upload-text-btn:hover {
  border-color: #0e7490;
  border-color: var(--ep-primary);
  color: #0e7490;
  color: var(--ep-primary);
}

.ep-upload-icon-btn {
  display: inline-flex;
  align-self: center;
  justify-content: center;
  width: 38px;
  height: 28px;
  border-radius: 6px;
  border: 1.5px dashed #e2e8f0;
  border: 1.5px dashed var(--ep-border);
  background: #f8fafc;
  color: #64748b;
  color: var(--ep-muted);
  font-size: 13px;
  cursor: pointer;
  transition:
    border-color 0.14s,
    color 0.14s;
}
.ep-upload-icon-btn:hover {
  border-color: #0e7490;
  border-color: var(--ep-primary);
  color: #0e7490;
  color: var(--ep-primary);
}

/* ── Inline table ─────────────────────────────────────── */
.ep-itable-wrap {
  border: 1.5px solid #e2e8f0;
  border: 1.5px solid var(--ep-border);
  border-radius: 8px;
  overflow: hidden;
}

.ep-itable-head,
.ep-itable-row {
  display: flex;
  align-items: stretch;
}

.ep-itable-head {
  background: #3b1f5e;
  background: var(--ep-table-head);
}

.ep-ith {
  padding: 7px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
}
.ep-ith:last-child {
  border-right: none;
}
.ep-ith-sno {
  flex: 0 0 36px !important;
  min-width: 36px !important;
  justify-content: center;
}
.ep-ith-act {
  flex: 0 0 36px !important;
  min-width: 36px !important;
}

.ep-itable-row {
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}
.ep-itable-row:last-of-type {
  border-bottom: none;
}
.ep-itable-row:hover {
  background: #f8fafc;
}

.ep-itd {
  padding: 5px 6px;
  flex: 1 1;

  align-items: center;
  border-right: 1px solid #f1f5f9;
  min-width: 0;
}

.ep-itd:last-child {
  border-right: none;
}

/* Override ant input sizes inside table cells */
.ep-itd .ant-input,
.ep-itd .ep-input {
  height: 26px !important;
  font-size: 12px !important;
  border-radius: 5px !important;
  padding: 0 6px !important;
  width: 100%;
}
.ep-itd .ant-select .ant-select-selector {
  height: 26px !important;
  min-height: 26px !important;
  font-size: 12px !important;
  padding: 0 6px !important;
  border-radius: 5px !important;
}
.ep-itd .ant-select .ant-select-selection-item,
.ep-itd .ant-select .ant-select-selection-placeholder {
  line-height: 24px !important;
  font-size: 12px !important;
}
.ep-itd .ant-picker {
  height: 26px !important;
  font-size: 12px !important;
  padding: 0 6px !important;
  border-radius: 5px !important;
}
.ep-itd .ant-picker input {
  font-size: 12px !important;
}

.ep-del-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: none;
  background: #fee2e2;
  color: #ef4444;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.13s;
}
.ep-del-btn:hover {
  background: #fca5a5;
}

.ep-add-row-btn {
  width: 100%;
  padding: 7px;
  background: #f8fafc;
  border: none;
  border-top: 1.5px dashed #e2e8f0;
  border-top: 1.5px dashed var(--ep-border);
  color: #0e7490;
  color: var(--ep-primary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.13s;
}
.ep-add-row-btn:hover {
  background: #ecfeff;
}

/* ── Declaration ──────────────────────────────────────── */
.ep-declaration-box {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 8px;
  padding: 14px 16px;
}
.ep-declaration-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #92400e;
  line-height: 1.6;
}
.ep-declaration-check {
  align-items: flex-start !important;
}

.ep-decl-warn {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 5px;
  padding: 4px 10px;
  display: inline-block;
  margin-left: 10px;
}

.float-div-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}

.common-header-ep {
  font-size: 15px;
  font-weight: bold;
  margin: 0px;
  gap: 10px;
}

.ep-check-col-vehicle {
  width: 190px;
}

.ep-esi-pf-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
}

.ep-esi-pf-row .ep-field {
  min-width: 220px;
}

.ep-esi-pf-row input,
.ep-esi-pf-row .ant-input {
  width: 160px;
}

.ep-one-line-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.ep-one-line-row .ep-field {
  display: flex;
}

.ep-check-col {
  white-space: nowrap;
}
.emp-dir__selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 7px 12px;
  margin: 8px 0 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-sizing: border-box;
}

.emp-dir__selection-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.emp-dir__selection-count::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #4f46e5;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.emp-dir__selection-bar > :not(.emp-dir__selection-count) {
  flex-shrink: 0;
}

.emp-dir__selection-bar .emp-dir__selection-count + * {
  margin-left: auto;
}

.emp-dir__selection-bar .ant-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.emp-dir__selection-bar .ant-btn:hover {
  border-color: #94a3b8;
  color: #334155;
}

.epm .ant-modal-content {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}
.epm .ant-modal-header {
  margin: 0;
  padding: 16px 22px;
  border-bottom: 1px solid #e6e9f0;
  background: #f4f6fb;
}
.epm .ant-modal-body {
  padding: 14px 22px 8px;
}
.epm .ant-modal-footer {
  margin: 0;
  padding: 12px 22px;
  border-top: 1px solid #e6e9f0;
}

/* title */
.epm__title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.epm__title-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #0f3460;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.epm__title-main {
  font-size: 15px;
  font-weight: 700;
  color: #0f3460;
  line-height: 1.2;
}
.epm__title-sub {
  font-size: 12px;
  font-weight: 400;
  color: #5a6b8c;
  margin-top: 2px;
}

/* toolbar */
.epm__toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

/* body */
.epm__body {
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}
.epm__group {
  margin-bottom: 14px;
}
.epm__group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e6e9f0;
}
.epm__group-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f3460;
}
.epm__group-count {
  margin: 0;
  font-size: 11px;
  color: #5a6b8c;
  background: #fff;
}

/* chips */
.epm__chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  grid-gap: 8px;
  gap: 8px;
}
.epm__chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #d9dee8;
  border-radius: 8px;
  font-size: 12.5px;
  color: #333;
  background: #fff;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.epm__chip:hover {
  border-color: #0f3460;
}
.epm__chip--on {
  border-color: #0f3460;
  background: #eef2fa;
  color: #0f3460;
  font-weight: 600;
}

/* hint */
.epm__hint {
  margin: 4px 0 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #ad6800;
  font-size: 12px;
}

/* footer */
.epm__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.epm__count {
  font-size: 12.5px;
  color: #5a6b8c;
}
.epm__count strong {
  color: #0f3460;
}
.epm__footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.epm__print-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 6px;
  background: #0f3460;
  color: #fff;
}
.epm__print-wrap button,
.epm__print-wrap svg {
  color: #fff;
}
.epm__print-label {
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 600px) {
  .epm__chips {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .emp-dir__selection-bar {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px;
  }

  .emp-dir__selection-bar .emp-dir__selection-count + * {
    margin-left: 0;
  }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .ep-main {
    padding: 10px 10px 36px;
  }
  .ep-section-body {
    padding: 12px 12px 14px;
  }
  .ep-topbar {
    padding: 0 14px;
  }
  .ep-inline-checks-row {
    gap: 14px;
  }
  .ep-inline-radio-block {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
}

.mill-supp-card-container {
  margin: 10px 0 0 0;
  height: 46vh;
  overflow-x: auto;
}
.mill-supp-select {
  display: grid;
  width: 80%;
}

.supp-table-td {
  border-radius: 2px;
  text-align: center;
  min-width: 18vw;
  background: #f6f6f6;
}

.mill-grid-divide-50 {
  display: grid;
  grid-template-columns: 1fr 4fr;
}

.mill-inner-tabs-main-container {
  border-radius: 5px;
  padding: 0px 5px 5px 5px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 25fr 1fr;
}
.mill-input-fields-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  grid-column-gap: 10px;
  column-gap: 10px;
}

.mill-image-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 2px;
  border: 2px dashed #ccc;
  gap: 10px;
  border-radius: 5px;
}
.mill-img {
  width: 30px;
}

.mill-checkbox-container {
  text-align: center;
}
.mill-cert-table-td {
  min-width: 25vw;
  max-width: 0;
}
.mill-image-label {
  margin: 0px;
  font-size: 12px;
  overflow: hidden;
  white-space: pre-wrap;
  cursor: pointer;
}
.mill-margin {
  padding: 6px;
}

.mill-file-img {
  width: 30%;
  margin: 10px 0;
}
.mill-file-upload-container {
  border: 2px dashed #ccc;
  text-align: center;
  border-radius: 5px;
  padding: 2px;
  height: 56px;
}
.mill-sub-details-container {
  margin: 0.25em;
  border-radius: 5px;
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
  padding: 15px;
}
.mill-inner-tabs-container {
  height: 40vh;
  overflow-y: auto;
  margin: 10px 0 0 0;
}
.mill-edit-checkBox-container {
  display: flex;
  gap: 10px;
}

.tandC-table-td {
  border-radius: 2px;
  text-align: center;
  background: #f6f6f6;
  min-width: 88vw;
}
.tandC-input {
  min-height: 30vh !important;
  resize: none !important;
}

.tandC-outer-grid {
  display: grid;
  grid-template-columns: 9fr 1fr;
}

.common-qr {
  white-space: noWrap;
}

.prod-std-lbl-df {
  font-weight: 700;
  display: flex;
  align-items: center;
  text-indent: 5px;
  color: #0f3460;
  flex-wrap: nowrap;
  white-space: pre-line;
  margin-top: 5px;
  margin-bottom: 5px;
  font-size: 0.625rem;
}

.readonly-field {
  display: flex;
  flex-direction: column;
}

.readonly-label {
  font-size: 0.8rem;
  font-weight: bold;
  color: #6a1e55;
}

.readonly-value {
  font-size: 0.7rem;
  color: #103460;
}

.duties-info-grid {
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
    rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
  border-radius: 5px;
  padding-bottom: 0.25em;
  margin: 0.25em;
}

.duties-file-uploader {
  border: 2px dashed #ccc;
  padding: 3px;
}

.duty-file-container {
  text-align: center;
  padding: 0 5px;
  display: flex;
  gap: 10px;
}

.duty-image-holder {
  align-items: center;
  display: flex;
  width: 100%;
  text-align: center;
  margin: 0 auto;
  height: 20px;
}
.duties-img {
  height: 60px;
  width: 60px;
}
.duties-file-heading {
  color: #0f3460;
  display: flex;
  flex-direction: column;
  font-size: 0.625rem;
  margin-top: 10px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
.duties-img {
  height: 40px;
  width: 40px;
}
.duties-button-container {
  display: grid;
  justify-content: right;
}
.duties-inner-container-btns {
  text-align: right;
  display: flex;
  align-items: end;
}
.duties-delete-upload {
  display: flex;
  align-content: center;
  justify-content: center;
  align-items: center;
}
.duties-img {
  height: 60px;
  width: 60px;
}

/* Graph paper cards with a gradient bottom bar.
   Replace the old .management-search*, .menu-card* and .settings-grp-icon
   rules in Menubar.css with this. */

.mc-page {
  margin: 0 auto;
  padding: 8px 12px 32px;
}

.mc-search-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0 28px;
}
.mc-search.ant-input-affix-wrapper {
  max-width: 420px;
  border-radius: 999px;
  padding: 8px 18px;
  background: #fff;
  border-color: #e6e8f0;
  box-shadow: 0 1px 2px rgba(28, 32, 51, 0.04);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.mc-search.ant-input-affix-wrapper:hover,
.mc-search.ant-input-affix-wrapper-focused {
  border-color: #8b8cf6;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
.mc-search .ant-input-prefix {
  color: #8a8fa6;
  -webkit-margin-end: 10px;
          margin-inline-end: 10px;
}

/* ---------- Group header ---------- */
.mc-group + .mc-group {
  margin-top: 36px;
}
.mc-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.mc-group-bar {
  flex: none;
  width: 4px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
}
.mc-group-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: #1c2033;
}
.mc-group-count {
  flex: none;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: #5b5fc7;
  background: #eef0ff;
  border-radius: 999px;
}
.mc-group-line {
  flex: 1 1;
  height: 1px;
  background: linear-gradient(90deg, #dfe1ee, rgba(223, 225, 238, 0));
}

.mc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}
.mc-empty {
  margin: 48px 0;
}

/* ---------- Card: graph paper ---------- */
.mc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 132px;
  padding: 18px 18px 22px;
  overflow: hidden;
  color: #1c2033;
  text-decoration: none;
  border: 1px solid #e6e8f0;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 92%),
    linear-gradient(
        90deg,
        color-mix(in srgb, var(--c) 12%, transparent) 1px,
        transparent 1px
      )
      0 0 / 16px 16px,
    linear-gradient(
        color-mix(in srgb, var(--c) 12%, transparent) 1px,
        transparent 1px
      )
      0 0 / 16px 16px,
    #fff;
  box-shadow: 0 1px 2px rgba(28, 32, 51, 0.05);
  transition:
    transform 0.3s,
    border-color 0.3s,
    box-shadow 0.3s;
}
.mc-card > .mc-icon,
.mc-card > .mc-label {
  position: relative;
  z-index: 1;
}

/* Gradient bottom bar, grows on hover */
.mc-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  z-index: 1;
  background: linear-gradient(90deg, var(--c), var(--d));
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.4s;
}

/* Icon: soft tint, no coloured shadow */
.mc-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 22px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 11%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 18%, #fff);
  transition:
    background 0.3s,
    color 0.3s;
}

a.mc-card:hover .mc-icon,
a.mc-card:focus-visible .mc-icon {
  background: linear-gradient(135deg, var(--c), var(--d));
  border-color: transparent;
  color: #fff;
}
a.mc-card:hover .mc-icon svg,
a.mc-card:hover .mc-icon svg *,
a.mc-card:focus-visible .mc-icon svg,
a.mc-card:focus-visible .mc-icon svg * {
  color: #fff !important;
  width: 1em;
  height: 1em;
}
.mc-icon svg {
  width: 1em;
  height: 1em;
  color: inherit;
  transition:
    color 0.3s,
    fill 0.3s,
    stroke 0.3s;
}

.mc-label {
  display: block;
  padding-right: 34px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}

.mc-arrow {
  position: absolute;
  right: 14px;
  bottom: 18px;
  z-index: 1;
  width: 28px;
  height: 28px;
  padding: 7px;
  border-radius: 50%;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 11%, #fff);
  transition:
    background 0.3s,
    color 0.3s,
    transform 0.3s;
}

/* Hover: lift, neutral shadow, full bar */
a.mc-card:hover {
  transform: translateY(-3px);
  color: #1c2033;
  border-color: color-mix(in srgb, var(--c) 30%, #fff);
  box-shadow: 0 10px 22px -16px rgba(28, 32, 51, 0.4);
}
a.mc-card:hover::after {
  transform: none;
}
a.mc-card:hover .mc-icon {
  background: var(--c);
  color: #fff;
}
a.mc-card:hover .mc-arrow {
  background: var(--c);
  color: #fff;
  transform: translateX(2px);
}
a.mc-card:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 2px;
}

/* ---------- Coming soon ---------- */
.mc-soon {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  color: #8a6d00;
  background: #fff6cc;
}
.mc-card.is-disabled {
  cursor: not-allowed;
  filter: saturate(0.35);
  opacity: 0.8;
}
.mc-card.is-disabled::after {
  transform: scaleX(0.15);
}

/* ---------- Responsive / motion ---------- */
@media (max-width: 576px) {
  .mc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .mc-card {
    padding: 14px 14px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mc-card,
  .mc-icon,
  .mc-arrow,
  .mc-card::after {
    transition: none;
  }
  a.mc-card:hover {
    transform: none;
  }
}

.col-width {
  width: 4vw;
}
.marker-tbl {
  overflow-x: auto;
  width: 100%;
}
.cur-sel-wgt {
  font-weight: bold;
  color: #0f3460;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-size: 0.7rem;
}

.cut-plan-display-flex-center {
  display: grid;
  grid-template-columns: 1fr 10fr;
  align-items: center;
  grid-column-gap: 5px;
  column-gap: 5px;
  /* margin: 15px 0; */
}
.no-data {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
  color: #6b7280; /* muted gray */
  font-size: 1.125rem; /* 18px */
  margin: 2rem auto;
  width: 100%;
  max-width: 90%;
  box-sizing: border-box;
  word-wrap: break-word;
}

.tooltip-header {
  position: relative;
}

.tooltip-header:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #333;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
}

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

.m-summary-section {
  padding: 12px 0;
}

.m-summary-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr)); /* single row */
  grid-gap: 6px;
  gap: 6px;
}

.m-summary-card {
  background: #f7f8f9;
  border-radius: 6px;
  padding: 7px 10px;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.m-summary-label {
  font-size: 10px;
  color: #888;
  line-height: 1.3;
  flex: 1 1;
}

.m-summary-value {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.2;
  white-space: nowrap;
  background: #e8edf5;
  padding: 2px 8px;
  border-radius: 4px;
  min-width: 28px;
  text-align: center;
}

.m-summary-value.m-success {
  background: #e6f4ee;
  color: #0f6e56;
}

.m-summary-value.m-danger {
  background: #fdeaea;
  color: #a32d2d;
}

.lay-prod-card {
  display: inline-flex;
  flex-direction: column;
  min-width: 100px;
  padding: 4px 6px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.lay-prod-label {
  font-size: 10px;
  color: #8c8c8c;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.lay-prod-value {
  font-size: 16px;
  font-weight: 700;
  color: #1677ff;
  line-height: 1.2;
}

/* Each metric as a distinct chip, not bare inline text */
.time-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #f5f6fa;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.4;
}

.time-card .prod-std-lbl {
  font-weight: 600;
  color: #6b7280;
  margin: 0;
  font-size: 12px;
}

.time-card .prod-std-lbl::after {
  content: ":";
  margin-right: 2px;
}

/* value text */
.time-card {
  color: #111827;
}

.pos-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 12px;
  background: #f5f6fa;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  min-width: 100px;
}

.pos-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pos-value {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  line-height: 1.3;
}

.m-summary-datetime {
  white-space: normal;
  word-break: break-word;
  text-align: left;
  max-width: 100%;
  line-height: 1.3;
  font-size: 12px;
}

.mkr-page {
  --mkr-navy-900: #1a1a2e;
  --mkr-navy-800: #16213e;
  --mkr-primary: #0f3460;
  --mkr-accent: #e94560;
  --mkr-ink: #1a1a2e;
  --mkr-muted: #6b7794;
  --mkr-line: #e3e8f1;
  --mkr-soft: #f4f6fb;
  --mkr-tint: #e8eef7;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mkr-panel {
  background: #fff;
  border: 1px solid var(--mkr-line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15, 52, 96, 0.08);
}

/* Slim header */
.mkr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 16px;
  background: var(--mkr-primary);
  border-bottom: 3px solid var(--mkr-accent);
  color: #fff;
}
.mkr-head__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.mkr-head__title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.mkr-chip {
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mkr-primary);
  background: #fff;
  border-radius: 999px;
}
.mkr-head__name {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.mkr-head__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.mkr-badge.ant-tag {
  margin: 0;
  padding: 1px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 0;
  border-radius: 999px;
}

/* Body */
.mkr-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 16px;
}

/* Key metric tiles */
.mkr-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  grid-gap: 10px;
  gap: 10px;
}
.mkr-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--mkr-soft);
  border: 1px solid var(--mkr-line);
  border-left: 3px solid var(--mkr-primary);
  border-radius: 8px;
  min-width: 0;
}
.mkr-tile__label {
  font-size: 11.5px;
  color: var(--mkr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mkr-tile__value {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--mkr-primary);
  overflow-wrap: anywhere;
}
.mkr-tile--eff {
  border-left-color: var(--mkr-accent);
}
.mkr-tile--eff .mkr-tile__value {
  color: var(--mkr-accent);
}
.mkr-meter {
  height: 4px;
  margin-top: 4px;
  background: #dbe2ee;
  border-radius: 999px;
  overflow: hidden;
}
.mkr-meter__bar {
  height: 100%;
  background: var(--mkr-accent);
  border-radius: 999px;
}

/* Detail groups */
.mkr-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 10px;
  gap: 10px;
}
.mkr-group {
  padding: 10px 14px 6px;
  background: #fff;
  border: 1px solid var(--mkr-line);
  border-radius: 8px;
}
.mkr-group__title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mkr-primary);
}
.mkr-list {
  margin: 0;
}
.mkr-list__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--mkr-line);
}
.mkr-list__label {
  font-size: 12.5px;
  color: var(--mkr-muted);
}
.mkr-list__value {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--mkr-ink);
  text-align: right;
  overflow-wrap: anywhere;
}

/* Pending lays */
.mkr-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--mkr-tint);
  border-bottom: 1px solid var(--mkr-line);
}
.mkr-section-head__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--mkr-primary);
}
.mkr-section-head__count {
  min-width: 22px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  color: #fff;
  background: var(--mkr-primary);
  border-radius: 999px;
}
.mkr-table {
  padding: 8px 12px 12px;
  overflow-x: auto;
}
.mkr-table .ant-table-thead > tr > th {
  background: var(--mkr-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.mkr-table .ant-table-tbody > tr {
  cursor: pointer;
}
.mkr-table .ant-table-tbody > tr:hover > td {
  background: var(--mkr-tint);
}

@media (max-width: 576px) {
  .mkr-head {
    flex-wrap: wrap;
  }
  .mkr-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mkr-head__name {
    max-width: 100%;
  }
}

.size-selection-container {
  padding: 4px 2px;
}

.size-selection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.size-selection-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.size-selection-heading {
  font-size: 14px;
  font-weight: 600;
  color: #0f3460;
}

.size-selection-count {
  font-size: 12px;
  color: #64748b;
}

.size-selection-grid {
  margin-top: 4px;
}

.size-selection-card {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #d9e2ec;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.size-selection-card:hover {
  border-color: #0f3460;
  background: #f5f8fc;
}

.size-selection-card.selected {
  background: #edf4ff;
  border-color: #0f3460;
}

.size-selection-card .ant-checkbox-wrapper {
  width: 100%;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
}

.size-selection-card.selected .ant-checkbox-wrapper {
  color: #0f3460;
  font-weight: 600;
}

.size-selection-validation {
  margin-top: 14px;
  padding: 8px 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
}

@media (max-width: 576px) {
  .size-selection-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .size-selection-card {
    min-height: 40px;
    padding: 6px 8px;
  }
}

.zero-order-validation-modal .ant-modal-content {
  padding: 20px 24px 16px;
  border-radius: 10px;
}

.zero-order-validation-modal .ant-modal-footer {
  margin-top: 12px;
  text-align: right;
}

.zero-order-alert {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.zero-order-alert-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #faad14;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 32px;
  text-align: center;
}

.zero-order-alert-body {
  flex: 1 1;
  min-width: 0;
}

.zero-order-alert-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f1f1f;
  margin-bottom: 4px;
}

.zero-order-alert-text {
  font-size: 13px;
  color: #595959;
  margin-bottom: 8px;
}

.zero-order-alert-list {
  margin: 0;
  padding-left: 18px;
  max-height: 160px;
  overflow-y: auto;
  font-size: 13px;
  color: #262626;
}

.zero-order-alert-list li {
  margin-bottom: 4px;
}

/* ── Root ─────────────────────────────────────────────── */
.fm-root {
  margin: 10px auto;
  padding: 0 10px 10px;
  color: #111827;
  height: 79vh;
  overflow-x: hidden;
}

/* ── Header ───────────────────────────────────────────── */
.fm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.fm-title.ant-typography {
  font-weight: 800;
  font-size: 21px;
  color: #0f172a;
  margin: 0 0 4px !important;
  letter-spacing: -0.4px;
}

.fm-subtitle {
  color: #64748b;
  font-size: 13.5px;
  line-height: 1.5;
}

.fm-save-btn.ant-btn {
  background: #59bd4a;
  border: none;
  color: #fff;
  font-weight: 700;
  height: 38px;
  padding: 0 22px;
  border-radius: 9px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition:
    background 0.18s,
    transform 0.12s;
  flex-shrink: 0;
}
.fm-save-btn.ant-btn:hover {
  background: #1d4ed8 !important;
  color: #fff !important;
  transform: translateY(-1px);
}

/* ── Stats bar ────────────────────────────────────────── */
.fm-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.fm-stat-card {
  flex: 1 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 11px;
  border: 1.5px solid;
  transition:
    transform 0.14s,
    box-shadow 0.14s;
}
.fm-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}
.fm-stat-total {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

.fm-stat-icon {
  font-size: 17px;
  display: flex;
}
.fm-stat-count {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}
.fm-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ── Bulk bar ─────────────────────────────────────────── */
.fm-bulk {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.fm-bulk-label {
  color: #64748b;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.fm-bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1.5px solid;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition:
    opacity 0.14s,
    transform 0.12s;
  white-space: nowrap;
}
.fm-bulk-btn:hover {
  opacity: 0.78;
  transform: scale(1.04);
}
.fm-bulk-sm {
  padding: 3px 10px;
  font-size: 12px;
}

/* ── Body layout ──────────────────────────────────────── */
.fm-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* ── Sidebar ──────────────────────────────────────────── */
.fm-sidebar {
  width: 230px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: -webkit-sticky;
  position: sticky;
  top: 16px;
}

.fm-tab-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition:
    background 0.15s,
    border-color 0.15s;
  text-align: left;
}
.fm-tab-btn:hover {
  background: #f1f5f9;
}

.fm-tab-active {
  border-left-width: 3px;
  border-left-style: solid;
}

.fm-tab-icon {
  font-size: 16px;
  display: flex;
  flex-shrink: 0;
  transition: color 0.15s;
}

.fm-tab-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1;
  min-width: 0;
}

.fm-tab-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1e293b;
}

.fm-tab-sub {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

/* ── Content panel ────────────────────────────────────── */
.fm-content {
  flex: 1 1;
  min-width: 0;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.fm-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 2px solid;
  background: #fafafa;
}

.fm-content-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

/* Collapse */
.fm-collapse.ant-collapse {
  border: none;
  background: transparent;
}

.fm-panel.ant-collapse-item {
  border-bottom: 1px solid #f1f5f9 !important;
  border-radius: 0 !important;
}

.fm-panel .ant-collapse-header {
  padding: 11px 20px !important;
  background: #f8fafc;
}

.fm-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fm-section-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.fm-section-count {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1px 8px;
}

.fm-section-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fm-mini-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 10px;
  border: 1px solid;
}

.fm-panel .ant-collapse-content-box {
  padding: 0 !important;
}

/* ── Table ────────────────────────────────────────────── */
.fm-table-wrap {
  overflow: hidden;
}

.fm-table-wrap .ant-table {
  font-size: 13.5px;
}

.fm-table-wrap .ant-table-thead > tr > th {
  background: #f0f4f8;
  color: #475569;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid #e2e8f0 !important;
  padding: 9px 14px;
}

.fm-table-wrap .ant-table-tbody > tr > td {
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 9px 14px;
  vertical-align: middle;
}

/* Left accent per status */
.fm-row-mandatory > td:first-child {
  border-left: 3px solid #059669 !important;
}
.fm-row-required > td:first-child {
  border-left: 3px solid #d97706 !important;
}
.fm-row-not_required > td:first-child {
  border-left: 3px solid #e2e8f0 !important;
}

.fm-table-wrap .ant-table-tbody > tr:hover > td {
  background: #f8fafc !important;
}

/* ── Row number ───────────────────────────────────────── */
.fm-row-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

/* ── Field cell ───────────────────────────────────────── */
.fm-field-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fm-field-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 13.5px;
}
.fm-field-desc {
  font-size: 11.5px;
  color: #94a3b8;
}

/* ── Status Select ────────────────────────────────────── */
.fm-status-select.ant-select .ant-select-selector {
  border-radius: 8px !important;
  border: 1.5px solid #e2e8f0 !important;
  font-weight: 600;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
}
.fm-status-select.ant-select-focused .ant-select-selector {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15) !important;
}

.fm-opt-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.fm-status-popup .ant-select-item {
  border-radius: 6px;
  margin: 2px 4px;
}
.fm-status-popup .ant-select-item-option-selected {
  background: #f1f5f9 !important;
}

/* ── Status Tag ───────────────────────────────────────── */
.fm-status-tag.ant-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1.5px solid;
  white-space: nowrap;
}

.fm-tabs {
  border-right: 1px solid #ddd7d6;
}
.fm-tab-name-cs {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.fm-tab-name-inactive {
  color: #6e7e98;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .fm-body {
    flex-direction: column;
  }
  .fm-sidebar {
    width: 100%;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .fm-tab-btn {
    width: auto;
    flex: 1 1;
    min-width: 130px;
  }
  .fm-stats {
    flex-direction: column;
  }
}

.header-compo {
  padding: 5px;
  background-color: #103460;
  border-radius: 6px 6px 0px 0px;
}

.header-props {
  justify-content: space-between;
}
.btn-style {
  margin-left: 5px;
}
.select-month-styling {
  margin-left: 5px;
}

.calendar .ant-picker-cell {
  border: 1px dashed #b9a7ff;
}

.calendar {
  /* width: 80% !important; */
  border-radius: 20px !important;
  padding: 10px !important;
  overflow: hidden !important;
}
.calendar .ant-picker-body {
  padding: 0 !important;
}

.calendar .ant-picker-content thead {
  background-color: #d4cfff;
  border: 3px solid #d4cfff;
}
.calendar .ant-picker-content th {
  font-size: 1rem;
  color: #103460;
  font-weight: 600;
}
.calendar .ant-picker-calendar-date-value {
  font-size: 1.5rem;
  font-weight: 900;
}

.company-settings-cards-grid {
  width: 100%;
  padding: 6px 2px 30px;
}

.company-settings-cards-grid .ant-list-item {
  padding: 0;
}

.company-settings-card-v2 {
  --settings-accent: #0f3460;

  position: relative;

  width: 100%;
  height: 154px;

  overflow: hidden;

  background: #ffffff;

  border: 1px solid #e7eaf0;
  border-radius: 18px;

  cursor: pointer;

  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);

  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.company-settings-card-v2:hover {
  transform: translateY(-4px);

  border-color: color-mix(in srgb, var(--settings-accent) 28%, #e7eaf0);

  box-shadow:
    0 14px 32px rgba(16, 24, 40, 0.09),
    0 3px 8px rgba(16, 24, 40, 0.04);
}

.company-settings-card-inner {
  position: relative;

  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;

  padding: 22px 19px;
}

.company-settings-card-v2::before {
  content: "";

  position: absolute;

  width: 120px;
  height: 120px;

  top: -65px;
  right: -55px;

  border-radius: 50%;

  background: color-mix(in srgb, var(--settings-accent) 7%, transparent);

  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.company-settings-card-v2:hover::before {
  transform: scale(1.8);

  opacity: 0.9;
}

.company-settings-icon-wrap {
  position: relative;
  z-index: 2;

  flex-shrink: 0;

  width: 68px;
  height: 68px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 18px;

  background: color-mix(in srgb, var(--settings-accent) 7%, #ffffff);

  border: 1px solid color-mix(in srgb, var(--settings-accent) 12%, #ffffff);

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-radius 0.22s ease;
}

.company-settings-card-v2:hover .company-settings-icon-wrap {
  transform: translateY(-2px) scale(1.04);

  border-radius: 21px;

  box-shadow: 0 7px 18px
    color-mix(in srgb, var(--settings-accent) 16%, transparent);
}

.company-settings-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;
}

.company-settings-icon .ant-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-settings-info {
  position: relative;
  z-index: 2;

  min-width: 0;
  flex: 1 1;

  margin-left: 16px;

  padding-right: 36px;
}

.company-settings-name {
  margin: 0;

  color: #101828;

  font-size: 14px;
  font-weight: 650;

  line-height: 1.45;

  letter-spacing: -0.1px;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  overflow: hidden;

  transition: color 0.2s ease;
}

.company-settings-card-v2:hover .company-settings-name {
  color: var(--settings-accent);
}

.company-settings-description {
  margin: 7px 0 0;

  color: #98a2b3;

  font-size: 10.5px;
  font-weight: 400;

  line-height: 1.45;
}

.company-settings-arrow {
  position: absolute;

  z-index: 3;

  right: 17px;
  bottom: 17px;

  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #eaecf0;
  border-radius: 50%;

  background: #ffffff;

  color: #98a2b3;

  opacity: 0;

  transform: translateX(-5px);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.company-settings-arrow span {
  font-size: 16px;
  line-height: 1;

  transition: transform 0.2s ease;
}

.company-settings-card-v2:hover .company-settings-arrow {
  opacity: 1;

  transform: translateX(0);

  background: var(--settings-accent);

  border-color: var(--settings-accent);

  color: #ffffff;
}

.company-settings-card-v2:hover .company-settings-arrow span {
  transform: translate(1px, -1px);
}

.company-settings-hover-line {
  position: absolute;

  left: 18px;
  right: 18px;
  bottom: 0;

  height: 2px;

  border-radius: 4px 4px 0 0;

  background: var(--settings-accent);

  opacity: 0;

  transform: scaleX(0.4);

  transform-origin: center;

  transition:
    opacity 0.2s ease,
    transform 0.25s ease;
}

.company-settings-card-v2:hover .company-settings-hover-line {
  opacity: 0.8;

  transform: scaleX(1);
}

@media (max-width: 992px) {
  .company-settings-card-v2 {
    height: 148px;
  }

  .company-settings-card-inner {
    padding: 20px 17px;
  }

  .company-settings-icon-wrap {
    width: 62px;
    height: 62px;
  }

  .company-settings-info {
    margin-left: 14px;
  }
}

@media (max-width: 576px) {
  .company-settings-cards-grid {
    padding-bottom: 20px;
  }

  .company-settings-card-v2 {
    height: 136px;

    border-radius: 15px;
  }

  .company-settings-card-inner {
    padding: 18px 15px;
  }

  .company-settings-icon-wrap {
    width: 56px;
    height: 56px;

    border-radius: 14px;
  }

  .company-settings-info {
    margin-left: 12px;
    padding-right: 28px;
  }

  .company-settings-name {
    font-size: 13px;
  }

  .company-settings-description {
    margin-top: 5px;
    font-size: 9.5px;
  }

  .company-settings-arrow {
    right: 13px;
    bottom: 13px;

    width: 27px;
    height: 27px;
  }

  .company-settings-hover-line {
    left: 14px;
    right: 14px;
  }
} /* =========================================================
    COMMON SETTINGS PAGE ACTIONS
    ========================================================= */

.settings-page-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px;
  background: #f7f8fa;
  border: 1px solid #e2e6ea;
  border-radius: 7px;
}

.settings-page-actions > * {
  flex: 0 0 auto;
}

/* =========================================================
   COMMON SETTINGS INFO ALERT
   ========================================================= */

.settings-info-alert {
  margin-bottom: 8px;
}

.settings-info-alert .ant-alert {
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid #dbe5ee;
  background: #f7fafc;
}

.settings-info-alert .ant-alert-icon {
  font-size: 14px;
}

.settings-info-alert .ant-alert-message {
  color: #4e5964;
  font-size: 12px;
  line-height: 17px;
  font-weight: 500;
}

/* =========================================================
   COMMON SETTINGS SECTION
   ========================================================= */

.settings-section {
  margin-top: 8px;
  padding: 0;
  background: #f7f8fa;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  overflow: hidden;
}

.settings-section-inner {
  padding: 12px;
  background: #ffffff;
}

/* =========================================================
   SECTION HEADER
   ========================================================= */

.settings-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;

  min-height: auto;
  margin-bottom: 11px;
  padding-bottom: 9px;

  border-bottom: 1px solid #edf0f2;
}

.settings-section-eyebrow {
  margin-bottom: 3px;

  color: #7d858e;
  font-size: 10px;
  line-height: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.settings-section-title {
  margin: 0;

  color: #20252b;
  font-size: 18px;
  line-height: 23px;
  font-weight: 650;
}

.settings-section-description {
  margin: 3px 0 0;

  color: #747d87;
  font-size: 12px;
  line-height: 17px;
}

/* =========================================================
   COMMON SETTINGS FIELD
   ========================================================= */

.settings-field {
  height: 100%;
  padding: 10px 11px;

  background: #ffffff;
  border: 1px solid #e1e5e9;
  border-radius: 7px;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.settings-field:hover {
  border-color: #cbd4de;
  box-shadow: 0 3px 10px rgba(15, 52, 96, 0.05);
  transform: translateY(-1px);
}

.settings-field-label {
  display: block;
  margin-bottom: 5px;

  color: #4f5862;
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
  padding-left: 4px;
}

/* =========================================================
   COMMON SETTINGS GRID
   ========================================================= */

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

.settings-section-inner .ant-row {
  width: 100%;
}

/* =========================================================
   COMMON SETTINGS CARD
   ========================================================= */

.settings-card {
  min-width: 0;
  min-height: 82px;
  padding: 10px 11px;

  /* display: flex; */
  align-items: center;
  gap: 10px;

  background: #ffffff;
  border: 1px solid #e1e5e9;
  border-radius: 7px;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.settings-card:hover {
  border-color: #cbd4de;
  box-shadow: 0 4px 12px rgba(15, 52, 96, 0.05);
  transform: translateY(-1px);
}

.settings-card-header {
  min-width: 0;
  flex: 1 1;

  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.settings-card-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #0f3460;
  background: #eef3f8;
  border: 1px solid #dbe4ec;
  border-radius: 6px;

  font-size: 10px;
  font-weight: 700;
}

.settings-card-content {
  min-width: 0;
}

.settings-card-title {
  color: #252b32;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.settings-card-description {
  margin-top: 2px;

  color: #7b838d;
  font-size: 11px;
  line-height: 15px;
}

.settings-card-control {
  min-width: 95px;

  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

/* =========================================================
   STATUS
   ========================================================= */

.settings-status {
  padding: 2px 7px;
  border-radius: 4px;

  font-size: 10px;
  line-height: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.settings-status.configured {
  color: #3d6954;
  background: #edf6f0;
}

.settings-status.required {
  color: #7b838d;
  background: #f3f4f5;
}

/* =========================================================
   INPUT / SELECT CARD CONTROLS
   ========================================================= */

.settings-card-input {
  padding-top: 10px;
  min-width: 135px;
}

.settings-card-input .ant-input,
.settings-card-input input {
  width: 100%;
}

.settings-card-select {
  padding-top: 10px;
  min-width: 170px;
  max-width: 210px;
}

.settings-card-select .ant-select {
  width: 100%;
}

.settings-card-control .ant-checkbox-wrapper {
  color: #4f5862;
  font-size: 11px;
  font-weight: 500;
}

/* =========================================================
   ANT DESIGN CONTROLS
   ========================================================= */

.settings-section-inner .ant-btn {
  font-size: 12px;
}

.settings-section-inner .ant-checkbox-wrapper {
  color: #4f5862;
  font-size: 12px;
}

.settings-section-inner .ant-radio-wrapper {
  color: #4f5862;
  font-size: 12px;
}

.settings-section-inner .ant-switch {
  flex: 0 0 auto;
}

/* =========================================================
   SUBSECTION HEADER
   ========================================================= */

.settings-subsection-header {
  margin-top: 14px;
  margin-bottom: 8px;
  padding-bottom: 7px;

  border-bottom: 1px solid #edf0f2;
}

.settings-subsection-header .settings-section-title {
  font-size: 15px;
  line-height: 20px;
}

/* =========================================================
   QC SECTION
   ========================================================= */

.qc-settings-section {
  margin-top: 8px;
}

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

.qc-setting-card {
  min-width: 0;

  background: #ffffff;
  border: 1px solid #e1e5e9;
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 10px;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.qc-setting-card:hover {
  border-color: #ccd5de;
  box-shadow: 0 4px 12px rgba(15, 52, 96, 0.05);
  transform: translateY(-1px);
}

.qc-setting-card-wide {
  grid-column: 1 / -1;
}

/* =========================================================
   QC HEADER
   ========================================================= */

.qc-setting-card-header {
  min-height: 52px;
  padding: 9px 11px;

  display: flex;
  align-items: flex-start;
  gap: 9px;

  background: #fafbfc;
  border-bottom: 1px solid #e8ebee;
}

.qc-setting-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #0f3460;
  background: #eef3f8;
  border: 1px solid #dbe4ec;
  border-radius: 6px;

  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.qc-setting-heading {
  min-width: 0;
}

.qc-setting-title {
  color: #252b32;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.qc-setting-description {
  margin-top: 2px;

  color: #7b838d;
  font-size: 11px;
  line-height: 15px;
}

/* =========================================================
   QC BODY
   ========================================================= */

.qc-setting-body {
  padding: 9px;
}

.qc-setting-option {
  min-height: 45px;
  padding: 8px 9px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 6px;
}

.qc-option-title {
  color: #414951;
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
}

.qc-option-description {
  margin-top: 2px;

  color: #858d96;
  font-size: 10px;
  line-height: 14px;
}

/* =========================================================
   QC OPTIONS GRID
   ========================================================= */

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

.qc-option-box {
  min-height: 52px;
  padding: 8px 9px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;

  background: #ffffff;
  border: 1px solid #e2e6ea;
  border-radius: 6px;
}

.qc-option-user {
  display: block;
}

.qc-option-user .settings-field-label {
  margin-bottom: 5px;
  font-size: 12px;
}

/* =========================================================
   QC ROLL WIDTH
   ========================================================= */

.qc-roll-width-option {
  margin-bottom: 9px;
}

/* =========================================================
   QC NESTED SECTION
   ========================================================= */

.qc-nested-section {
  padding: 10px;

  background: #f8f9fa;
  border: 1px solid #e2e6ea;
  border-radius: 7px;
}

.qc-nested-header {
  padding-bottom: 7px;
  margin-bottom: 8px;

  border-bottom: 1px solid #e5e8eb;
}

.qc-nested-title {
  color: #343b43;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
}

.qc-nested-description {
  margin-top: 2px;

  color: #858d96;
  font-size: 10px;
  line-height: 14px;
}

/* =========================================================
   QC BUYER MODE
   ========================================================= */

.qc-buyer-mode {
  padding: 7px 8px;
  margin-bottom: 8px;

  background: #ffffff;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
}

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

/* =========================================================
   QC SPECIFIC BUYER
   ========================================================= */

.qc-specific-buyer {
  padding: 9px;

  background: #ffffff;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
}

.qc-specific-buyer-header {
  margin-bottom: 8px;
}

.qc-specific-buyer-title {
  color: #414951;
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
}

.qc-specific-buyer-description {
  margin-top: 2px;

  color: #858d96;
  font-size: 10px;
  line-height: 14px;
}

.qc-specific-buyer-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* =========================================================
   REQUIRED / RISK ICON
   ========================================================= */

/* =========================================================
   QC ANT DESIGN CONTROLS
   ========================================================= */

.qc-setting-card .ant-checkbox-wrapper {
  color: #4f5862;
  font-size: 11px;
}

.qc-setting-card .ant-radio-wrapper {
  color: #4f5862;
  font-size: 11px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
  .qc-settings-grid {
    grid-template-columns: 1fr;
  }

  .qc-setting-card-wide {
    grid-column: auto;
  }

  .qc-options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .settings-section-inner {
    padding: 11px;
  }

  .settings-section-title {
    font-size: 17px;
    line-height: 22px;
  }

  .settings-section-description {
    font-size: 11px;
    line-height: 16px;
  }
}

@media (max-width: 750px) {
  .qc-options-grid {
    grid-template-columns: 1fr;
  }

  .qc-buyer-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .settings-page-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .settings-info-alert .ant-alert-message {
    font-size: 11px;
  }

  .settings-section-inner {
    padding: 10px;
  }

  .settings-section-header {
    margin-bottom: 9px;
    padding-bottom: 8px;
  }

  .settings-section-title {
    font-size: 16px;
    line-height: 21px;
  }

  .settings-section-description {
    font-size: 11px;
    line-height: 15px;
  }

  .settings-field-label {
    font-size: 11px;
    line-height: 16px;
    padding-left: 4px;
  }

  .settings-card {
    min-height: auto;
    padding: 9px;
  }

  .settings-card-title {
    font-size: 12px;
    line-height: 17px;
  }

  .settings-card-description {
    font-size: 10px;
    line-height: 14px;
  }

  .settings-card-control {
    min-width: 85px;
  }

  .settings-card-input {
    min-width: 115px;
  }

  .settings-card-select {
    min-width: 140px;
    max-width: 180px;
  }

  .qc-setting-card-header {
    padding: 8px 9px;
  }

  .qc-setting-body {
    padding: 8px;
  }

  .qc-setting-title {
    font-size: 12px;
    line-height: 17px;
  }

  .qc-setting-description {
    font-size: 10px;
    line-height: 14px;
  }

  .qc-option-title {
    font-size: 11px;
  }

  .qc-option-description {
    font-size: 10px;
  }

  .qc-option-box {
    padding: 8px;
  }

  .qc-nested-section {
    padding: 8px;
  }

  .settings-subsection-header {
    margin-top: 11px;
    margin-bottom: 7px;
    padding-bottom: 6px;
  }
}
/* =========================================================
    APPROVAL SETTINGS
    ========================================================= */

.approval-settings-card {
  display: block;
  min-height: auto;
}

.approval-settings-card .settings-card-header {
  padding-bottom: 9px;
  margin-bottom: 8px;
  border-bottom: 1px solid #edf0f2;
}

.approval-settings-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 6px;
  gap: 6px;
}

.approval-setting-option {
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;

  display: flex;
  align-items: center;

  background: #fafbfc;
  border: 1px solid #e5e8eb;
  border-radius: 6px;

  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}

.approval-setting-option:hover {
  background: #f6f8fa;
  border-color: #d5dce3;
}

.approval-setting-option .ant-checkbox-wrapper {
  width: 100%;
  color: #414951;
  font-size: 11px;
  line-height: 16px;
}

.approval-setting-option.is-disabled {
  background: #f3f4f5;
  border-color: #e5e7e9;
  opacity: 0.7;
}

.approval-setting-option.is-disabled:hover {
  background: #f3f4f5;
  border-color: #e5e7e9;
}

/* =========================================================
   APPROVAL SETTINGS RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
  .approval-settings-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .approval-setting-option {
    min-height: 32px;
    padding: 5px 7px;
  }

  .approval-setting-option .ant-checkbox-wrapper {
    font-size: 11px;
  }
}
/* =========================================================
   PAYROLL PAGE
   ========================================================= */

.payroll-settings-section {
  margin-top: 8px;
}

/* =========================================================
   COMMON PAYROLL PANEL
   ========================================================= */

.payroll-unit-panel,
.payroll-unit-tabs-panel {
  margin-bottom: 10px;

  background: #ffffff;
  border: 1px solid #dfe4e8;
  border-radius: 8px;
  overflow: hidden;
}

/* =========================================================
   PANEL HEADER
   ========================================================= */

.payroll-panel-heading {
  min-height: 54px;
  padding: 10px 12px;

  display: flex;
  align-items: center;
  gap: 10px;

  background: #f8f9fa;
  border-bottom: 1px solid #e5e8eb;
}

.payroll-tabs-heading {
  min-height: 48px;
}

.payroll-panel-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #0f3460;
  background: #eef3f8;
  border: 1px solid #d8e2eb;
  border-radius: 6px;

  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.payroll-panel-title {
  color: #252b32;
  font-size: 13px;
  line-height: 18px;
  font-weight: 650;
}

.payroll-panel-description {
  margin-top: 2px;

  color: #7b838d;
  font-size: 11px;
  line-height: 15px;
}

/* =========================================================
   UNIT SELECTOR
   ========================================================= */

.payroll-unit-selector {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 10px 12px;

  background: #ffffff;
}

.payroll-unit-selector .settings-field-label {
  margin: 0;
  min-width: 38px;
  padding-left: 4px;
}

.payroll-unit-select {
  width: 260px;
}

.payroll-unit-select .ant-select {
  width: 100%;
}

/* =========================================================
   ACTIVE UNIT
   ========================================================= */

.payroll-active-unit {
  margin-top: 12px;
}

/* =========================================================
   MAJOR PAYROLL SECTIONS
   ========================================================= */

.payroll-section-block {
  margin-top: 10px;

  background: #ffffff;
  border: 1px solid #dce2e7;
  border-radius: 8px;
  overflow: hidden;
}

.payroll-section-block:first-child {
  margin-top: 0;
}

/* =========================================================
   SECTION HEADER
   ========================================================= */

.payroll-section-header {
  min-height: 65px;
  padding: 11px 13px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  background: #f7f9fb;
  border-bottom: 1px solid #dfe4e8;
}

.payroll-section-heading {
  min-width: 0;

  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.payroll-section-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #0f3460;
  background: #edf3f8;
  border: 1px solid #d8e2eb;
  border-radius: 7px;

  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.payroll-section-title {
  color: #20252b;
  font-size: 15px;
  line-height: 20px;
  font-weight: 650;
}

.payroll-section-description {
  margin-top: 2px;

  color: #747d87;
  font-size: 11px;
  line-height: 15px;
}

/* =========================================================
   GAME CLOCK
   ========================================================= */

.payroll-clock-grid {
  padding: 11px;

  display: grid;
  grid-template-columns:
    minmax(280px, 1.5fr)
    minmax(210px, 1fr)
    minmax(210px, 1fr);

  grid-gap: 9px;

  gap: 9px;

  background: #ffffff;
}

.payroll-clock-field {
  min-height: 78px;
  padding: 10px;

  background: #ffffff;
  border: 1px solid #e1e5e9;
  border-radius: 7px;
}

.payroll-toggle-card {
  min-height: 78px;
  padding: 10px;

  background: #ffffff;
}

/* =========================================================
   EMPLOYEE SCHEDULE
   ========================================================= */

.employee-schedule-section {
  margin-top: 12px;
}

.payroll-employee-list {
  padding: 11px;

  background: #f5f7f9;
}

/* =========================================================
   EMPLOYEE CARD
   ========================================================= */

.payroll-employee-card {
  margin-bottom: 10px;

  background: #ffffff;
  border: 1px solid #dce2e7;
  border-radius: 8px;

  overflow: hidden;

  box-shadow: 0 1px 2px rgba(15, 52, 96, 0.03);

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.payroll-employee-card:last-child {
  margin-bottom: 0;
}

.payroll-employee-card:hover {
  border-color: #c8d1da;
  box-shadow: 0 4px 12px rgba(15, 52, 96, 0.05);
}

/* =========================================================
   EMPLOYEE HEADER
   ========================================================= */

.payroll-employee-header {
  min-height: 51px;
  padding: 8px 11px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  background: #fafbfc;
  border-bottom: 1px solid #e2e6ea;
}

.payroll-employee-heading {
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 9px;
}

.payroll-employee-number {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #0f3460;
  background: #eef3f8;
  border: 1px solid #d8e2eb;
  border-radius: 6px;

  font-size: 9px;
  font-weight: 700;
}

.payroll-employee-title {
  color: #30363d;
  font-size: 13px;
  line-height: 18px;
  font-weight: 650;
}

.payroll-employee-description {
  margin-top: 1px;

  color: #7b838d;
  font-size: 10px;
  line-height: 14px;
}

/* =========================================================
   EMPLOYEE FORM
   ========================================================= */

.payroll-config-form-layout {
  padding: 11px;
  background: #ffffff;
}

/* =========================================================
   FORM FIELD SEPARATION
   ========================================================= */

.payroll-config-form-layout .ant-row {
  margin-bottom: 0;
}

.payroll-repeat-days {
  min-height: 32px;
  padding: 6px 7px;

  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;

  background: #ffffff;
  border: 1px solid #dfe4e8;
  border-radius: 6px;
}

.payroll-repeat-days .ant-checkbox-wrapper {
  margin: 0;

  color: #4f5862;
  font-size: 11px;
  line-height: 15px;
}

/* =========================================================
   ADD EMPLOYEE SHIFT
   ========================================================= */

.payroll-add-shift {
  display: flex;
  justify-content: flex-start;

  margin-top: 10px;
  padding-top: 9px;

  border-top: 1px dashed #dfe4e8;
}

/* =========================================================
   REQUIRED ICON
   ========================================================= */

.payroll-config-form-layout .aster-risk-Icon {
  margin-left: 3px;

  color: #d95353;
  font-size: 9px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {
  .payroll-clock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payroll-clock-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .payroll-unit-selector {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .payroll-unit-select {
    width: 100%;
  }

  .payroll-clock-grid {
    grid-template-columns: 1fr;
  }

  .payroll-clock-field {
    grid-column: auto;
  }

  .payroll-section-header {
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .payroll-section-header {
    padding: 9px 10px;
  }

  .payroll-section-title {
    font-size: 14px;
  }

  .payroll-section-description {
    font-size: 10px;
  }

  .payroll-employee-list {
    padding: 8px;
  }

  .payroll-config-form-layout {
    padding: 8px;
  }

  .payroll-repeat-days {
    gap: 4px;
  }

  .payroll-repeat-days .ant-checkbox-wrapper {
    font-size: 10px;
  }
}
.qci-root {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 0;
  width: 100%;
}

/* page header */
.qci-page-header {
  display: flex;
  flex-direction: column;
}
.qci-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #0f3460;
}
.qci-page-header h2 {
  margin: 4px 0;
  font-size: 20px;
  color: #263445;
}
.qci-page-header p {
  margin: 0;
  color: #8b95a5;
  font-size: 13px;
}

/* main card */
.qci-card {
  background: #fff;
  border: 1px solid #e5eaf0;
  border-radius: 12px;
  padding: 18px;
  width: 100%;
}
.qci-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.qci-card-header h4 {
  margin: 0;
  color: #263445;
}
.qci-card-header p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #8b95a5;
}
.qci-card-header .ant-btn {
  flex-shrink: 0;
}

/* unit list */
.qci-unit-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.qci-unit {
  background: #fafbfd;
  border: 1px solid #e5eaf0;
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.2s;
}
.qci-unit:hover {
  border-color: #b6c8df;
}
.qci-unit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e1e7ef;
}
.qci-unit-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #263445;
}
.qci-unit-number {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf1fa;
  color: #0f3460;
  font-size: 12px;
  font-weight: 700;
}

/* fields */
.qci-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}
.qci-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.qci-field label {
  font-size: 12px;
  font-weight: 600;
  color: #344054;
}
.qci-required {
  color: #d9363e;
}
.qci-field .ant-select,
.qci-field .ant-input-number-group-wrapper {
  width: 100%;
}

/* interval presets */
.qci-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.qci-preset {
  padding: 3px 12px;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid #d5dde8;
  background: #fff;
  color: #344054;
  transition: all 0.2s;
}
.qci-preset:hover {
  border-color: #0f3460;
}
.qci-preset.active {
  background: #0f3460;
  border-color: #0f3460;
  color: #fff;
}

/* empty state */
.qci-empty {
  text-align: center;
  padding: 28px;
  background: #fafbfd;
  border: 1px dashed #d5dde8;
  border-radius: 10px;
  color: #8b95a5;
}
.qci-empty h4 {
  color: #263445;
  margin-bottom: 4px;
}

/* mobile */
@media (max-width: 700px) {
  .qci-card-header {
    flex-wrap: wrap;
  }
  .qci-grid {
    grid-template-columns: 1fr;
  }
}

.qci-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
  align-items: start;
}

/* medium screens: 2 per row */
@media (max-width: 1200px) {
  .qci-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* mobile: 1 per row */
@media (max-width: 700px) {
  .qci-card-header {
    flex-wrap: wrap;
  }
  .qci-grid {
    grid-template-columns: 1fr;
  }
}
.qci-field .ant-input-number {
  height: 24px;
}

.qci-field .ant-input-number-input {
  height: 22px;
  font-size: 12px;
}

.qci-field .ant-input-number-group-addon {
  height: 24px;
  padding: 0 6px;
  font-size: 12px;
  line-height: 22px;
}


.lr-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px;
}
.lr-card {
  border: 1px solid #d3deee;
  border-radius: 10px;
  background: #fff;
}
.lr-card .ant-card-head {
  background: #15325d;
  color: #fff;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  min-height: 44px;
}
.lr-card .ant-card-head-title,
.lr-card .ant-card-extra {
  color: #fff;
}
.lr-hero {
  border-left: 4px solid #15325d;
}
.lr-hero-title {
  color: #15325d;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.lr-title-icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
}
.lr-subhead {
  color: #15325d;
  font-weight: 700;
  font-size: 15px;
  margin: 16px 0 10px;
}
.lr-block {
  background: #f6f8fc;
  border: 1px solid #d3deee;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
}

.lr-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: #e8eef7;
  border: 1px solid #d3deee;
  color: #1f2d45;
  font-size: 13px;
  white-space: nowrap;
}
.lr-chip span {
  color: #6b7a93;
}
.lr-chip-primary {
  background: #15325d;
  border-color: #15325d;
  color: #fff;
}
.lr-chip-primary span {
  color: rgba(255, 255, 255, 0.75);
}
.lr-chip-danger b {
  color: #b42318;
}
.lr-chip-success b {
  color: #1a7f4b;
}

.lr-group-title {
  color: #15325d;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 14px 0 8px;
}
.lr-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  grid-gap: 12px 16px;
  gap: 12px 16px;
}
.lr-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.lr-field-label {
  font-size: 12px;
  color: #6b7a93;
}
.lr-field-value {
  font-size: 14px;
  font-weight: 600;
  color: #1f2d45;
  overflow-wrap: anywhere;
}

.lr-table-wrap {
  overflow-x: auto;
  border: 1px solid #d3deee;
  border-radius: 8px;
  background: #fff;
}
.lr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.lr-table th {
  background: #e8eef7;
  color: #15325d;
  font-weight: 600;
  padding: 8px 10px;
  border: 1px solid #d3deee;
  text-align: center;
  white-space: nowrap;
}
.lr-table td {
  padding: 6px 10px;
  border: 1px solid #d3deee;
  text-align: center;
  white-space: nowrap;
  color: #1f2d45;
}
.lr-table tbody tr.lr-row:hover td {
  background: #f6f8fc;
}
.lr-table .lr-row-group td {
  background: #e6f5ed;
  color: #1a7f4b;
  font-weight: 700;
  text-align: left;
}
.lr-table .lr-row-sub td {
  background: #f6f8fc;
  font-weight: 600;
  color: #15325d;
}
.lr-table .lr-row-total td {
  background: #e8eef7;
  font-weight: 700;
  color: #15325d;
}
.lr-table .lr-row-avg td {
  background: #f6f8fc;
  font-weight: 600;
  color: #6b7a93;
}
.lr-input {
  width: 96px;
}
.lr-offscreen {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

/* ---------- collapse (lay list) ---------- */
.lr-card .ant-collapse {
  background: transparent;
  border: none;
}
.lr-card .ant-collapse > .ant-collapse-item {
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #d3deee;
  border-radius: 10px;
  overflow: hidden;
}
.lr-card .ant-collapse > .ant-collapse-item > .ant-collapse-header {
  background: #f6f8fc;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
}
.lr-card .ant-collapse .ant-collapse-header-text {
  flex: none;
}
.lr-card .ant-collapse .ant-collapse-extra {
  margin-left: auto;
  color: #1f2d45; /* override the white card-head extra colour */
}
.lr-card .ant-collapse > .ant-collapse-item > .ant-collapse-content {
  border-top: 1px solid #d3deee;
}
.lr-card .ant-collapse .ant-collapse-content-box {
  padding: 14px;
}

/* ---------- tabs inside cards ---------- */
.lr-card .ant-tabs {
  margin: 10px 0 12px;
}
.lr-card .ant-tabs .ant-tabs-tab {
  color: #6b7a93;
  font-weight: 600;
}
.lr-card .ant-tabs .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: #15325d;
}
.lr-card .ant-tabs .ant-tabs-ink-bar {
  background: #15325d;
}

/* ---------- table polish ---------- */
.lr-table thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1;
}
.lr-table .lr-row:nth-child(even) td {
  background: #fafcff;
}
.lr-table th[title] {
  cursor: help;
  -webkit-text-decoration: underline dotted #9fb0cc;
          text-decoration: underline dotted #9fb0cc;
  text-underline-offset: 3px;
}
.lr-table .lr-input,
.lr-table .ant-input,
.lr-table input {
  width: 96px;
  text-align: center;
}

/* ---------- misc ---------- */
.lr-card .ant-card-body {
  padding: 14px 16px;
}
.lr-hero .ant-card-body {
  padding: 14px 18px;
}
@media (max-width: 768px) {
  .lr-page {
    padding: 8px;
    gap: 12px;
  }
  .lr-field-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .lr-hero-title {
    font-size: 16px;
  }
}

.sub-table-heading-bun {
  margin-top: 0px;
  font-size: 0.625rem;
  margin-bottom: 1px;
  color: white;
  padding: 4px;
  background-color: #f29f58;
  border-radius: 2px;
  text-align: left;
  height: 30px;
}
.main-table-heading-bun {
  margin-top: 0px;
  font-size: 0.625rem;
  margin-bottom: 1px;
  color: white;
  padding: 4px;
  background-color: #219b9d;
  border-radius: 2px;
  text-align: left;
  height: 30px;
}

/* Light theme. Scoped to .mb-page so existing global classes stay untouched. */
.mb-page {
  --mb-bg: #f4f6fa;
  --mb-surface: #ffffff;
  --mb-ink: #1b2436;
  --mb-muted: #667085;
  --mb-line: #e3e7ee;
  --mb-indigo: #3b4ba6;
  --mb-indigo-soft: #eceffb;
  --mb-green: #1f9d74;
  --mb-green-soft: #e4f6ef;
  --mb-amber: #c9821a;
  --mb-amber-soft: #fdf1dc;
  --mb-blue-soft: #e6effd;
  --mb-radius: 12px;

  font-family:
    "Manrope",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--mb-ink);
  background: var(--mb-bg);
  padding: 16px 20px 40px;
  min-height: 100%;
}
.mb-page *,
.mb-page *::before,
.mb-page *::after {
  box-sizing: border-box;
}

/* ---------- Header ---------- */
.mb-hero {
  background: var(--mb-surface);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  position: relative;
}
/* stitched edge: the one signature detail */
.mb-hero::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px dashed #cfd6e6;
  border-radius: 8px;
  pointer-events: none;
}
.mb-hero__title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.mb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--mb-indigo-soft);
  color: var(--mb-indigo);
  font-size: 12.5px;
  font-weight: 600;
}
.mb-chip b {
  font-weight: 800;
  color: var(--mb-ink);
}
.mb-back {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--mb-line);
  background: var(--mb-surface);
  color: var(--mb-ink);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mb-back:hover {
  background: var(--mb-indigo-soft);
}

/* ---------- Dashboard ---------- */
.mb-dash {
  margin: 16px 0;
}
.mb-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}
.mb-kpi {
  background: var(--mb-surface);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.mb-kpi__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex: none;
}
.mb-kpi--indigo .mb-kpi__icon {
  background: var(--mb-indigo-soft);
  color: var(--mb-indigo);
}
.mb-kpi--green .mb-kpi__icon {
  background: var(--mb-green-soft);
  color: var(--mb-green);
}
.mb-kpi--amber .mb-kpi__icon {
  background: var(--mb-amber-soft);
  color: var(--mb-amber);
}
.mb-kpi--blue .mb-kpi__icon {
  background: var(--mb-blue-soft);
  color: #2f62c9;
}
.mb-kpi__label {
  font-size: 12.5px;
  color: var(--mb-muted);
  font-weight: 600;
}
.mb-kpi__value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}
.mb-kpi__sub {
  font-size: 12px;
  color: var(--mb-muted);
}

.mb-charts {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr 1.3fr;
  grid-gap: 12px;
  gap: 12px;
  margin-top: 12px;
}
.mb-card {
  background: var(--mb-surface);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius);
  padding: 14px 16px 6px;
  min-width: 0;
}
.mb-card__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}
.mb-empty {
  margin-top: 12px;
  padding: 22px;
  text-align: center;
  border: 1.5px dashed var(--mb-line);
  border-radius: var(--mb-radius);
  color: var(--mb-muted);
  font-size: 13.5px;
  background: var(--mb-surface);
}

/* ---------- Tabs wrapper (antd tabs inherit look) ---------- */
.mb-tabs {
  background: var(--mb-surface);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius);
  padding: 0 12px;
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.mb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.mb-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.mb-btn svg {
  font-size: 16px;
}
.mb-btn--primary {
  background: var(--mb-indigo);
  color: #fff;
}
.mb-btn--primary:hover {
  background: #2f3d8f;
}
.mb-btn--green {
  background: var(--mb-green);
  color: #fff;
}
.mb-btn--green:hover {
  background: #178562;
}
.mb-btn--ghost {
  background: var(--mb-surface);
  color: var(--mb-ink);
  border-color: var(--mb-line);
}
.mb-btn--ghost:hover {
  background: var(--mb-indigo-soft);
  border-color: #cfd6f2;
}
.mb-btn--sm {
  padding: 6px 11px;
  font-size: 12px;
}
.mb-btn:focus-visible,
.mb-back:focus-visible {
  outline: 2px solid var(--mb-indigo);
  outline-offset: 2px;
}

/* ---------- Sections ---------- */
.mb-section {
  background: var(--mb-surface);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.mb-section__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 800;
  border-bottom: 2px dashed #d5dbea; /* seam line */
  background: #fafbfe;
}
.mb-section__head svg {
  color: var(--mb-indigo);
  font-size: 18px;
}
.mb-pos {
  padding: 12px 16px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
}
.mb-size-tag {
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--mb-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.mb-shade-block {
  padding: 8px 16px 16px;
}
.mb-shade-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.mb-shade-title {
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.mb-shade-tools {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--mb-muted);
  font-weight: 600;
}
.mb-inline-check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.mb-shade-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  grid-gap: 16px;
  gap: 16px;
  align-items: start;
}

/* ---------- Tables ---------- */
.mb-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--mb-line);
  border-radius: 10px;
  background: #fff;
}
.mb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.mb-table thead th {
  background: #eef1f9;
  color: #3d4762;
  font-weight: 700;
  font-size: 12px;
  padding: 11px 14px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  border-bottom: 1px solid #d9dfec;
}
.mb-table td {
  padding: 10px 14px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  border-bottom: 1px solid #eef1f6;
}
.mb-table .mb-left {
  text-align: left;
}
.mb-table .mb-num {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.mb-table tbody tr:nth-child(even) td {
  background: #fafbfe;
}
.mb-table tbody tr:hover td {
  background: #f1f4ff;
}
.mb-table tbody tr:last-child td {
  border-bottom: 0;
}
.mb-row--done td {
  color: #8a93a6;
  background: #f6f8fb !important;
}
.mb-table input[type="number"],
.mb-line-input {
  width: 90px;
  margin: 0 auto;
  text-align: center;
}
.mb-total-row td {
  font-weight: 800;
  background: #eef1f9 !important;
  border-top: 1px solid #d9dfec;
}
.mb-parts-cell {
  text-align: center;
}
.mb-yes {
  color: var(--mb-green);
  font-size: 16px;
  vertical-align: middle;
}
.mb-no {
  color: #eb2a44;
  font-size: 16px;
  vertical-align: middle;
}
.mb-th-tip {
  cursor: help;
  border-bottom: 1px dotted #8a93a6;
}
.mb-count {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--mb-amber-soft);
  color: #9a6212;
  font-size: 11.5px;
  font-weight: 700;
  cursor: help;
}

/* ---------- Status chips ---------- */
.mb-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: #eef1f6;
  color: #5b667d;
}
.mb-status--ok {
  background: var(--mb-green-soft);
  color: #14775a;
}
.mb-status--warn {
  background: var(--mb-amber-soft);
  color: #9a6212;
}
.mb-status--info {
  background: var(--mb-blue-soft);
  color: #2f62c9;
}

/* ---------- Modal bodies ---------- */
.mb-form {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  font-family: "Manrope", system-ui, sans-serif;
}
.mb-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.mb-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 150px;
}
.mb-field--full {
  flex: 1 1 100%;
}
.mb-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #46506a;
}
.mb-date {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font: inherit;
}
.mb-print-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 12px;
  border-top: 2px dashed #d5dbea;
}
.mb-hint {
  font-size: 12.5px;
  color: var(--mb-muted);
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .mb-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mb-charts {
    grid-template-columns: 1fr;
  }
  .mb-shade-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .mb-page {
    padding: 12px;
  }
  .mb-hero {
    flex-direction: column;
  }
  .mb-kpis {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mb-btn {
    transition: none;
  }
}

/* ---------- Collapsible dashboard ---------- */
.mb-dash__bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--mb-surface);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius);
  font: inherit;
  cursor: pointer;
  color: var(--mb-ink);
}
.mb-dash__bar:hover {
  background: #fafbfe;
}
.mb-dash__bar:focus-visible {
  outline: 2px solid var(--mb-indigo);
  outline-offset: 2px;
}
.mb-dash__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14.5px;
}
.mb-dash__title svg {
  color: var(--mb-indigo);
  font-size: 20px;
}
.mb-dash__mini {
  color: var(--mb-muted);
  font-size: 12.5px;
  font-weight: 600;
}
.mb-dash__toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--mb-indigo);
}
.mb-dash__toggle svg {
  font-size: 20px;
}
.mb-dash__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.mb-dash__body.is-open {
  grid-template-rows: 1fr;
}
.mb-dash__inner {
  overflow: hidden;
  min-height: 0;
  padding-top: 0;
}
.mb-dash__body.is-open .mb-dash__inner {
  padding-top: 12px;
}
.mb-kpi {
  transition:
    box-shadow 0.15s,
    transform 0.15s;
  cursor: help;
}
.mb-kpi:hover {
  box-shadow: 0 6px 18px rgba(27, 36, 54, 0.08);
  transform: translateY(-1px);
}
.mb-kpi--indigo {
  border-left: 4px solid var(--mb-indigo);
}
.mb-kpi--green {
  border-left: 4px solid var(--mb-green);
}
.mb-kpi--amber {
  border-left: 4px solid #f0a63a;
}
.mb-kpi--blue {
  border-left: 4px solid #2f62c9;
}
.mb-section {
  box-shadow: 0 1px 2px rgba(27, 36, 54, 0.04);
}
.mb-section__head {
  background: linear-gradient(90deg, #f3f5fc, #fafbfe);
}
@media (prefers-reduced-motion: reduce) {
  .mb-dash__body,
  .mb-kpi {
    transition: none;
  }
  .mb-kpi:hover {
    transform: none;
  }
}

.mb-card__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.mb-card__meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--mb-muted);
}

.style-page-heading {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.style-page-heading-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;
  background: #eef3f8;
  color: #0f3460;

  font-size: 15px;
}

.style-page-heading .common-header {
  margin: 0;
  color: #20252b;
  font-size: 19px;
  line-height: 24px;
  font-weight: 650;
}

.style-page-heading-subtitle {
  display: block;
  margin-top: 2px;

  color: #7b838d;
  font-size: 11px;
  line-height: 16px;
}

/* =========================================================
   INFORMATION ALERT
   ========================================================= */

.style-settings-alert {
  margin-bottom: 12px;
}

.style-settings-alert .ant-alert {
  border-radius: 8px;
}

.style-settings-alert .ant-alert-message {
  font-size: 12px;
  font-weight: 500;
}

/* =========================================================
   MAIN WORKSPACE
   ========================================================= */

.style-settings-workspace {
  margin-top: 12px;

  background: #f7f8fa;

  border: 1px solid #e1e5e9;
  border-radius: 10px;

  overflow: hidden;
}

/* =========================================================
   UNIT TOOLBAR
   ========================================================= */

.style-settings-unit-toolbar {
  min-height: 72px;

  padding: 14px 17px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  background: #ffffff;

  border-bottom: 1px solid #e4e7eb;
}

/* Unit information */

.style-settings-unit-info {
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 11px;
}

.style-settings-unit-icon {
  width: 36px;
  height: 36px;

  flex: 0 0 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  background: #eef3f8;
  color: #0f3460;

  font-size: 15px;
}

.style-settings-unit-title {
  color: #20252b;

  font-size: 15px;
  line-height: 20px;

  font-weight: 600;
}

.style-settings-unit-subtitle {
  margin-top: 3px;

  color: #7b838d;

  font-size: 12px;
  line-height: 17px;
}

/* =========================================================
   UNIT SELECT
   ========================================================= */

.style-settings-unit-select {
  width: 280px;
  flex: 0 0 280px;
}

.style-settings-unit-select .ant-select-selector {
  min-height: 36px !important;

  border-radius: 7px !important;

  border-color: #d8dde3 !important;

  display: flex;
  align-items: center;

  box-shadow: none !important;
}

.style-settings-unit-select .ant-select-selection-placeholder,
.style-settings-unit-select .ant-select-selection-item {
  font-size: 12px;
}

.style-settings-unit-select:hover .ant-select-selector {
  border-color: #9eabb8 !important;
}

.style-settings-unit-select.ant-select-focused .ant-select-selector {
  border-color: #0f3460 !important;
}

/* =========================================================
   UNIT TABS
   ========================================================= */

.style-settings-tabs-wrapper {
  padding: 0 17px;

  background: #ffffff;

  border-bottom: 1px solid #e4e7eb;
}

/* Ant tabs container */

.style-settings-tabs-wrapper .ant-tabs {
  margin-bottom: -1px;
}

.style-settings-tabs-wrapper .ant-tabs-nav {
  margin-bottom: 0;
}

/* Tabs */

.style-settings-tabs-wrapper .ant-tabs-tab {
  min-height: 43px;

  margin: 0 5px 0 0 !important;

  padding: 10px 16px !important;

  border-radius: 7px 7px 0 0 !important;

  border: 1px solid transparent !important;

  background: transparent;

  color: #68717b;

  font-size: 13px;
  line-height: 18px;

  font-weight: 500;

  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}

/* Hover */

.style-settings-tabs-wrapper .ant-tabs-tab:hover {
  color: #0f3460;

  background: #f6f8fa;
}

/* Active */

.style-settings-tabs-wrapper .ant-tabs-tab-active {
  background: #f5f8fb !important;

  border-color: #dce3e9 !important;

  border-bottom-color: #f5f8fb !important;
}

.style-settings-tabs-wrapper .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: #0f3460;

  font-size: 13px;

  font-weight: 600;
}

/* Ink bar */

.style-settings-tabs-wrapper .ant-tabs-ink-bar {
  height: 2px;

  background: #0f3460;
}

/* Close icon */

.style-settings-tabs-wrapper .ant-tabs-tab-remove {
  margin-left: 7px;

  color: #8b939c;

  font-size: 11px;
}

.style-settings-tabs-wrapper .ant-tabs-tab-remove:hover {
  color: #c04d5b;
}

/* =========================================================
   MAIN CONTENT
   ========================================================= */

.style-settings-content {
  padding: 17px;
}

/* =========================================================
   ACTIVE UNIT PANEL
   ========================================================= */

.style-settings-unit-panel {
  padding: 17px;

  background: #ffffff;

  border: 1px solid #e1e5e9;

  border-radius: 9px;
}

/* =========================================================
   PANEL HEADER
   ========================================================= */

.style-settings-panel-header {
  min-height: 48px;

  margin-bottom: 16px;
  padding-bottom: 14px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  border-bottom: 1px solid #edf0f2;
}

/* Small heading */

.style-settings-panel-eyebrow {
  margin-bottom: 4px;

  color: #7d858e;

  font-size: 10px;
  line-height: 13px;

  font-weight: 700;

  letter-spacing: 1px;
}

/* Unit name */

.style-settings-panel-title {
  margin: 0;

  color: #20252b;

  font-size: 19px;
  line-height: 25px;

  font-weight: 650;
}

/* Description */

.style-settings-panel-description {
  margin: 4px 0 0;

  color: #747d87;

  font-size: 12px;
  line-height: 18px;
}

/* =========================================================
   REQUEST COUNT
   ========================================================= */

.style-settings-config-count {
  min-width: 100px;

  padding: 9px 13px;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  background: #fafbfc;

  border: 1px solid #e1e5e9;

  border-radius: 8px;
}

.style-settings-config-count span {
  color: #0f3460;

  font-size: 20px;
  line-height: 22px;

  font-weight: 650;
}

.style-settings-config-count small {
  margin-top: 3px;

  color: #858d96;

  font-size: 10px;
  line-height: 13px;

  font-weight: 500;
}

/* =========================================================
   REQUEST CARD
   ========================================================= */

.style-request-card {
  height: 100%;

  min-height: 215px;

  padding: 14px;

  display: flex;
  flex-direction: column;

  background: #ffffff;

  border: 1px solid #e1e5e9;

  border-radius: 8px;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

/* Hover */

.style-request-card:hover {
  border-color: #cbd4de;

  box-shadow: 0 5px 16px rgba(15, 52, 96, 0.07);

  transform: translateY(-1px);
}

/* Missing department */

.style-request-card-error {
  border-color: #e6d3d3;
}

.style-request-card-error:hover {
  border-color: #d8bcbc;
}

/* =========================================================
   REQUEST CARD TOP
   ========================================================= */

.style-request-card-top {
  min-height: 57px;

  display: flex;
  align-items: flex-start;

  gap: 10px;
}

/* Request icon */

.style-request-icon {
  width: 32px;
  height: 32px;

  flex: 0 0 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 7px;

  background: #f0f4f8;

  color: #0f3460;

  font-size: 15px;
}

/* Title wrapper */

.style-request-title-wrap {
  min-width: 0;
}

/* Request title */

.style-request-title {
  color: #252b32;

  font-size: 14px;
  line-height: 19px;

  font-weight: 600;
}

/* Description */

.style-request-description {
  margin-top: 3px;

  color: #7d858e;

  font-size: 11px;
  line-height: 16px;

  display: -webkit-box;

  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  overflow: hidden;
}

/* =========================================================
   CARD DIVIDER
   ========================================================= */

.style-request-divider {
  height: 1px;

  margin: 12px 0;

  background: #edf0f2;
}

/* =========================================================
   DEPARTMENT FIELD
   ========================================================= */

.style-request-field {
  flex: 1 1;
}

/* Field header */

.style-request-field-label {
  min-height: 20px;

  margin-bottom: 6px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 8px;
}

/* Label */

.style-request-field-label > span:first-child {
  color: #4f5862;

  font-size: 12px;
  line-height: 17px;

  font-weight: 600;
}

/* =========================================================
   TREE SELECT
   ========================================================= */

.style-request-field .ant-select {
  width: 100%;
}

.style-request-field .ant-select-selector {
  min-height: 34px !important;

  border-radius: 6px !important;

  border-color: #d6dce2 !important;

  box-shadow: none !important;

  display: flex;
  align-items: center;
}

.style-request-field .ant-select-selection-item {
  color: #343b43;

  font-size: 12px;

  line-height: 18px;
}

.style-request-field .ant-select-selection-placeholder {
  color: #9aa1a9;

  font-size: 12px;
}

.style-request-field .ant-select:hover .ant-select-selector {
  border-color: #9eabb8 !important;
}

.style-request-field .ant-select-focused .ant-select-selector {
  border-color: #0f3460 !important;

  box-shadow: 0 0 0 2px rgba(15, 52, 96, 0.06) !important;
}

/* =========================================================
   STATUS
   ========================================================= */

.style-request-status {
  padding: 3px 7px;

  border-radius: 5px;

  font-size: 10px;
  line-height: 13px;

  font-weight: 600;

  white-space: nowrap;
}

/* Configured */

.style-request-status.configured {
  color: #3d6954;

  background: #edf6f0;
}

/* Required */

.style-request-status.required {
  color: #9b5757;

  background: #fbefef;
}

/* =========================================================
   CARD FOOTER
   ========================================================= */

.style-request-footer {
  min-height: 27px;

  margin-top: 11px;
  padding-top: 9px;

  display: flex;
  align-items: center;

  gap: 8px;

  border-top: 1px solid #f0f1f3;
}

/* Manage department */

.style-add-dept-label {
  color: #626b75;

  font-size: 11px;

  font-weight: 500;
}

/* Selected department */

.style-selected-department {
  min-width: 0;

  flex: 1 1;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  text-align: right;

  color: #7c858f;

  font-size: 11px;

  line-height: 15px;
}

/* =========================================================
   MANDATORY ASTERISK
   ========================================================= */

/* =========================================================
   ANT DESIGN TREE DROPDOWN
   ========================================================= */

.style-settings-workspace .ant-select-tree {
  font-size: 12px;
}

.style-settings-workspace .ant-select-tree-node-content-wrapper {
  font-size: 12px;
}

.style-settings-workspace .ant-select-tree-node-content-wrapper:hover {
  background: #f1f4f7;
}

.style-settings-workspace
  .ant-select-tree-node-content-wrapper.ant-select-tree-node-selected {
  background: #eef3f8;
  color: #0f3460;
}

/* =========================================================
   UNIT DROPDOWN OPTIONS
   ========================================================= */

.style-settings-unit-select + .ant-select-dropdown {
  border-radius: 7px;
}

.ant-select-dropdown .ant-select-item-option-content {
  font-size: 12px;
}

/* =========================================================
   BUTTON AREA
   ========================================================= */

.style-settings-workspace .ant-btn {
  font-size: 11px;
}

/* =========================================================
   PAGE ACTION BUTTON ALIGNMENT
   ========================================================= */

.style-settings-page-actions {
  display: flex;

  align-items: center;

  gap: 6px;
}

/* =========================================================
   DEPARTMENT MODAL / EXTRA CONTENT
   ========================================================= */

.style-settings-workspace .ant-modal-content {
  border-radius: 9px;
}

/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */

@media (max-width: 1100px) {
  .style-settings-unit-toolbar {
    align-items: stretch;
  }

  .style-settings-unit-select {
    width: 240px;
    flex-basis: 240px;
  }

  .style-request-card {
    min-height: 210px;
  }
}

/* =========================================================
   RESPONSIVE - TABLET / SMALL LAPTOP
   ========================================================= */

@media (max-width: 900px) {
  .style-settings-unit-toolbar {
    flex-direction: column;

    align-items: stretch;

    gap: 12px;
  }

  .style-settings-unit-select {
    width: 100%;
    flex-basis: auto;
  }

  .style-settings-panel-header {
    align-items: flex-start;
  }

  .style-settings-config-count {
    min-width: 90px;
  }
}

/* =========================================================
   RESPONSIVE - MOBILE
   ========================================================= */

@media (max-width: 600px) {
  .style-settings-unit-toolbar {
    padding: 12px;
  }

  .style-settings-tabs-wrapper {
    padding: 0 8px;
  }

  .style-settings-content {
    padding: 10px;
  }

  .style-settings-unit-panel {
    padding: 12px;
  }

  .style-settings-panel-header {
    flex-direction: column;

    align-items: flex-start;

    gap: 12px;
  }

  .style-settings-config-count {
    align-self: flex-start;
  }

  .style-settings-panel-title {
    font-size: 17px;
  }

  .style-settings-panel-description {
    font-size: 11px;
  }

  .style-request-card {
    min-height: auto;

    padding: 13px;
  }

  .style-request-title {
    font-size: 13px;
  }

  .style-request-description {
    font-size: 11px;
  }
}

/* =========================================================
   REDUCE EXCESSIVE ANT TAB SPACING
   ========================================================= */

.style-settings-tabs-wrapper .ant-tabs-nav-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
}

.style-settings-tabs-wrapper .ant-tabs-nav-list {
  min-width: -webkit-max-content;
  min-width: max-content;
}

/* =========================================================
   SCROLLBAR
   ========================================================= */

.style-settings-tabs-wrapper .ant-tabs-nav-wrap::-webkit-scrollbar {
  height: 4px;
}

.style-settings-tabs-wrapper .ant-tabs-nav-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.style-settings-tabs-wrapper .ant-tabs-nav-wrap::-webkit-scrollbar-thumb {
  background: #d2d7dc;

  border-radius: 10px;
}

/* =========================================================
   EMPTY / GENERAL SPACING
   ========================================================= */

.style-settings-workspace .ant-row {
  width: 100%;
}

/* =========================================================
   PRINT FRIENDLY
   ========================================================= */

@media print {
  .style-settings-workspace {
    border: 0;
    background: #ffffff;
  }

  .style-settings-unit-toolbar,
  .style-settings-tabs-wrapper,
  .style-settings-unit-panel,
  .style-request-card {
    box-shadow: none;
  }

  .style-request-card:hover {
    transform: none;
  }
}
/* =========================================================
   STYLE SETTINGS HEADER
   ========================================================= */

.style-settings-header-row {
  width: 100%;
  margin-bottom: 10px;
}

/* =========================================================
   PAGE HEADING
   ========================================================= */

.style-page-heading {
  min-height: 42px;

  display: flex;
  align-items: center;

  gap: 10px;

  min-width: 0;
}

.style-page-heading-icon {
  width: 36px;
  height: 36px;

  flex: 0 0 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  background: #eef3f8;
  color: #0f3460;

  font-size: 17px;
}

.style-page-heading-content {
  min-width: 0;
}

.style-page-heading .common-header {
  margin: 0;

  color: #20252b;

  font-size: 19px;
  line-height: 24px;

  font-weight: 650;
}

.style-page-heading-subtitle {
  display: block;

  margin-top: 2px;

  color: #7b838d;

  font-size: 11px;
  line-height: 16px;

  white-space: nowrap;
}

/* =========================================================
   HEADER ACTIONS
   ========================================================= */

.style-settings-header-actions {
  display: flex;
  align-items: center;

  gap: 6px;

  padding: 4px;

  background: #f7f8fa;

  border: 1px solid #e4e7eb;

  border-radius: 8px;
}

/* =========================================================
   ACTION BUTTON WRAPPERS
   ========================================================= */

.style-settings-header-actions > * {
  flex: 0 0 auto;
}

/* =========================================================
   SUBMIT BUTTON
   ========================================================= */

.style-settings-header-actions .ant-btn[type="submit"] {
  min-width: 72px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 850px) {
  .style-settings-header-row {
    align-items: flex-start !important;
  }

  .style-page-heading-subtitle {
    white-space: normal;
  }

  .style-settings-header-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .style-settings-header-row {
    flex-direction: column;
  }

  .style-settings-header-row > .ant-col {
    width: 100%;
  }

  .style-settings-header-actions {
    width: 100%;

    justify-content: flex-end;

    padding: 5px;
  }

  .style-page-heading {
    width: 100%;
  }
}

.service-multi-img {
  display: flex;
  column-gap: 5px;
  margin-top: 5px;
}
.service-multi-div {
  margin-top: 10px;
  height: 110px;
  border: 2px dashed #d9d9d9;
  padding: 10px;
  border-radius: 5px;
}
.service-img {
  height: 25px;
  width: 25px;
}

.range-picker {
  font-size: 10px;
}
.rev-count {
  color: #ed4747;
  font-weight: bold;
}

.td-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  height: 45px;
  margin-top: 5px;
  border-radius: 7px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.04);
}

.td-topbar-left {
  display: flex;
  align-items: center;
}

.td-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #0f3460;
  letter-spacing: -0.4px;
}

.td-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.td-btn-primary {
  background: #0f3460 !important;
  border-color: #0f3460 !important;
  color: #fff !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: background 0.2s !important;
}

.td-btn-primary:hover {
  background: #0f3460 !important;
}

.td-btn-ghost {
  background: transparent !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.2s !important;
}

.td-btn-ghost:hover {
  border-color: #0f3460 !important;
  color: #0f3460 !important;
  background: #eef2ff !important;
}

.td-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 16px;
  gap: 16px;
}

.td-req-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow:
    0 4px 16px rgba(79, 70, 229, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  transition:
    box-shadow 0.25s,
    transform 0.2s;
  cursor: default;
}

.td-req-card:hover {
  box-shadow: 16px;
  transform: translateY(-2px);
}

.td-req-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.td-req-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.td-req-card-title {
  font-family: sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  flex: 1 1;
  min-width: 100px;
}

.td-req-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 100px;
  padding: 2px 10px;
}

.td-req-card-body {
  display: flex;
  gap: 13px;
}
.tf-timing-toggle {
  display: inline-flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  margin: 0px 16px;
}

.timing-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #64748b;
  transition: all 0.15s;
}
.timing-btn.active {
  background: #fff;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.timing-btn.on-time.active {
  color: #16a34a;
}
.timing-btn.delayed.active {
  color: #ea580c;
}
.timing-btn.all.active {
  color: #260cea;
}

.td-req-stat {
  display: flex;
  align-items: center;
  gap: 10px;
}

.td-req-stat.pending .stat-icon {
  color: #ef4444;
}
.td-req-stat.completed .stat-icon {
  color: #22c55e;
}

.stat-num {
  font-family: sans-serif;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}

.td-req-stat.pending .stat-num {
  color: #ef4444;
}
.td-req-stat.completed .stat-num {
  color: #22c55e;
}

.stat-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.td-main {
  padding: 0px 15px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1700px;
  margin: 0 auto;
  width: 100%;
}

.td-status-bar {
  padding: 14px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.td-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.td-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    border-color 0.15s;
  font-size: 12px;
  font-weight: 500;
  -webkit-user-select: none;
          user-select: none;
  background: var(--chip-color);
  color: #fff;
}

.td-status-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.td-status-chip.active {
  border-color: rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px var(--chip-color);
  filter: brightness(1.15);
}

.chip-label {
  letter-spacing: 0.01em;
}

.chip-count {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  min-width: 22px;
  text-align: center;
}
.td-panel {
  background: #ffffff;
  border-radius: 20px;
  box-shadow:
    0 4px 16px rgba(79, 70, 229, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

/* ── Tab Row ────────────────────────────────────────────────────── */
.td-tabs-row {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 20px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.td-tabs-row::-webkit-scrollbar {
  display: none;
}

.td-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}

.td-tab:hover {
  color: #0f172a;
  background: #eef2ff;
  border-radius: 6px 6px 0 0;
}

.td-tab.active {
  color: #0f3460;
  border-bottom-color: #0f3460;
}

.td-filters {
  padding: 4px 6px;
  background: #f8faff;
  border-bottom: 1px solid #e2e8f0;
}

.workflow-cards-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
}

.workflow-card-col {
  flex: 1 1;
  min-width: 0;
}

.workflow-card.ant-card {
  border-radius: 18px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 14px rgb(15 23 42 / 6%);
  transition: all 0.25s ease;
  overflow: hidden;
  height: 100%;
}

.workflow-card.ant-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgb(15 23 42 / 12%);
}

.workflow-card .ant-card-head {
  border-bottom: 1px solid #f1f5f9 !important;
  min-height: auto !important;
  padding: 7px 10px !important;
}

.workflow-card .ant-card-head-title {
  padding: 0 !important;
}

.workflow-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}

.workflow-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.workflow-status-tag.ant-tag {
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  padding-inline: 8px;
  display: flex;
  align-items: center;
}

.workflow-card .ant-card-body {
  padding: 10px !important;
}

.td-type-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.td-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1.5px solid #cbd5e1;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.td-type-chip:hover {
  border-color: #0f3460;
  color: #0f3460;
  background: #eef2ff;
}

.td-type-chip.active {
  border-color: #0f3460;
  background: #0f3460;
  color: #fff;
}

.tm-filter-card {
  background: #f8faff;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 10px 10px;
}

.tm-filter-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.tm-filter-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
}

.tm-filter-icon {
  color: #0f172a;
  font-size: 14px;
}

.tm-dept-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-left: 5px;
  flex-wrap: wrap;
}

@media (max-width: 1400px) {
  .workflow-cards-row {
    flex-wrap: wrap;
  }

  .workflow-card-col {
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: calc(50% - 8px);
  }
}

@media (max-width: 768px) {
  .workflow-card-col {
    flex: 0 0 100%;
  }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .td-main {
    padding: 16px;
  }
}

@media (max-width: 1024px) {
  .td-cards-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .td-topbar-right .td-btn-ghost:nth-child(n + 3) {
    display: none;
  }
}

@media (max-width: 768px) {
  .td-topbar {
    padding: 0 14px;
    height: 54px;
    flex-wrap: wrap;
  }

  .td-topbar-right {
    gap: 5px;
  }

  .td-topbar-right .td-btn-ghost {
    display: none;
  }

  .td-main {
    padding: 12px;
    gap: 12px;
  }

  .td-cards-row {
    grid-template-columns: 1fr;
  }

  .td-req-card {
    padding: 16px;
  }

  .stat-num {
    font-size: 22px;
  }

  .td-tabs-row {
    padding: 0 10px;
  }

  .td-tab {
    padding: 10px 12px;
    font-size: 12px;
  }

  .td-filters-grid {
    grid-template-columns: 1fr 1fr;
  }

  .td-status-chips {
    gap: 5px;
  }

  .td-status-chip {
    font-size: 11px;
    padding: 4px 9px;
  }

  .filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .td-filters-grid {
    grid-template-columns: 1fr;
  }

  .td-req-card-body {
    gap: 10px;
  }
} /* ───────── Kept: used by other screens ───────── */
.service-multi-img {
  display: flex;
  column-gap: 5px;
  margin-top: 5px;
}
.service-multi-div {
  margin-top: 10px;
  height: 110px;
  border: 2px dashed #d9d9d9;
  padding: 10px;
  border-radius: 5px;
}
.service-img {
  height: 25px;
  width: 25px;
}
.range-picker {
  font-size: 10px;
}
.rev-count {
  color: #ed4747;
  font-weight: bold;
}

/* ═════════ Shell ═════════ */
.mw-app {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #111c36;
  --muted: #6b7794;
  --line: #e6eaf2;
  --accent: #2563eb;
  --accent-soft: #eaf1ff;
  --accent-ring: rgba(37, 99, 235, 0.28);
  --side-w: 244px;
  /* fixed sidebar height - tweak 110px to match your top header height */
  --side-h: calc(100vh - 100px);
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  grid-gap: 14px;
  gap: 14px;
  align-items: start;
  padding: 10px 10px 48px; /* bottom space for the fixed footer bar */
  background: var(--bg);
  border-radius: 16px;
  color: var(--ink);
}
.mw-app.is-collapsed {
  --side-w: 66px;
}
.mw-app *,
.mw-app *::before,
.mw-app *::after {
  box-sizing: border-box;
}
.mw-app button {
  font-family: inherit;
}
.mw-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* ═════════ Light sidebar ═════════ */
.mw-side {
  position: -webkit-sticky;
  position: sticky;
  top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: var(--side-h);
  min-height: 560px;
  padding: 12px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(17, 28, 54, 0.04);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}
.mw-side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 2px 10px;
}
.mw-side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.mw-side-logo {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mw-side-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.mw-side-toggle {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.mw-side-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.mw-side-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 4px 12px var(--accent-ring);
  transition:
    filter 0.15s,
    transform 0.15s;
}
.mw-side-add:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.mw-side-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 8px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #9aa5bf;
}
/* push the Requests block to the bottom of the fixed-height sidebar */
.mw-side .mw-req-label {
  margin-top: auto;
  padding-top: 14px;
}
.mw-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mw-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #4a5675;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}
.mw-nav-item svg {
  flex-shrink: 0;
  font-size: 17px;
}
.mw-nav-item:hover {
  background: #f3f5fb;
  color: var(--ink);
}
.mw-nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.mw-nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}
.mw-nav-item.is-link {
  font-size: 12.5px;
}

/* requests (HSN / CSP …) */
.mw-req-legend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: none;
}
.mw-req-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 4px;
}
.mw-req-legend .p,
.mw-req-badges .p {
  --rc: #ef4444;
}
.mw-req-legend .d,
.mw-req-badges .d {
  --rc: #16a34a;
}
.mw-req-legend i {
  background: var(--rc);
}

.mw-req-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 190px;
}
.mw-req-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  background: #f8f9fd;
  cursor: pointer;
  font-size: 12px;
  color: #4a5675;
  transition: background 0.15s;
}
.mw-req-row:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.mw-req-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.mw-req-badges {
  display: inline-flex;
  gap: 4px;
  flex-shrink: 0;
}
.mw-req-badges b {
  min-width: 24px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: var(--rc);
  background: color-mix(in srgb, var(--rc) 12%, #fff);
}
.mw-req-compact {
  display: none;
  justify-content: center;
}
.mw-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* collapsed state */
.mw-app.is-collapsed .mw-txt,
.mw-app.is-collapsed .mw-side-label span,
.mw-app.is-collapsed .mw-req-full {
  display: none;
}
.mw-app.is-collapsed .mw-side-top {
  flex-direction: column;
  gap: 10px;
}
.mw-app.is-collapsed .mw-side-label {
  height: 1px;
  margin: 10px 6px;
  padding-top: 0;
  background: var(--line);
}
.mw-app.is-collapsed .mw-nav-item,
.mw-app.is-collapsed .mw-side-add {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}
.mw-app.is-collapsed .mw-nav-item.is-active::before {
  left: -10px;
}
.mw-app.is-collapsed .mw-req-compact {
  display: flex;
}

/* ═════════ View card ═════════ */
.mw-view {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(17, 28, 54, 0.04);
  min-width: 0;
  overflow: hidden;
}
.mw-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
}
.mw-view-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.mw-view-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mw-view-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.mw-view-title p {
  margin: 1px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}
.mw-view-sub {
  padding: 0 16px 10px;
}
.mw-view-pad {
  padding: 4px 16px 16px;
}

.mw-solid-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s;
}
.mw-solid-btn:hover {
  filter: brightness(1.1);
}
.mw-view-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mw-ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.mw-ghost-btn:hover,
.mw-ghost-btn.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* filter zone: date filter on top, full-width filters below (never side by side) */
.mw-fz {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 8px 16px;
  background: #f8f9fd;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.mw-fz-date {
  max-width: 100%;
  overflow-x: auto;
}
.mw-fz-search {
  min-width: 0;
}
.mw-fz-search.is-hidden {
  display: none; /* stays mounted so applied filters keep working */
}

/* status tabs */
.mw-stabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
}
.mw-stabs::-webkit-scrollbar {
  display: none;
}
.mw-stab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 10px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.mw-stab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}
.mw-stab em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef1f7;
  color: #475569;
}
.mw-stab:hover {
  color: var(--ink);
}
.mw-stab.is-active {
  color: var(--ink);
  font-weight: 700;
}
.mw-stab.is-active em {
  background: var(--c);
  color: #fff;
}
.mw-stab.is-active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--c);
}

/* tools row */
.mw-view-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 16px;
}
.mw-view-tools-right {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.mw-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: #eef1f7;
  border-radius: 10px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.mw-seg::-webkit-scrollbar {
  display: none;
}
.mw-seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 5px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.15s;
}
.mw-seg-btn:hover {
  color: var(--ink);
}
.mw-seg-btn.is-active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(17, 28, 54, 0.12);
}
.mw-seg-btn.is-active[data-tone="warn"] {
  color: #ea580c;
}
.mw-seg-btn.is-active[data-tone="ok"] {
  color: #16a34a;
}

.mw-view-table {
  padding: 0 10px 10px;
  overflow-x: auto;
}
.mw-side > * {
  flex-shrink: 0;
}
.mw-side-add {
  min-height: 38px;
}

.mw-view {
  position: relative;
  isolation: isolate;
}

/* ═════════ Table ═════════ */
.mw-view-table .ant-table {
  font-size: 12.5px;
  color: var(--ink);
  background: transparent;
}
.mw-view-table .ant-table-container {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

/* header */
.mw-view-table .ant-table-thead > tr > th,
.mw-view-table .ant-table-thead > tr > td {
  background: #f3f6fc;
  color: #5b6785;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 9px 10px;
  white-space: wrap;
  border-bottom: 1px solid var(--line);
}
.mw-view-table .ant-table-thead > tr > th::before {
  display: none !important; /* remove vertical column dividers */
}
.mw-view-table .ant-table-column-sorter,
.mw-view-table .ant-table-filter-trigger {
  color: #9aa5bf;
}
.mw-view-table .ant-table-filter-trigger.active,
.mw-view-table .ant-table-column-sorter-up.active,
.mw-view-table .ant-table-column-sorter-down.active {
  color: var(--accent);
}

/* body */
.mw-view-table .ant-table-tbody > tr > td {
  padding: 8px 10px;
  line-height: 1.35;
  vertical-align: middle;
  border-bottom: 1px solid #eef1f7;
  transition: background 0.12s;
}
.mw-view-table .ant-table-tbody > tr:last-child > td {
  border-bottom: none;
}
.mw-view-table .ant-table-tbody > tr {
  cursor: pointer;
}
.mw-view-table .ant-table-tbody > tr:hover > td {
  background: var(--accent-soft) !important;
}
.mw-view-table .ant-table-cell-fix-left,
.mw-view-table .ant-table-cell-fix-right {
  background: #fff;
}
.mw-view-table .ant-table-thead .ant-table-cell-fix-left,
.mw-view-table .ant-table-thead .ant-table-cell-fix-right {
  background: #f3f6fc;
}
.mw-view-table .ant-table-body {
  scrollbar-width: thin;
  min-height: 220px;
}
.mw-view-table .ant-pagination {
  margin: 10px 0 0;
}
.mw-view-table .ant-empty {
  margin: 28px 0;
}

/* tags (status / type) */
.mw-view-table .ant-tag {
  margin: 0;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 20px;
}
.mw-type {
  min-width: 30px;
  text-align: center;
  background: #eaf1ff;
  border-color: #cfe0ff;
  color: #1d4ed8;
}
.mw-type.is-rev {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

/* cell helpers */
.mw-view-table .task-highlight {
  color: #b91c1c;
  font-weight: 600;
}
.mw-dash {
  color: #c3cadb;
}
.mw-date {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mw-code {
  font-weight: 600;
  color: var(--accent);
}
.mw-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: #eef1f7;
  color: #475569;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.mw-pill.is-late {
  background: #fee2e2;
  color: #b91c1c;
}
.mw-pill.is-early {
  background: #dcfce7;
  color: #15803d;
}
.mw-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mw-view-table .mw-avatar.ant-avatar {
  flex-shrink: 0;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}

/* history cell */
.mw-hist {
  max-width: 280px;
  font-size: 11px;
  line-height: 1.45;
  white-space: normal;
}
.mw-hist-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  font-weight: 700;
}
.mw-hist-item + .mw-hist-item {
  margin-top: 4px;
}
.mw-hist-from {
  color: var(--muted);
}
.mw-hist-to {
  color: var(--accent);
  font-weight: 600;
}
.mw-hist-note {
  font-size: 10px;
  color: #9aa5bf;
}

/* ═════════ Responsive ═════════ */
@media (max-width: 1100px) {
  .mw-app,
  .mw-app.is-collapsed {
    grid-template-columns: 1fr;
  }
  .mw-side {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 8px;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .mw-side-top {
    padding: 0 6px 0 0;
    flex-direction: row;
  }
  .mw-side-toggle,
  .mw-side-label,
  .mw-req-full {
    display: none;
  }
  .mw-side-add {
    flex-shrink: 0;
    padding: 0 14px;
    height: 36px;
  }
  .mw-nav {
    flex-direction: row;
    flex-shrink: 0;
  }
  .mw-nav-item.is-active::before {
    display: none;
  }
  .mw-nav-item.is-link .mw-txt {
    display: none;
  }
  .mw-req-compact {
    display: flex;
    flex-shrink: 0;
  }
  .mw-app.is-collapsed .mw-txt {
    display: inline;
  }
  .mw-app.is-collapsed .mw-nav-item.is-link .mw-txt {
    display: none;
  }
}
@media (max-width: 700px) {
  .mw-app {
    padding: 6px 6px 48px;
    gap: 10px;
    border-radius: 12px;
  }
  .mw-side-name {
    display: none !important;
  }
  .mw-view-head,
  .mw-view-tools,
  .mw-view-sub,
  .mw-fz,
  .mw-view-pad {
    padding-left: 12px;
    padding-right: 12px;
  }
  .mw-view-table {
    padding: 0 8px 10px;
  }
  .mw-view-actions {
    width: 100%;
  }
  .mw-view-actions > button {
    flex: 1 1;
    justify-content: center;
  }
  .mw-view-tools-right {
    margin-left: 0;
    width: 100%;
  }
}

/* ApexCharts custom tooltip content (rendered via dangerouslySetInnerHTML by apex internally) */
.apex-custom-tooltip {
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  background: #ffffff;
  color: #1f2937;
}
*/ .task-dashboard {
  padding: 20px;
  background: #f5f6f8;
  min-height: 100vh;
}

.section-row {
  margin-top: 16px;
}

.stat-card {
  border-radius: 10px;
  cursor: default;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.stat-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.stat-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
}

.stat-icon {
  font-size: 14px;
}

.chart-card {
  border-radius: 10px;
  height: 100%;
}

.chart-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.chart-header-icon {
  color: #3e7cb1;
  font-size: 15px;
  display: flex;
  align-items: center;
}

.chart-header-title {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
}

.info-tip {
  color: #9ca3af;
  cursor: help;
  display: flex;
  align-items: center;
  font-size: 13px;
  transition: color 0.15s ease;
}

.info-tip:hover {
  color: #3e7cb1;
}

.progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0 4px;
}

.progress-caption {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.row-detail-trigger {
  color: #9ca3af;
  cursor: help;
}

.row-detail-trigger:hover {
  color: #3e7cb1;
}

.row-detail-tooltip {
  max-width: 280px;
  color: #1f2937;
}

.row-detail-overlay .ant-tooltip-inner {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  border: 1px solid #e5e7eb;
}

/* ApexCharts custom tooltip content (rendered via dangerouslySetInnerHTML by apex internally) */
.apex-custom-tooltip {
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  background: #ffffff;
  color: #1f2937;
}

.highlight-card {
  border: 1px solid #e5e7eb;
}

.gauge-col {
  display: flex;
  justify-content: center;
}

.gauge-number {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
}

.risk-list-title {
  font-weight: 600;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.risk-name {
  font-weight: 500;
  color: #1f2937;
}

.risk-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.risk-count {
  font-size: 12px;
  color: #6b7280;
}

.analytics-card {
  border: 1px solid #e7eaf0;
  border-radius: 17px;
  box-shadow: 0 7px 25px rgba(15, 23, 42, 0.045);
  overflow: hidden;
}

.analytics-card .ant-card-body {
  padding: 21px;
}

.delay-analysis-card {
  min-height: 350px;
}

.delay-analysis-card .ant-card-body {
  text-align: center;
}

.delay-analysis-card .card-heading {
  text-align: left;
}

.delay-analysis-card .ant-progress {
  margin-top: 12px;
}

.card-heading-ts {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 19px;
}

.heading-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #eef2ff;
  color: #4f46e5;
}

.heading-icon.blue {
  background: #eff6ff;
  color: #2563eb;
}

.card-title-ts {
  font-size: 14px;
  font-weight: 800;
  color: #172033;
}

.card-subtitle-ts {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.5;
}

.hierarchy-bars {
  margin-top: 35px;
}

.hierarchy-bars > div {
  margin-bottom: 22px;
}

.hierarchy-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 11px;
}

.analysis-description {
  margin-top: 18px;
  text-align: left;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.6;
}

/* ───────── My Dashboard (complete stylesheet) ───────── */
.md-dash {
  --md-bg: #f5f7fc;
  --md-surface: #ffffff;
  --md-border: #e6eaf3;
  --md-text: #1b2440;
  --md-muted: #7b86a3;
  --md-radius: 16px;
  --md-shadow:
    0 1px 2px rgba(27, 36, 64, 0.04), 0 4px 16px rgba(27, 36, 64, 0.04);
  --md-red: #f0585a;
  --md-green: #12b981;
  --md-amber: #f59e0b;
  --md-blue: #4f6bed;
  color: var(--md-text);
}

.md-dash .md-body {
  background: var(--md-bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  overflow-y: auto;
}

/* ───── entrance animations ───── */
@keyframes md-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes md-wave {
  0%,
  60%,
  100% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(14deg);
  }
  20% {
    transform: rotate(-8deg);
  }
  30% {
    transform: rotate(14deg);
  }
  40% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(10deg);
  }
}
@keyframes md-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes md-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(18, 185, 129, 0.45);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(18, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(18, 185, 129, 0);
  }
}
@keyframes md-rot {
  to {
    transform: rotate(360deg);
  }
}

/* ───── hero ───── */
.md-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px 28px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(
      circle at 92% 0%,
      rgba(255, 255, 255, 0.2),
      transparent 45%
    ),
    linear-gradient(120deg, #4f6bed 0%, #6a4fe0 100%);
  box-shadow: 0 10px 28px rgba(79, 107, 237, 0.3);
  animation: md-up 0.45s ease both;
}
.md-hero::before,
.md-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.md-hero::before {
  width: 190px;
  height: 190px;
  right: -50px;
  bottom: -90px;
  animation: md-float 7s ease-in-out infinite;
}
.md-hero::after {
  width: 90px;
  height: 90px;
  right: 190px;
  top: -40px;
  animation: md-float 9s ease-in-out infinite reverse;
}
.md-hero-text {
  position: relative;
  z-index: 1;
}
.md-hero h1 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}
.md-wave {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: md-wave 2.4s ease-in-out infinite;
}
.md-hero p {
  margin: 0;
  font-size: 14px;
  opacity: 0.94;
  max-width: 640px;
  line-height: 1.5;
}
.md-hero p b {
  font-weight: 700;
}
.md-hero p b.is-red {
  background: rgba(255, 255, 255, 0.95);
  color: var(--md-red);
  padding: 0 7px;
  border-radius: 6px;
}
.md-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.md-hero-chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}
.md-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
}
.md-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}
.md-btn:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}
.md-btn.is-primary {
  background: #fff;
  color: #4f46d8;
  border-color: #fff;
}

/* ───── section titles ───── */
.md-section {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 6px 2px -6px;
}
.md-section h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--md-text);
}
.md-section span {
  font-size: 12px;
  color: var(--md-muted);
}

/* ───── KPI tiles ───── */
.md-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 14px;
  gap: 14px;
}
.md-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  background: var(--md-surface);
  border: 1px solid var(--md-border);
  border-radius: var(--md-radius);
  box-shadow: var(--md-shadow);
  overflow: hidden;
  animation: md-up 0.5s ease both;
  animation-delay: calc(0 * 60ms + 120ms);
  animation-delay: calc(var(--i, 0) * 60ms + 120ms);
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    border-color 0.15s;
}
.md-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--k);
}
.md-kpi::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--k) 8%, transparent);
}
.md-kpi.is-click {
  cursor: pointer;
}
.md-kpi.is-click:hover,
.md-kpi.is-click:focus-visible {
  transform: translateY(-2px);
  border-color: var(--k);
  box-shadow: 0 8px 22px rgba(27, 36, 64, 0.1);
  outline: none;
}
.md-kpi-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.md-kpi-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 18px;
  color: var(--k);
  background: color-mix(in srgb, var(--k) 13%, #fff);
}
.md-kpi-go {
  color: var(--md-muted);
  opacity: 0;
  transition:
    opacity 0.15s,
    transform 0.15s;
}
.md-kpi.is-click:hover .md-kpi-go {
  opacity: 1;
  transform: translateX(2px);
}
.md-kpi-val {
  position: relative;
  z-index: 1;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.md-kpi-label {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 600;
}
.md-kpi-sub {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: var(--md-muted);
}
.md-kpi-bar {
  position: relative;
  z-index: 1;
  height: 6px;
  margin: 8px 0 2px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--k) 14%, #fff);
  overflow: hidden;
}
.md-kpi-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--k);
  transition: width 0.8s ease;
}

/* ───── card grid (12 columns) ───── */
.md-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
}
.md-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--md-surface);
  border: 1px solid var(--md-border);
  border-radius: var(--md-radius);
  box-shadow: var(--md-shadow);
  padding: 18px 20px 14px;
  animation: md-up 0.5s ease both;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}
.md-card:hover {
  border-color: #d5dcf0;
  box-shadow: 0 6px 22px rgba(27, 36, 64, 0.08);
}
.md-grid > .md-card:nth-child(2) {
  animation-delay: 60ms;
}
.md-grid > .md-card:nth-child(3) {
  animation-delay: 120ms;
}
.md-grid > .md-card:nth-child(4) {
  animation-delay: 180ms;
}
.md-grid > .md-card:nth-child(5) {
  animation-delay: 240ms;
}
.md-grid > .md-card:nth-child(6) {
  animation-delay: 300ms;
}
.md-card.c-4 {
  grid-column: span 4;
}
.md-card.c-5 {
  grid-column: span 5;
}
.md-card.c-6 {
  grid-column: span 6;
}
.md-card.c-7 {
  grid-column: span 7;
}
.md-card.c-8 {
  grid-column: span 8;
}
.md-card.c-12 {
  grid-column: span 12;
}

.md-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.md-card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--md-text);
}
.md-card-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--md-muted);
}
.md-card-body {
  flex: 1 1;
  min-height: 0;
}
.md-link {
  border: 0;
  background: none;
  padding: 2px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--md-blue);
  cursor: pointer;
}
.md-link:hover {
  text-decoration: underline;
}
.md-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
}

/* ───── lists ───── */
.md-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 2px;
}
.md-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--md-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
.md-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: var(--md-border);
}
.md-row.is-late::before {
  background: var(--md-red);
}
.md-row.is-today::before {
  background: var(--md-amber);
}
.md-row.is-early::before {
  background: var(--md-green);
}
.md-row:hover {
  background: #f8faff;
  border-color: #cfd8f5;
  transform: translateX(2px);
}
.md-row.is-static {
  cursor: default;
}
.md-row.is-static:hover {
  background: #fff;
  border-color: var(--md-border);
  transform: none;
}
.md-row.is-static::before {
  display: none;
}
.md-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1;
}
.md-row-name {
  flex: 1 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--md-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.md-row-sub {
  font-size: 12px;
  font-weight: 600;
  color: #51607f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.md-row-sub.is-muted {
  font-weight: 500;
  color: var(--md-muted);
}
.md-row-count {
  margin-left: auto;
  font-weight: 700;
  font-size: 14px;
}
.md-row-go {
  color: #b3bcd3;
  flex: none;
  transition:
    transform 0.15s,
    color 0.15s;
}
.md-row:hover .md-row-go {
  color: var(--md-blue);
  transform: translateX(2px);
}
.md-code {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--md-blue);
}
.md-tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, #fff);
}
.md-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
}
.md-pill {
  flex: none;
  min-width: 28px;
  text-align: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: #eef1f8;
  color: #51607f;
}
.md-pill.is-late {
  background: #fdeaea;
  color: #d83a3d;
}
.md-pill.is-today {
  background: #fff3dc;
  color: #b9770a;
}
.md-pill.is-early {
  background: #e2f8ef;
  color: #0b8e63;
}
.md-pill.is-zero {
  background: #eef1f8;
  color: #9aa5c0;
}

/* ───── delegated ───── */
.md-big {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.md-big b {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1px;
}
.md-big span {
  font-size: 13px;
  color: var(--md-muted);
}
.md-big em,
.md-late {
  font-style: normal;
  font-weight: 600;
}
.md-big em.is-red,
.md-late {
  color: var(--md-red);
}

/* ───── gate passes ───── */
.md-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-gap: 16px;
  gap: 16px;
  align-items: center;
}

/* ───── attendance: today + yesterday + chart ───── */
.md-att {
  display: grid;
  grid-template-columns: 260px 260px minmax(0, 1fr);
  grid-gap: 16px;
  gap: 16px;
  align-items: start;
}
.md-day {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--md-border);
  border-radius: 14px;
  background: #fafbff;
}
.md-day-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.md-day-head b {
  font-size: 14px;
}
.md-day-head span {
  color: var(--md-muted);
  font-size: 12px;
}
.md-live {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: #0b8e63;
  background: #e2f8ef;
  padding: 2px 9px;
  border-radius: 99px;
  animation: md-pulse 1.8s infinite;
}
.md-day-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}
.md-day-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--md-border);
  border-radius: 10px;
}
.md-day-stats small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--md-muted);
}
.md-day-stats b {
  font-size: 12.5px;
  white-space: nowrap;
}
.md-day-bar {
  height: 6px;
  border-radius: 99px;
  background: #e8ecfd;
  overflow: hidden;
}
.md-day-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f6bed, #7c5cf0);
  transition: width 0.8s ease;
}
.md-day-none {
  font-size: 12px;
  color: var(--md-muted);
  padding: 2px;
}
.md-punch-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 4px;
}
.md-punch-list::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--md-border);
}
.md-punch-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.md-punch-item i {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--md-blue);
  box-shadow: 0 0 0 4px #e8ecfd;
}
.md-punch-item b {
  min-width: 70px;
}
.md-punch-item span {
  color: var(--md-muted);
}
.md-tip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  font-size: 12px;
}
.md-tip b {
  color: var(--md-text);
}

/* ───── misc ───── */
.md-spin {
  animation: md-rot 0.9s linear infinite;
}

/* ───── responsive ───── */
@media (max-width: 1280px) {
  .md-card.c-7,
  .md-card.c-5,
  .md-card.c-8,
  .md-card.c-4,
  .md-card.c-6 {
    grid-column: span 12;
  }
  .md-att {
    grid-template-columns: 1fr 1fr;
  }
  .md-att .md-punch-chart {
    grid-column: span 2;
  }
}
@media (max-width: 900px) {
  .md-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .md-split {
    grid-template-columns: 1fr;
  }
  .md-dash .md-body {
    padding: 12px;
  }
}
@media (max-width: 700px) {
  .md-att {
    grid-template-columns: 1fr;
  }
  .md-att .md-punch-chart {
    grid-column: auto;
  }
}
@media (max-width: 520px) {
  .md-kpi-val {
    font-size: 22px;
  }
  .md-hero {
    padding: 18px;
  }
  .md-hero-actions {
    width: 100%;
  }
  .md-btn {
    flex: 1 1;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .md-wave,
  .md-spin,
  .md-live,
  .md-hero::before,
  .md-hero::after {
    animation: none;
  }
  .md-kpi,
  .md-card,
  .md-hero {
    animation: none;
  }
  .md-kpi,
  .md-row {
    transition: none;
  }
}

/* Role sections + approvals card. Uses the --md-* tokens from MyDashboard.css. */
.md-section-title {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--md-muted);
}

.md-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
  margin-bottom: 12px;
}
.md-chips.is-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.md-chip {
  --c: var(--md-blue);
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 20%, #fff);
}
.md-chip b {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--c);
}
.md-chip span {
  font-size: 12px;
  color: var(--md-muted);
}

.md-dot {
  --c: var(--md-blue);
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}
.md-kv {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--md-border);
  font-size: 13px;
}
.md-kv:last-child {
  border-bottom: none;
}
.md-kv span {
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.md-kv b {
  font-weight: 700;
}
.md-when {
  flex: none;
  font-size: 11.5px;
  color: var(--md-muted);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .md-chips.is-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* ───── added for the role sections (append to MyDashboard.css) ───── */
.md-chips.is-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.md-chips.is-1 {
  grid-template-columns: minmax(0, 1fr);
}
/* one-line note under a chip's label */
.md-chip small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--md-muted);
}

@media (max-width: 900px) {
  .md-chips.is-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .md-chips.is-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* ───── today's production journey (append to MyDashboard.css) ───── */
.md-jr {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  grid-gap: 10px;
  gap: 10px;
}
.md-jr-tile {
  --g: #0f3460;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--md-border);
  border-top: 3px solid var(--g);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  font: inherit;
  color: var(--md-text);
  cursor: pointer;
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
}
.md-jr-tile:hover,
.md-jr-tile:focus-visible {
  border-color: #c9d3ea;
  box-shadow: 0 6px 18px rgba(15, 52, 96, 0.12);
  outline: none;
}
.md-jr-group {
  font-size: 10px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--md-muted);
}
.md-jr-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.md-jr-head i {
  flex: 0 0 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--g);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.md-jr-head b {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f3460;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.md-jr-main {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.15;
  color: #0f3460;
}
.md-jr-main small {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--md-muted);
}
.md-jr-bar {
  display: flex;
  height: 6px;
  border-radius: 99px;
  overflow: hidden;
  background: #eef1f8;
}
.md-jr-bar i {
  display: block;
  height: 100%;
}
.md-jr-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  font-size: 11.5px;
}
.md-jr-parts em {
  font-style: normal;
}
.md-jr-foot {
  font-size: 11px;
  color: var(--md-muted);
}
.md-jr-push {
  margin-top: auto;
}
.md-jr-warn {
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--md-red);
}

.lot-display-flex-center {
  display: grid;
  grid-template-columns: 1fr 10fr;
  align-items: center;
  grid-column-gap: 10px;
  column-gap: 10px;
  margin: 10px 0 0 0;
}

.lot-spec-file-upload {
  border: 2px dashed #afa9a9;
  align-items: center;
  height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
}

.lot-spec-image-holder {
  align-items: center;
  display: flex;
  width: 100%;
  text-align: center;
  height: 100px;
}

.lot-image {
  height: 50px;
  width: 50px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.lot-file-embed {
  height: 50px;
  width: 50px;
  margin: 5px;
  border-radius: 8px;
  border: 1px solid #3e5888;
}

.lot-image-lbl {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.lot-img-name {
  padding: 0px;
  margin: 0px;
  cursor: pointer;
}

.truncate-rolls {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.5rem;
  background-color: #f5f5f5;
  border-radius: 4px;
  font-size: 0.6rem;
}

.truncate-rolls:hover {
  cursor: pointer;
  background-color: #eaeaea;
}

.lot-file-uploader {
  border: 2px dashed #ccc;
  text-align: center;
  min-height: 150px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px;
  padding: 5px;
}
.lot-img {
  width: 150px;
}

.trims-lot-file-uploader {
  border: 2px dashed #ccc;
  text-align: center;
  min-height: 150px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px;
  padding: 5px;
}
.trims-lot-img {
  width: 150px;
}

.sample-qc-display-flex-center {
  display: grid;
  grid-template-columns: 1fr 10fr;
  align-items: center;
  grid-column-gap: 10px;
  column-gap: 10px;
  margin: 10px 0 0 0;
}

.sample-qc-spec-file-upload {
  border: 2px dashed #afa9a9;
  align-items: center;
  height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
}

.sample-qc-spec-image-holder {
  align-items: center;
  display: flex;
  width: 100%;
  text-align: center;
  height: 100px;
}

.sample-qc-image {
  height: 50px;
  width: 50px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.sample-qc-file-embed {
  height: 50px;
  width: 50px;
  margin: 5px;
  border-radius: 8px;
  border: 1px solid #3e5888;
}

.sample-qc-image-lbl {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.sample-qc-img-name {
  padding: 0px;
  margin: 0px;
  cursor: pointer;
}

/* ---- Order report drawers (new classes only, imported by ReportUi.jsx) ---- */

.rpt-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* summary tiles */
.rpt-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.rpt-kpi {
  --c: #0f3460;
  position: relative;
  padding: 10px 12px 10px 14px;
  border: 1px solid #e8edf4;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.rpt-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--c);
}

.rpt-kpi-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #8c8c8c;
}

.rpt-kpi-value {
  margin-top: 2px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--c);
}

.rpt-kpi-sub {
  margin-top: 2px;
  font-size: 11px;
  color: #8c8c8c;
}

.rpt-toolbar {
  display: flex;
  justify-content: flex-end;
  overflow-x: auto;
}

/* quantity pill */
.rpt-qty {
  --c: #0f3460;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 36px;
  justify-content: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, #fff);
  white-space: nowrap;
}

.rpt-qty-uom {
  font-size: 10.5px;
  font-weight: 500;
  opacity: 0.75;
}

.rpt-qty.is-zero,
.rpt-dash {
  color: #bfbfbf;
  background: transparent;
  font-weight: 400;
}

/* progress bar */
.rpt-progress {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rpt-progress-track {
  flex: 1 1;
  height: 6px;
  border-radius: 6px;
  background: #f0f0f0;
  overflow: hidden;
}

.rpt-progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.3s ease;
}

.rpt-progress-text {
  min-width: 38px;
  font-size: 11.5px;
  color: #595959;
  text-align: right;
}

/* text bits */
.rpt-code {
  font-weight: 600;
  color: #0f3460;
}

.rpt-item {
  min-width: 140px;
}

.rpt-item-name {
  font-weight: 600;
  color: #1f1f1f;
}

.rpt-item-meta {
  font-size: 11.5px;
  color: #8c8c8c;
}

.rpt-color {
  display: inline-block;
  padding: 1px 8px;
  border-left: 3px solid #0f3460;
  border-radius: 4px;
  background: #f3f6fb;
  font-weight: 500;
  color: #0f3460;
}

.rpt-size {
  display: inline-block;
  min-width: 32px;
  padding: 1px 6px;
  border: 1px solid #e4e9f2;
  border-radius: 4px;
  text-align: center;
  font-weight: 500;
}

.rpt-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #0f3460;
  font-weight: 500;
}

.rpt-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rpt-ellipsis {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rpt-text-danger {
  color: #ff4d4f;
  font-weight: 600;
}

/* PO chips */
.rpt-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 170px;
}

.rpt-chip {
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11.5px;
  background: #f3f6fb;
  color: #0f3460;
  white-space: nowrap;
}

.rpt-chip.is-more {
  background: #0f3460;
  color: #fff;
}

/* counters (preparatory status) */
.rpt-counters {
  display: inline-flex;
  gap: 4px;
}

.rpt-counter {
  --c: #0f3460;
  min-width: 24px;
  padding: 0 6px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, #fff);
}

.rpt-counter.is-zero {
  color: #bfbfbf;
  background: #fafafa;
  font-weight: 400;
}

/* nested (expanded) tables */
.rpt-nested {
  padding: 6px 0 6px 12px;
  border-left: 3px solid #0f3460;
  background: #fafbfd;
}

/* task view: overdue rows */
.rpt-wrap .rpt-row-overdue > td {
  background: #fff6f6;
}

/* sample QC info card */
.rpt-info-card {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #e8edf4;
  border-radius: 10px;
  background: #fff;
}

.rpt-info-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.rpt-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  grid-gap: 10px 16px;
  gap: 10px 16px;
}

.rpt-info-wide {
  grid-column: 1 / -1;
}

.rpt-info-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #8c8c8c;
}

.rpt-info-value {
  font-weight: 500;
  color: #1f1f1f;
  word-break: break-word;
}

.rpt-info-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* measurement difference */
.rpt-diff {
  font-weight: 600;
}

.rpt-diff.is-ok {
  color: #52c41a;
}

.rpt-diff.is-plus {
  color: #d48806;
}

.rpt-diff.is-minus {
  color: #ff4d4f;
}

/* ---- Order report: order → colour → size grouping (new classes only) ---- */

/* drawer buttons under the style details */
.owv-style-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.owv-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  border: 1px solid #e4e9f2;
  border-radius: 999px;
  background: #fff;
}

.owv-action-label {
  font-size: 12px;
  color: #0f3460;
  font-weight: 500;
  white-space: nowrap;
}

/* colour / size first column */
.owv-color-cell {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.owv-color-name {
  font-weight: 600;
  color: #0f3460;
}

.owv-color-meta {
  font-size: 11px;
  color: #8c8c8c;
}

.owv-size-cell {
  font-size: 13px;
  color: #434343;
}

/* colour rows stand out, size rows stay light */
.owv-style-table .owv-row-color > td {
  background: #f3f6fb;
}

.owv-style-table .owv-row-color > td:first-child {
  box-shadow: inset 3px 0 0 #0f3460;
}

.owv-style-table .owv-row-size > td {
  background: #fff;
}

.owv-style-table .owv-row-total > td {
  background: #e9eef6;
  font-weight: 600;
  color: #0f3460;
}

.dropdown-size {
  width: 10vw;
}

.readonly-field {
  display: flex;
  flex-direction: column;
}

.readonly-label {
  font-size: 0.8rem;
  font-weight: bold;
  color: #6a1e55;
}

.readonly-value {
  font-size: 0.7rem;
  color: #103460;
}

.checklist-drag {
  display: flex;
  align-content: center;
  align-items: center;
  min-width: 0vw;
  max-width: 4vw;
}
.etv-wrapper {
  width: 100%;
  min-height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.etv-header {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.etv-user {
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: #3a8dff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}
.user-name {
  font-weight: 700;
  font-size: 18px;
}
.user-meta {
  color: #667085;
  font-size: 13px;
}
.kpis {
  display: flex;
  gap: 5px;
}
.kpi {
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 10px 5px;
  border-radius: 8px;
  min-width: 80px;
  text-align: center;
}
.kpi-label {
  font-size: 12px;
  color: #667085;
}
.kpi-value {
  font-weight: 700;
  font-size: 16px;
}
.kpi-value.completed {
  color: #15803d;
}
.kpi-value.delayed {
  color: #c2410c;
}
.etv-controls {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
  align-items: center;
  background: #fff;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tab {
  border: 1px solid #e5e7eb;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  background: #fff;
}
.tab.active {
  background: #f1f5ff;
  border-color: #c7d2fe;
  font-weight: 600;
}
.summary-tasks {
  font-weight: bold;
  background-color: #dcedc8;
  padding: 5px;
  border-radius: 5px;
}
.summary-text {
  font-size: 13px;
  color: #475569;
}
.etv-tasks {
  flex: 1 1;
  margin: 5px;
  padding: 0px;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}
.tasks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.tasks-table thead tr {
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
}
.tasks-table thead th {
  text-align: left;
  padding: 10px;
  font-size: 13px;
  color: #667085;
  border-bottom: 1px solid #e5e7eb;
}
.tasks-table tbody td {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
}
.mono {
  font-family: monospace;
}
.no-tasks {
  padding: 40px;
  text-align: center;
  color: #475569;
}
.no-tasks-emoji {
  font-size: 28px;
}
.mini-kpis {
  display: flex;
  gap: 8px;
}

.mini-kpi {
  background: #f3f4f6;
  padding: 6px 12px;
  min-width: 105px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
  -webkit-user-select: none;
          user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mini-kpi:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.mini-kpi-label {
  font-size: 10px;
  color: #667085;
}

.mini-kpi-value {
  font-weight: 700;
  font-size: 12px;
}

.mini-kpi-value.completed {
  color: #15803d;
}

.mini-kpi-value.delayed {
  color: #c2410c;
}
.mini-kpi.selected {
  background: #cddaf4;
  color: white;
}
.task-report-print {
  cursor: pointer;
}
.task-report-print:hover {
  transform: translateY(-1px);
}

.dtv-wrapper {
  width: 100%;
  min-height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.dtv-header {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.dtv-dept {
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #3a8dff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}
.dept-name {
  font-weight: 700;
  font-size: 17px;
}
.dept-meta {
  color: #667085;
  font-size: 13px;
}
.kpis {
  display: flex;
  gap: 5px;
}
.kpi {
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 10px 5px;
  border-radius: 8px;
  min-width: 80px;
  text-align: center;
}
.kpi-label {
  font-size: 12px;
  color: #667085;
}
.kpi-value {
  font-weight: 700;
  font-size: 16px;
}
.kpi-value.completed {
  color: #15803d;
}
.kpi-value.delayed {
  color: #c2410c;
}
.dtv-controls {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
  align-items: center;
  background: #fff;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tab {
  border: 1px solid #e5e7eb;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  background: #fff;
}
.tab.active {
  background: #f1f5ff;
  border-color: #c7d2fe;
  font-weight: 600;
}
.summary-text {
  font-size: 13px;
  color: #475569;
}
.dtv-tasks {
  flex: 1 1;
  margin: 5px;
  padding: 0px;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}
.tasks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.tasks-table thead tr {
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
}
.tasks-table thead th {
  text-align: left;
  padding: 10px;
  font-size: 13px;
  color: #667085;
  border-bottom: 1px solid #e5e7eb;
}
.tasks-table tbody td {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
}
.mono {
  font-family: monospace;
}
.no-tasks {
  padding: 40px;
  text-align: center;
  color: #475569;
}
.no-tasks-emoji {
  font-size: 28px;
}
.mini-kpis {
  display: flex;
  gap: 6px;
}

.mini-kpi {
  background: #f3f4f6;
  padding: 8px 4px;
  min-width: 103px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
  -webkit-user-select: none;
          user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mini-kpi:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.mini-kpi-label {
  font-size: 10px;
  color: #667085;
}

.mini-kpi-value {
  font-weight: 700;
  font-size: 12px;
}

.mini-kpi-value.completed {
  color: #15803d;
}

.mini-kpi-value.delayed {
  color: #c2410c;
}
.mini-kpi.selected {
  background: #cddaf4;
  color: white;
}
.task-report-print {
  cursor: pointer;
}
.task-report-print:hover {
  transform: translateY(-1px);
}

/* ================= Work Order Dashboard ================= */
.wod-page {
  --wod-bg: #f4f6fb;
  --wod-card: #ffffff;
  --wod-border: #e9edf5;
  --wod-text: #0f172a;
  --wod-muted: #64748b;
  --wod-ok: #22c55e;
  --wod-late: #f43f5e;
  --wod-primary: #4f46e5;
  --wod-radius: 16px;
  --wod-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --wod-shadow-hover:
    0 4px 10px rgba(15, 23, 42, 0.06), 0 18px 40px rgba(15, 23, 42, 0.1);

  padding: 20px;
  min-height: 100vh;
  background:
    radial-gradient(
      1200px 400px at 0% -10%,
      rgba(99, 102, 241, 0.08),
      transparent 60%
    ),
    radial-gradient(
      900px 400px at 100% 0%,
      rgba(236, 72, 153, 0.06),
      transparent 60%
    ),
    var(--wod-bg);
  color: var(--wod-text);
}

.wod-section {
  margin-bottom: 16px;
}

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

/* ---------- Info icon + tooltip ---------- */
.wod-info {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  border-radius: 50%;
  font-size: 13px;
  color: #94a3b8;
  cursor: help;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.wod-info:hover {
  color: var(--wod-primary);
  background: #eef2ff;
}

.wod-info.light {
  color: rgba(255, 255, 255, 0.8);
}

.wod-info.light:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.wod-inline-info {
  margin-left: 4px;
  vertical-align: -2px;
  cursor: help;
}

.wod-tooltip .ant-tooltip-inner {
  background: #0f172a;
  border-radius: 12px;
  padding: 12px 14px;
  max-width: 340px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.3);
}

.wod-tooltip .ant-tooltip-arrow::before {
  background: #0f172a;
}

.wod-tip {
  font-size: 12px;
  line-height: 1.55;
  color: #e2e8f0;
}

.wod-tip-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.wod-tip-row {
  margin-bottom: 6px;
}

.wod-tip-key {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a5b4fc;
  margin-bottom: 1px;
}

.wod-tip-row.delay .wod-tip-key {
  color: #fda4af;
}

.wod-tip-row.formula {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.wod-tip-note {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
}

.wod-tip-foot {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  color: #a5b4fc;
}

/* ---------- Help popover ---------- */
.wod-help {
  max-width: 360px;
  font-size: 13px;
  line-height: 1.55;
}

.wod-help-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
}

.wod-help p {
  margin: 0 0 6px;
}

.wod-help-muted {
  color: #64748b;
  color: var(--wod-muted, #64748b);
  font-size: 12px;
}

/* ---------- Hero header ---------- */
.wod-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px;
  margin-bottom: 16px;
  border-radius: var(--wod-radius);
  background: linear-gradient(120deg, #4f46e5 0%, #7c3aed 55%, #db2777 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.3);
  position: relative;
  overflow: hidden;
}

.wod-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.wod-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wod-hero-left h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.wod-hero-left p {
  margin: 2px 0 0;
  opacity: 0.85;
  font-size: 13px;
}

.wod-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}

.wod-hero-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.wod-hero-right .ant-segmented {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.wod-hero-right .ant-segmented-item-selected {
  color: var(--wod-primary);
}

.wod-hero-btn.ant-btn {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.wod-hero-btn.ant-btn:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #fff !important;
}

/* ---------- Filter card ---------- */
.wod-filter-card {
  border-radius: var(--wod-radius);
  box-shadow: var(--wod-shadow);
  margin-bottom: 16px;
}

.wod-quick-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.wod-chip {
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--wod-border);
  background: #f8fafc;
  color: var(--wod-muted);
  transition: all 0.2s ease;
  -webkit-user-select: none;
          user-select: none;
}

.wod-chip:hover {
  border-color: #c7d2fe;
  color: var(--wod-primary);
}

.wod-chip.active {
  background: linear-gradient(120deg, #4f46e5, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.wod-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wod-muted);
  margin-bottom: 4px;
}

.wod-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* ---------- Big KPI cards ---------- */
.wod-big-card {
  position: relative;
  overflow: hidden;
  padding: 18px 22px;
  border-radius: var(--wod-radius);
  color: #fff;
  cursor: pointer;
  min-height: 150px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.wod-big-card:hover {
  transform: translateY(-3px);
}

.wod-big-card::before {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.gradient-indigo {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35);
}

.gradient-rose {
  background: linear-gradient(135deg, #fb7185, #e11d48);
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.3);
}

.gradient-emerald {
  background: linear-gradient(135deg, #34d399, #059669);
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.3);
}

.wod-big-head {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  padding-right: 56px;
}

.wod-big-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.2);
}

.wod-big-label {
  font-size: 13px;
  opacity: 0.92;
  font-weight: 600;
}

.wod-big-value {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  margin: 6px 0 10px;
  position: relative;
  z-index: 1;
}

.wod-big-value small {
  font-size: 15px;
  font-weight: 600;
  opacity: 0.85;
}

.wod-big-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.wod-big-foot span {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

/* ---------- Status cards ---------- */
.wod-status-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.wod-status-card {
  position: relative;
  background: var(--wod-card);
  border-radius: 14px;
  padding: 14px 16px 12px;
  box-shadow: var(--wod-shadow);
  border: 1px solid var(--wod-border);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.wod-status-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--accent);
}

.wod-status-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--wod-shadow-hover);
}

.wod-status-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wod-status-top .wod-info {
  margin-left: auto;
}

.wod-status-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  font-size: 16px;
  flex-shrink: 0;
}

.wod-status-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--wod-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wod-status-value {
  font-size: 30px;
  font-weight: 800;
  margin: 8px 0 8px;
  color: var(--wod-text);
  line-height: 1.1;
}

.wod-split-bar {
  display: flex;
  height: 6px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.wod-split-bar span {
  height: 100%;
  transition: width 0.6s ease;
}

.wod-split-bar .ok {
  background: linear-gradient(90deg, #4ade80, #16a34a);
}

.wod-split-bar .late {
  background: linear-gradient(90deg, #fb7185, #e11d48);
}

.wod-status-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 600;
}

.wod-status-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.wod-status-foot .ok {
  color: #16a34a;
}

.wod-status-foot .late {
  color: #94a3b8;
  padding: 1px 6px;
  border-radius: 999px;
}

.wod-status-foot .late.has {
  color: #e11d48;
  background: #fff1f2;
}

.wod-status-foot .late.has:hover {
  background: #ffe4e6;
}

/* ---------- Insight cards ---------- */
.wod-insight-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.wod-insight-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 12px 14px 16px;
  border-radius: 14px;
  background: var(--wod-card);
  border: 1px solid var(--wod-border);
  box-shadow: var(--wod-shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.wod-insight-card.clickable {
  cursor: pointer;
}

.wod-insight-card.clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--wod-shadow-hover);
}

.wod-insight-body {
  flex: 1 1;
  min-width: 0;
}

.wod-insight-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--accent),
    color-mix(in srgb, var(--accent) 70%, #000)
  );
  box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 35%, transparent);
}

.wod-insight-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.wod-insight-label {
  font-size: 12px;
  color: var(--wod-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wod-insight-sub {
  font-size: 11px;
  color: #e11d48;
  font-weight: 600;
}

/* ---------- Chart cards ---------- */
.wod-card {
  border-radius: var(--wod-radius) !important;
  box-shadow: var(--wod-shadow);
  border: 1px solid var(--wod-border) !important;
  height: 100%;
}

.wod-card .ant-card-head {
  border-bottom: 1px solid var(--wod-border);
  min-height: 54px;
}

.wod-card .ant-card-head-title {
  overflow: visible;
}

.wod-card-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
}

.wod-card-title .wod-info {
  margin-left: -2px;
}

.wod-card-title-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--wod-primary);
  background: #eef2ff;
  font-size: 15px;
}

.wod-sub-title {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wod-muted);
  margin: 4px 0 2px 4px;
}

/* ---------- Rank toolbar (search / sort / pager) ---------- */
.wod-rank-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--wod-border);
}

.wod-rank-search {
  width: 200px;
  border-radius: 8px;
}

.wod-rank-sort {
  min-width: 170px;
}

.wod-rank-size {
  min-width: 100px;
}

.wod-rank-toolbar .ant-pagination {
  margin-left: auto;
}

.wod-rank-count {
  font-size: 12px;
  color: var(--wod-muted);
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eef2ff;
}

.wod-user-insights .ant-card-body {
  padding-top: 14px;
}

/* ---------- Tables ---------- */
.wod-table .ant-table-thead > tr > th {
  background: #f8fafc !important;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wod-muted);
}

.wod-th {
  cursor: help;
  border-bottom: 1px dashed #cbd5e1;
}

.wod-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  min-width: 0;
}

.wod-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wod-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  flex-shrink: 0;
}

.wod-cell-pair {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wod-link {
  font-weight: 700;
  cursor: pointer;
}

.wod-link:hover {
  text-decoration: underline;
}

.wod-link.zero {
  color: #cbd5e1;
  cursor: default;
}

.wod-link.zero:hover {
  text-decoration: none;
}

.wod-delay-tag {
  margin: 0;
  cursor: pointer;
  border-radius: 999px;
  font-size: 11px;
  padding: 0 7px;
}

.wod-summary-row td {
  background: #eef2ff !important;
  font-weight: 700;
}

.wod-summary-delay {
  color: #e11d48;
  font-size: 12px;
}

.wod-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  color: var(--wod-primary);
}

.wod-row-delayed td {
  background: #fff5f7;
}

.wod-row-delayed:hover td {
  background: #ffe4ea !important;
}

/* ---------- Drawer ---------- */
.wod-drawer-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.wod-drawer-search {
  margin-bottom: 14px;
  max-width: 380px;
  border-radius: 10px;
}

/* ---------- ApexCharts polish ---------- */
.wod-page .apexcharts-tooltip {
  border-radius: 10px !important;
  box-shadow: var(--wod-shadow-hover) !important;
  border: none !important;
}

.wod-page .apexcharts-tooltip-title {
  font-weight: 700 !important;
  background: #f8fafc !important;
}

.wod-page .apexcharts-legend-text {
  color: var(--wod-muted) !important;
}

.wod-page .apexcharts-bar-area,
.wod-page .apexcharts-pie-area,
.wod-page .apexcharts-heatmap-rect {
  cursor: pointer;
}

.wod-page .apexcharts-heatmap-rect:hover {
  filter: brightness(0.92);
}

/* ---------- Responsive ---------- */
@media (max-width: 1500px) {
  .wod-status-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .wod-insight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .wod-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .wod-rank-toolbar .ant-pagination {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .wod-page {
    padding: 12px;
  }
  .wod-status-grid,
  .wod-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wod-big-value {
    font-size: 30px;
  }
  .wod-hero {
    padding: 16px;
  }
  .wod-rank-search,
  .wod-rank-sort {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }
}

@media (max-width: 480px) {
  .wod-status-grid,
  .wod-insight-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Work Order Dashboard — layout additions
   Import AFTER WorkOrderDashboard.css (rules here override it)
   ========================================================= */

/* ---------- Period row ---------- */
.wod-period {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.wod-period-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.wod-period-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wod-muted);
  margin-right: 6px;
}

.wod-period-fields {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.wod-period-field {
  width: 170px;
}

.wod-period-range {
  width: 250px;
}

.wod-period-month {
  width: 130px;
}

/* ---------- Grouped filters ---------- */
.wod-fgroups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) minmax(0, 1fr);
  grid-gap: 12px;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--wod-border);
}

.wod-fgroup {
  border: 1px solid var(--wod-border);
  border-radius: 12px;
  background: #fbfcfe;
  overflow: hidden;
  min-width: 0;
}

.wod-fgroup-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #334155;
  background: #f1f5fb;
  border-bottom: 1px solid var(--wod-border);
}

.wod-fgroup-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #e0e7ff;
  color: var(--wod-primary);
  font-size: 12px;
}

.wod-fgroup-count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  color: #fff;
  background: var(--wod-primary);
}

.wod-fgroup-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

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

.wod-field .wod-label {
  margin-bottom: 3px;
}

.wod-switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
}

/* ---------- Scope banner + active filter tags ---------- */
.wod-active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--wod-border);
}

.wod-scope-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #3730a3;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  margin-right: 4px;
}

.wod-ftag {
  margin: 0;
  border-radius: 999px;
  padding: 1px 10px;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #fff;
}

.wod-ftag b {
  font-weight: 600;
  color: var(--wod-muted);
}

.wod-reset {
  margin-left: auto;
}

/* ---------- Tabs ---------- */
.wod-tabs > .ant-tabs-nav {
  margin-bottom: 14px;
  padding: 0 6px;
  background: var(--wod-card);
  border-radius: 12px;
  box-shadow: var(--wod-shadow);
}

.wod-tabs > .ant-tabs-nav::before {
  border-bottom: none;
}

.wod-tabs .ant-tabs-tab {
  padding: 12px 6px;
}

.wod-tab-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.wod-tab-count {
  margin: 0;
  border-radius: 999px;
  font-size: 11px;
  line-height: 18px;
  padding: 0 7px;
}

.wod-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wod-muted);
  margin: 4px 0 8px 2px;
}

/* status / insight grids adapt to 7 or 8 statuses */
.wod-status-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.wod-insight-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

/* ---------- Summary table ---------- */
.wod-table-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.wod-seg-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wod-sum-table .ant-table-tbody > tr > td {
  padding: 6px 6px !important;
}

.wod-group-th {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #1e293b;
  cursor: help;
  text-transform: none;
  letter-spacing: 0;
}

.wod-group-th i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}

.wod-group-th.overall {
  cursor: default;
  color: var(--wod-primary);
}

.wod-sum-table .wod-col-late {
  background: #fffafb;
}

.wod-sum-table .ant-table-tbody > tr:hover > td.wod-col-late {
  background: #fff1f3 !important;
}

.wod-zero {
  color: #cbd5e1;
}

.wod-red {
  color: #e11d48;
}

/* ---------- Drawer ---------- */
.wod-drawer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.wod-drawer-tools .wod-drawer-search {
  margin-bottom: 0;
  flex: 1 1 320px;
  max-width: 480px;
}

.wod-drawer-sort {
  width: 190px;
}

.wod-sum-table .ant-table-thead > tr > th {
  text-align: center;
  padding: 6px 6px !important;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.25;
  vertical-align: middle;
  overflow: hidden;
  white-space: normal;
}

.wod-group-th {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap; /* dot + text can wrap instead of overflowing */
  gap: 4px 6px;
  font-weight: 700;
  color: #1e293b;
  cursor: help;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  text-align: center;
  max-width: 100%;
}

.wod-group-th i {
  flex: 0 0 9px; /* keep the colour dot from shrinking */
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .wod-fgroups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wod-fgroups .wod-fgroup:nth-child(2) {
    grid-column: span 2;
    order: 3;
  }
}

@media (max-width: 768px) {
  .wod-fgroups {
    grid-template-columns: 1fr;
  }
  .wod-fgroups .wod-fgroup:nth-child(2) {
    grid-column: auto;
  }
  .wod-field-grid {
    grid-template-columns: 1fr;
  }
  .wod-period-field,
  .wod-period-range,
  .wod-period-month {
    width: 100%;
  }
  .wod-period-fields {
    width: 100%;
  }
  .wod-reset {
    margin-left: 0;
  }
}

/* =========================================================
   Team Overview — all selectors use the tov- prefix
   ========================================================= */

.tov-wrap {
  border-radius: 14px !important;
  border: 1px solid #e9edf5 !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px rgba(15, 23, 42, 0.05);
}

.tov-wrap .ant-card-head {
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid #eef1f6;
}

.tov-wrap .ant-card-head-wrapper {
  flex-wrap: wrap;
  gap: 8px;
}

.tov-wrap .ant-card-body {
  padding: 12px 14px 10px;
}

.tov-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 15px;
}

.tov-title-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef2ff;
  color: #4f46e5;
}

.tov-title-sub {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

/* ---------- action pills ---------- */
.tov-pills {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
  margin-bottom: 10px;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.tov-pill {
  --accent: #6366f1;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #eef1f6;
  border-left: 3px solid var(--accent);
}

.tov-pill.clickable {
  cursor: pointer;
  transition:
    box-shadow 0.15s,
    transform 0.15s;
}

.tov-pill.clickable:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.tov-pill-icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
}

.tov-pill-body {
  min-width: 0;
  line-height: 1.2;
}

.tov-pill-value {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
}

.tov-pill-label {
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tov-pill-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- toolbar ---------- */
.tov-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  padding: 6px 8px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef1f6;
}

.tov-search {
  width: 180px;
}

.tov-sort {
  min-width: 165px;
}

.tov-toolbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tov-range {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

.tov-hseg.critical {
  color: #dc2626;
}

.tov-hseg.watch {
  color: #d97706;
}

.tov-hseg.good {
  color: #16a34a;
}

/* ---------- shared bits ---------- */
.tov-th {
  cursor: help;
  white-space: nowrap;
  border-bottom: 1px dashed #cbd5e1;
}

.tov-dash {
  color: #cbd5e1;
}

.tov-red {
  color: #e11d48;
}

.tov-link {
  cursor: pointer;
  color: #4f46e5;
}

.tov-link:hover {
  text-decoration: underline;
}

.tov-health,
.tov-zero {
  margin: 0;
}

.tov-health {
  cursor: help;
}

.tov-avatar {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 700;
}

.tov-avatar.sm {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.tov-person {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tov-person-text {
  min-width: 0;
  flex: 1 1;
  line-height: 1.2;
}

.tov-person-text b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tov-person-text span {
  font-size: 11px;
  color: #94a3b8;
}

.tov-late {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  cursor: pointer;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #fff1f2;
  color: #e11d48;
  white-space: nowrap;
}

.tov-late small {
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0.85;
}

.tov-late:hover {
  background: #ffe4e6;
}

.tov-chip {
  display: inline-block;
  cursor: pointer;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.tov-chip small {
  font-weight: 600;
  font-size: 10.5px;
}

.tov-chip.red {
  background: #fff1f2;
  color: #e11d48;
}

.tov-num {
  font-weight: 700;
  cursor: pointer;
}

.tov-num:hover {
  text-decoration: underline;
}

/* ---------- STATUS view (grouped Total | Delayed columns) ---------- */
.tov-mtable .ant-table-thead > tr > th {
  background: #f8fafc !important;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  text-align: center;
  padding: 5px 4px !important;
}

.tov-mtable .ant-table-tbody > tr > td {
  padding: 5px 4px !important;
}

.tov-gth {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: #1e293b;
  cursor: help;
}

.tov-gth i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

.tov-mtable td.tov-col-late,
.tov-mtable th.tov-col-late {
  background: #fffafb;
}
.tov-mtable th.tov-col-late {
  color: #e11d48 !important;
  white-space: normal;
  overflow-wrap: break-word;
}

.tov-sum td {
  background: #eef2ff !important;
  font-weight: 700;
}

/* ---------- LIST view (status chips) ---------- */
.tov-list .ant-table-thead > tr > th {
  background: #f8fafc !important;
  font-size: 12px;
}

.tov-pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tov-pair {
  --c: #6366f1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 3px 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  background: color-mix(in srgb, var(--c) 9%, white);
  border: 1px solid color-mix(in srgb, var(--c) 25%, white);
  white-space: nowrap;
}

.tov-pair i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}

.tov-pair-label {
  color: #475569;
}

.tov-pair b {
  color: var(--c);
  cursor: pointer;
  padding-right: 4px;
}

.tov-pair em {
  font-style: normal;
  font-weight: 700;
  font-size: 10.5px;
  color: #fff;
  background: #e11d48;
  border-radius: 999px;
  padding: 0 6px;
  cursor: pointer;
}

/* ---------- CARDS view ---------- */
.tov-grid {
  display: grid;
  grid-gap: 10px;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.tov-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eef1f6;
  border-top: 3px solid #22c55e;
}

.tov-card.watch {
  border-top-color: #f59e0b;
}

.tov-card.critical {
  border-top-color: #ef4444;
}

.tov-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tov-name {
  min-width: 0;
  flex: 1 1;
  line-height: 1.2;
}

.tov-name b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tov-name span {
  font-size: 11px;
  color: #94a3b8;
}

.tov-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 5px;
  gap: 5px;
}

.tov-cstat {
  text-align: center;
  padding: 5px 2px;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}

.tov-cstat b {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.tov-cstat span {
  font-size: 10.5px;
  color: #64748b;
}

.tov-cstat.bad b {
  color: #e11d48;
}

.tov-card-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 4px 8px;
  gap: 4px 8px;
}

.tov-cs {
  --c: #6366f1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
  min-width: 0;
}

.tov-cs:hover {
  background: #f8fafc;
}

.tov-cs.zero {
  opacity: 0.45;
  cursor: default;
}

.tov-cs-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tov-cs-label i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}

.tov-cs-nums {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.tov-cs-nums em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  color: #e11d48;
  background: #fff1f2;
  border-radius: 999px;
  padding: 0 6px;
}

/* ---------- CHART view ---------- */
.tov-charts {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}

.tov-chart-title {
  font-weight: 700;
  font-size: 13px;
  color: #334155;
  margin-bottom: 2px;
}

/* ---------- footer ---------- */
.tov-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #eef1f6;
}

.tov-footer-text {
  font-size: 12px;
  color: #64748b;
}

/* ---------- tooltip ---------- */
.tov-tooltip {
  max-width: 300px;
}

.tov-tooltip .ant-tooltip-inner {
  background: #0f172a;
  color: #e2e8f0;
  padding: 8px 10px;
  border-radius: 10px;
}

.tov-tooltip .ant-tooltip-arrow::before {
  background: #0f172a;
}

.tov-tip {
  font-size: 12px;
  line-height: 1.45;
}

.tov-tip-title {
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.tov-tip-text {
  color: #cbd5e1;
  margin-bottom: 2px;
}

.tov-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.tov-tip-row span {
  color: #94a3b8;
}

.tov-tip-row b {
  color: #fff;
}

.tov-tip-foot {
  margin-top: 5px;
  padding-top: 4px;
  border-top: 1px solid #334155;
  font-size: 11px;
  color: #7dd3fc;
}

@media (max-width: 640px) {
  .tov-search,
  .tov-sort {
    width: 100%;
  }
  .tov-toolbar-right {
    margin-left: 0;
  }
  .tov-charts {
    grid-template-columns: 1fr;
  }
  .tov-card-status {
    grid-template-columns: 1fr;
  }
}

/* ---------- fraction "2/10" ---------- */
.tov-frac {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  white-space: nowrap;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.tov-frac b {
  font-weight: 700;
  color: #0f172a;
}

.tov-frac i {
  font-style: normal;
  font-size: 0.82em;
  color: #94a3b8;
}

.tov-frac.late b {
  color: #e11d48;
}

.tov-frac.late i {
  color: #fda4af;
}

.tov-frac.zero b {
  color: #cbd5e1;
}

.tov-frac.clickable {
  cursor: pointer;
  padding: 0 4px;
  border-radius: 6px;
}

.tov-frac.clickable:hover {
  background: #eef2ff;
}

.tov-frac.late.clickable:hover {
  background: #fff1f2;
}

.tov-mtable .ant-table-thead > tr > th {
  white-space: nowrap;
}

.tov-late small,
.tov-cstat b small,
.tov-pair b small {
  font-size: 0.8em;
  font-weight: 600;
  opacity: 0.7;
}

/* cards: one status per line so "Open 3/10 · 1/3 late" fits */
.tov-card-status {
  grid-template-columns: 1fr;
  gap: 2px;
}

.tov-cs-nums {
  gap: 6px;
}
/* =========================================================
   Work Order Dashboard — layout (import AFTER WorkOrderDashboard.css)
   ========================================================= */

/* ---------- page + header ---------- */
.wod-page {
  padding: 18px;
}

.wod-hero {
  padding: 16px 22px;
  margin-bottom: 14px;
}

.wod-hero-left h2 {
  font-size: 20px;
}

.wod-hero-icon {
  width: 42px;
  height: 42px;
  font-size: 22px;
}

/* =========================================================
   FILTER PANEL
   ========================================================= */
.wod-filters {
  background: var(--wod-card);
  border: 1px solid var(--wod-border);
  border-radius: var(--wod-radius);
  box-shadow: var(--wod-shadow);
  padding: 14px 18px;
  margin-bottom: 16px;
}

/* period row */
.wod-f-period {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.wod-f-period-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.wod-f-heading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #334155;
}

.wod-f-heading svg {
  color: var(--wod-primary);
}

.wod-f-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wod-f-period-right {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.wod-f-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wod-f-field .wod-label {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.wod-f-datefield {
  width: 190px;
}

.wod-f-range {
  width: 260px;
}

.wod-f-month {
  width: 150px;
}

/* grouped filters */
.wod-f-groups {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2.4fr) minmax(220px, 1fr);
  grid-gap: 14px;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--wod-border);
}

.wod-f-group {
  border: 1px solid var(--wod-border);
  border-radius: 12px;
  background: #fbfcfe;
  min-width: 0;
}

.wod-f-group > header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #334155;
  border-bottom: 1px solid var(--wod-border);
  background: #f4f6fb;
  border-radius: 12px 12px 0 0;
}

.wod-f-group > header em {
  margin-left: auto;
  font-style: normal;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  color: #fff;
  background: var(--wod-primary);
}

.wod-f-gicon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #e0e7ff;
  color: var(--wod-primary);
  font-size: 13px;
}

.wod-f-grid {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  padding: 12px 14px 14px;
}

.wod-f-grid.cols-1 {
  grid-template-columns: 1fr;
}

.wod-f-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wod-f-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #475569;
  cursor: pointer;
  padding-top: 2px;
}

/* footer: scope + active tags + actions */
.wod-f-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--wod-border);
}

.wod-scope-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: #3730a3;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}

.wod-scope-banner b {
  color: #1e1b4b;
}

.wod-ftag {
  margin: 0;
  border-radius: 999px;
  padding: 2px 10px;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #fff;
}

.wod-ftag b {
  font-weight: 600;
  color: var(--wod-muted);
}

.wod-f-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

/* =========================================================
   TABS + SECTION HEADS
   ========================================================= */
.wod-tabs > .ant-tabs-nav {
  margin-bottom: 14px;
  padding: 0 10px;
  background: var(--wod-card);
  border-radius: 12px;
  border: 1px solid var(--wod-border);
  box-shadow: var(--wod-shadow);
}

.wod-tabs > .ant-tabs-nav::before {
  border-bottom: none;
}

.wod-tabs .ant-tabs-tab {
  padding: 12px 6px;
}

.wod-tab-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.wod-tab-count {
  margin: 0;
  border-radius: 999px;
  font-size: 11px;
  line-height: 18px;
  padding: 0 7px;
}

.wod-section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 4px 2px 10px;
}

.wod-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #334155;
}

.wod-section-hint {
  font-size: 12px;
  color: var(--wod-muted);
}

.wod-section-hint b {
  color: #334155;
}

.wod-section-hint b.late {
  color: #e11d48;
}

/* =========================================================
   FRACTION "2/10"
   ========================================================= */
.wod-frac {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  white-space: nowrap;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.wod-frac b {
  font-weight: 700;
  color: var(--wod-text);
}

.wod-frac i {
  font-style: normal;
  font-size: 0.82em;
  color: #94a3b8;
}

.wod-frac.big b {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.wod-frac.big i {
  font-size: 14px;
  font-weight: 600;
}

.wod-frac.late b {
  color: #e11d48;
}

.wod-frac.late i {
  color: #fda4af;
}

.wod-frac.ok b {
  color: #16a34a;
}

.wod-frac.zero b {
  color: #cbd5e1;
}

.wod-frac.clickable {
  cursor: pointer;
  border-radius: 6px;
  padding: 0 4px;
}

.wod-frac.clickable:hover {
  background: #eef2ff;
}

.wod-frac.late.clickable:hover {
  background: #fff1f2;
}

/* =========================================================
   STATUS CARDS  (Open 5/20  |  Open delayed 2/5)
   ========================================================= */
.wod-status-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.wod-status-card {
  padding: 12px 14px 10px;
  cursor: default;
}

.wod-status-card:hover {
  transform: none;
}

.wod-status-top {
  margin-bottom: 8px;
}

.wod-status-label {
  font-size: 14px;
  color: #1e293b;
  font-weight: 700;
}

.wod-sline {
  display: grid;
  grid-template-columns: 1fr auto 40px;
  align-items: center;
  grid-gap: 8px;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: #f8fafc;
  margin-bottom: 6px;
}

.wod-sline-name {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wod-sline-pct {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-align: right;
}

.wod-sline .wod-frac.big b {
  color: var(--accent);
}

.wod-sline.late .wod-frac.big b {
  color: #cbd5e1;
}

.wod-sline.late.has {
  background: #fff1f2;
}

.wod-sline.late.has .wod-sline-name,
.wod-sline.late.has .wod-sline-pct {
  color: #e11d48;
}

.wod-sline.late.has .wod-frac.big b {
  color: #e11d48;
}

.wod-sline.clickable {
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.wod-sline.clickable:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, white);
}

.wod-sline.late.has.clickable:hover {
  border-color: #fda4af;
  background: #ffe4e6;
}

.wod-status-card .wod-split-bar {
  margin-top: 4px;
}

.wod-status-foot {
  margin-top: 7px;
  font-size: 11.5px;
}

/* =========================================================
   INSIGHT CARDS
   ========================================================= */
.wod-insight-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.wod-insight-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.wod-insight-of {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.wod-big-value small {
  font-size: 18px;
  opacity: 0.8;
}

/* =========================================================
   SUMMARY TABLE
   ========================================================= */
.wod-table-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.wod-seg-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wod-sum-table .ant-table-thead > tr > th {
  text-align: center !important;
  padding: 7px 6px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 12px !important;
  white-space: nowrap;
}

.wod-sum-table .ant-table-tbody > tr > td {
  padding: 7px 6px !important;
}

.wod-sum-table th.wod-col-late {
  color: #e11d48 !important;
  background: #fff5f7 !important;
}

.wod-sum-table td.wod-col-late {
  background: #fffafb;
}

.wod-sum-table .ant-table-tbody > tr:hover > td.wod-col-late {
  background: #fff1f3 !important;
}

.wod-group-th {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #1e293b;
  cursor: help;
}

.wod-group-th i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}

.wod-group-th.overall {
  cursor: default;
  color: var(--wod-primary);
}

.wod-total-cell {
  display: inline-block;
  min-width: 34px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  cursor: pointer;
}

.wod-total-cell:hover {
  background: #e0e7ff;
}

.wod-zero {
  color: #cbd5e1;
}

.wod-red {
  color: #e11d48;
}

/* =========================================================
   DRAWERS
   ========================================================= */
.wod-drawer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.wod-drawer-tools .wod-drawer-search {
  margin-bottom: 0;
  flex: 1 1 320px;
  max-width: 480px;
}

.wod-drawer-sort {
  width: 190px;
}

/* count check */
.wod-check-sum {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  grid-gap: 10px;
  gap: 10px;
  margin-bottom: 14px;
}

.wod-check-box {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e9edf5;
  border: 1px solid var(--wod-border, #e9edf5);
  background: #f8fafc;
}

.wod-check-box b {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.wod-check-box span {
  font-size: 12px;
  color: #64748b;
}

.wod-check-box.ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.wod-check-box.ok b {
  color: #16a34a;
}

.wod-check-box.muted b {
  font-size: 15px;
  color: #475569;
}

.wod-check-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.wod-reason {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
}

.wod-reason em {
  font-style: normal;
  padding: 0 7px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 11px;
}

.wod-reason.ok {
  color: #15803d;
  border-color: #bbf7d0;
}

.wod-reason.bad {
  color: #be123c;
  border-color: #fecdd3;
}

.wod-reason.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

.wod-reason.active em {
  background: rgba(255, 255, 255, 0.25);
}

.wod-reason-tag {
  white-space: normal;
  line-height: 1.35;
  padding: 2px 8px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1280px) {
  .wod-f-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wod-f-group.wide {
    grid-column: span 2;
    order: 3;
  }
}

@media (max-width: 900px) {
  .wod-f-grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wod-f-period-right {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .wod-page {
    padding: 12px;
  }
  .wod-f-groups {
    grid-template-columns: 1fr;
  }
  .wod-f-group.wide {
    grid-column: auto;
  }
  .wod-f-grid.cols-3 {
    grid-template-columns: 1fr;
  }
  .wod-f-datefield,
  .wod-f-range,
  .wod-f-month,
  .wod-f-field {
    width: 100%;
  }
  .wod-f-actions {
    margin-left: 0;
  }
}

/* ---------- Print sections modal ---------- */
.wod-print-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.wod-print-meta {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #f4f6fb;
  border: 1px solid #e9edf5;
  font-size: 12.5px;
  color: #334155;
}

.wod-print-meta b {
  color: #0f3460;
}

.wod-print-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}

.wod-print-list.ant-checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
  width: 100%;
}

.wod-print-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.wod-print-item:hover {
  border-color: #c7d2fe;
}

.wod-print-item.on {
  border-color: #818cf8;
  background: #eef2ff;
}

.wod-print-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.wod-print-text b {
  font-size: 13px;
  color: #1e293b;
}

.wod-print-text span {
  font-size: 11.5px;
  color: #64748b;
}

.wod-print-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.wod-print-btn {
  display: inline-flex;
}

@media (max-width: 560px) {
  .wod-print-list.ant-checkbox-group {
    grid-template-columns: 1fr;
  }
}

/* ---------- view bar (Combined | Per Created By | Per Department) ---------- */
.wod-segbar {
  background: #fff;
  background: var(--wod-card, #fff);
  border: 1px solid #e9edf5;
  border: 1px solid var(--wod-border, #e9edf5);
  border-radius: 16px;
  border-radius: var(--wod-radius, 16px);
  box-shadow: var(--wod-shadow);
  padding: 12px 16px;
  margin-bottom: 14px;
}

.wod-segbar-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.wod-segbar-hint {
  font-size: 12px;
  color: #64748b;
  color: var(--wod-muted, #64748b);
}

.wod-segchips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e9edf5;
  border-top: 1px dashed var(--wod-border, #e9edf5);
}

.wod-segchip {
  --c: #6366f1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 9px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}

.wod-segchip:hover {
  border-color: color-mix(in srgb, var(--c) 45%, white);
  background: color-mix(in srgb, var(--c) 6%, white);
}

.wod-segchip.active {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, white);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 20%, transparent);
}

.wod-segchip.compare {
  --c: #4f46e5;
  color: #3730a3;
}

.wod-segchip.compare.active {
  background: linear-gradient(120deg, #4f46e5, #7c3aed);
  border-color: transparent;
  color: #fff;
}

.wod-segchip em {
  font-style: normal;
  font-size: 11px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.12);
}

.wod-segchip.compare.active em {
  background: rgba(255, 255, 255, 0.25);
}

.wod-segchip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  flex: none;
}

.wod-segchip-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wod-segchip-num {
  font-size: 11px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
}

.wod-segchip-late {
  font-size: 11px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff1f2;
  color: #e11d48;
}

.wod-segchip.critical .wod-segchip-late {
  background: #e11d48;
  color: #fff;
}

/* ---------- banner when one user / department is open ---------- */
.wod-seg-banner {
  --c: #6366f1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 8%, white);
  border: 1px solid color-mix(in srgb, var(--c) 30%, white);
  border-left: 4px solid var(--c);
}

.wod-seg-banner-text {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 13px;
  color: #334155;
}

.wod-seg-banner-text b {
  color: #0f172a;
  font-size: 14px;
}

.wod-seg-banner-text > span {
  font-size: 12px;
  color: #64748b;
  color: var(--wod-muted, #64748b);
}

.wod-seg-banner-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

/* ---------- compare: one card per user / department ---------- */
.wod-seg-grid {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.wod-seg-card {
  --c: #6366f1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  background: var(--wod-card, #fff);
  border: 1px solid #e9edf5;
  border: 1px solid var(--wod-border, #e9edf5);
  border-top: 4px solid var(--c);
  box-shadow: var(--wod-shadow);
}

.wod-seg-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.wod-seg-card-name {
  flex: 1 1;
  min-width: 0;
  line-height: 1.25;
}

.wod-seg-card-name b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.wod-seg-card-name span {
  font-size: 11px;
  color: #94a3b8;
}

.wod-seg-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 5px;
  gap: 5px;
}

.wod-seg-stat {
  text-align: center;
  padding: 6px 2px;
  border-radius: 9px;
  background: #f8fafc;
  cursor: pointer;
}

.wod-seg-stat:hover {
  background: #eef2ff;
}

.wod-seg-stat b {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.wod-seg-stat b small {
  font-size: 0.72em;
  font-weight: 600;
  opacity: 0.6;
}

.wod-seg-stat span {
  font-size: 10.5px;
  color: #64748b;
}

.wod-seg-stat.bad b {
  color: #e11d48;
}

.wod-seg-mixbar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #f1f5f9;
}

.wod-seg-mixbar span {
  display: block;
  height: 100%;
}

.wod-seg-card-status {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1;
}

.wod-seg-sline {
  --c: #6366f1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
}

.wod-seg-sline:hover {
  background: #f8fafc;
}

.wod-seg-sline-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wod-seg-sline-label i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}

.wod-seg-sline-nums {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.wod-seg-sline-nums em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  color: #e11d48;
  background: #fff1f2;
  border-radius: 999px;
  padding: 0 6px;
}

.wod-seg-sline-nums em:hover {
  background: #ffe4e6;
}

.wod-seg-open.ant-btn {
  border-color: color-mix(in srgb, var(--c) 40%, white);
  color: var(--c);
}

.wod-seg-open.ant-btn:not(:disabled):hover {
  border-color: var(--c) !important;
  color: var(--c) !important;
  background: color-mix(in srgb, var(--c) 8%, white) !important;
}

/* ---------- compare table ---------- */
.wod-seg-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}

.wod-seg-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

@media (max-width: 768px) {
  .wod-seg-banner-nav {
    margin-left: 0;
  }
  .wod-segchip-name {
    max-width: 120px;
  }
}

/* NEW — Components/CollapsibleSection.css */

.cs-collapse.ant-collapse {
  margin-bottom: 10px;
  background: #ffffff;
  border: 1px solid #e2e5eb;
  border-radius: 8px;
}

.cs-collapse.ant-collapse > .ant-collapse-item {
  border-bottom: none;
}

.cs-collapse.ant-collapse > .ant-collapse-item > .ant-collapse-header {
  align-items: center;
  padding: 8px 12px;
  border-left: 3px solid #0f3460;
  border-radius: 8px 8px 0 0;
  background: #f7f9fc;
}

.cs-collapse.ant-collapse
  > .ant-collapse-item:not(.ant-collapse-item-active)
  > .ant-collapse-header {
  border-radius: 8px;
}

.cs-collapse.ant-collapse > .ant-collapse-item > .ant-collapse-content {
  border-top: 1px solid #e2e5eb;
  border-radius: 0 0 8px 8px;
}

.cs-collapse.ant-collapse
  > .ant-collapse-item
  > .ant-collapse-content
  > .ant-collapse-content-box {
  padding: 10px 12px;
}

.cs-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f3460;
}

.cs-extra {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Smaller header for sections nested inside another card */
.cs-compact.ant-collapse {
  margin-bottom: 0;
  border-radius: 6px;
}

.cs-compact.ant-collapse > .ant-collapse-item > .ant-collapse-header {
  padding: 4px 10px;
  border-radius: 6px 6px 0 0;
}

.cs-compact .cs-title {
  font-size: 12px;
}

.cs-compact.ant-collapse
  > .ant-collapse-item
  > .ant-collapse-content
  > .ant-collapse-content-box {
  padding: 6px;
}

/* Access-denied placeholder */
.cs-denied {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px dashed #cdd2da;
  border-radius: 8px;
  background: #fafbfc;
  color: #8c8c8c;
  font-size: 12px;
}

.cs-denied-title {
  font-weight: 600;
  color: #0f3460;
}

.cs-denied-text {
  color: #8c8c8c;
}

/* NEW — BundleStatusSummary.css (Other Info tab: donut panels) */

.bss-panel.ant-collapse {
  height: 100%;
  margin-bottom: 0;
}

/* NEW — Laybundledashboard.css (Stage wise details tab) */

/* Analytics panels sit inside antd Row/Col — let the row gutter do the
   spacing and keep panels in one row the same height */
.lbd-panel.ant-collapse {
  height: 100%;
  margin-bottom: 0;
}

.lbd-section-count {
  font-size: 11px;
  font-weight: 500;
  color: #8c8c8c;
}

/* BundleStageTable.css — compact version (replaces the previous file) */

/* ---------------- Section header (legend + count) ---------------- */

.bst-header-extra {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.bst-legend {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 10.5px;
  letter-spacing: 0.2px;
  color: #666e7c;
}

.bst-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bst-section-count {
  font-size: 11px;
  font-weight: 500;
  color: #8c8c8c;
  white-space: nowrap;
}

/* ---------------- Filter bar ---------------- */

.bst-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 8px;
  padding: 6px 8px;
  border: 1px solid #e2e5eb;
  border-radius: 6px;
  background: #f7f9fc;
  font-size: 11.5px;
}

.bst-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bst-filter-right {
  margin-left: auto;
}

.bst-filter-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #0f3460;
}

/* Smaller text inside the filter controls */
.bst-filters .ant-select,
.bst-filters .ant-input,
.bst-filters .ant-btn,
.bst-filters .ant-segmented {
  font-size: 11.5px;
}

.bst-filters .ant-segmented-item-label {
  min-height: 22px;
  padding: 0 8px;
  line-height: 22px;
}

/* ---------------- Table header ---------------- */

/* Every header cell: same background, padding and alignment;
   only the phase row (navy) is different */
.bst-table .ant-table-thead > tr > th,
.bst-table .ant-table-thead > tr > th.bst-fixed-head,
.bst-table .ant-table-thead > tr > th.bst-ob-head,
.bst-table .ant-table-thead > tr > th.bst-leaf-head {
  padding: 4px 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.2;
  text-align: center;
  vertical-align: middle;
  color: #0f3460;
  background: #eef2f8;
}

/* Phase row (CUTTING, PREPARATORY, ...) — title at the left of the group
   so it stays readable even when the group is wider than the screen */
.bst-table .ant-table-thead > tr > th.bst-phase-head {
  padding: 3px 8px;
  letter-spacing: 0.6px;
  text-align: left;
  color: #ffffff;
  background: #0f3460;
}

/* Stage / operation / part names: max 2 lines, words never split */
.bst-col-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

/* Sort arrows take less room */
.bst-table .ant-table-column-sorters {
  gap: 2px;
}

/* Phase dividers and the divider after the fixed columns.
   Drawn as an inset shadow (not a border) so header, totals and body
   columns stay exactly aligned. */
.bst-table .ant-table-thead > tr > th.bst-phase-start,
.bst-table .ant-table-summary td.bst-phase-start,
.bst-table .ant-table-tbody > tr > td.bst-phase-start {
  box-shadow: inset 2px 0 0 #0f3460;
}

.bst-table .ant-table-thead > tr > th.bst-phase-head {
  box-shadow: inset 2px 0 0 #ffffff;
}

.bst-table .ant-table-thead > tr > th.bst-fixed-last,
.bst-table .ant-table-tbody > tr > td.bst-fixed-last {
  box-shadow: inset -2px 0 0 #cdd2da;
}

/* ---------------- Body ---------------- */

.bst-table .ant-table-tbody > tr > td {
  padding: 3px 6px;
  font-size: 12px;
  line-height: 1.3;
}

/* Long text (line names, shades) stays on one line; full text on hover */
.bst-ellipsis {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bst-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.bst-mark svg {
  width: 13px;
  height: 13px;
}

.bst-mark.is-done,
.bst-icon-done {
  color: #52c41a;
}

.bst-mark.is-not-done,
.bst-icon-not-done {
  color: #ff4d4f;
}

.bst-na {
  font-size: 10.5px;
  font-weight: 600;
  color: #bfbfbf;
  cursor: default;
}

.bst-tip-title {
  margin-bottom: 4px;
  font-weight: 600;
}

/* Done x/y per bundle */
.bst-done-pill {
  display: inline-block;
  min-width: 40px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

.bst-done-pill.is-done {
  color: #389e0d;
  background: #f6ffed;
}

.bst-done-pill.is-not-done {
  color: #0f3460;
  background: #eef2f8;
}

/* Fully done bundles get a light green row */
.bst-table .ant-table-tbody > tr.bst-row-done > td {
  background: #f6ffed;
}

/* ---------------- Totals row ---------------- */

.bst-table .bst-summary-row > td {
  padding: 3px 6px;
  font-size: 11px;
  background: #fafbfd;
  border-bottom: 2px solid #cdd2da;
}

.bst-summary-label {
  font-weight: 600;
  color: #0f3460;
}

.bst-summary-count {
  font-weight: 700;
}

.bst-summary-count.is-done {
  color: #52c41a;
}

.bst-summary-count.is-not-done {
  color: #ff4d4f;
}

/* ---------------- Pagination ---------------- */

.bst-section .ant-pagination {
  margin: 8px 0 0;
  font-size: 11.5px;
}

/* ---------------- Lay-marked star (added) ---------------- */

/* Gold star next to the green tick: Cut Measurement QC was marked done
   on the lay (cut_measurement_qc_done = 1) */
.bst-mark {
  position: relative;
}

.bst-lay-star {
  width: 9px;
  height: 9px;
  margin-left: 2px;
  color: #faad14;
}

.bst-mark .bst-lay-star {
  position: absolute;
  top: -4px;
  right: -8px;
}
/* ---------------- Phase colours (added) ---------------- */

/* One colour per phase. --ph = phase bar, --ph-soft = group row
   (CUT MEASUREMENT QC, OB names), --ph-faint = column names / totals */
.bst-table .bst-ph-cutting {
  --ph: #0f3460;
  --ph-soft: #d9e2ef;
  --ph-faint: #eef2f8;
}

.bst-table .bst-ph-loading {
  --ph: #0e6b6b;
  --ph-soft: #d4ebea;
  --ph-faint: #edf6f6;
}

.bst-table .bst-ph-embellishment {
  --ph: #8a5a00;
  --ph-soft: #f3e4c4;
  --ph-faint: #fbf5e8;
}

.bst-table .bst-ph-preparatory {
  --ph: #2d6a3a;
  --ph-soft: #d9eadb;
  --ph-faint: #eff6f0;
}

.bst-table .bst-ph-sewing-line {
  --ph: #1d5a87;
  --ph-soft: #d6e6f2;
  --ph-faint: #eef5fa;
}

.bst-table .bst-ph-finishing {
  --ph: #7a2e3a;
  --ph-soft: #f0d9dc;
  --ph-faint: #f9eff0;
}

/* Phase bar (top row) */
.bst-table .ant-table-thead > tr > th.bst-phase-head[class*="bst-ph-"] {
  color: #ffffff;
  background: var(--ph);
}

/* Group row: CUT MEASUREMENT QC, CUT PANEL QC, OB names */
.bst-table .ant-table-thead > tr > th.bst-ob-head[class*="bst-ph-"] {
  color: var(--ph);
  background: var(--ph-soft);
}

/* Column names, with a thin phase-colour line under them */
.bst-table .ant-table-thead > tr > th.bst-leaf-head[class*="bst-ph-"] {
  color: var(--ph);
  background: var(--ph-faint);
}

.bst-table .ant-table-thead > tr > th.bst-leaf-head[class*="bst-ph-"]::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--ph);
  content: "";
}

/* Divider before each phase in the phase colour */
.bst-table .ant-table-thead > tr > th.bst-phase-start[class*="bst-ph-"],
.bst-table .ant-table-summary td.bst-phase-start[class*="bst-ph-"],
.bst-table .ant-table-tbody > tr > td.bst-phase-start {
  box-shadow: inset 2px 0 0 #9aa5b5;
}

.bst-table .ant-table-thead > tr > th.bst-phase-start[class*="bst-ph-"],
.bst-table .ant-table-summary td.bst-phase-start[class*="bst-ph-"] {
  box-shadow: inset 2px 0 0 var(--ph);
}

/* Totals row tinted per phase */
.bst-table .bst-summary-row > td[class*="bst-ph-"] {
  background: var(--ph-faint);
}

/* Fixed columns (BUNDLE ... DONE): neutral grey so the phases stand out */
.bst-table .ant-table-thead > tr > th.bst-fixed-head {
  color: #3a4250;
  background: #f0f2f5;
}

/* NEW — ViewBundles.css (View bundles drawer) */

.vb-section-count {
  font-size: 11px;
  font-weight: 500;
  color: #8c8c8c;
}

/* OrderRequestBundleStatusSummary.css — compact version (full replacement) */

.orbs {
  margin-bottom: 14px;
}

/* ---------------- Phase colours (same as the Bundle Stage Table) ---------------- */

.orbs-ph-cutting {
  --ph: #0f3460;
  --ph-soft: #d9e2ef;
  --ph-faint: #eef2f8;
}

.orbs-ph-loading {
  --ph: #0e6b6b;
  --ph-soft: #d4ebea;
  --ph-faint: #edf6f6;
}

.orbs-ph-embellishment {
  --ph: #8a5a00;
  --ph-soft: #f3e4c4;
  --ph-faint: #fbf5e8;
}

.orbs-ph-preparatory {
  --ph: #2d6a3a;
  --ph-soft: #d9eadb;
  --ph-faint: #eff6f0;
}

.orbs-ph-sewing-line {
  --ph: #1d5a87;
  --ph-soft: #d6e6f2;
  --ph-faint: #eef5fa;
}

.orbs-ph-finishing {
  --ph: #7a2e3a;
  --ph-soft: #f0d9dc;
  --ph-faint: #f9eff0;
}

.orbs-ph-other {
  --ph: #5b6472;
  --ph-soft: #e3e6ea;
  --ph-faint: #f4f5f7;
}

/* ---------------- Overview KPIs ---------------- */

.orbs-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-gap: 8px;
  gap: 8px;
}

.orbs-kpi {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid #e6e9ef;
  border-radius: 8px;
  background: #ffffff;
}

.orbs-kpi-icon {
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 15px;
  color: #0f3460;
  background: #eef2f8;
}

.orbs-kpi-body {
  min-width: 0;
}

.orbs-kpi-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #8c8c8c;
}

.orbs-kpi-value {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  color: #0f3460;
}

.orbs-kpi-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: #595959;
}

.orbs-kpi-completion .ant-progress-text {
  font-size: 10.5px;
  font-weight: 700;
}

/* ---------------- Slowest stage ---------------- */

.orbs-bottleneck {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid #e6e9ef;
  border-left: 4px solid var(--bn);
  border-radius: 8px;
  background: var(--bn-bg);
}

.orbs-bottleneck.is-low {
  --bn: #f5222d;
  --bn-bg: #fff6f6;
}

.orbs-bottleneck.is-mid {
  --bn: #fa8c16;
  --bn-bg: #fffaf2;
}

.orbs-bottleneck.is-high {
  --bn: #52c41a;
  --bn-bg: #f7fdf2;
}

.orbs-bottleneck-icon {
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--bn);
}

.orbs-bottleneck-body {
  flex: 1 1 auto;
  min-width: 0;
}

.orbs-bottleneck-title {
  font-size: 13px;
  color: #262626;
}

.orbs-bottleneck-percent {
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  background: var(--bn);
}

.orbs-bottleneck-text {
  margin-top: 2px;
  font-size: 11.5px;
  color: #8c8c8c;
}

.orbs-bottleneck-bar {
  flex: 0 0 120px;
  margin: 0;
}

/* ---------------- Stage grid ---------------- */

/* Cards keep their own height (no stretching to the tallest card) */
.orbs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  align-items: start;
  grid-gap: 8px;
  gap: 8px;
}

/* ---------------- Stage card ---------------- */

.orbs-card {
  padding: 7px 10px 8px;
  border: 1px solid #e6e9ef;
  border-top: 3px solid var(--ph);
  border-radius: 8px;
  background: #ffffff;
}

.orbs-card:hover {
  box-shadow: 0 3px 10px rgba(15, 52, 96, 0.08);
}

.orbs-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

/* Title stays on one line (full name on hover) so every card's
   header is the same height */
.orbs-card-title {
  overflow: hidden;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--ph);
}

/* Phase tag (on the totals line) */
.orbs-card-phase {
  flex: 0 0 auto;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 15px;
  text-transform: uppercase;
  color: var(--ph);
  background: var(--ph-faint);
}

.orbs-card-percent {
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  white-space: nowrap;
}

/* Stacked bar: completed / in progress / pending (by pieces) */
.orbs-bar {
  display: flex;
  overflow: hidden;
  height: 5px;
  border-radius: 3px;
  background: #f0f2f5;
}

.orbs-bar-seg {
  height: 100%;
}

.orbs-bar-seg.is-done {
  background: #52c41a;
}

.orbs-bar-seg.is-progress {
  background: #faad14;
}

.orbs-bar-seg.is-pending {
  background: #d4d8de;
}

.orbs-card-total {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  margin-top: 4px;
  font-size: 10.5px;
  white-space: nowrap;
  color: #8c8c8c;
}

.orbs-card-total-text {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
}

.orbs-card-na {
  margin-left: auto;
  color: #8c8c8c;
}

/* Done / In prog. / Pending / N/A — one compact row */
.orbs-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 5px;
  border: 1px solid #f0f2f5;
  border-radius: 6px;
}

.orbs-stat {
  min-width: 0;
  padding: 3px 6px;
}

.orbs-stat + .orbs-stat {
  border-left: 1px solid #f0f2f5;
}

.orbs-stat.is-done {
  --tone: #389e0d;
}

.orbs-stat.is-progress {
  --tone: #d48806;
}

.orbs-stat.is-pending {
  --tone: #595959;
}

.orbs-stat.is-na,
.orbs-stat.is-empty {
  --tone: #bfbfbf;
}

.orbs-stat.is-empty .orbs-stat-count {
  color: #bfbfbf;
}

.orbs-stat-label {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--tone);
}

.orbs-stat-count {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: #262626;
}

.orbs-stat-qty {
  overflow: hidden;
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #8c8c8c;
}

/* ---------------- Card sections (operations, QC) ---------------- */

.orbs-block {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px dashed #e6e9ef;
}

.orbs-block-title {
  margin-bottom: 2px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #0f3460;
}

.orbs-sub-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #8c8c8c;
}

/* Operations / parts list */
.orbs-op-list {
  overflow-y: auto;
  max-height: 130px;
  padding-right: 4px;
}

.orbs-op-group + .orbs-op-group {
  margin-top: 6px;
}

.orbs-op {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 0;
}

.orbs-op-name {
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11.5px;
  color: #595959;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.orbs-op-bar {
  flex: 0 0 56px;
  width: 56px;
  margin: 0;
}

.orbs-op-count {
  min-width: 52px;
  font-size: 12px;
  font-weight: 700;
  color: #262626;
  text-align: right;
  white-space: nowrap;
}

.orbs-op-star {
  margin-left: 4px;
  color: #faad14;
}

/* QC block */
.orbs-qc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.orbs-qc-col {
  padding-right: 10px;
}

.orbs-qc-col.is-bordered {
  padding: 0 0 0 10px;
  border-left: 1px solid #f0f0f0;
}

.orbs-qc-waiting {
  margin-top: 4px;
  padding-top: 3px;
  border-top: 1px dashed #f0f0f0;
}

.orbs-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 1px 0;
}

.orbs-mini-label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 12px;
  color: #595959;
  white-space: nowrap;
}

.orbs-mini-icon {
  display: inline-flex;
  font-size: 13px;
}

.orbs-mini-value {
  font-size: 12px;
  font-weight: 700;
  color: #262626;
  white-space: nowrap;
}

.orbs-mini-total {
  font-weight: 500;
  color: #8c8c8c;
}

/* Small screens */
@media (max-width: 576px) {
  .orbs-bottleneck {
    flex-wrap: wrap;
  }

  .orbs-bottleneck-bar {
    flex-basis: 100%;
  }
}

/* ---------------- Details toggle (added) ---------------- */

/* "Parts (5) · QC result" link under the counts */
.orbs-more {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  margin-top: 5px;
  padding: 2px 0 0;
  border: 0;
  border-top: 1px dashed #e6e9ef;
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-align: left;
  text-transform: uppercase;
  color: #0f3460;
  background: transparent;
  cursor: pointer;
}

.orbs-more:hover,
.orbs-more.is-open {
  color: var(--ph);
}

.orbs-more.is-placeholder {
  cursor: default;
}

.orbs-more .anticon {
  font-size: 9px;
}

/* Opened details: no extra top line (the toggle already has one) */
.orbs-details > .orbs-block:first-child {
  margin-top: 4px;
  padding-top: 0;
  border-top: 0;
}

/* "Show details" button in the section header */
.orbs-section-extra {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.orbs-details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border: 1px solid #d9e2ef;
  border-radius: 4px;
  font: inherit;
  font-size: 11px;
  color: #0f3460;
  background: #ffffff;
  cursor: pointer;
}

.orbs-details-toggle:hover {
  border-color: #0f3460;
}

/* NEW — BundleStatusSections.css (Bundle Status page sections) */

.bs-section-title {
  display: inline-flex;
  align-items: center;
}

.bs-section-count {
  font-size: 11px;
  font-weight: 500;
  color: #8c8c8c;
}

/* Order-wise report section sits a little below the summary */
.bs-report-section.ant-collapse {
  margin-top: 4px;
}

/* The style table is already inside a card — no extra outer gap */
.owv-style-table .cs-collapse.ant-collapse {
  margin-bottom: 0;
}

/* BundleStatusSizeTabs.css — new file (garment color blocks, size tabs,
   Bundle wise / Piece wise highlight) */

/* ---------------- Bundle / Piece switch ---------------- */

.bs-unit-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.bs-unit-bar-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #8c8c8c;
}

.bs-unit-bar .ant-segmented-item-selected {
  color: #ffffff;
  background: #0f3460;
}

/* Only one unit allowed: shown as a fixed navy tag */
.bs-unit-fixed {
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: #0f3460;
}

/*
 * Highlight. The page / drawer wrapper has bs-unit-piece or
 * bs-unit-bundle; every count is tagged bs-u-piece or bs-u-bundle.
 * Chosen unit: light navy box + navy bold text (also on inner text
 * that has its own colour). Other unit: faded.
 * (bs-unit-none = no permission: nothing changes)
 */
.bs-unit-piece .bs-u-piece,
.bs-unit-bundle .bs-u-bundle {
  border-radius: 4px;
  font-weight: 700;
  color: #0f3460;
  background-color: #e3eaf5;
  box-shadow:
    0 0 0 2px #e3eaf5,
    inset 0 0 0 1px #0f3460;
}

.bs-unit-piece .bs-u-piece *,
.bs-unit-bundle .bs-u-bundle * {
  font-weight: 700;
  color: #0f3460;
}

/* Tiles / cards: the frame is enough, keep their own background */
.bs-unit-piece .orbs-kpi.bs-u-piece,
.bs-unit-bundle .orbs-kpi.bs-u-bundle,
.bs-unit-piece .ant-card.bs-u-piece,
.bs-unit-bundle .ant-card.bs-u-bundle {
  background-color: #f3f6fb;
  box-shadow: inset 0 0 0 2px #0f3460;
}

/* Bundle Stage Table totals: pcs line under the bundle count */
.bst-summary-pcs {
  display: block;
  font-size: 10px;
  white-space: nowrap;
}

/* ---------------- Garment color blocks ---------------- */

.bs-color-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bs-color-block {
  padding: 6px 10px 8px;
  border: 1px solid #e6e9ef;
  border-left: 3px solid #0f3460;
  border-radius: 8px;
  background: #ffffff;
}

.bs-color-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.bs-color-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f3460;
}

.bs-color-sub {
  font-size: 11.5px;
  color: #8c8c8c;
}

/* ---------------- Size tabs ---------------- */

.bs-size-tabs .ant-tabs-nav {
  margin-bottom: 6px;
}

.bs-size-tabs .ant-tabs-tab {
  padding: 4px 0;
}

.bs-size-tabs .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: #0f3460;
}

.bs-size-tabs .ant-tabs-ink-bar {
  background: #0f3460;
}

.bs-size-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
}

/* small count next to the size (bundles or pcs, per the switch) */
.bs-size-tab-count {
  padding: 0 5px;
  border-radius: 8px;
  font-size: 10.5px;
  line-height: 16px;
  color: #595959;
  background: #f0f2f5;
}

.bs-unit-piece .bs-size-tab-count.bs-u-piece,
.bs-unit-bundle .bs-size-tab-count.bs-u-bundle {
  color: #ffffff;
  background: #0f3460;
}

/* ---------------- Size pane ---------------- */

.bs-size-pane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}

.bs-size-pane-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bs-size-pane-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #8c8c8c;
}

.bs-size-pane-empty {
  padding: 8px 0;
  font-size: 12px;
  color: #8c8c8c;
}

/* ---------------- Stage mini cards ---------------- */

.bs-stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-gap: 6px;
  gap: 6px;
}

.bs-stage-mini {
  padding: 5px 8px 6px;
  border: 1px solid #e6e9ef;
  border-top: 2px solid #0f3460;
  border-top: 2px solid var(--c, #0f3460);
  border-radius: 6px;
  background: #ffffff;
  cursor: default;
}

.bs-stage-mini:hover {
  box-shadow: 0 2px 8px rgba(15, 52, 96, 0.1);
}

.bs-stage-mini.is-na {
  border-top-color: #d9d9d9;
  background: #fafafa;
}

.bs-stage-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.bs-stage-mini-name {
  overflow: hidden;
  min-width: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #3a4250;
}

.bs-stage-mini-pct {
  font-size: 12px;
  font-weight: 700;
  color: #8c8c8c;
  color: var(--c, #8c8c8c);
}

.bs-stage-mini-bar {
  overflow: hidden;
  height: 4px;
  margin: 3px 0 4px;
  border-radius: 2px;
  background: #f0f2f5;
}

.bs-stage-mini-bar span {
  display: block;
  height: 100%;
  background: #0f3460;
  background: var(--c, #0f3460);
}

.bs-stage-mini-line {
  font-size: 11px;
  line-height: 1.35;
  color: #595959;
}

.bs-stage-mini-line b {
  color: #262626;
}

/*
 * Highlight. The page / drawer wrapper has bs-unit-piece or
 * bs-unit-bundle; every count is tagged bs-u-piece or bs-u-bundle.
 * (bs-unit-none = no permission: nothing changes)
 */

/* Chosen unit, plain text counts: soft navy pill, bold navy text.
   The pill is drawn with background + shadow, so nothing moves. */
.bs-unit-piece
  .bs-u-piece:not(.orbs-kpi):not(.owv-chip):not(.owv-count):not(.ant-card):not(
    .bs-size-tab-count
  ),
.bs-unit-bundle
  .bs-u-bundle:not(.orbs-kpi):not(.owv-chip):not(.owv-count):not(.ant-card):not(
    .bs-size-tab-count
  ) {
  width: -webkit-fit-content;
  width: fit-content;
  border-radius: 3px;
  font-weight: 700;
  color: #0f3460;
  background-color: #e6edf7;
  box-shadow: 0 0 0 2px #e6edf7;
}

.bs-unit-piece .bs-u-piece *,
.bs-unit-bundle .bs-u-bundle * {
  font-weight: 700;
  color: #0f3460;
}

/* Chosen unit, tiles / chips / count pills: navy frame + light tint */
.bs-unit-piece .bs-u-piece:is(.orbs-kpi, .owv-chip, .owv-count, .ant-card),
.bs-unit-bundle .bs-u-bundle:is(.orbs-kpi, .owv-chip, .owv-count, .ant-card) {
  background-color: #eef3fa;
  box-shadow: inset 0 0 0 1.5px #0f3460;
}

/* ========================= ROOT ========================= */
.roster-scheduler {
  height: 88vh;
  display: flex;
  flex-direction: column;
  background-color: #f0f2f5;
}

.roster-header {
  margin-bottom: 0;
  border-radius: 0;
}

.roster-content {
  display: flex;
  flex: 1 1;
  overflow: hidden;
}

/* ========================= USER LIST ========================= */
.roster-user-list {
  width: 280px;
  background: white;
  border-right: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.user-list-header {
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid #f0f0f0;
  background-color: #fafafa;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.user-list-body {
  flex: 1 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.user-row {
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 60px !important; /* 🔥 CRITICAL: Matches calendar row height */
}

.user-row:hover {
  background-color: #e6f7ff;
}

/* ========================= CALENDAR ========================= */
.roster-calendar {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: white;
}

/* ======== HEADER ======== */
.calendar-header {
  background-color: #fafafa;
  border-bottom: 2px solid #f0f0f0;
  overflow-x: auto;
  overflow-y: hidden;
  height: 60px; /* 🔥 Slightly larger to allow scroll */
  flex-shrink: 0;
  white-space: nowrap; /* 🔥 Must have for horizontal scrolling */
}

.calendar-header::-webkit-scrollbar {
  height: 6px;
}
.calendar-header::-webkit-scrollbar-thumb {
  background: transparent;
}

.date-header-cell {
  border-right: 1px solid #f0f0f0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

/* ======== BODY ======== */
.calendar-body {
  flex: 1 1;
  overflow-y: auto;
  overflow-x: auto;
  scrollbar-width: thin;
}

.calendar-row {
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
  height: 60px !important; /* 🔥 Matches user row height */
  display: flex;
}

.calendar-cell {
  border-right: 1px solid #f0f0f0;
  padding: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.calendar-cell:hover {
  background-color: #e6f7ff;
}

/* ========================= SHIFT BADGE ========================= */
.shift-badge {
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  border-radius: 4px;
  padding: 6px 8px;
  color: white;
  width: 100%;
  height: calc(100% - 8px);
  margin: 4px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.shift-badge.not-created::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  pointer-events: none;

  background: repeating-linear-gradient(
    135deg,
    rgba(163, 163, 163, 0.35) 0px,
    rgba(163, 163, 163, 0.35) 4px,
    transparent 4px,
    transparent 10px
  );
}

.shift-badge.deleted::before,
.shift-badge.deleted::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  pointer-events: none;
}

.shift-badge.deleted::before {
  background: repeating-linear-gradient(
    45deg,
    rgba(190, 102, 102, 0.45) 0px,
    rgba(190, 102, 102, 0.45) 4px,
    transparent 4px,
    transparent 10px
  );
}

.shift-badge.deleted::after {
  background: repeating-linear-gradient(
    -45deg,
    rgba(190, 102, 102, 0.45) 0px,
    rgba(190, 102, 102, 0.45) 4px,
    transparent 4px,
    transparent 10px
  );
}

.shift-badge.created {
  opacity: 1;
}

.shift-time {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.shift-role {
  font-size: 10px;
  opacity: 0.9;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shift-delete-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  opacity: 0;
  transition: opacity 0.2s;
  padding: 2px 4px;
  height: auto;
  min-width: auto;
  background: rgba(255, 77, 79, 0.9) !important;
  color: white !important;
  border: none;
}

.shift-delete-btn:hover {
  background: rgba(255, 77, 79, 1) !important;
}

.shift-badge:hover .shift-delete-btn {
  opacity: 1;
}

.empty-cell {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  color: #bfbfbf;
}

.calendar-cell:hover .empty-cell {
  opacity: 1;
}

/* ========================= SCROLLBAR STYLING ========================= */
.user-list-body::-webkit-scrollbar,
.calendar-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.user-list-body::-webkit-scrollbar-track,
.calendar-body::-webkit-scrollbar-track {
  background: #f0f0f0;
}

.user-list-body::-webkit-scrollbar-thumb,
.calendar-body::-webkit-scrollbar-thumb {
  background: #bfbfbf;
  border-radius: 4px;
}

.user-list-body::-webkit-scrollbar-thumb:hover,
.calendar-body::-webkit-scrollbar-thumb:hover {
  background: #8c8c8c;
}
.user-list-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
}

.calendar-header-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  height: 100%;
}

.calendar-body-scroll {
  overflow-y: auto;
  overflow-x: auto;
  height: 100%;
}

.layout_group_messages {
  height: 100vh;
  background: #ffffff;
}

.group_chat_header {
  position: fixed;
  top: 55px;
  left: 60px;
  right: 20px;
  z-index: 90;
  height: 45px;
  display: flex;
  align-items: center;
  padding: 5px 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
}

.group_name {
  flex: 1 1;
  font-weight: 600;
  font-size: 18px;
  text-align: left;
  gap: 10px;
}

.message_sender {
  font-size: 13px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 4px;
}

.date-divider {
  display: flex;
  justify-content: center;
  margin: 6px 0;
}

.date-divider span {
  background: #d9dbd5;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 12px;
  color: #555;
}
.group_messages {
  flex: 1 1;
  padding: 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 45px;
}

.message_bubble {
  padding: 7px 6px;
  cursor: pointer;
}

.message_inner_wrapper:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(88, 88, 88, 0.08);
  background-color: #f8f9fa;
}

.message_inner_wrapper {
  padding: 13px 10px;
  border-bottom: 1px solid rgb(243, 243, 243);
}
.msg_time {
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  margin-left: 20px;
}

.search-input-box {
  display: flex;
  position: relative;
  margin-bottom: 5px;
  margin-top: 5px;
  -webkit-margin-start: auto;
          margin-inline-start: auto;
  margin-left: 5px;
  height: 29px;
  width: 300px;
  margin-right: 20px;
}

.load-more-wrapper {
  display: flex;
  justify-content: center;
  padding: 8px 0;
}
.load-more-btn {
  background: #e4e6eb;
  border: none;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 13px;
  cursor: pointer;
  color: #050505;
  transition: background 0.2s ease;
}

.load-more-btn:hover {
  background: #d8dadf;
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.message_hightlight {
  background: #ede6cb;
  padding: 6px 10px;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .group_name {
    font-size: 14px;
  }
  .message_bubble {
    max-width: 85%;
    font-size: 13px;
  }
}

/* Timesheet.css */

/* Animation for spinning icon */
.animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Container styles */
.timesheet-container {
  padding: 24px;
  background-color: #f5f5f5;
  min-height: 100vh;
}

.timesheet-content {
  max-width: 1280px;
  margin: 0 auto;
}

/* Header styles */
.timesheet-header {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timesheet-title {
  font-size: 30px;
  font-weight: bold;
  color: #1f2937;
  margin: 0;
}

.timesheet-subtitle {
  color: #6b7280;
  margin-top: 4px;
  font-size: 14px;
}

/* Total hours card */
.total-hours-card {
  text-align: center;
  min-width: 120px;
}

.total-hours-label {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 4px;
}

.total-hours-value {
  font-size: 32px;
  font-weight: bold;
  color: #2563eb;
}

/* Table styles */
.timesheet-table {
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

/* Date column */
.date-cell {
  display: flex;
  flex-direction: column;
}

.date-day {
  font-weight: 600;
  font-size: 16px;
  color: #111827;
}

.date-text {
  color: #6b7280;
  font-size: 14px;
  margin-top: 2px;
}

/* Punch records container */
.punches-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.no-punches {
  color: #9ca3af;
  font-style: italic;
}

/* Individual punch card */
.punch-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 12px;
  background-color: white;
  transition: box-shadow 0.2s ease;
  cursor: pointer;
}

.punch-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.punch-times {
  display: flex;
  align-items: center;
  gap: 8px;
}

.punch-time {
  font-weight: 600;
  color: #111827;
}

.punch-arrow {
  color: #9ca3af;
}

.punch-hours {
  color: #6b7280;
  font-size: 14px;
}

.punch-info-icon {
  color: #9ca3af;
  font-size: 14px;
}

/* Popover content */
.punch-details {
  padding: 4px 0;
}

.punch-detail-row {
  margin-bottom: 8px;
}

.punch-detail-label {
  font-weight: 600;
  margin-right: 4px;
}

.punch-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

/* Total hours column */
.day-total-hours {
  font-weight: 600;
  font-size: 18px;
  color: #2563eb;
}

/* Modal styles */
.modal-field {
  margin-bottom: 16px;
}

.modal-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #374151;
}

.modal-input-wrapper {
  width: 100%;
}

/* Button styles */
.add-punch-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .timesheet-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .total-hours-card {
    width: 100%;
  }

  .punch-card {
    font-size: 13px;
  }

  .timesheet-title {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .timesheet-container {
    padding: 12px;
  }

  .punches-container {
    flex-direction: column;
  }

  .punch-card {
    width: 100%;
  }
}

/* Focus states for accessibility */
.punch-card:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.custom-table-header .ant-table-thead > tr > th {
  font-size: 16px; /* increase as needed: 16px / 18px / 20px */
  font-weight: 600;
}

.report-date-picker input::placeholder {
  font-size: 12px;
}
.dept-card {
  border-radius: "12px";
  box-shadow: "0 4px 14px rgba(0,0,0,0.06)";
  padding: "0 10px 10px 10px";
}

.card-inner-title {
  font-size: 16px;
  font-weight: 500;
}

.card-inner-value {
  font-size: 33px;
  text-align: center;
  font-weight: 600;
}

.timesheet-statcard {
  background: #fff;
  border-radius: 14px;
  padding: 13px 10px;
  padding-right: 40px;
  border: 1px solid #fffbeb;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.statscard-icon-present {
  width: 50px;
  height: 50px;
  border-radius: 11px;
  background: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #059669;
  flex-shrink: 0;
  font-size: 24px;
}
.statscard-icon-all {
  width: 50px;
  height: 50px;
  border-radius: 11px;
  background: #eaecf6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b1847;
  flex-shrink: 0;
  font-size: 24px;
}

.statscard-icon-absent {
  width: 50px;
  height: 50px;
  border-radius: 11px;
  background: #fef2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc2626;
  flex-shrink: 0;
  font-size: 24px;
}
.statscard-icon-ot {
  width: 50px;
  height: 50px;
  border-radius: 11px;
  background: #fffbeb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d97706;
  flex-shrink: 0;
  font-size: 24px;
}
.statscard-icon-late {
  width: 50px;
  height: 50px;
  border-radius: 11px;
  background: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a1d41f;
  flex-shrink: 0;
  font-size: 24px;
}

.statscard-body {
  flex: 1 1;
  min-width: 0px;
}

.stats-card-value {
  font-size: 25px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
}

.stats-card-title {
  font-size: 15px;
  color: #94a3b8;
  margin-top: 1px;
}

.status-card {
  padding: 5px;
  margin-top: 10px;
  margin-left: 10px;
  border-radius: 16px;
  box-shadow: "0 2px 10px rgba(0,0,0,0.04)";
}

.filter-card {
  border-radius: 12px;
  box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.06);
  padding: 0px 10px 10px 10px;
}

.filter-title {
  font-size: 15px;
  color: #575551;
  font-weight: 600;
  margin-left: 2px;
}
.dept-view {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  margin-bottom: 0;
}

.dept-view-header {
  padding: 14px 18px;
  background: linear-gradient(135deg, #fff 12px, #fff 04px);
  border-bottom: 1px solid blue 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #d7d2d2;
}
.dept-title-view {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #deeafb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.dept-details {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.dept-title {
  font-size: 14px;
  color: #0f172a;
}
.dept-total {
  font-size: 10px;
  font-weight: 700;
  color: #3079d2;
  background: #eff6ff;
  padding: 1px 8px;
  border-radius: 20px;
}
.dept-summary {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.dept-summary-card-present {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 20px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #6ee7b7;
  font-size: 10px;
  font-weight: 700;
  cursor: default;
}
.dept-summary-icon {
  font-size: 9px;
  padding-top: 2px;
}
.dept-summary-card-absent {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 20px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  font-size: 10px;
  font-weight: 700;
  cursor: default;
}
.dept-summary-card-late {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 20px;
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fcd34d;
  font-size: 10px;
  font-weight: 700;
  cursor: default;
}

.dept-summary-card-ot {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 20px;
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #a5b4fc;
  font-size: 10px;
  font-weight: 700;
  cursor: default;
}

.dept-header-graph {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-shrink: 0px;
}
.dept-sub-style {
  font-size: 9px;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
}

.dept-graph-divider {
  height: 3px;
  background: rgba(37, 99, 235, 0.15);
  position: relative;
}

.dept-graph-percentage {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #2563eb;
}

.time-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.pill-title {
  font-size: 10px;
}
.date-view {
  font-size: 13px;
  font-weight: bold;
  margin-top: 5px;
}
.dept-expandable-view {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #deeafb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.dept-expandable-view-title {
  font-size: 12px;
  color: #0f172a;
  padding: 5px;
}

.dept-expandable {
  padding-top: 5px;
}
.date-expandable {
  margin-bottom: 5px;
}
.avatar-style {
  background-color: #f56a00;
  vertical-align: middle;
}

.date-view-header {
  background: linear-gradient(135deg, #fff 12px, #fff 04px);
  border-bottom: 1px solid blue 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}

.emp-details {
  display: flex;
  align-items: center;
  gap: 7px;
}
.emp-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 11px;
  line-height: 1.2;
}
.emp-code {
  font-size: 9px;
  color: #94a3b8;
}

.profile-img-container {
  width: 100%;
  max-height: 40px;
  border-radius: 7px;
  align-items: center;
  justify-content: center;
}
.profile-img-container-hover {
  width: 100%;
  max-height: 130px;
  border-radius: 7px;
  align-items: center;
  justify-content: center;
}

.graph-summary-card {
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 4px 16px #dc262614;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}
.graph-summary-card {
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 4px 16px #dc262614;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.graph-summary-card-present {
  background: #ecfdf5;
  border: 1.5px solid #6ee7b7;
}
.graph-summary-card-absent {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
}

.graph-summary-card-late {
  background: #fffbeb;
  border: 1.5px solid #e0b62d;
}
.graph-summary-card-ot {
  background: #eef2ff;
  border: 1.5px solid #a5b4fc;
}

.graph-summary-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.graph-summary-card-title-absent {
  background: red;
  box-shadow: 0 4px 14px rgb(193, 87, 87);
}

.graph-summary-card-title-present {
  background: green;
  box-shadow: 0 4px 14px green;
}

.gragh-summary-card-title {
  width: 35px;
  height: 35px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.graph-summary-data-count-absent {
  font-size: 10px;
  font-weight: 700;
  color: #991b1b;
  background: #fee2e2;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid #fca5a5;
}

.card-icon-align {
  display: flex;
  flex-direction: row;
  gap: 4px;
}

.icon-count {
  display: flex;
  flex-direction: row;
  gap: 155px;
}

.section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 12px;
}

.section-header {
  flex: 1 1;
  height: 1px;
  background: #e2eaf5;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.dtr-root {
  --dtr-bg: #f3f4f9;
  --dtr-surface: #ffffff;
  --dtr-ink: #171a2e;
  --dtr-ink-soft: #5c6178;
  --dtr-ink-faint: #070708;
  --dtr-border: #e6e8f1;
  --dtr-border-soft: #eef0f7;

  --dtr-primary: #3a4de0;
  --dtr-primary-soft: #ecefff;

  --dtr-present: #128a5e;
  --dtr-present-bg: #e6f7ef;
  --dtr-absent: #d43d3d;
  --dtr-absent-bg: #fceeee;
  --dtr-late: #b8720c;
  --dtr-late-bg: #fbf1de;
  --dtr-half: #9c6b12;
  --dtr-half-bg: #f8f0dd;
  --dtr-ot: #6a3fc9;
  --dtr-ot-bg: #f0ebfb;
  --dtr-issue: #b32c74;
  --dtr-issue-bg: #fbe9f2;
  --dtr-open: #2f7fb0;
  --dtr-open-bg: #e8f3fa;

  --dtr-radius: 14px;
  --dtr-radius-sm: 9px;
  --dtr-shadow:
    0 1px 2px rgba(23, 26, 46, 0.04), 0 8px 24px -12px rgba(23, 26, 46, 0.12);

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  min-height: 100%;
  background: var(--dtr-bg);
  font-family: var(--font-body);
  color: var(--dtr-ink);
  padding: 20px clamp(10px, 4vw, 10px) 20px;
  box-sizing: border-box;
}

.dtr-root *,
.dtr-root *::before,
.dtr-root *::after {
  box-sizing: border-box;
}

/* ---------- Top controls ---------- */

.dtr-controls-card {
  background: var(--dtr-surface);
  border: 1px solid var(--dtr-border);
  border-radius: var(--dtr-radius-sm);
  box-shadow: var(--dtr-shadow);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.dtr-lbl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--dtr-ink-soft);
  margin-bottom: 4px;
}

.dtr-aster {
  color: var(--dtr-absent);
  font-size: 10px;
  vertical-align: super;
}

.dtr-apply-btn {
  background: var(--dtr-ink) !important;
  border-color: var(--dtr-ink) !important;
  font-weight: 600;
}

.dtr-range-picker {
  border-radius: var(--dtr-radius-sm);
}

.dtr-controls-grow {
  margin-left: auto;
}

/* ---------- Empty / initial states ---------- */

.dtr-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--dtr-ink-faint);
}

.dtr-empty-initial {
  background: var(--dtr-surface);
  border: 1px dashed var(--dtr-border);
  border-radius: var(--dtr-radius);
}

/* ---------- Header ---------- */

.dtr-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

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

.dtr-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(155deg, var(--dtr-primary), #1f2a99);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px -6px rgba(58, 77, 224, 0.55);
}

.dtr-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}

.dtr-subtitle {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--dtr-ink-soft);
}

.dtr-view-switch .ant-segmented {
  background: var(--dtr-surface);
  border: 1px solid var(--dtr-border);
  border-radius: 999px;
  padding: 3px;
  box-shadow: var(--dtr-shadow);
}

.dtr-view-switch .ant-segmented-item {
  border-radius: 999px !important;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
}

.dtr-view-switch .ant-segmented-item-selected {
  background: var(--dtr-ink) !important;
  color: #fff !important;
}

.dtr-view-switch .ant-segmented-item-icon {
  -webkit-margin-end: 6px;
          margin-inline-end: 6px;
  display: inline-flex;
  vertical-align: -2px;
}

/* ---------- Stat cards (also act as quick-filter toggles) ---------- */

.dtr-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 1200px) {
  .dtr-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .dtr-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dtr-stat-card {
  width: 100%;
  background: var(--dtr-surface);
  border: 1px solid var(--dtr-border);
  border-radius: var(--dtr-radius-sm);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition:
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

.dtr-stat-card:hover {
  box-shadow: var(--dtr-shadow);
}

.dtr-stat-card.is-active {
  border-color: var(--dtr-primary);
  border-color: var(--stat-accent, var(--dtr-primary));
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--dtr-primary) 22%, transparent);
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--stat-accent, var(--dtr-primary)) 22%, transparent);
}

.dtr-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--dtr-primary);
  background: var(--stat-accent, var(--dtr-primary));
}

.dtr-stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--dtr-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dtr-stat-label svg {
  color: var(--dtr-primary);
  color: var(--stat-accent, var(--dtr-primary));
}

.dtr-stat-value {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 600;
  color: var(--dtr-ink);
}

.dtr-stat-value span {
  font-size: 12px;
  color: var(--dtr-ink-faint);
  font-family: var(--font-body);
  font-weight: 500;
  margin-left: 3px;
}

/* ---------- Filter bar ---------- */

.dtr-filterbar {
  background: var(--dtr-surface);
  border: 1px solid var(--dtr-border);
  border-radius: var(--dtr-radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.dtr-filterbar-icon {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--dtr-ink-soft);
  flex-shrink: 0;
}

.dtr-filterbar-grow {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dtr-search .ant-input-affix-wrapper {
  border-radius: 999px;
  background: var(--dtr-bg);
  border-color: var(--dtr-border);
}

.dtr-filter-select .ant-select-selector {
  border-radius: 999px;
  background: var(--dtr-bg);
  border-color: var(--dtr-border);
  color: #070708;
}

.dtr-reset-btn,
.dtr-sort-toggle {
  border-radius: 999px;
  font-weight: 600;
}

/* Tooltip breakdown shown on hover over a StatChip / count / progress bar */

.dtr-breakdown-tip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  min-width: 150px;
}

/* ---------- Employee column header (carries the sort-by control) ---------- */

.dtr-emp-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dtr-emp-col-sort {
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: none;
  letter-spacing: 0;
}

.dtr-emp-col-sort-select {
  min-width: 74px;
}

.dtr-emp-col-sort-select .ant-select-selector {
  border-radius: 6px !important;
  background: var(--dtr-surface) !important;
  font-size: 11px !important;
  font-weight: 600;
  text-transform: none;
  color: var(--dtr-ink-soft) !important;
}

.dtr-emp-col-sort-dir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--dtr-border);
  background: var(--dtr-surface);
  color: var(--dtr-ink-soft);
  cursor: pointer;
  flex-shrink: 0;
}

.dtr-emp-col-sort-dir:hover {
  color: var(--dtr-primary);
  border-color: var(--dtr-primary);
}

/* ---------- Context strip (department / date navigation cards) ---------- */

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

.dtr-chip-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  width: 100%;
}

/* Chip used in the department / date strips — name + total + mini P/A/L/OT
   breakdown row, with the full breakdown available on hover via Tooltip. */
.dtr-stat-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 12px;
  border-radius: var(--dtr-radius-sm);
  border: 1px solid var(--dtr-border);
  background: var(--dtr-surface);
  cursor: pointer;
  text-align: left;
  font: inherit;
  min-width: 132px;
  transition: all 0.15s ease;
}

.dtr-stat-chip:hover {
  border-color: var(--dtr-primary);
  box-shadow: var(--dtr-shadow);
}

.dtr-stat-chip.is-active {
  background: var(--dtr-ink);
  border-color: var(--dtr-ink);
}

.dtr-stat-chip.is-active .dtr-stat-chip-label,
.dtr-stat-chip.is-active .dtr-stat-chip-total {
  color: #fff;
}

.dtr-chip-mono .dtr-stat-chip-label {
  font-family: var(--font-mono);
}

.dtr-stat-chip-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.dtr-stat-chip-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--dtr-ink);
  white-space: nowrap;
}

.dtr-stat-chip-total {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--dtr-ink-faint);
}

.dtr-stat-chip-row {
  display: flex;
  gap: 4px;
}

.dtr-mini-pill {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.6;
}

.mp-present {
  background: var(--dtr-present-bg);
  color: var(--dtr-present);
}
.mp-absent {
  background: var(--dtr-absent-bg);
  color: var(--dtr-absent);
}
.mp-late {
  background: var(--dtr-late-bg);
  color: var(--dtr-late);
}
.mp-ot {
  background: var(--dtr-ot-bg);
  color: var(--dtr-ot);
}
.mp-half {
  background: var(--dtr-half-bg);
  color: var(--dtr-half);
}
.mp-issue {
  background: var(--dtr-issue-bg);
  color: var(--dtr-issue);
}

/* ---------- Table card ---------- */

.dtr-table-card {
  background: var(--dtr-surface);
  border: 1px solid var(--dtr-border);
  border-radius: var(--dtr-radius);
  box-shadow: var(--dtr-shadow);
  padding: 6px;
  overflow: hidden;
}

.dtr-table .ant-table {
  background: transparent;
}

.dtr-table .ant-table-thead > tr > th {
  background: var(--dtr-bg) !important;
  color: var(--dtr-ink-soft);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--dtr-border) !important;
}

.dtr-table .ant-table-thead > tr > th::before {
  display: none;
}

.dtr-table .ant-table-tbody > tr > td {
  border-bottom: 1px solid var(--dtr-border-soft);
  font-size: 13px;
  vertical-align: middle;
}

.dtr-table .ant-table-tbody > tr:hover > td {
  background: var(--dtr-primary-soft) !important;
}

.dtr-row-absent > td {
  background: rgba(212, 61, 61, 0.035);
}

.dtr-mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--dtr-ink);
}

.dtr-mono-faint {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--dtr-ink-faint);
}

/* ---------- Leave / late-penalty cells (now inline, not in an expand row) ---------- */

.dtr-leave-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.dtr-leave-paid {
  color: var(--dtr-present);
}

.dtr-leave-unpaid {
  color: var(--dtr-absent);
}

/* ---------- "All departments" overview table ---------- */

.dtr-dept-overview-card {
  padding: 4px;
}

.dtr-dept-overview-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--dtr-ink);
}

.dtr-dept-overview-table .ant-table-tbody > tr > td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.dtr-dept-overview-table .ant-progress-text {
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Rows whose department contains a live search match — a light indigo
   wash + left rail so it's obvious at a glance which cards were jumped to. */
.dtr-row-search-match > td {
  background: var(--dtr-primary-soft) !important;
  box-shadow: inset 3px 0 0 var(--dtr-primary);
}

/* ---------- Employee cell ---------- */

.dtr-emp-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dtr-emp-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.dtr-emp-ring {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(
    var(--dtr-present) calc(100 * 1%),
    var(--dtr-border-soft) 0
  );
  background: conic-gradient(
    var(--ring-color, var(--dtr-present)) calc(var(--ring-pct, 100) * 1%),
    var(--dtr-border-soft) 0
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.dtr-emp-ring .ant-avatar {
  border: 2px solid var(--dtr-surface);
}

.dtr-emp-live-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dtr-open);
  border: 2px solid var(--dtr-surface);
}

.dtr-emp-live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--dtr-open);
  animation: dtr-pulse 1.8s ease-out infinite;
}

@keyframes dtr-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.dtr-emp-text {
  min-width: 0;
}

.dtr-emp-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--dtr-ink);
  line-height: 1.25;
}

.dtr-emp-meta {
  font-size: 11.5px;
  color: var(--dtr-ink-faint);
  font-family: var(--font-mono);
}

.dtr-emp-supervisor {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--dtr-ink-soft);
  margin-top: 2px;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dtr-emp-supervisor::before {
  content: "↳";
  color: var(--dtr-ink-faint);
  flex-shrink: 0;
}

.dtr-emp-preview-img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* ---------- Status tags ---------- */

.dtr-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.6;
  border: none;
  -webkit-margin-end: 5px;
          margin-inline-end: 5px;
}

.dtr-tag svg {
  font-size: 12px;
}

.dtr-tag-present {
  background: var(--dtr-present-bg);
  color: var(--dtr-present);
}
.dtr-tag-absent {
  background: var(--dtr-absent-bg);
  color: var(--dtr-absent);
}
.dtr-tag-late {
  background: var(--dtr-late-bg);
  color: var(--dtr-late);
}
.dtr-tag-half {
  background: var(--dtr-half-bg);
  color: var(--dtr-half);
}
.dtr-tag-issue {
  background: var(--dtr-issue-bg);
  color: var(--dtr-issue);
}
.dtr-tag-ot {
  background: var(--dtr-ot-bg);
  color: var(--dtr-ot);
}
.dtr-tag-open {
  background: var(--dtr-open-bg);
  color: var(--dtr-open);
}

.dtr-tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

/* ---------- Department chip inside the date-first view table ---------- */

.dtr-dept-chip {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--dtr-ink-soft);
  background: var(--dtr-bg);
  border: 1px solid var(--dtr-border);
  padding: 3px 9px;
  border-radius: 999px;
}

/* ---------- Legend ---------- */

.dtr-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  padding: 0 4px;
}

.dtr-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--dtr-ink-soft);
}

/* ---------- Nested per-department employee table ---------- */

.dtr-nested-table-wrap {
  width: 100%;
  margin: 0;
  padding: 10px;
  background: transparent;
  border-radius: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.dtr-dept-overview-table .ant-table-expanded-row > td {
  padding: 0 !important;
}

/* Some Ant Design versions use expanded-row-fixed */
.dtr-dept-overview-table .ant-table-expanded-row-fixed {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* Nested table should occupy complete expanded-row width */
.dtr-nested-table {
  width: 100%;
  margin: 0 !important;
}

/* Prevent nested table from inheriting unwanted spacing */
.dtr-nested-table .ant-table {
  width: 100%;
  margin: 0 !important;
}

/* Nested table header */
.dtr-nested-table .ant-table-thead > tr > th {
  background: var(--dtr-surface) !important;
  padding: 10px 12px !important;
  white-space: nowrap;
}

/* Nested table body */
.dtr-nested-table .ant-table-tbody > tr > td {
  padding: 10px 12px !important;
  white-space: nowrap;
  background-color: white;
}

/* Make horizontal scroll available instead of hiding columns */
.dtr-nested-table .ant-table-container {
  overflow-x: auto;
}

/* Keep table content from being clipped */
.dtr-nested-table .ant-table-content {
  overflow-x: auto !important;
}

/* Empty state */
.dtr-nested-empty {
  width: 100%;
  padding: 18px 10px;
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--dtr-ink-faint);
  background: var(--dtr-bg);
  border-radius: var(--dtr-radius-sm);
}

.dtr-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dtr-primary);
  background: var(--dot-color, var(--dtr-primary));
  flex-shrink: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .dtr-controls-grow {
    margin-left: 0;
  }
  .dtr-filterbar-grow {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
}

.print-options-modal {
  max-width: calc(100vw - 32px);
}

.print-options-modal .ant-modal-content {
  max-width: 100%;
  overflow: hidden;
}

.print-options-modal .ant-modal-body {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 16px 24px;
}

/* Prevent content from forcing modal width */
.print-options-modal,
.print-options-modal *,
.print-options-modal *::before,
.print-options-modal *::after {
  box-sizing: border-box;
}

.print-options-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
}

/* =========================================================
   SUMMARY
   ========================================================= */

.print-options-modal .print-option-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.print-options-modal .print-summary-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
}

.print-options-modal .print-summary-card > div {
  min-width: 0;
}

.print-options-modal .print-summary-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

/* =========================================================
   SECTIONS
   ========================================================= */

.print-options-modal .print-option-section {
  width: 100%;
  min-width: 0;
  padding: 2px 0;
}

.print-options-modal .print-section-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  font-size: 18px;
}

.print-options-modal .print-section-title > div {
  min-width: 0;
}

.print-options-modal .print-section-title > svg {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 19px;
}

.print-options-modal .print-section-description {
  margin-top: 3px;
  color: #8c8c8c;
  font-size: 12px;
  font-weight: 400;
}

.print-options-modal .print-selected-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
  min-width: 0;
  margin-top: 10px;
  padding: 8px 10px;
  background: #f5f7fa;
  border-radius: 7px;
  color: #595959;
  font-size: 12px;
}

/* =========================================================
   STATUS
   ========================================================= */

.print-options-modal .print-status-checkboxes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 10px;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
}

.print-options-modal .print-sub-title {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 16px 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #595959;
}

/* =========================================================
   DRAG LIST
   ========================================================= */

.print-options-modal .print-drag-list,
.print-options-modal .print-column-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.print-options-modal .print-sortable-item {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.print-options-modal .print-drag-handle {
  flex: 0 0 34px;
  width: 34px;
  border: 1px solid #e5e7eb;
  border-right: 0;
  background: #fafafa;
  border-radius: 8px 0 0 8px;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8c8c8c;
  font-size: 18px;
}

.print-options-modal .print-drag-handle:active {
  cursor: grabbing;
}

.print-options-modal .print-status-item,
.print-options-modal .print-column-item {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 0 8px 8px 0;
  background: #fff;
}

.print-options-modal .print-status-item:hover,
.print-options-modal .print-column-item:hover {
  border-color: #bfbfbf;
  background: #fafafa;
}

.print-options-modal .print-item-disabled {
  opacity: 0.45;
}

/* =========================================================
   STATUS ITEMS
   ========================================================= */

.print-options-modal .print-status-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.print-options-modal .print-status-dot.gold {
  background: #d48806;
}

.print-options-modal .print-status-dot.green {
  background: #389e0d;
}

.print-options-modal .print-status-dot.red {
  background: #cf1322;
}

.print-options-modal .print-status-dot.blue {
  background: #1677ff;
}

.print-options-modal .print-status-dot.purple {
  background: #722ed1;
}

.print-options-modal .print-status-number,
.print-options-modal .print-column-index {
  flex: 0 0 24px;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #f0f0f0;
  font-size: 11px;
  font-weight: 600;
}

.print-options-modal .print-column-item svg {
  flex-shrink: 0;
  color: #389e0d;
}

/* =========================================================
   SUMMARY STATUS
   ========================================================= */

.print-options-modal .print-status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin-top: 12px;
}

.print-options-modal .print-summary-status {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid #f0f0f0;
  border-radius: 7px;
  background: #fafafa;
}

/* =========================================================
   FINAL PREVIEW
   ========================================================= */

.print-options-modal .print-final-preview {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
}

.print-options-modal .print-config-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 6px;
  font-size: 12px;
}

.print-options-modal .print-group-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 10px;
  padding: 7px 9px;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
}

.print-duration-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
  width: 100%;
  margin: 16px 0;
}

.print-duration-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.print-duration-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #4b5563;
}

.print-duration-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.print-duration-content .ant-typography {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.print-duration-content strong {
  font-size: 13px;
  line-height: 1.3;
  color: #111827;
  font-weight: 600;
  white-space: nowrap;
}

/* Tablet */
@media (max-width: 900px) {
  .print-duration-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 550px) {
  .print-duration-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .print-duration-item {
    min-height: 58px;
  }
}

/* =========================================================
   FOOTER
   ========================================================= */

.print-options-modal .print-modal-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid #f0f0f0;
}

/* =========================================================
   DRAG OVERLAY
   ========================================================= */

.print-options-modal .print-drag-overlay {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 400px;
  padding: 10px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  font-size: 13px;
  font-weight: 600;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
  .print-options-modal .print-option-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .print-options-modal .print-status-checkboxes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .print-options-modal .print-option-summary {
    grid-template-columns: 1fr;
  }

  .print-options-modal .print-status-checkboxes {
    grid-template-columns: 1fr;
  }

  .print-options-modal .ant-modal-body {
    padding: 12px 16px;
  }
}

.summary-panel {
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.summary-field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #8c8c8c;
  display: block;
  margin-bottom: 2px;
}

.summary-field-value {
  font-size: 13px;
  font-weight: 500;
  color: #1d1d1d;
}

.summary-divider {
  width: 1px;
  height: 32px;
  background: #e8e8e8;
}

/* ---------- Gradient border (outside) ---------- */
.ym-border {
  /* defaults = Violet (original) */
  --ym-grad: linear-gradient(135deg, #3b6fb6, #0f3460, #3b6fb6);
  --ym-accent: #0f3460;
  --ym-accent-soft: #eaf0f9;
  --ym-accent-line: #c3d2e8;
  --ym-head: linear-gradient(90deg, #eaf0f9, #f4f7fc);
  --ym-content-bg: #f5f8fd;

  padding: 2px;
  border-radius: 16px;
  background: var(--ym-grad);
}
.ym-panel {
  --ym-text: #0f172a;
  --ym-label: #5575a1;
  --ym-line: #e5e7eb;
  --ym-accent-soft: #f5f3ff;
  --ym-accent-line: #ddd6fe;

  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
}

/* ---------- Header ---------- */
.ym-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--ym-head);
}

.ym-head-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-width: 0;
}

.ym-key {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ym-label);
}

.ym-id {
  font-size: 16px;
  font-weight: 700;
  color: var(--ym-text);
}

.ym-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ym-accent);
  background: var(--ym-accent-soft);
  border: 1px solid var(--ym-accent-line);
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Panel toggle (chevron) ---------- */
.ym-toggle {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--ym-line);
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.ym-toggle:hover {
  border-color: var(--ym-accent);
  background: var(--ym-accent-soft);
}

.ym-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ym-label);
  border-bottom: 2px solid var(--ym-label);
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 0.25s ease;
}

.ym-toggle.is-open .ym-chevron {
  transform: rotate(-135deg) translate(-1px, -1px);
}

/* ---------- Smooth collapse (works with auto height) ---------- */
.ym-collapse {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.28s ease;
}

.ym-collapse.is-collapsed {
  grid-template-rows: 0fr;
}

.ym-collapse-inner {
  min-height: 0;
  overflow: hidden;
}

/* ---------- Toolbar ---------- */
.ym-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--ym-line);
}

.ym-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ym-text);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ym-btn:hover {
  border-color: var(--ym-accent);
  color: var(--ym-accent);
}

.ym-btn.is-active {
  color: var(--ym-accent);
  background: var(--ym-accent-soft);
  border-color: var(--ym-accent);
}

.ym-count {
  min-width: 22px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  color: #fff;
  background: var(--ym-accent);
  border-radius: 999px;
}

.ym-caret {
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.ym-btn.is-active .ym-caret {
  transform: rotate(-135deg) translateY(-2px);
}

/* ---------- Values area (below toolbar) ---------- */
.ym-content {
  margin: 0 14px 14px;
  padding: 12px;
  background: #faf9ff;
  background: var(--ym-content-bg);
  border-radius: 10px;
}

.ym-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.ym-tag {
  max-width: 200px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 24px;
  color: var(--ym-text);
  background: #fff;
  border: 1px solid var(--ym-line);
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ym-empty {
  font-size: 12px;
  color: var(--ym-label);
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .ym-btn {
    flex: 1 1 100%;
    justify-content: space-between;
  }
}

/* ================================
   TABLE SETTINGS — DESIGN SYSTEM
================================ */

:root {
  --bg-page: #f7faff;
  --bg-card: #ffffff;
  --bg-item: #fafbfc;
  --bg-item-hover: #f0f2ff;
  --bg-drag-active: #eef0fd;

  --accent: #4f56ff;
  --accent-light: #e8e9ff;
  --accent-hover: #3a40e0;

  --border: #e8eaed;
  --border-strong: #d0d3dc;

  --text-primary: #1a1d2e;
  --text-secondary: #6b7080;
  --text-muted: #9ea5b5;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 4px 20px rgba(79, 86, 255, 0.1);
  --shadow-item: 0 1px 3px rgba(0, 0, 0, 0.05);

  --radius-card: 14px;
  --radius-item: 8px;
  --radius-badge: 20px;

  --font-ui: "DM Sans", sans-serif;
  --font-display: "Syne", sans-serif;

  --transition: 0.18s ease;

  --sidebar-width: 320px;
}

/* ================================
   PAGE WRAPPER
================================ */

.ts-page {
  font-family: "DM Sans", sans-serif;
  font-family: var(--font-ui);
  background: #f7faff;
  background: var(--bg-page);
  min-height: 100vh;
  padding: 32px 24px 60px;
}

.ts-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* ================================
   TOP HEADER
================================ */

.ts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.ts-header__left h1 {
  font-family: "Syne", sans-serif;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #1a1d2e;
  color: var(--text-primary);
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}

.ts-header__left p {
  font-size: 13px;
  color: #6b7080;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 400;
}

/* ================================
   DIVIDER
================================ */

.ts-divider {
  border: none;
  border-top: 1.5px solid #e8eaed;
  border-top: 1.5px solid var(--border);
  margin: 0 0 24px;
}

/* ================================
   TWO-COLUMN LAYOUT
================================ */

.ts-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* ================================
   SIDEBAR
================================ */

.ts-sidebar {
  width: 320px;
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: #ffffff;
  background: var(--bg-card);
  border: 1.5px solid #e8eaed;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  border-radius: var(--radius-card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: -webkit-sticky;
  position: sticky;
  top: 24px;
}

/* Search inside sidebar */
.ts-search {
  position: relative;
  display: flex;
  align-items: center;
  padding: 12px 12px 8px;
  border-bottom: 1.5px solid #e8eaed;
  border-bottom: 1.5px solid var(--border);
}

.ts-search__icon {
  position: absolute;
  left: 24px;
  color: #9ea5b5;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.ts-search input {
  width: 100%;
  height: 34px;
  padding: 0 30px 0 30px;
  border: 1.5px solid #e8eaed;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: "DM Sans", sans-serif;
  font-family: var(--font-ui);
  font-size: 13px;
  color: #1a1d2e;
  color: var(--text-primary);
  background: #f7faff;
  background: var(--bg-page);
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.ts-search input:focus {
  border-color: #4f56ff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 86, 255, 0.1);
}

.ts-search input::placeholder {
  color: #9ea5b5;
  color: var(--text-muted);
}

.ts-search__clear {
  position: absolute;
  right: 18px;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ea5b5;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: 4px;
  transition: color 0.18s ease;
  transition: color var(--transition);
}

.ts-search__clear:hover {
  color: #1a1d2e;
  color: var(--text-primary);
}

/* Sidebar list */
.ts-sidebar__list {
  padding: 8px 8px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.ts-sidebar__list::-webkit-scrollbar {
  width: 4px;
}
.ts-sidebar__list::-webkit-scrollbar-track {
  background: transparent;
}
.ts-sidebar__list::-webkit-scrollbar-thumb {
  background: #d0d3dc;
  background: var(--border-strong);
  border-radius: 4px;
}

/* Each table item in sidebar */
.ts-sidebar__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.18s ease,
    color 0.18s ease;
  transition:
    background var(--transition),
    color var(--transition);
  margin-bottom: 2px;
}

.ts-sidebar__item:hover {
  background: #f0f2ff;
  background: var(--bg-item-hover);
}

.ts-sidebar__item--active {
  background: #e8e9ff !important;
  background: var(--accent-light) !important;
}

.ts-sidebar__item--active .ts-sidebar__item-name {
  color: #4f56ff !important;
  color: var(--accent) !important;
  font-weight: 600;
}

.ts-sidebar__item--active .ts-sidebar__item-count {
  color: #4f56ff !important;
  color: var(--accent) !important;
  opacity: 0.75;
}

.ts-sidebar__item--active .ts-sidebar__item-icon {
  color: #4f56ff;
  color: var(--accent);
  background: rgba(79, 86, 255, 0.12);
}

.ts-sidebar__item-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f7faff;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7080;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition:
    background 0.18s ease,
    color 0.18s ease;
  transition:
    background var(--transition),
    color var(--transition);
}

.ts-sidebar__item-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ts-sidebar__item-name {
  font-size: 13px;
  font-weight: 500;
  color: #1a1d2e;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.18s ease;
  transition: color var(--transition);
}

.ts-sidebar__item-count {
  font-size: 11px;
  color: #9ea5b5;
  color: var(--text-muted);
  font-weight: 400;
}

.ts-sidebar__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 12px;
  color: #9ea5b5;
  color: var(--text-muted);
  font-size: 12.5px;
  text-align: center;
  opacity: 0.6;
}

/* ================================
   MAIN RIGHT AREA
================================ */

.ts-main {
  flex: 1 1;
  min-width: 0;
}

/* ================================
   TABLE PANEL
================================ */

.ts-panel {
  background: #ffffff;
  background: var(--bg-card);
  border-radius: 14px;
  border-radius: var(--radius-card);
  border: 1.5px solid #e8eaed;
  border: 1.5px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.ts-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1.5px solid #e8eaed;
  border-bottom: 1.5px solid var(--border);
  background: #fdfdfe;
}

.ts-panel__head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ts-panel__subtitle {
  font-size: 12px;
  color: #9ea5b5;
  color: var(--text-muted);
  margin-top: 2px;
}

.ts-panel__body {
  padding: 14px 16px;
}

/* ================================
   CARD ICON & TITLE (shared)
================================ */

.ts-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e8e9ff;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4f56ff;
  color: var(--accent);
  flex-shrink: 0;
}

.ts-card__title {
  font-family: "Syne", sans-serif;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #1a1d2e;
  color: var(--text-primary);
  letter-spacing: -0.1px;
}

/* ================================
   COLUMN LIST HEADER
================================ */

.ts-col-header {
  display: grid;
  grid-template-columns: 28px 1fr 52px;
  grid-gap: 8px;
  gap: 8px;
  padding: 4px 6px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: #9ea5b5;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid #e8eaed;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

/* ================================
   SORTABLE ITEM
================================ */

.ts-item {
  display: grid;
  grid-template-columns: 28px 1fr 52px;
  grid-gap: 8px;
  gap: 8px;
  align-items: center;
  padding: 8px 6px;
  border-radius: 8px;
  border-radius: var(--radius-item);
  background: #fafbfc;
  background: var(--bg-item);
  border: 1.5px solid transparent;
  margin-bottom: 5px;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  transition:
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
  cursor: default;
}

.ts-item:last-child {
  margin-bottom: 0;
}

.ts-item:hover {
  background: #f0f2ff;
  background: var(--bg-item-hover);
  border-color: rgba(79, 86, 255, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-item);
}

.ts-item--dragging {
  background: #eef0fd;
  background: var(--bg-drag-active);
  border-color: #4f56ff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(79, 86, 255, 0.14);
  opacity: 0.95;
  z-index: 100;
}

.ts-item--hidden {
  opacity: 0.55;
}

.ts-item__handle {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: #9ea5b5;
  color: var(--text-muted);
  border-radius: 5px;
  height: 24px;
  transition:
    color 0.18s ease,
    background 0.18s ease;
  transition:
    color var(--transition),
    background var(--transition);
}

.ts-item__handle:hover {
  color: #4f56ff;
  color: var(--accent);
  background: #e8e9ff;
  background: var(--accent-light);
}

.ts-item__handle:active {
  cursor: grabbing;
}

.ts-item__name {
  font-size: 13px;
  font-weight: 500;
  color: #1a1d2e;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts-item--hidden .ts-item__name {
  color: #9ea5b5;
  color: var(--text-muted);
  text-decoration: line-through;
  -webkit-text-decoration-color: #d0d3dc;
          text-decoration-color: #d0d3dc;
  -webkit-text-decoration-color: var(--border-strong);
          text-decoration-color: var(--border-strong);
}

.ts-item__toggle {
  display: flex;
  justify-content: flex-end;
}

/* ================================
   ANT SWITCH OVERRIDES
================================ */

.ts-switch.ant-switch-checked {
  background-color: #4f56ff !important;
  background-color: var(--accent) !important;
}

.ts-switch {
  min-width: 36px !important;
  height: 20px !important;
  line-height: 20px !important;
}

.ts-switch .ant-switch-handle {
  width: 16px !important;
  height: 16px !important;
  top: 2px !important;
}

.ts-switch.ant-switch-checked .ant-switch-handle {
  left: calc(100% - 18px) !important;
}

/* ================================
   SAVE ALL BUTTON (top)
================================ */

.ts-btn-save {
  height: 38px !important;
  padding: 0 22px !important;
  border-radius: 9px !important;
  font-family: "DM Sans", sans-serif !important;
  font-family: var(--font-ui) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  background: #4f56ff !important;
  background: var(--accent) !important;
  border-color: #4f56ff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 2px 8px rgba(79, 86, 255, 0.28) !important;
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease !important;
  transition:
    background var(--transition),
    box-shadow var(--transition) !important;
  letter-spacing: 0.1px;
}

.ts-btn-save:hover:not(:disabled) {
  background: #3a40e0 !important;
  background: var(--accent-hover) !important;
  border-color: #3a40e0 !important;
  border-color: var(--accent-hover) !important;
  box-shadow: 0 4px 16px rgba(79, 86, 255, 0.36) !important;
}

/* Update single table button */
.ts-btn-update {
  border-radius: 7px !important;
  font-weight: 500 !important;
  font-size: 13px !important;
}

/* ================================
   EMPTY STATE
================================ */

.ts-empty {
  text-align: center;
  padding: 80px 24px;
  color: #9ea5b5;
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ts-empty svg {
  opacity: 0.3;
}

/* ================================
   SKELETON LOADER
================================ */

.ts-skeleton-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.ts-skeleton-sidebar {
  width: 320px;
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: #ffffff;
  background: var(--bg-card);
  border: 1.5px solid #e8eaed;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  border-radius: var(--radius-card);
  padding: 12px;
}

.ts-skeleton-panel {
  flex: 1 1;
}

.ts-skeleton__card {
  background: #ffffff;
  background: var(--bg-card);
  border-radius: 14px;
  border-radius: var(--radius-card);
  border: 1.5px solid #e8eaed;
  border: 1.5px solid var(--border);
  overflow: hidden;
}

.ts-skeleton__head {
  height: 54px;
  background: linear-gradient(90deg, #f0f1f5 25%, #e8e9ef 50%, #f0f1f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.ts-skeleton__rows {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ts-skeleton__row {
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f5f6f8 25%, #ecedf2 50%, #f5f6f8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.ts-skeleton__row:nth-child(2) {
  animation-delay: 0.1s;
}
.ts-skeleton__row:nth-child(3) {
  animation-delay: 0.2s;
}
.ts-skeleton__row:nth-child(4) {
  animation-delay: 0.3s;
}
.ts-skeleton__row:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 700px) {
  .ts-page {
    padding: 16px 12px 48px;
  }

  .ts-layout {
    flex-direction: column;
  }

  .ts-sidebar {
    width: 100%;
    position: static;
  }

  .ts-sidebar__list {
    max-height: 200px;
  }

  .ts-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─────────────────────────────────────────
   SampleCutting.css
   Styles for SampleCutting, SampleCuttingView, SampleCuttingTableBlock
   ───────────────────────────────────────── */

/* ── SampleCutting (list page) ── */
.sc-list-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sc-list-title {
  margin: 0;
  font-weight: 600;
}

/* ── SampleCuttingView ── */
.scv-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f0f2f5;
}

/* top bar */
.scv-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
}

.scv-page-title {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  color: #111;
}

.scv-page-title-code {
  color: #1677ff;
  margin-left: 8px;
}

/* scrollable body */
.scv-body {
  flex: 1 1;
  overflow-y: auto;
  padding: 10px 0;
}

/* info card */
.scv-info-card {
  margin: 0 10px 10px;
  background: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
}

.scv-info-grid {
  display: flex;
  flex-wrap: wrap;
}

/* InfoItem */
.scv-info-item {
  width: 20%;
  min-width: 130px;
  padding: 6px 10px;
}

.scv-info-item__label {
  font-size: 11px;
  color: #888;
  margin-bottom: 2px;
}

.scv-info-item__value {
  font-size: 13px;
  font-weight: 600;
  color: #111;
}

/* ── SampleCuttingTableBlock ── */

/* outer card wrapper (shared by both blocks) */
.sctb-card {
  margin: 12px;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  background-color: #fff;
  overflow: hidden;
}

/* block title bar */
.sctb-title-bar {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background-color: #f3f4f6;
  border-bottom: 1px solid #d1d5db;
}

/* horizontal scroll wrapper */
.sctb-scroll {
  overflow-x: auto;
}

.sctb-scroll-inner {
  display: inline-block;
}

/* generic flex row */
.sctb-row {
  display: flex;
}

/* ── shared cell base ── */
.sctb-cell {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* header cell (top-level column headers) */
.sctb-cell--header {
  background-color: #eef2f7;
  font-weight: 700;
  font-size: 12px;
  color: #111827;
}

/* sub-header cell (PO Qty / Cut Qty / To Cut / Qty) */
.sctb-cell--subheader {
  width: 72px;
  background-color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
}

/* left column: spans 2 rows */
.sctb-cell--left-span {
  width: 140px;
  height: 88px; /* CELL_HEIGHT * 2 */
  background-color: #e5e7eb;
  font-weight: 700;
  font-size: 12px;
  color: #111827;
}

/* left column: data rows */
.sctb-cell--left-data {
  width: 140px;
  justify-content: flex-start;
  padding-left: 8px;
  background-color: #fff;
  font-size: 12px;
  color: #1f2933;
}

/* read-only data cell */
.sctb-cell--read {
  width: 72px;
  background-color: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #111827;
}

/* print icon header cell */
.sctb-cell--print-header {
  width: 60px;
  height: 88px; /* CELL_HEIGHT * 2 */
  background-color: #e5e7eb;
  font-weight: 700;
  font-size: 12px;
  color: #111827;
}

/* summary size group header (spans 3 sub-columns) */
.sctb-size-group-header {
  width: 216px; /* SIZE_COL_WIDTH * 3 */
}

/* single-size header (qty block) */
.sctb-size-single-header {
  width: 72px;
}

.avc-wrapper {
  padding: 15px;
  background: #f5f5f5;
  min-height: 100vh;
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
}

.avc-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.avc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.avc-header-icon {
  color: #3ddc84;
}

.avc-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.avc-sub {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 1px;
}

.avc-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.avc-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.avc-stripe {
  height: 4px;
}

.avc-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
}

.avc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.avc-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 5px;
}

.avc-row {
  display: flex;
  gap: 6px;
}

.avc-version {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #ede9fe;
  color: #6d28d9;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.avc-android {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #dcfce7;
  color: #15803d;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}

.avc-divider {
  height: 1px;
  background: #f3f4f6;
  margin: 0 16px;
}

.avc-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  gap: 8px;
}

.avc-scan {
  font-size: 11px;
  color: #9ca3af;
}

/* ChecklistConfiguration.css */

.cc-page {
  --cc-navy: #16234a;
  --cc-accent: #3958d9;
  --cc-amber: #e2a63b;
  --cc-bg: #eef1f8;
  --cc-ink: #1c2333;
  --cc-muted: #6e7787;
  --cc-border: #e6e9f2;

  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 7px 15px 15px;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: var(--cc-ink);
  background: var(--cc-bg);
  box-sizing: border-box;
}

.cc-page * {
  box-sizing: border-box;
}

/* ---------- Header ---------- */
.cc-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.cc-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cc-navy), var(--cc-accent));
  color: #ffffff;
  font-size: 22px;
  box-shadow: 0 8px 20px rgba(22, 35, 74, 0.22);
}

.cc-header-text {
  min-width: 0;
}

.cc-title {
  margin: 0 !important;
  font-family: "Poppins", "Inter", sans-serif !important;
  letter-spacing: -0.01em;
  color: var(--cc-navy) !important;
}

.cc-subtitle {
  color: var(--cc-muted);
  font-size: 13.5px;
}

.cc-header-summary {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 10px 20px;
  background: #ffffff;
  border: 1px solid var(--cc-border);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(22, 35, 74, 0.05);
}

.cc-header-summary-number {
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--cc-navy);
  line-height: 1.1;
}

.cc-header-summary-label {
  font-size: 11.5px;
  color: var(--cc-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- Type overview strip ---------- */
.cc-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 14px;
  gap: 14px;
  margin-bottom: 22px;
}

.cc-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--cc-border);
  background: #ffffff;
  cursor: pointer;
  font-family: inherit;
  transition:
    box-shadow 0.15s ease,
    transform 0.1s ease,
    border-color 0.15s ease;
}

.cc-stat-card:hover {
  box-shadow: 0 6px 16px rgba(22, 35, 74, 0.08);
  transform: translateY(-1px);
}

.cc-stat-active {
  border-color: var(--stat-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--stat-color) 35%, transparent);
}

.cc-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  font-size: 17px;
  color: var(--stat-color);
  background: color-mix(in srgb, var(--stat-color) 14%, white);
}

.cc-stat-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cc-stat-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cc-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-stat-meta {
  font-size: 11.5px;
  color: var(--cc-muted);
}

.cc-stat-meta-done {
  color: #1f8a52;
  font-weight: 600;
}

/* ---------- Layout ---------- */
.cc-body {
  align-items: stretch;
}

.cc-card {
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(22, 35, 74, 0.07);
}

.cc-card .ant-card-body {
  padding: 15px;
}

/* Fixed-height cards: keeps the Save button in view and confines large
   checklists (40+ items) to an internally scrolling list. */
.cc-config-card {
  height: calc(100vh - 300px);
  min-height: 520px;
  max-height: 760px;
  display: flex;
  flex-direction: column;
}

.cc-config-card .ant-card-body {
  flex: 1 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cc-fixed-top {
  flex-shrink: 0;
}

.cc-saved-card {
  background: #ffffff;
}

.cc-saved-card .ant-card-body {
  overflow: hidden;
}

.cc-saved-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-family: "Poppins", "Inter", sans-serif;
  color: var(--cc-navy);
  font-size: 15px;
}

/* ---------- Fields ---------- */
.cc-field {
  margin-bottom: 20px;
}

.cc-label {
  display: block;
  margin-bottom: 8px;
  color: var(--cc-ink);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cc-label-flush {
  margin-bottom: 0;
}

.cc-select {
  width: 100%;
}

.cc-select .ant-select-selector {
  border-radius: 10px;
}

.cc-divider {
  margin: 4px 0 0;
  border-color: var(--cc-border);
}

/* ---------- Type option / value rendering ---------- */
.cc-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.cc-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 14px;
}

/* ---------- Name field mode tag ---------- */
.cc-name-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cc-mode-tag {
  border-radius: 999px;
  font-weight: 600;
  font-size: 11.5px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cc-mode-editing {
  background: #fdf3e2;
  color: #a2701a;
}

.cc-mode-new {
  background: #eef2ff;
  color: var(--cc-accent);
}

/* ---------- Items area (this is the part that scrolls) ---------- */
.cc-items-field {
  flex: 1 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  margin-bottom: 16px;
}

.cc-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.cc-count-tag {
  border-radius: 999px;
  border: 1px solid var(--cc-border);
  background: #f6f7fb;
  color: var(--cc-muted);
  font-weight: 600;
  font-size: 12px;
}

/* ---------- Add item row ---------- */
.cc-add-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.cc-add-row .ant-input {
  flex: 1 1;
  border-radius: 10px;
}

.cc-add-btn {
  border-radius: 10px;
  background: var(--cc-accent);
  border-color: var(--cc-accent);
  font-weight: 600;
}

.cc-add-btn:hover {
  background: #2c46b8 !important;
  border-color: #2c46b8 !important;
}

/* ---------- Checklist items: internal scroll, no page growth ---------- */
.cc-items-list {
  flex: 1 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 6px;
  border: 1px solid var(--cc-border);
  border-radius: 12px;
  padding: 10px;
  background: #fafbfd;
}

.cc-items-list::-webkit-scrollbar {
  width: 8px;
}

.cc-items-list::-webkit-scrollbar-thumb {
  background: #d3d9e8;
  border-radius: 8px;
}

.cc-items-list::-webkit-scrollbar-thumb:hover {
  background: #b7bfd9;
}

.cc-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  background: #ffffff;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.cc-item-row:hover {
  border-color: #c7d2fe;
  background: #f8f9ff;
}

.cc-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cc-item-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 6px;
  background: #eef2ff;
  color: var(--cc-accent);
  font-size: 11.5px;
  font-weight: 700;
}

.cc-item-text {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-item-delete {
  opacity: 0.55;
  flex-shrink: 0;
}

.cc-item-row:hover .cc-item-delete {
  opacity: 1;
}

/* ---------- Save button: always pinned at the bottom of the card ---------- */
.cc-save-btn {
  flex-shrink: 0;
  margin-top: 4px;
  height: 46px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 15px;
  background: var(--cc-navy);
  border-color: var(--cc-navy);
  letter-spacing: 0.01em;
}

.cc-save-btn:hover {
  background: #101a38 !important;
  border-color: #101a38 !important;
}

.cc-empty-state {
  flex: 1 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cc-saved-empty-text {
  max-width: 220px;
  display: inline-block;
  color: var(--cc-muted);
  font-size: 13px;
}

/* ---------- Saved configurations ---------- */
.cc-saved-list {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 4px;
}

.cc-saved-item {
  border: 1px solid var(--cc-border);
  border-left: 4px solid var(--cc-accent);
  border-radius: 12px;
  padding: 14px 16px;
  background: #ffffff;
  cursor: pointer;
  transition:
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

.cc-saved-item:hover {
  box-shadow: 0 4px 14px rgba(22, 35, 74, 0.08);
  transform: translateY(-1px);
}

.cc-saved-item-active {
  box-shadow: 0 0 0 2px var(--cc-accent);
}

.cc-saved-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cc-saved-item-head > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cc-type-tag {
  align-self: flex-start;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
  border: 1px solid;
}

.cc-saved-name {
  font-size: 14.5px;
  font-family: "Poppins", "Inter", sans-serif;
}

.cc-saved-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  max-height: 78px;
  overflow-y: auto;
}

.cc-checked-tag {
  border-radius: 999px;
  background: #eef2ff;
  border-color: #dbe3fb;
  color: var(--cc-navy);
  font-size: 12px;
}

.cc-saved-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cc-edit-hint {
  font-size: 11.5px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .cc-page {
    padding: 26px 24px 40px;
  }
}

@media (max-width: 992px) {
  .cc-page {
    padding: 22px 16px 40px;
  }

  .cc-card .ant-card-body {
    padding: 20px;
  }

  .cc-header {
    flex-wrap: wrap;
  }

  .cc-header-summary {
    margin-left: 0;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .cc-config-card {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .cc-items-list {
    max-height: 420px;
  }

  .cc-saved-card.cc-config-card {
    height: auto;
    max-height: none;
  }

  .cc-saved-list {
    max-height: 500px;
  }
}

@media (max-width: 576px) {
  .cc-header {
    gap: 12px;
  }

  .cc-header-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 18px;
  }

  .cc-title {
    font-size: 20px !important;
  }

  .cc-stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .cc-add-row {
    flex-direction: column;
  }

  .cc-add-row .ant-btn {
    width: 100%;
  }

  .cc-saved-item-head {
    flex-direction: column;
  }

  .cc-items-header,
  .cc-name-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .cc-items-list {
    max-height: 340px;
  }
}

.lot-section {
  margin-top: 24px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.lot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(90deg, #f7f9fc 0%, #eef5ff 100%);
  border-bottom: 1px solid #e8e8e8;
  flex-wrap: wrap;
  gap: 10px;
}

.lot-title {
  font-size: 16px;
  font-weight: 600;
  color: #262626;
}

.lot-title span {
  margin-left: 8px;
  color: #1677ff;
  font-weight: 700;
}

.lot-count {
  font-size: 14px;
  color: #595959;
}

.lot-count span {
  font-weight: 600;
  color: #1677ff;
}

.lot-section .ant-table-wrapper {
  padding: 10px;
}

/* Tablet */
@media (max-width: 768px) {
  .lot-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
  }

  .lot-title {
    font-size: 15px;
  }

  .lot-count {
    font-size: 13px;
  }

  .lot-section .ant-table-wrapper {
    padding: 6px;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .lot-section {
    margin-top: 16px;
    border-radius: 8px;
  }

  .lot-header {
    padding: 10px;
  }

  .lot-title {
    font-size: 14px;
  }

  .lot-count {
    font-size: 12px;
  }

  .lot-section .ant-table-wrapper {
    padding: 4px;
  }
}

.grn-page {
  --grn-navy: #1f2a44;
  --grn-teal: #0f7c6b;
  --grn-teal-bg: #e6f5f2;
  --grn-amber: #b25e09;
  --grn-amber-bg: #fdf1e2;
  --grn-rose: #b23a48;
  --grn-rose-bg: #fceaec;
  --grn-line: #e4e8ef;
  --grn-bg: #f6f8fb;

  background: var(--grn-bg);
  padding: 7px 7px 10px;
  min-height: 100%;
}

/* ---------- Page header ---------- */
.grn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.grn-header__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grn-header__title h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--grn-navy);
  margin: 0;
  letter-spacing: 0.2px;
}

.grn-header__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--grn-teal-bg);
  color: var(--grn-teal);
  font-size: 18px;
  flex-shrink: 0;
}

.grn-header__subtitle {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #7c8698;
}

/* ---------- Filter card ---------- */
.grn-filter-card {
  background: #ffffff;
  border: 1px solid var(--grn-line);
  border-radius: 14px;
  padding: 18px 20px 14px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.grn-filter-card__label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.grn-filter-card__label-row span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #98a2b3;
}

.grn-table-scroll {
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  overflow-x: hidden;
}
.grn-filter-card__label-row svg {
  color: var(--grn-teal);
  font-size: 15px;
}

.grn-field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #475066;
  margin-bottom: 5px;
}

.grn-field-label svg {
  font-size: 12px;
  color: #9aa4b8;
}

.tiny-range-picker {
  width: 230px;
}

.grn-filter-card__actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.grn-btn-submit button,
.grn-btn-submit .ant-btn {
  background: var(--grn-teal);
  border-color: var(--grn-teal);
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.grn-btn-clear button,
.grn-btn-clear .ant-btn {
  border-radius: 8px;
  border-color: var(--grn-line);
  color: #667085;
  font-weight: 600;
}

.grn-print-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.grn-print-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--grn-line);
  color: var(--grn-navy);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.grn-print-pill:hover {
  border-color: var(--grn-teal);
  color: var(--grn-teal);
  background: var(--grn-teal-bg);
}

/* ---------- Results summary strip ---------- */
.grn-summary-strip {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #ffffff;
  border: 1px solid var(--grn-line);
  border-radius: 10px;
  padding: 11px 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.grn-summary-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.grn-summary-icon {
  font-size: 13px;
  opacity: 0.7;
}

.grn-summary-label {
  font-size: 12.5px;
  color: #667085;
  font-weight: 400;
}

.grn-summary-value {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--grn-navy);
  background: #f2f4f7;
  padding: 2px 9px;
  border-radius: 6px;
  line-height: 1.6;
}

.grn-divider {
  width: 1px;
  height: 18px;
  background: var(--grn-line);
  flex-shrink: 0;
}

.grn-table-shell {
  background: #ffffff;
  border: 1px solid var(--grn-line);
  border-radius: 14px;
  padding: 6px;
}

.grn-table-shell .ant-table-wrapper,
.grn-table-shell .ant-table {
  border-radius: 10px;
}

.grn-table-shell .ant-table-thead > tr > th {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
}

/* Header background + text */
.grn-table-shell .ant-table-thead > tr > th {
  background: var(--grn-navy) !important;
  color: #eef1f6 !important;
}

.grn-table-shell .ant-table-thead > tr > th::before {
  display: none !important;
}

/* Header hover — distinct from row hover color */
.grn-table-shell .ant-table-thead > tr > th:hover {
  background: var(--grn-teal) !important;
  color: #ffffff !important;
}

/* Search / filter icon in the header — default AntD icon is dark,
   invisible against the navy header, so make it visible + give it
   hover/active states. */
.grn-table-shell .ant-table-thead .ant-table-filter-trigger {
  color: rgba(255, 255, 255, 0.75) !important;
}

.grn-table-shell .ant-table-thead .ant-table-filter-trigger:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15) !important;
}

.grn-table-shell .ant-table-thead .ant-table-filter-trigger.active {
  color: var(--grn-teal) !important;
  background: #ffffff !important;
  border-radius: 4px;
}

/* Sort arrows, same treatment */
.grn-table-shell .ant-table-thead .ant-table-column-sorter {
  color: rgba(255, 255, 255, 0.55) !important;
}

.grn-table-shell .ant-table-thead .ant-table-column-sorter-up.active,
.grn-table-shell .ant-table-thead .ant-table-column-sorter-down.active {
  color: #ffffff !important;
}

/* Body rows: zebra striping + distinct hover */
.grn-table-shell .ant-table-tbody > tr > td {
  padding: 11px 14px !important;
  font-size: 13px;
  color: #344054;
  border-bottom: 1px solid #eef1f6;
}

.grn-row-even > td {
  background: #ffffff;
}

.grn-row-odd > td {
  background: #f9fafc;
}

.grn-table-shell .ant-table-tbody > tr:hover > td {
  background: var(--grn-teal-bg);
}

/* Date column emphasis */
.grn-cell-date {
  font-weight: 600;
  color: var(--grn-navy);
}

/* GRN / PO number chips */
.grn-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #eef1f6;
  color: var(--grn-navy);
  font-weight: 600;
  font-size: 12px;
}

.grn-qty-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.grn-qty-badge--excess {
  background: var(--grn-teal-bg);
  color: var(--grn-teal);
}

.grn-qty-badge--shortage {
  background: var(--grn-rose-bg);
  color: var(--grn-rose);
}

.grn-qty-badge--neutral {
  background: #eef1f6;
  color: #667085;
}

/* Items action button */
.grn-items-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--grn-teal-bg);
  color: var(--grn-teal);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.grn-items-btn:hover {
  background: var(--grn-teal);
  color: #ffffff;
}

/* Empty state */
.grn-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  color: #98a2b3;
  gap: 8px;
}

.grn-empty svg {
  font-size: 28px;
  color: #c3cbdb;
}

.grn-empty p {
  margin: 0;
  font-size: 13px;
}

/* Sticky header */
.grn-table-shell .ant-table-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (max-width: 640px) {
  .grn-filter-card__actions {
    width: 100%;
    justify-content: flex-start;
  }
  .tiny-range-picker {
    width: 100%;
  }
}

.grn-group-block {
  margin-bottom: 20px;
}

.grn-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-weight: 600;
  background-color: #f5f7fa;
  border-bottom: 1px solid #e5e7eb;
}
.grn-group-header__divider {
  color: #9ca3af;
}

.grn-overall-grand-total {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 12px 16px;
  margin-top: 8px;
  font-weight: 700;
  background-color: #eaf1ff;
  border-radius: 6px;
}
.grn-overall-grand-total__label {
  color: #0f3460;
}

.grn-group-header-row td {
  background: #f0f5ff !important;
  font-weight: 600;
}
.grn-group-total-row td {
  background: #fafafa !important;
  border-top: 1px solid #d9d9d9;
}

/* ---------------------------------------------------
   Design tokens — indigo/navy "security badge" motif
--------------------------------------------------- */
.lbp-page {
  --lbp-ink: #1c2140;
  --lbp-paper: #f2f4fa;
  --lbp-panel: #ffffff;
  --lbp-brand: #5850ec;
  --lbp-brand-dark: #201c5c;
  --lbp-brand-soft: #e2e0fc;
  --lbp-amber: #dc9a2e;
  --lbp-amber-soft: #f6e4bf;
  --lbp-green: #17945f;
  --lbp-green-soft: #d3efe0;
  --lbp-red: #e0405c;
  --lbp-red-soft: #fbdce2;
  --lbp-line: #e1e3f1;
  --lbp-muted: #51587a;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  background: var(--lbp-paper);
  color: var(--lbp-ink);
  font-family: var(--font-body);
  padding: 28px 32px 60px;
  min-height: 100%;
  box-sizing: border-box;
}

.lbp-page *,
.lbp-page *::before,
.lbp-page *::after {
  box-sizing: border-box;
}

/* ---------------------------------------------------
   Header
--------------------------------------------------- */
.lbp-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.lbp-header__badge {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--lbp-brand-dark);
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 0 rgba(32, 28, 92, 0.25);
}

.lbp-header__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0.2px;
  margin: 0;
  color: var(--lbp-brand-dark);
}

.lbp-header__subtitle {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: var(--lbp-muted);
}

/* ---------------------------------------------------
   Status stamps — counters
--------------------------------------------------- */
.lbp-stamps {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  grid-gap: 14px;
  gap: 14px;
  margin-bottom: 24px;
}

.lbp-stamp {
  position: relative;
  font-family: var(--font-body);
  background: var(--lbp-panel);
  border: 2px solid var(--lbp-line);
  border-radius: 14px;
  padding: 16px 14px 14px;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lbp-stamp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(28, 33, 64, 0.08);
}

.lbp-stamp:focus-visible {
  outline: 2px solid var(--lbp-brand);
  outline-offset: 2px;
}

.lbp-stamp__count {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 28px;
  color: var(--lbp-ink);
}

.lbp-stamp__label {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lbp-muted);
}

.lbp-stamp--all.is-active {
  border-color: var(--lbp-brand);
  background: var(--lbp-brand-soft);
}
.lbp-stamp--all.is-active .lbp-stamp__count {
  color: var(--lbp-brand-dark);
}

.lbp-stamp--progress.is-active {
  border-color: var(--lbp-amber);
  background: var(--lbp-amber-soft);
}
.lbp-stamp--progress.is-active .lbp-stamp__count {
  color: #8a5c14;
}

.lbp-stamp--completed.is-active {
  border-color: var(--lbp-green);
  background: var(--lbp-green-soft);
}
.lbp-stamp--completed.is-active .lbp-stamp__count {
  color: #0e6b45;
}

/* ---------------------------------------------------
   Department snapshot strip
--------------------------------------------------- */
.lbp-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.lbp-overview__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: var(--lbp-panel);
  border: 1px solid var(--lbp-line);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  min-width: 128px;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.lbp-overview__card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(28, 33, 64, 0.06);
}

.lbp-overview__card.is-active {
  border-color: var(--lbp-brand);
  background: var(--lbp-brand-soft);
}

.lbp-overview__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--lbp-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lbp-overview__figure {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 20px;
  color: var(--lbp-brand-dark);
}

.lbp-overview__of {
  font-size: 13px;
  color: var(--lbp-muted);
  font-weight: 500;
}

.lbp-overview__label {
  font-size: 11px;
  color: var(--lbp-muted);
}

/* ---------------------------------------------------
   Filter rail
--------------------------------------------------- */
.lbp-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  padding: 10px 12px;
  background: var(--lbp-panel);
  border: 1px solid var(--lbp-line);
  border-radius: 12px;
}

.lbp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--lbp-paper);
  border: 1px solid var(--lbp-line);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--lbp-muted);
  min-width: 200px;
}

.lbp-search input {
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--lbp-ink);
  width: 100%;
}

.lbp-filters__select {
  min-width: 170px;
}

.lbp-filters .ant-btn-primary {
  background: var(--lbp-brand) !important;
  border-color: var(--lbp-brand) !important;
}

.lbp-filters__spacer {
  flex: 1 1;
}

.lbp-linkbtn {
  background: none;
  border: none;
  color: var(--lbp-brand);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}

.lbp-linkbtn:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------
   Date groups — divider
--------------------------------------------------- */
.lbp-groups {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.lbp-group__divider {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--lbp-line);
}

.lbp-group__date {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--lbp-brand-dark);
  letter-spacing: 0.02em;
}

.lbp-group__count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--lbp-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------------------------------------------------
   Department subgroups within a date
--------------------------------------------------- */
.lbp-depts {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.lbp-dept__header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 10px;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: 8px;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.lbp-dept__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--lbp-line);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lbp-dept__header:hover {
  background: var(--lbp-brand-soft);
  border-color: var(--lbp-brand);
}

.lbp-dept__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lbp-dept__right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.lbp-dept__chevron {
  color: var(--lbp-muted);
  transition: transform 0.2s ease;
}

.lbp-dept__chevron.is-open {
  transform: rotate(90deg);
}

.lbp-dept__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--lbp-brand-dark);
  white-space: nowrap;
}

.lbp-dept__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 18px;
  background: var(--lbp-brand-soft);
  border: 1px solid var(--lbp-brand);
  color: var(--lbp-brand-dark);
  font-weight: 700;
  font-family: var(--font-mono);
}

.lbp-dept__chip small {
  font-size: 11px;
  color: var(--lbp-muted);
  font-weight: 600;
}

.lbp-dept__header:hover {
  background: var(--lbp-brand-soft);
}

.lbp-dept__chevron {
  color: var(--lbp-muted);
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.lbp-dept__chevron.is-open {
  transform: rotate(90deg);
}

.lbp-dept__name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--lbp-brand-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--lbp-brand-soft);
  padding: 3px 10px;
  border-radius: 6px;
}

.lbp-dept__count {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--lbp-muted);
}

/* ---------------------------------------------------
   Tickets — employee entries
--------------------------------------------------- */
.lbp-tickets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: lbp-fade-in 0.18s ease;
}

@keyframes lbp-fade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lbp-ticket {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr 90px 110px;
  align-items: center;
  grid-gap: 20px;
  gap: 20px;
  background: var(--lbp-panel);
  border: 1px solid var(--lbp-line);
  border-radius: 10px;
  padding: 14px 20px;
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.lbp-ticket:hover {
  box-shadow: 0 4px 12px rgba(28, 33, 64, 0.07);
  border-color: #c7cbe6;
}

.lbp-dept__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, #5850ec, #6c63ff);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
}

.lbp-dept__chip small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.9;
}
.lbp-dept__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, #5850ec, #6c63ff);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
}

.lbp-dept__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, #5850ec, #6c63ff);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
}

.lbp-dept__chip small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.9;
}

.lbp-ticket::before,
.lbp-ticket::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--lbp-paper);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
}
.lbp-ticket::before {
  left: -7px;
}
.lbp-ticket::after {
  right: -7px;
}

.lbp-ticket--progress {
  box-shadow: inset 3px 0 0 var(--lbp-amber);
}

/* prevent grid items from overflowing into neighboring columns */
.lbp-ticket > * {
  min-width: 0;
}

/* person */
.lbp-ticket__person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 0 0 auto;
}

.lbp-ticket__avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lbp-brand-dark);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
}

.lbp-ticket__avatar,
.lbp-avatar {
  flex-shrink: 0;
}

.lbp-ticket__name {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--lbp-ink);
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 10px;
}

.lbp-ticket__avatar-img.ant-image {
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
  display: inline-block;
}

.lbp-ticket__avatar-img .ant-image-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.8);
}

.lbp-avatar {
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
}

.lbp-avatar > .ant-image {
  width: 100%;
  height: 100%;
}

.lbp-avatar > .ant-image > .ant-image-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
/* actual time */
.lbp-ticket__times {
  font-size: 12.5px;
  color: var(--lbp-muted);
  font-family: var(--font-mono);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 35px;
}

.lbp-ticket__times b {
  color: var(--lbp-ink);
  font-weight: 600;
}

/* duration */
.lbp-ticket__duration {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  color: var(--lbp-brand-dark);
  text-align: center;
}

/* status stamp */
.lbp-stampmark {
  justify-self: end;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1.5px solid currentColor;
}

.lbp-stampmark--completed {
  color: var(--lbp-green);
}
.lbp-stampmark--progress {
  color: var(--lbp-amber);
}

/* ---------------------------------------------------
   Empty state
--------------------------------------------------- */
.lbp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 60px 20px;
  color: var(--lbp-muted);
  text-align: center;
  border: 2px dashed var(--lbp-line);
  border-radius: 14px;
  background: var(--lbp-panel);
}

.lbp-empty p {
  margin: 6px 0 0;
  font-weight: 600;
  color: var(--lbp-ink);
  font-size: 14.5px;
}

.lbp-empty span {
  font-size: 12.5px;
}

/* ---------------------------------------------------
   Responsive
--------------------------------------------------- */
@media (max-width: 900px) {
  .lbp-stamps {
    grid-template-columns: repeat(2, 1fr);
  }
  .lbp-overview {
    gap: 8px;
  }
  .lbp-overview__card {
    min-width: 108px;
  }
  .lbp-ticket {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
  .lbp-ticket__duration {
    text-align: left;
  }
  .lbp-stampmark {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .lbp-page {
    padding: 18px 16px 40px;
  }
  .lbp-stamps {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------
   Motion & accessibility
--------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .lbp-stamp {
    transition: none;
  }
}

.lbp-page :focus-visible {
  outline: 2px solid var(--lbp-brand);
  outline-offset: 2px;
}

.end-table-qc-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.qc-section-card {
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
}

.qc-section-card .ant-card-head {
  border-bottom: 2px solid #f0f0f0;
  min-height: 48px;
}

.qc-section-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #1f1f1f;
}

.end-table-qc-comments-row {
  margin-top: 16px;
}

.end-table-qc-defect-images {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.end-table-qc-defect-thumb-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.end-table-qc-defect-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.end-table-qc-defect-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qc-comments-box {
  background: #f7f9fc;
  border: 1px solid #eaeef3;
  border-left: 3px solid #0f3460;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.qc-comments-attachments-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ---------- Page layout ---------- */
.label-template-builder-page {
  padding: 32px 40px;
  background: linear-gradient(180deg, #f8f9fd 0%, #f1f3f9 100%);
  min-height: 100vh;
}

.label-template-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.label-template-builder-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1d29;
  letter-spacing: -0.3px;
}

.label-template-builder-subtitle {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: #9aa0ac;
  font-weight: 500;
}

/* ---------- Search ---------- */
.label-template-search-input {
  width: 320px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid #e8eaf0;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.label-template-search-input:hover,
.label-template-search-input:focus-within {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.label-template-search-icon {
  color: #b0b5c0;
}

/* ---------- Grid item ---------- */
.label-template-list-item {
  width: 100%;
}

/* ---------- Card base ---------- */
.label-template-card-style {
  position: relative;
  width: 100%;
  height: 110px;
  border-radius: 14px;
  border: 1px solid #eef0f5;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 10px;
  box-sizing: border-box;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.label-template-card-style:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.09);
  border-color: transparent;
}

/* Scoped to antd's inner body div — NOT the card itself, so the
   fixed height above isn't overridden (see note above the code) */
.label-template-card-style .ant-card-body {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Top accent bar, revealed on hover */
.label-template-card-accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  opacity: 0.85;
  transform: scaleX(0.3);
  transition: transform 0.25s ease;
}

.label-template-card-style:hover .label-template-card-accent-bar {
  transform: scaleX(1);
}

/* ---------- Icon badge ---------- */
.label-template-card-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.label-template-card-style:hover .label-template-card-icon-wrapper {
  transform: scale(1.08);
}

.label-template-card-icon {
  font-size: 14px;
}

/* ---------- Title ---------- */
.label-template-header-title {
  margin: 0;
  width: 100%;
  font-size: 0.8rem;
  font-weight: 600;
  color: #262a35;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ---------- Color themes ---------- */
.label-template-theme-indigo .label-template-card-accent-bar {
  background: #6366f1;
}
.label-template-theme-indigo .label-template-card-icon-wrapper {
  background: #eef0ff;
}
.label-template-theme-indigo .label-template-card-icon {
  color: #6366f1;
}

.label-template-theme-teal .label-template-card-accent-bar {
  background: #14b8a6;
}
.label-template-theme-teal .label-template-card-icon-wrapper {
  background: #e6fbf8;
}
.label-template-theme-teal .label-template-card-icon {
  color: #0d9488;
}

.label-template-theme-amber .label-template-card-accent-bar {
  background: #f59e0b;
}
.label-template-theme-amber .label-template-card-icon-wrapper {
  background: #fef6e7;
}
.label-template-theme-amber .label-template-card-icon {
  color: #d97706;
}

.label-template-theme-rose .label-template-card-accent-bar {
  background: #f43f5e;
}
.label-template-theme-rose .label-template-card-icon-wrapper {
  background: #ffeef1;
}
.label-template-theme-rose .label-template-card-icon {
  color: #e11d48;
}

.label-template-theme-violet .label-template-card-accent-bar {
  background: #8b5cf6;
}
.label-template-theme-violet .label-template-card-icon-wrapper {
  background: #f4effe;
}
.label-template-theme-violet .label-template-card-icon {
  color: #7c3aed;
}

.label-template-theme-cyan .label-template-card-accent-bar {
  background: #06b6d4;
}
.label-template-theme-cyan .label-template-card-icon-wrapper {
  background: #e6fbfd;
}
.label-template-theme-cyan .label-template-card-icon {
  color: #0891b2;
}

.label-template-theme-emerald .label-template-card-accent-bar {
  background: #10b981;
}
.label-template-theme-emerald .label-template-card-icon-wrapper {
  background: #e9fbf3;
}
.label-template-theme-emerald .label-template-card-icon {
  color: #059669;
}

.label-template-theme-orange .label-template-card-accent-bar {
  background: #f97316;
}
.label-template-theme-orange .label-template-card-icon-wrapper {
  background: #fff1e6;
}
.label-template-theme-orange .label-template-card-icon {
  color: #ea580c;
}

/* ---------- Empty state ---------- */
.label-template-empty-state {
  padding: 56px 0;
  color: #9ca3af;
}

.label-template-empty-state-icon {
  font-size: 34px;
  margin-bottom: 10px;
  color: #c7cbd4;
}

.template-builder-grid {
  width: 100%;
  padding: 4px 0;
}

.template-builder-list {
  width: 100%;
}

.template-builder-list .ant-list-item {
  padding: 0;
}

.template-builder-card {
  position: relative;
  height: 172px;
  overflow: hidden;

  border: 1px solid #e7eaf0;
  border-radius: 16px;

  background: #ffffff;

  cursor: pointer;

  box-shadow:
    0 2px 5px rgba(15, 52, 96, 0.03),
    0 8px 24px rgba(15, 52, 96, 0.06);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

/* top accent */

.template-card-accent {
  position: absolute;

  top: 0;
  left: 0;

  width: 100%;
  height: 3px;

  opacity: 0.9;

  transform: scaleX(0.15);
  transform-origin: left;

  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* hover */

.template-builder-card:hover {
  transform: translateY(-5px);

  border-color: #d9dee7;

  box-shadow:
    0 5px 12px rgba(15, 52, 96, 0.06),
    0 18px 38px rgba(15, 52, 96, 0.11);
}

.template-builder-card:hover .template-card-accent {
  transform: scaleX(1);
  opacity: 1;
}

.template-card-content {
  position: relative;

  height: 100%;

  display: flex;
  flex-direction: column;

  padding: 0 16px;
}

.template-card-top {
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid #f0f2f5;
}

.template-card-title-wrap {
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 9px;
}

.template-card-dot {
  width: 6px;
  height: 6px;

  flex: 0 0 auto;

  border-radius: 50%;

  box-shadow: 0 0 0 4px rgba(15, 52, 96, 0.04);
}

.template-card-title {
  margin: 0;

  color: #252d3a;

  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-card-arrow {
  width: 27px;
  height: 27px;

  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  background: #f7f8fa;

  font-size: 15px;
  font-weight: 600;

  opacity: 0.55;

  transition:
    transform 0.25s ease,
    opacity 0.25s ease,
    background 0.25s ease;
}

.template-builder-card:hover .template-card-arrow {
  transform: translate(2px, -2px);

  opacity: 1;

  background: #f2f4f7;
}

.template-card-main {
  flex: 1 1;

  display: flex;
  align-items: center;

  padding-top: 5px;
}

/* icon container */

.template-card-icon {
  position: relative;

  width: 58px;
  height: 58px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 15px;

  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 10%, #ffffff),
    #ffffff
  );

  border: 1px solid color-mix(in srgb, var(--accent) 17%, #e7eaf0);

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* soft glow */

.template-card-icon::before {
  content: "";

  position: absolute;

  width: 36px;
  height: 36px;

  border-radius: 50%;

  border: 1px dashed color-mix(in srgb, var(--accent) 28%, transparent);

  opacity: 0.65;
}

/* icon */

.template-card-icon-inner {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--accent);

  font-size: 23px;

  transition: transform 0.3s ease;
}

.template-builder-card:hover .template-card-icon {
  transform: translateY(-2px) scale(1.06);

  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 17%, transparent);
}

.template-builder-card:hover .template-card-icon-inner {
  transform: scale(1.08);
}

.template-card-footer {
  height: 34px;

  display: flex;
  align-items: center;
  gap: 8px;
}

.template-card-label {
  color: #9aa2ae;

  font-size: 10px;
  font-weight: 500;

  letter-spacing: 0.25px;

  white-space: nowrap;
}

.template-card-line {
  width: 22px;
  height: 2px;

  border-radius: 10px;

  opacity: 0.35;

  transition:
    width 0.3s ease,
    opacity 0.3s ease;
}

.template-builder-card:hover .template-card-line {
  width: 38px;
  opacity: 0.75;
}

@media (max-width: 1200px) {
  .template-builder-card {
    height: 165px;
  }
}

@media (max-width: 992px) {
  .template-builder-card {
    height: 158px;
  }

  .template-card-top {
    height: 49px;
  }

  .template-card-icon {
    width: 54px;
    height: 54px;
  }
}

@media (max-width: 576px) {
  .template-builder-card {
    height: 150px;
    border-radius: 14px;
  }

  .template-card-content {
    padding: 0 14px;
  }

  .template-card-top {
    height: 47px;
  }

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

  .template-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 13px;
  }

  .template-card-footer {
    height: 31px;
  }
}

/* Buyer-wise label template cards (LabelTemplateBuilder card view).
   Uses the accent theme classes from PrintTemplateBuilder.css. */

.label-buyer-card {
  position: relative;
  width: 100%;
  border-radius: 14px;
  border: 1px solid #eef0f5;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
  overflow: hidden;
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.label-buyer-card:hover {
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.09);
}

.label-buyer-card:hover .label-template-card-accent-bar {
  transform: scaleX(1);
}

.label-buyer-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid #f0f2f5;
}

.label-buyer-card-head .label-template-card-icon-wrapper {
  margin-bottom: 0;
}

.label-buyer-card-titles {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.label-buyer-card-name {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #262a35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.label-buyer-card-type {
  font-size: 0.7rem;
  color: #9aa0ac;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.label-buyer-version {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.78rem;
  color: #262a35;
  cursor: pointer;
  border-bottom: 1px solid #f6f7f9;
  transition: background 0.15s ease;
}

.label-buyer-version:hover {
  background: #f7f8fc;
}

.label-buyer-version-empty {
  cursor: default;
  color: #9aa0ac;
}

.label-buyer-version-name {
  flex: 1 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.label-buyer-meta {
  color: #9aa0ac;
  font-weight: 400;
}

.label-buyer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #6366f1;
}

.label-buyer-dot-default {
  background: #10b981;
}

.label-buyer-edit {
  color: #b0b5c0;
}

.label-buyer-delete {
  color: #cbd0d8;
  cursor: pointer;
}

.label-buyer-delete:hover {
  color: #e11d48;
}

.label-buyer-card-foot {
  padding: 8px 14px 12px;
}

.label-buyer-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px dashed #c7cbe0;
  border-radius: 8px;
  background: #fafbff;
  color: #4f46e5;
  font-size: 0.75rem;
  white-space: nowrap;
  cursor: pointer;
}

.label-buyer-add:hover {
  border-color: #6366f1;
  background: #eef0ff;
}

.label-buyer-modal-note {
  color: #64748b;
  margin-top: 0;
}

/* ============================================================================
   TemplateView.css — complete stylesheet for the Label Studio designer.
   Every utility is namespaced with `template-view-` and scoped so it cannot
   leak into the host application.

   Structure:
     0. Scoped reset + ring/shadow composition variables
     1. Root shell
     2. Display / position
     3. Flexbox & grid
     4. Sizing
     5. Spacing
     6. Typography
     7. Colours (text / background / gradients)
     8. Borders, radius, outline, ring
     9. Effects (shadow, opacity, transform, transition, cursor, filters)
    10. Interaction states (hover / focus / active / group-hover)
    11. Component-level rules
    12. Inspector tab bar / toolbar

   ── FIXES IN THIS VERSION ──────────────────────────────────────────────
   1. SPECIFICITY BUG (this was the "text turns white" / general clashing
      issue): the old reset used `.template-view-root button { … }` — a
      CLASS + ELEMENT compound selector, specificity (0,1,1). Every colour
      utility (`.template-view-text-white`, `.template-view-bg-slate-900`,
      etc.) is a single class, specificity (0,1,0). Because (0,1,1) beats
      (0,1,0) *regardless of source order*, the reset's `color: inherit`,
      `background: none` and `padding: 0` were silently winning over ANY
      colour/background/padding utility applied directly to a <button> —
      e.g. the "Update" button's `text-white`, the Preview panel's
      "This record / All records" toggle (`bg-slate-900 text-white` when
      active), and any `Tog`/`Mini` button state. Wrapping the reset in
      `:where(...)` drops its specificity to zero, so it only contributes
      the `.template-view-root` class (0,1,0) — the same as every utility —
      and normal source order (reset first, utilities after) decides, the
      way it was clearly intended to.
   2. Native <select>/<input> controls can silently render their dropdown
      text using the OS/browser dark colour scheme even though the control
      itself is styled light, which shows up as invisible white-on-white
      text. `color-scheme: light` on the root, plus an explicit (non-
      "inherit") text colour on form controls, pins them to the app's own
      palette regardless of the user's OS theme.
   3. Every "indigo" accent (buttons, focus rings, selected states, the
      header logo gradient, tab/toolbar active states) now derives from
      the app's primary colour, #15325d, via the --tv-primary-* scale
      defined on .template-view-root. Change --tv-primary-500 to re-theme
      the whole app from one place. Semantic colours (emerald = success,
      rose = danger, amber = warning) are untouched on purpose.
   ========================================================================== */

/* ── 0. Scoped reset ─────────────────────────────────────────────────────── */

.template-view-root,
.template-view-root *,
.template-view-root *::before,
.template-view-root *::after {
  box-sizing: border-box;
  /* Tailwind-style ring/shadow composition: both utilities write the same
     box-shadow expression, so `shadow-xl ring-1` no longer clobber each other. */
  --tv-ring: 0 0 #0000;
  --tv-shadow: 0 0 #0000;
  --tv-ring-color: #e2e8f0;
}

/* FIX (specificity): :where() keeps these resets at the same specificity as
   a plain utility class, so a colour/background/padding utility applied to
   a button/input/select/textarea always wins, instead of losing to the
   reset the way it silently did before. */
.template-view-root :where(button, input, select, textarea) {
  font: inherit;
  color: #0f172a;
  color: var(--tv-text, #0f172a);
  margin: 0;
}

.template-view-root :where(button) {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.template-view-root :where(input[type="range"]) {
  cursor: pointer;
}

.template-view-root :where(textarea) {
  resize: vertical;
}

.template-view-root table {
  border-spacing: 0;
}

.template-view-root img,
.template-view-root svg {
  display: block;
}

.template-view-root pre {
  margin: 0;
}

.template-view-root p {
  margin: 0;
}

/* ── 1. Root shell ───────────────────────────────────────────────────────── */

/* The component is rendered inside a host modal that already has a title bar,
   so 100vh overflows. It fills its parent by default; override --tv-height if
   you mount it full-screen. The parent MUST have a resolved height. */
.template-view-root {
  width: 100%;
  height: 100%;
  height: var(--tv-height, 100%);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f1f5f9;
  color: #0f172a;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* FIX (white-text / dark-mode select bug): pins every native form control
     inside the designer (select, input, their dropdown/option rendering) to
     the light scheme regardless of the host OS/browser theme, so option
     text can never silently render white-on-white. */
  color-scheme: light;

  /* Primary brand colour — every former "indigo" utility below now reads
     from this scale. Base value matches the app's primary, #15325d;
     lighter/darker stops are used for tints, hovers and active states.
     Re-theme the whole designer by changing --tv-primary-500 alone. */
  --tv-primary-50: #eef2f6;
  --tv-primary-100: #dce4ed;
  --tv-primary-200: #b7c5d9;
  --tv-primary-300: #8ca0bf;
  --tv-primary-400: #4c6386;
  --tv-primary-500: #15325d;
  --tv-primary-600: #102748;
  --tv-primary-700: #0c1e38;
  --tv-primary-800: #081527;
  --tv-primary-50-rgb: 220, 227, 236;
  --tv-primary-400-rgb: 76, 99, 134;
  --tv-text: #0f172a;
}

/* ── 2. Display / position ───────────────────────────────────────────────── */

.template-view-block {
  display: block;
}
.template-view-inline {
  display: inline;
}
.template-view-inline-block {
  display: inline-block;
}
.template-view-inline-grid {
  display: inline-grid;
}
.template-view-flex {
  display: flex;
}
.template-view-grid {
  display: grid;
}
.template-view-hidden {
  display: none;
}

.template-view-relative {
  position: relative;
}
.template-view-absolute {
  position: absolute;
}
.template-view-fixed {
  position: fixed;
}

.template-view-inset-0 {
  inset: 0;
}
.template-view-top-0 {
  top: 0;
}
.template-view-top-2 {
  top: 0.5rem;
}
/* Negative offset — used by the floating block toolbar so it sits above the
   element. Kept distinct from `top-2`, which previously collided with it. */
.template-view--top-2 {
  top: -0.5rem;
}
.template-view-right-0 {
  right: 0;
}
.template-view-right-0-5 {
  right: 0.125rem;
}
.template-view-right-1 {
  right: -0.25rem;
} /* intentionally negative: resize grip overhang */
.template-view-right-3px {
  right: -3px;
} /* intentionally negative: column splitter */
.template-view-bottom-1 {
  bottom: -0.25rem;
} /* intentionally negative: resize grip overhang */
.template-view-bottom-5 {
  bottom: 1.25rem;
}
.template-view-left-1 {
  left: 0.25rem;
}
.template-view-left-2 {
  left: 0.5rem;
}
.template-view-left-1-2 {
  left: 50%;
}

.template-view-z-0 {
  z-index: 0;
}
.template-view-z-1 {
  z-index: 1;
}
.template-view-z-10 {
  z-index: 10;
}
.template-view-z-20 {
  z-index: 20;
}
.template-view-z-50 {
  z-index: 50;
}

.template-view-overflow-auto {
  overflow: auto;
}
.template-view-overflow-hidden {
  overflow: hidden;
}
.template-view-pointer-events-none {
  pointer-events: none;
}

/* ── 3. Flexbox & grid ───────────────────────────────────────────────────── */

.template-view-flex-1 {
  flex: 1 1;
}
.template-view-flex-col {
  flex-direction: column;
}
.template-view-flex-wrap {
  flex-wrap: wrap;
}
.template-view-shrink-0 {
  flex-shrink: 0;
}
.template-view-grow {
  flex-grow: 1;
}

.template-view-items-center {
  align-items: center;
}
.template-view-items-start {
  align-items: flex-start;
}
.template-view-justify-center {
  justify-content: center;
}
.template-view-justify-between {
  justify-content: space-between;
}

.template-view-grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.template-view-grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.template-view-place-items-center {
  place-items: center;
}

.template-view-gap-0-5 {
  gap: 0.125rem;
}
.template-view-gap-1 {
  gap: 0.25rem;
}
.template-view-gap-1-5 {
  gap: 0.375rem;
}
.template-view-gap-2 {
  gap: 0.5rem;
}
.template-view-gap-2-5 {
  gap: 0.625rem;
}
.template-view-gap-3 {
  gap: 0.75rem;
}

.template-view-ml-auto {
  margin-left: auto;
}
.template-view-mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* ── 4. Sizing ───────────────────────────────────────────────────────────── */

.template-view-w-px {
  width: 1px;
}
.template-view-w-0 {
  width: 0;
}
.template-view-w-2px {
  width: 2px;
}
.template-view-w-3 {
  width: 0.75rem;
}
.template-view-w-5 {
  width: 1.25rem;
}
.template-view-w-6 {
  width: 1.5rem;
}
.template-view-w-6px {
  width: 6px;
}
.template-view-w-7 {
  width: 1.75rem;
}
.template-view-w-8 {
  width: 2rem;
}
.template-view-w-14 {
  width: 3.5rem;
}
.template-view-w-24 {
  width: 6rem;
}
.template-view-w-64 {
  width: 16rem;
}
.template-view-w-336px {
  width: 336px;
}
.template-view-w-full {
  width: 100%;
}
.template-view-w-calc-100-0-75rem {
  width: calc(100% - 0.75rem);
}
.template-view-min-w-0 {
  min-width: 0;
}

.template-view-h-2-5 {
  height: 0.625rem;
}
.template-view-h-3 {
  height: 0.75rem;
}
.template-view-h-3px {
  height: 3px;
}
.template-view-h-4 {
  height: 1rem;
}
.template-view-h-5 {
  height: 1.25rem;
}
.template-view-h-6 {
  height: 1.5rem;
}
.template-view-h-7 {
  height: 1.75rem;
}
.template-view-h-8 {
  height: 2rem;
}
.template-view-h-14 {
  height: 3.5rem;
}
.template-view-h-16 {
  height: 4rem;
}
.template-view-h-20 {
  height: 5rem;
}
.template-view-h-32 {
  height: 8rem;
}
.template-view-h-380px {
  height: 380px;
}
.template-view-h-520px {
  height: 520px;
}
.template-view-h-full {
  height: 100%;
}
.template-view-h-screen {
  height: 100vh;
}

.template-view-min-h-0 {
  min-height: 0;
}
.template-view-min-h-18px {
  min-height: 18px;
}

/* ── 5. Spacing ──────────────────────────────────────────────────────────── */

.template-view-p-0 {
  padding: 0;
}
.template-view-p-1px {
  padding: 1px;
}
.template-view-p-0-5 {
  padding: 0.125rem;
}
.template-view-p-1 {
  padding: 0.25rem;
}
.template-view-p-1-5 {
  padding: 0.375rem;
}
.template-view-p-2 {
  padding: 0.5rem;
}
.template-view-p-2-5 {
  padding: 0.625rem;
}
.template-view-p-3 {
  padding: 0.75rem;
}
.template-view-p-6 {
  padding: 1.5rem;
}
.template-view-p-8 {
  padding: 2rem;
}

.template-view-px-0-5 {
  padding-left: 0.125rem;
  padding-right: 0.125rem;
}
.template-view-px-1 {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}
.template-view-px-1-5 {
  padding-left: 0.375rem;
  padding-right: 0.375rem;
}
.template-view-px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.template-view-px-2-5 {
  padding-left: 0.625rem;
  padding-right: 0.625rem;
}
.template-view-px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.template-view-px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.template-view-py-0-5 {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}
.template-view-py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.template-view-py-1-5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}
.template-view-py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.template-view-py-2-5 {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}
.template-view-py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.template-view-pt-2-5 {
  padding-top: 0.625rem;
}
.template-view-pr-2 {
  padding-right: 0.5rem;
}
.template-view-pl-5 {
  padding-left: 1.25rem;
}
.template-view-pl-6 {
  padding-left: 1.5rem;
}
.template-view-pl-26px {
  padding-left: 26px;
}

.template-view-mb-1 {
  margin-bottom: 0.25rem;
}
.template-view-mb-1-5 {
  margin-bottom: 0.375rem;
}
.template-view-mb-2 {
  margin-bottom: 0.5rem;
}
.template-view-mb-3 {
  margin-bottom: 0.75rem;
}
.template-view-mb-4 {
  margin-bottom: 1rem;
}
.template-view-mt-1 {
  margin-top: 0.25rem;
}
.template-view-mt-2 {
  margin-top: 0.5rem;
}
.template-view-mt-4 {
  margin-top: 1rem;
}
.template-view-mt-6 {
  margin-top: 1.5rem;
}
.template-view-ml-3 {
  margin-left: 0.75rem;
}
.template-view-ml-5 {
  margin-left: 1.25rem;
}
.template-view-mr-1 {
  margin-right: 0.25rem;
}
.template-view-mx-1 {
  margin-left: 0.25rem;
  margin-right: 0.25rem;
}

/* ── 6. Typography ───────────────────────────────────────────────────────── */

.template-view-text-8px {
  font-size: 8px;
}
.template-view-text-9px {
  font-size: 9px;
}
.template-view-text-10px {
  font-size: 10px;
}
.template-view-text-11px {
  font-size: 11px;
}
.template-view-text-xs {
  font-size: 0.75rem;
}
.template-view-text-sm {
  font-size: 0.875rem;
}

.template-view-font-medium {
  font-weight: 500;
}
.template-view-font-semibold {
  font-weight: 600;
}
.template-view-font-bold {
  font-weight: 700;
}

.template-view-font-mono {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.template-view-leading-11px {
  line-height: 11px;
}
.template-view-leading-tight {
  line-height: 1.25;
}
.template-view-leading-relaxed {
  line-height: 1.625;
}

.template-view-tracking-tight {
  letter-spacing: -0.025em;
}
.template-view-tracking-wide {
  letter-spacing: 0.025em;
}

.template-view-text-left {
  text-align: left;
}
.template-view-text-center {
  text-align: center;
}
.template-view-uppercase {
  text-transform: uppercase;
}
.template-view-tabular-nums {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.template-view-font-feature-settings-cv11 {
  font-feature-settings: "cv11";
}

.template-view-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-view-align-top {
  vertical-align: top;
}

/* ── 7. Colours ──────────────────────────────────────────────────────────── */

/* text */
.template-view-text-white {
  color: #fff;
}
.template-view-text-slate-100 {
  color: #f1f5f9;
}
.template-view-text-slate-300 {
  color: #cbd5e1;
}
.template-view-text-slate-400 {
  color: #94a3b8;
}
.template-view-text-slate-500 {
  color: #64748b;
}
.template-view-text-slate-600 {
  color: #475569;
}
.template-view-text-slate-700 {
  color: #334155;
}
.template-view-text-slate-800 {
  color: #1e293b;
}
.template-view-text-slate-900 {
  color: #0f172a;
}
.template-view-text-indigo-500 {
  color: var(--tv-primary-500);
}
.template-view-text-indigo-600 {
  color: var(--tv-primary-600);
}
.template-view-text-indigo-700 {
  color: var(--tv-primary-700);
}
.template-view-text-rose-600 {
  color: #e11d48;
}
.template-view-text-rose-700 {
  color: #be123c;
}
.template-view-text-amber-700 {
  color: #b45309;
}
.template-view-text-emerald-300 {
  color: #6ee7b7;
}
.template-view-text-emerald-700 {
  color: #047857;
}

/* background */
.template-view-bg-white {
  background-color: #fff;
}
.template-view-bg-white-95 {
  background-color: rgba(255, 255, 255, 0.95);
}
.template-view-bg-slate-50 {
  background-color: #f8fafc;
}
.template-view-bg-slate-50-80 {
  background-color: rgba(248, 250, 252, 0.8);
}
.template-view-bg-slate-100 {
  background-color: #f1f5f9;
}
.template-view-bg-slate-200 {
  background-color: #e2e8f0;
}
.template-view-bg-slate-900 {
  background-color: #0f172a;
}
.template-view-bg-slate-900-70 {
  background-color: rgba(15, 23, 42, 0.7);
}
.template-view-bg-indigo-50 {
  background-color: var(--tv-primary-50);
}
.template-view-bg-indigo-50-60 {
  background-color: rgba(var(--tv-primary-50-rgb), 0.6);
}
.template-view-bg-indigo-100 {
  background-color: var(--tv-primary-100);
}
.template-view-bg-indigo-400 {
  background-color: var(--tv-primary-400);
}
.template-view-bg-indigo-400-70 {
  background-color: rgba(var(--tv-primary-400-rgb), 0.7);
}
.template-view-bg-indigo-500 {
  background-color: var(--tv-primary-500);
}
.template-view-bg-indigo-600 {
  background-color: var(--tv-primary-600);
}
.template-view-bg-amber-50 {
  background-color: #fffbeb;
}
.template-view-bg-emerald-50 {
  background-color: #ecfdf5;
}
.template-view-bg-rose-50 {
  background-color: #fff1f2;
}

/* gradients */
.template-view-bg-gradient-to-br {
  background-image: linear-gradient(
    to bottom right,
    var(--tv-primary-500),
    var(--tv-primary-700)
  );
  background-image: linear-gradient(
    to bottom right,
    var(--tv-gradient-from, var(--tv-primary-500)),
    var(--tv-gradient-to, var(--tv-primary-700))
  );
}
.template-view-from-indigo-500 {
  --tv-gradient-from: var(--tv-primary-500);
}
.template-view-to-violet-600 {
  --tv-gradient-to: var(--tv-primary-700);
}

/* canvas dot grid — kept faint on purpose. This sits directly behind the
   label being designed, so it reads as a neutral "graph paper" backdrop
   rather than another set of lines competing with the label's own content
   and the print-boundary corner marks drawn on top of it. */
.template-view-bg-radial-gradient-circle-hex-d5dbe4_1px-transparent_1px {
  background-image: radial-gradient(
    circle,
    rgba(148, 163, 184, 0.35) 1px,
    transparent 1px
  );
}
.template-view-background-size-18px_18px {
  background-size: 18px 18px;
}

.template-view-accent-indigo-600 {
  accent-color: var(--tv-primary-600);
}

/* ── 8. Borders, radius, outline, ring ───────────────────────────────────── */

.template-view-border {
  border-width: 1px;
  border-style: solid;
  border-color: #e2e8f0;
}
.template-view-border-2 {
  border-width: 2px;
  border-style: solid;
}
.template-view-border-t {
  border-top-width: 1px;
  border-top-style: solid;
}
.template-view-border-b {
  border-bottom-width: 1px;
  border-bottom-style: solid;
}
.template-view-border-b-2 {
  border-bottom-width: 2px;
  border-bottom-style: solid;
}
.template-view-border-l {
  border-left-width: 1px;
  border-left-style: solid;
}
.template-view-border-r {
  border-right-width: 1px;
  border-right-style: solid;
}
.template-view-border-dashed {
  border-style: dashed;
}
.template-view-border-transparent {
  border-color: transparent;
}
.template-view-border-collapse {
  border-collapse: collapse;
}
.template-view-table-fixed {
  table-layout: fixed;
}

.template-view-border-white {
  border-color: #fff;
}
.template-view-border-slate-100 {
  border-color: #f1f5f9;
}
.template-view-border-slate-200 {
  border-color: #e2e8f0;
}
.template-view-border-slate-300 {
  border-color: #cbd5e1;
}
.template-view-border-slate-800 {
  border-color: #1e293b;
}
.template-view-border-indigo-300 {
  border-color: var(--tv-primary-300);
}
.template-view-border-indigo-400 {
  border-color: var(--tv-primary-400);
}
.template-view-border-indigo-500 {
  border-color: var(--tv-primary-500);
}
.template-view-border-indigo-600 {
  border-color: var(--tv-primary-600);
}
.template-view-border-amber-300 {
  border-color: #fcd34d;
}
.template-view-border-emerald-300 {
  border-color: #6ee7b7;
}
.template-view-border-rose-300 {
  border-color: #fda4af;
}

.template-view-rounded {
  border-radius: 0.25rem;
}
.template-view-rounded-sm {
  border-radius: 0.125rem;
}
.template-view-rounded-md {
  border-radius: 0.375rem;
}
.template-view-rounded-lg {
  border-radius: 0.5rem;
}
.template-view-rounded-full {
  border-radius: 9999px;
}
.template-view-rounded-t-lg {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

/* outline */
.template-view-outline {
  outline-style: solid;
}
.template-view-outline-dashed {
  outline-style: dashed;
}
.template-view-outline-none {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.template-view-outline-1 {
  outline-width: 1px;
}
.template-view-outline-2 {
  outline-width: 2px;
}
.template-view-outline-transparent {
  outline-color: transparent;
}
.template-view-outline-indigo-500 {
  outline-color: var(--tv-primary-500);
}
.template-view-outline-slate-300 {
  outline-color: #cbd5e1;
}

/* ring — composes with shadow instead of overwriting it */
.template-view-ring-1 {
  --tv-ring: 0 0 0 1px var(--tv-ring-color);
  box-shadow: var(--tv-ring), var(--tv-shadow);
}
.template-view-ring-slate-200 {
  --tv-ring-color: #e2e8f0;
}
.template-view-ring-slate-300 {
  --tv-ring-color: #cbd5e1;
}
/* box-shadow cannot be dashed; rendered as an inset dashed outline instead */
.template-view-ring-dashed {
  box-shadow: none;
  outline: 1px dashed var(--tv-ring-color);
  outline-offset: -1px;
}

/* ── 9. Effects ──────────────────────────────────────────────────────────── */

.template-view-shadow-sm {
  --tv-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  box-shadow: var(--tv-ring), var(--tv-shadow);
}
.template-view-shadow {
  --tv-shadow:
    0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  box-shadow: var(--tv-ring), var(--tv-shadow);
}
.template-view-shadow-md {
  --tv-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  box-shadow: var(--tv-ring), var(--tv-shadow);
}
.template-view-shadow-lg {
  --tv-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  box-shadow: var(--tv-ring), var(--tv-shadow);
}
.template-view-shadow-xl {
  --tv-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  box-shadow: var(--tv-ring), var(--tv-shadow);
}

.template-view-opacity-0 {
  opacity: 0;
}
.template-view-rotate-90 {
  transform: rotate(90deg);
}
.template-view-translate-x-1-2 {
  transform: translateX(-50%);
}
.template-view-backdrop-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.template-view-transition {
  transition-property:
    color, background-color, border-color, outline-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-text-decoration-color;
  transition-property:
    color, background-color, border-color, outline-color, text-decoration-color,
    fill, stroke, opacity, box-shadow, transform, filter;
  transition-property:
    color, background-color, border-color, outline-color, text-decoration-color,
    fill, stroke, opacity, box-shadow, transform, filter, -webkit-text-decoration-color;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.template-view-transition-all {
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.template-view-cursor-pointer {
  cursor: pointer;
}
.template-view-cursor-grab {
  cursor: grab;
}
.template-view-cursor-col-resize {
  cursor: col-resize;
}
.template-view-cursor-nwse-resize {
  cursor: nwse-resize;
}

@media (prefers-reduced-motion: reduce) {
  .template-view-root *,
  .template-view-root *::before,
  .template-view-root *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ── 10. Interaction states ──────────────────────────────────────────────── */

.template-view-active-cursor-grabbing:active {
  cursor: grabbing;
}

.template-view-hover-bg-white:hover {
  background-color: #fff;
}
.template-view-hover-bg-slate-50:hover {
  background-color: #f8fafc;
}
.template-view-hover-bg-slate-100:hover {
  background-color: #f1f5f9;
}
.template-view-hover-bg-slate-200:hover {
  background-color: #e2e8f0;
}
.template-view-hover-bg-slate-700:hover {
  background-color: #334155;
}
.template-view-hover-bg-indigo-700:hover {
  background-color: var(--tv-primary-700);
}
.template-view-hover-bg-indigo-50:hover {
  background-color: var(--tv-primary-50);
}
.template-view-hover-bg-indigo-50-60:hover {
  background-color: rgba(var(--tv-primary-50-rgb), 0.6);
}

.template-view-hover-border-slate-300:hover {
  border-color: #cbd5e1;
}
.template-view-hover-border-slate-400:hover {
  border-color: #94a3b8;
}
.template-view-hover-border-indigo-400:hover {
  border-color: var(--tv-primary-400);
}
.template-view-hover-border-rose-300:hover {
  border-color: #fda4af;
}

.template-view-hover-text-slate-800:hover {
  color: #1e293b;
}
.template-view-hover-text-slate-900:hover {
  color: #0f172a;
}
.template-view-hover-text-indigo-600:hover {
  color: var(--tv-primary-600);
}
.template-view-hover-text-rose-600:hover {
  color: #e11d48;
}

.template-view-hover-outline-slate-300:hover {
  outline-color: #cbd5e1;
}

.template-view-hover-shadow-sm:hover {
  --tv-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  box-shadow: var(--tv-ring), var(--tv-shadow);
}

.template-view-focus-border-indigo-400:focus {
  border-color: var(--tv-primary-400);
}
.template-view-focus-outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.template-view-focus-ring-2:focus {
  --tv-ring: 0 0 0 2px var(--tv-ring-color);
  box-shadow: var(--tv-ring), var(--tv-shadow);
}
.template-view-focus-ring-indigo-100:focus {
  --tv-ring-color: var(--tv-primary-100);
}

/* Keyboard-only focus fallback so the editor stays navigable without a mouse. */
.template-view-root :focus-visible {
  outline: 2px solid var(--tv-primary-500);
  outline-offset: 1px;
}

/* group hover — generic palette / variable cards */
.template-view-group:hover .template-view-group-hover-text-slate-600 {
  color: #475569;
}
.template-view-group:hover .template-view-group-hover-text-slate-900 {
  color: #0f172a;
}
.template-view-group:hover .template-view-group-hover-text-rose-600 {
  color: #e11d48;
}
.template-view-group:hover .template-view-group-hover-text-indigo-400 {
  color: var(--tv-primary-400);
}
.template-view-group:hover .template-view-group-hover-text-indigo-600 {
  color: var(--tv-primary-600);
}
.template-view-group:hover .template-view-group-hover-border-indigo-400 {
  border-color: var(--tv-primary-400);
}
.template-view-group:hover .template-view-group-hover-border-slate-400 {
  border-color: #94a3b8;
}
.template-view-group:hover .template-view-group-hover-bg-indigo-50 {
  background-color: var(--tv-primary-50);
}
.template-view-group:hover .template-view-group-hover-bg-indigo-50-60 {
  background-color: rgba(var(--tv-primary-50-rgb), 0.6);
}
.template-view-group:hover .template-view-group-hover-bg-slate-50 {
  background-color: #f8fafc;
}
.template-view-group:hover .template-view-group-hover-bg-slate-200 {
  background-color: #e2e8f0;
}

/* group hover — table row toolbar / column handles */
.template-view-group-row:hover .template-view-group-hover-row-opacity-100 {
  opacity: 1;
}
.template-view-group-row:hover .template-view-group-hover-row-block {
  display: block;
}
.template-view-group-row:hover .template-view-group-hover-row-flex {
  display: flex;
}

/* group hover — individual block toolbar / resize grip */
.template-view-group-blk:hover .template-view-group-hover-blk-block {
  display: block;
}
.template-view-group-blk:hover .template-view-group-hover-blk-flex {
  display: flex;
}

/* Touch devices have no hover: keep row/block affordances reachable. */
@media (hover: none) {
  .template-view-group-hover-row-opacity-100 {
    opacity: 1;
  }
  .template-view-group-hover-row-flex,
  .template-view-group-hover-blk-flex {
    display: flex;
  }
  .template-view-group-hover-row-block,
  .template-view-group-hover-blk-block {
    display: block;
  }
}

/* ── 11. Component-level rules ───────────────────────────────────────────── */

/* Scrollbars inside the three panes */
.template-view-root .template-view-overflow-auto {
  scrollbar-width: thin;
}
.template-view-root .template-view-overflow-auto::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.template-view-root .template-view-overflow-auto::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 9999px;
}
.template-view-root
  .template-view-overflow-auto::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
  background-clip: content-box;
}
.template-view-root .template-view-overflow-auto::-webkit-scrollbar-track {
  background: transparent;
}

/* Ant Design icons ignore a numeric `size` prop; normalise them so they do not
   render at the inherited 1em of large containers. */
.template-view-root .anticon {
  font-size: 13px;
  line-height: 0;
}
.template-view-root .anticon svg {
  width: 1em;
  height: 1em;
}

/* Colour swatch inputs */
.template-view-root input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
}
.template-view-root input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
.template-view-root input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 0.25rem;
}

/* Native select needs its own padding-right for the chevron, and an explicit
   (non-"inherit") text colour — see the file header note on color-scheme —
   so it can never silently render white-on-white regardless of the host
   OS/browser dark-mode setting. */
.template-view-root select {
  padding-right: 1.25rem;
  background-color: #fff;
  color: #0f172a;
  color: var(--tv-text, #0f172a);
}
.template-view-root select option {
  color: #0f172a;
  color: var(--tv-text, #0f172a);
  background-color: #fff;
}

/* Designer canvas: the label surface is authored in mm, never let a long token
   push the table wider than the label. */
.template-view-root .template-view-table-fixed td {
  word-break: break-word;
}

/* Code panes */
.template-view-root pre.template-view-font-mono {
  white-space: pre;
}

/* ── 12. Inspector tab bar — icon + label, clearer active/rest states ────── */

.template-view-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1 1;
  padding: 9px 2px 8px;
  background: #fff;
  color: #64748b;
  border-bottom: 2px solid transparent;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease;
}
.template-view-tab-btn .anticon {
  font-size: 14px;
}
.template-view-tab-btn-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}
.template-view-tab-btn:hover {
  color: #1e293b;
  background: #f8fafc;
}
.template-view-tab-btn-active,
.template-view-tab-btn-active:hover {
  color: var(--tv-primary-700);
  background: var(--tv-primary-50);
  border-bottom-color: var(--tv-primary-600);
}

/* Toolbar icon buttons (undo/redo/guides etc.) — give them a resting
   button-like surface instead of floating, unlabeled glyphs. */
.template-view-toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.template-view-toolbar-btn {
  display: grid;
  place-items: center;
  height: 26px;
  width: 26px;
  border-radius: 6px;
  color: #475569;
  background: transparent;
  border: 1px solid transparent;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}
.template-view-toolbar-btn:hover {
  color: #1e293b;
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.template-view-toolbar-btn-active {
  color: var(--tv-primary-700);
  background: var(--tv-primary-50);
  border-color: var(--tv-primary-300);
}

/**
 * theme.css
 * -----------------------------------------------------------------------
 * Shared design tokens for the Buyer PO module. Import this once at the
 * top of each screen's own CSS file (already wired up below).
 * -----------------------------------------------------------------------
 */

:root {
  /* Palette — deep ink blue as the working accent, warm amber for counts */
  --bpo-primary: #2c4770;
  --bpo-primary-dark: #1c2f4d;
  --bpo-primary-soft: #eaf0fb;
  --bpo-accent: #d98e3c;
  --bpo-accent-soft: #fdf3e6;
  --bpo-success: #2f9e60;
  --bpo-success-soft: #e8f7ee;
  --bpo-danger: #cf4747;
  --bpo-danger-soft: #fcebeb;

  /* Neutrals */
  --bpo-bg: #f4f6f9;
  --bpo-surface: #ffffff;
  --bpo-border: #e3e8ef;
  --bpo-text: #1f2733;
  --bpo-text-muted: #6b7686;

  /* Shape */
  --bpo-radius-sm: 6px;
  --bpo-radius-md: 10px;
  --bpo-radius-lg: 14px;
  --bpo-shadow: 0 2px 10px rgba(28, 47, 77, 0.06);
  --bpo-shadow-lift: 0 8px 24px rgba(28, 47, 77, 0.12);
}

.bpo-list-page {
  min-height: 100vh;
  background: var(--bpo-bg);
  padding: 28px 32px 48px;
}

/* ---------------- Header ---------------- */

.bpo-list-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.bpo-list-title {
  margin: 0 !important;
  color: var(--bpo-primary-dark);
  font-weight: 700 !important;
}

.bpo-list-subtitle {
  color: var(--bpo-text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.bpo-add-btn {
  background: var(--bpo-primary) !important;
  border-color: var(--bpo-primary) !important;
  height: 42px;
  padding: 0 20px !important;
  font-weight: 600 !important;
  box-shadow: var(--bpo-shadow);
}

.bpo-add-btn:hover {
  background: var(--bpo-primary-dark) !important;
  border-color: var(--bpo-primary-dark) !important;
}
.bpo-list-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------------- Stat cards ---------------- */

.bpo-stats-row {
  margin-bottom: 20px;
}

.bpo-stat-card {
  border-radius: var(--bpo-radius-lg) !important;
  border: 1px solid var(--bpo-border) !important;
  box-shadow: var(--bpo-shadow);
  overflow: hidden;
}

.bpo-stat-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bpo-stat-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--bpo-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.bpo-stat-icon.blue {
  background: var(--bpo-primary-soft);
  color: var(--bpo-primary);
}
.bpo-stat-icon.amber {
  background: var(--bpo-accent-soft);
  color: var(--bpo-accent);
}
.bpo-stat-icon.green {
  background: var(--bpo-success-soft);
  color: var(--bpo-success);
}

.bpo-stat-label {
  color: var(--bpo-text-muted);
  font-size: 13px;
}

.bpo-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--bpo-text);
  line-height: 1.2;
}

/* ---------------- Filters ---------------- */

.bpo-filter-card {
  border-radius: var(--bpo-radius-lg) !important;
  border: 1px solid var(--bpo-border) !important;
  box-shadow: var(--bpo-shadow);
  margin-bottom: 18px;
}

.bpo-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--bpo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
  display: block;
}

.bpo-filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 100%;
}

/* ---------------- Table card ---------------- */

.bpo-table-card {
  border-radius: var(--bpo-radius-lg) !important;
  border: 1px solid var(--bpo-border) !important;
  box-shadow: var(--bpo-shadow);
}

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

.bpo-result-count {
  color: var(--bpo-text-muted);
  font-size: 13px;
}

.bpo-buyer-cell {
  font-weight: 600;
  color: var(--bpo-text);
}

.bpo-po-cell {
  font-family: "SFMono-Regular", Consolas, monospace;
  color: var(--bpo-primary-dark);
  font-weight: 600;
  background: var(--bpo-primary-soft);
  padding: 2px 8px;
  border-radius: var(--bpo-radius-sm);
  display: inline-block;
}

.bpo-style-tag {
  border-radius: 999px !important;
  border: none !important;
  background: var(--bpo-primary-soft) !important;
  color: var(--bpo-primary) !important;
  font-weight: 500;
}

.bpo-edit-btn {
  color: var(--bpo-primary) !important;
  font-weight: 600 !important;
}

.bpo-status-badge {
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  display: inline-block;
}

.bpo-status-badge.draft {
  background: var(--bpo-accent-soft);
  color: var(--bpo-accent);
}

.bpo-status-badge.submitted {
  background: var(--bpo-success-soft);
  color: var(--bpo-success);
}

.bpo-modal .ant-modal-content {
  border-radius: var(--bpo-radius-lg) !important;
  overflow: hidden;
  padding: 0 !important;
}

.bpo-modal-header {
  background: var(--bpo-primary-dark);
  padding: 20px 24px;
  color: #fff;
}

.bpo-modal-header-title {
  color: #fff !important;
  margin: 0 !important;
  font-weight: 700 !important;
}

.bpo-modal-header-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.bpo-modal-body {
  padding: 24px;
}

.bpo-modal-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--bpo-text);
  margin-bottom: 6px;
  display: block;
}

.bpo-modal-alert {
  margin-bottom: 16px;
  border-radius: var(--bpo-radius-sm) !important;
}

.bpo-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  background: #fafbfc;
  border-top: 1px solid var(--bpo-border);
}

.bpo-modal-submit-btn {
  background: var(--bpo-primary) !important;
  border-color: var(--bpo-primary) !important;
  font-weight: 600 !important;
}

.bpo-modal-submit-btn:hover {
  background: var(--bpo-primary-dark) !important;
  border-color: var(--bpo-primary-dark) !important;
}

.bpo-config-page {
  min-height: 100vh;
  background: var(--bpo-bg);
  padding: 0 32px 48px;
}

/* ---------------- Sticky top bar ---------------- */

.bpo-config-topbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bpo-bg);
  padding: 24px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.bpo-back-btn {
  color: var(--bpo-text-muted) !important;
  font-weight: 500 !important;
  padding-left: 0 !important;
}

.bpo-topbar-actions {
  display: flex;
  gap: 10px;
}

.bpo-draft-btn {
  border-color: var(--bpo-border) !important;
  color: var(--bpo-text) !important;
  font-weight: 600 !important;
}

.bpo-submit-btn {
  background: var(--bpo-success) !important;
  border-color: var(--bpo-success) !important;
  font-weight: 600 !important;
}

.bpo-submit-btn:hover {
  filter: brightness(0.94);
}

/* ---------------- Selected PO summary card ---------------- */

.bpo-summary-card {
  border-radius: var(--bpo-radius-lg) !important;
  border: 1px solid var(--bpo-border) !important;
  background: linear-gradient(
    135deg,
    var(--bpo-primary-dark),
    var(--bpo-primary)
  ) !important;
  box-shadow: var(--bpo-shadow-lift);
  margin-bottom: 20px;
}

.bpo-summary-item-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.bpo-summary-item-value {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.bpo-summary-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.18);
}

.bpo-summary-stat {
  text-align: center;
}

.bpo-summary-stat .bpo-summary-item-value {
  font-size: 24px;
}

/* ---------------- Builder card ---------------- */

.bpo-builder-card {
  border-radius: var(--bpo-radius-lg) !important;
  border: 1px solid var(--bpo-border) !important;
  box-shadow: var(--bpo-shadow);
  margin-bottom: 22px;
}

.bpo-builder-header-row {
  margin-bottom: 12px;
}

.bpo-builder-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700 !important;
  color: var(--bpo-primary-dark) !important;
  margin: 0 0 4px !important;
}

.bpo-builder-subtitle {
  color: var(--bpo-text-muted);
  font-size: 13px;
  margin-bottom: 16px;
  display: block;
  max-width: 560px;
}

.bpo-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--bpo-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
  display: block;
}

.bpo-add-style-btn {
  background: var(--bpo-primary) !important;
  border-color: var(--bpo-primary) !important;
  font-weight: 600 !important;
  height: 40px;
}

.bpo-add-style-btn:hover {
  background: var(--bpo-primary-dark) !important;
  border-color: var(--bpo-primary-dark) !important;
}

/* ---------------- Excel import trigger buttons (builder header) ---------------- */

.bpo-excel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bpo-template-btn {
  border-color: var(--bpo-border) !important;
  color: var(--bpo-text) !important;
  font-weight: 600 !important;
  height: 40px;
}

.bpo-import-trigger-btn {
  border-color: var(--bpo-primary) !important;
  color: var(--bpo-primary) !important;
  font-weight: 600 !important;
  height: 40px;
}

.bpo-import-trigger-btn:hover {
  color: var(--bpo-primary-dark) !important;
  border-color: var(--bpo-primary-dark) !important;
}

/* ---------------- Style matrix cards ---------------- */

.bpo-styles-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.bpo-style-card {
  border-radius: var(--bpo-radius-lg) !important;
  border: 1px solid var(--bpo-border) !important;
  box-shadow: var(--bpo-shadow);
  margin-bottom: 18px;
}

.bpo-style-card .ant-card-head {
  border-bottom: 1px solid var(--bpo-border);
}

.bpo-style-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bpo-style-index {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bpo-primary-soft);
  color: var(--bpo-primary);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bpo-style-name {
  font-weight: 700;
  color: var(--bpo-text);
  font-size: 15px;
}

.bpo-style-meta-tag {
  background: var(--bpo-accent-soft) !important;
  color: var(--bpo-accent) !important;
  border: none !important;
  font-weight: 600;
  border-radius: 999px !important;
}

.bpo-matrix-wrapper {
  overflow-x: auto;
}

.bpo-matrix-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
}

.bpo-matrix-table th,
.bpo-matrix-table td {
  border: 1px solid var(--bpo-border);
  padding: 8px 10px;
  text-align: center;
}

.bpo-matrix-table thead th {
  background: #f8fafc;
  color: var(--bpo-text);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

.bpo-matrix-corner-cell {
  background: #f1f4f8 !important;
  text-align: left !important;
  color: var(--bpo-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bpo-matrix-row-header {
  text-align: left !important;
  font-weight: 600;
  color: var(--bpo-text);
  background: #fafbfd;
  white-space: nowrap;
}

.bpo-matrix-qty-input {
  width: 78px !important;
  text-align: center;
}

.bpo-matrix-remove-col,
.bpo-matrix-remove-row {
  color: var(--bpo-text-muted);
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
}

.bpo-matrix-remove-col:hover,
.bpo-matrix-remove-row:hover {
  color: var(--bpo-danger);
}

.bpo-matrix-row-total {
  font-weight: 700;
  color: var(--bpo-primary-dark);
  background: #f8fafc;
}

.bpo-empty-state {
  border: 1px dashed var(--bpo-border);
  border-radius: var(--bpo-radius-lg);
  padding: 40px 20px;
  text-align: center;
  background: var(--bpo-surface);
}

/* =====================================================================
   Excel Import Modal
   ===================================================================== */

.bpo-import-modal .ant-modal-content {
  border-radius: var(--bpo-radius-lg);
}

.bpo-import-modal .ant-modal-header {
  border-radius: var(--bpo-radius-lg) var(--bpo-radius-lg) 0 0;
}

.bpo-import-modal .ant-modal-title {
  font-weight: 700;
  color: var(--bpo-primary-dark);
}

.bpo-import-template-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bpo-import-template-hint {
  font-size: 12px;
  color: var(--bpo-text-muted);
}

/* Upload dropzone */

.bpo-import-dragger.ant-upload-drag {
  border: 1.5px dashed var(--bpo-border) !important;
  border-radius: var(--bpo-radius-lg) !important;
  background: var(--bpo-surface) !important;
  padding: 20px 0;
}

.bpo-import-dragger.ant-upload-drag:hover {
  border-color: var(--bpo-primary) !important;
}

.bpo-import-dragger-icon {
  font-size: 34px;
  color: var(--bpo-primary);
  margin-bottom: 4px;
}

.bpo-import-dragger-text {
  font-weight: 600;
  color: var(--bpo-text);
  margin-bottom: 2px !important;
}

.bpo-import-dragger-hint {
  font-size: 12px;
  color: var(--bpo-text-muted);
}

.bpo-import-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Stats row */

.bpo-import-stats-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bpo-import-stat {
  border: 1px solid var(--bpo-border);
  border-radius: var(--bpo-radius-lg);
  padding: 10px 20px;
  min-width: 110px;
  text-align: center;
  background: var(--bpo-surface);
}

.bpo-import-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--bpo-text);
}

.bpo-import-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bpo-text-muted);
  margin-top: 2px;
}

.bpo-import-stat-ok .bpo-import-stat-value {
  color: var(--bpo-success);
}

.bpo-import-stat-warn .bpo-import-stat-value {
  color: #d97706;
}

.bpo-import-reset-btn {
  margin-left: auto;
  font-weight: 600 !important;
}

.bpo-import-alert {
  margin-bottom: 14px;
  border-radius: var(--bpo-radius-lg) !important;
}

/* Review table */

.bpo-import-table.ant-table-wrapper .ant-table {
  border: 1px solid var(--bpo-border);
  border-radius: var(--bpo-radius-lg);
}

.bpo-import-table .ant-table-thead > tr > th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 12px;
  color: var(--bpo-text);
}

.bpo-import-table .ant-table-tbody > tr > td {
  vertical-align: top;
  padding-top: 10px;
}

.bpo-import-match-tag {
  font-weight: 600;
  border-radius: 999px !important;
  padding: 2px 10px;
}

.bpo-import-raw-hint {
  font-size: 11px;
  color: var(--bpo-text-muted);
  margin-top: 3px;
  font-style: italic;
}

.bpo-import-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--bpo-border);
}

.bpo-import-confirm-btn {
  background: var(--bpo-success) !important;
  border-color: var(--bpo-success) !important;
  font-weight: 600 !important;
  height: 40px;
}

.bpo-import-confirm-btn:hover {
  filter: brightness(0.94);
}

.bpo-import-select-ok .ant-select-selector {
  border-color: #52c41a !important;
  background: #f6ffed !important;
}
.bpo-excel-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.bpo-excel-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bpo-excel-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bpo-text-muted);
}
.bpo-excel-group-btns {
  display: flex;
  gap: 8px;
}
.bpo-calc-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 10px;
  flex-wrap: wrap;
}
.bpo-calc-qty {
  font-weight: 600;
  color: var(--bpo-primary-dark);
}
/* Garment colour / Pre-packing tabs (style card + import review rows) */
.bpo-mode-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  margin-bottom: 14px;
  background: #f1f4f8;
  border: 1px solid var(--bpo-border);
  border-radius: 10px;
}
.bpo-mode-tab {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bpo-text-muted);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.bpo-mode-tab:hover:not(:disabled):not(.active) {
  color: var(--bpo-text);
}
.bpo-mode-tab.active {
  background: var(--bpo-primary);
  color: #fff;
}
.bpo-mode-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.bpo-mode-tab:focus-visible {
  outline: 2px solid var(--bpo-primary);
  outline-offset: 2px;
}

/* compact version used inside the import review tables */
.bpo-mode-switch.sm {
  padding: 2px;
  margin-bottom: 0;
  border-radius: 8px;
}
.bpo-mode-switch.sm .bpo-mode-tab {
  padding: 3px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.bpo-matrix-na {
  color: var(--bpo-text-muted);
}

/* Save as: <same folder as the editor>/EmailTemplateEditor.css */
.et-page {
  padding-bottom: 24px;
}

.et-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #fafafa;
}
.et-toolbar .et-divider {
  width: 1px;
  height: 20px;
  background: #e5e7eb;
  margin: 0 4px;
}
.et-color {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  color: #374151;
}
.et-btn-active,
.et-btn-active:hover {
  background: #e6f0ff !important;
  color: #0c447c !important;
}

.et-visual-frame {
  display: block;
  width: 100%;
  height: 640px;
  border: 1px solid #e5e7eb;
  border-radius: 0 0 8px 8px;
  background: #fff;
}

.et-source {
  width: 100%;
  height: 640px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: Consolas, Monaco, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.et-subject-row {
  margin-bottom: 12px;
}
.et-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}
.et-hint {
  margin-top: 4px;
  font-size: 11px;
  color: #8fa1b5;
}
.et-hint.warn {
  color: #d46b08;
}

.et-status {
  margin-right: 4px;
}

.et-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f3f4f6;
}
.et-preview-subject {
  width: 100%;
  max-width: 640px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: #0f1f35;
}
.et-preview-frame {
  border: 1px solid #d9d9d9;
  background: #fff;
  height: 680px;
  max-width: 100%;
}

.et-side-card {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #eef0f3;
  border-radius: 10px;
  background: #fff;
}
.et-side-title {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #0f1f35;
}
.et-var-chip {
  margin-bottom: 6px;
  cursor: pointer;
  font-family: Consolas, Monaco, monospace;
}
.et-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: #64748b;
}
.et-meta-row span:last-child {
  color: #0f1f35;
  font-weight: 600;
  text-align: right;
}
.et-field {
  margin-bottom: 10px;
}
.et-note {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* help drawer */
.et-help-step {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.et-help-num {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: #0c447c;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.et-help-title {
  font-weight: 700;
  color: #0f1f35;
  margin-bottom: 2px;
}
.et-help-body {
  font-size: 13px;
  color: #475569;
  line-height: 1.55;
}

/* =========================================================
   GENERAL TAGS — CLEAN PRODUCTION DASHBOARD
   ========================================================= */

.general-tag-page {
  min-height: 100%;
  padding: 22px clamp(14px, 2vw, 30px) 36px;
  background: #f6f8fc;
  color: #172033;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  box-sizing: border-box;
}

.general-tag-page *,
.general-tag-page *::before,
.general-tag-page *::after {
  box-sizing: border-box;
}

.gt-shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* ================= HEADER ================= */

.gt-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.gt-title-wrap {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.gt-title-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid #dbeafe;
  border-radius: 11px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 19px;
  box-shadow: none;
}

.gt-page-title {
  margin: 0 !important;
  color: #172033 !important;
  font-size: 23px !important;
  font-weight: 750 !important;
  letter-spacing: -0.65px;
  line-height: 1.3;
}

.gt-page-subtitle {
  display: block;
  margin-top: 4px;
  color: #78859a;
  font-size: 12px;
  line-height: 1.5;
}

.gt-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.gt-line-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.gt-refresh-btn {
  height: 35px !important;
  padding: 0 13px !important;
  border-radius: 8px !important;
  background: #2563eb !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  box-shadow: none !important;
}

.gt-refresh-btn:hover {
  background: #1d4ed8 !important;
}

/* ================= INVENTORY OVERVIEW ================= */

.gt-overview {
  margin-bottom: 24px;
  padding: 19px 21px;
  border: 1px solid #e5eaf2;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.025);
}

.gt-overview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.gt-eyebrow {
  color: #8792a5;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.1px;
}

.gt-overview h2 {
  margin: 5px 0 0;
  color: #172033;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.35px;
}

.gt-total-count {
  color: #172033;
  font-size: 25px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.7px;
  text-align: right;
}

.gt-total-count small {
  display: block;
  margin-top: 5px;
  color: #8b96a8;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.gt-overview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 18px;
}

.gt-overview-stat {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #e9edf4;
  border-radius: 10px;
  background: #fff;
}

.gt-stat-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
}

.gt-stat-icon i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.gt-green {
  background: #eaf8ef;
}

.gt-green i {
  background: #16a34a;
}

.gt-indigo {
  background: #eef2ff;
}

.gt-indigo i {
  background: #4f46e5;
}

.gt-slate {
  background: #f1f5f9;
}

.gt-slate i {
  background: #64748b;
}

.gt-overview-stat small {
  display: block;
  margin-bottom: 4px;
  color: #7c8799;
  font-size: 11px;
  font-weight: 550;
}

.gt-overview-stat strong {
  display: block;
  color: #172033;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.gt-overview-progress {
  display: flex;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 6px;
  background: #edf1f6;
}

.gt-overview-progress span {
  height: 100%;
  transition: width 0.25s ease;
}

.gt-overview-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 17px;
  margin-top: 12px;
}

.gt-overview-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #7b8799;
  font-size: 11px;
  font-weight: 550;
}

.gt-overview-legend i,
.gt-line-stats i,
.gt-group-title i {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
}

/* ================= PRODUCTION LINE SECTION ================= */

.gt-lines-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.gt-lines-heading h2 {
  margin: 0;
  color: #172033;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.25px;
}

.gt-lines-heading span {
  color: #8994a6;
  font-size: 11px;
  font-weight: 500;
}

.gt-line-card {
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid #e3e8f0;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.025);
  transition: border-color 0.18s ease;
}

.gt-line-card:hover {
  border-color: #d2dceb;
}

.gt-line-card.is-expanded {
  border-color: #cbd9f3;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.045);
}

.gt-line-header,
.gt-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.gt-line-header {
  min-height: 66px;
  padding: 12px 16px;
  background: #fff;
}

.gt-line-header:hover,
.gt-group-header:hover {
  background: #f8faff;
}

.gt-line-heading {
  display: flex;
  align-items: center;
  flex: 1 1;
  min-width: 0;
  gap: 11px;
}

.gt-line-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid #e0eaff;
  border-radius: 9px;
  background: #f0f5ff;
  color: #3568cf;
  font-size: 16px;
}

.gt-line-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
}

.gt-line-title strong {
  overflow: hidden;
  color: #202b3d;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gt-line-title small {
  color: #929daf;
  font-size: 11px;
  font-weight: 500;
}

.gt-total-badge {
  padding: 5px 9px;
  border: 1px solid #e5eaf2;
  border-radius: 7px;
  background: #f7f9fc;
  color: #526078;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.gt-line-chevron {
  display: grid;
  place-items: center;
  color: #8a96a8;
  font-size: 11px;
}

.gt-progress-track {
  display: flex;
  height: 4px;
  margin: 0 16px;
  overflow: hidden;
  border-radius: 4px;
  background: #edf1f6;
}

.gt-progress-track span {
  height: 100%;
}

.gt-line-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 17px;
  padding: 11px 16px 13px;
}

.gt-line-stats span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #78859a;
  font-size: 11px;
  font-weight: 550;
}

.gt-line-stats b {
  color: #283449;
  font-size: 12px;
  font-weight: 750;
}

/* ================= EXPANDED LINE CONTENT ================= */

.gt-expanded-content {
  padding: 12px 14px 15px;
  border-top: 1px solid #edf1f6;
  background: #f8faff;
}

.gt-group {
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid #e5eaf2;
  border-radius: 9px;
  background: #fff;
}

.gt-group:first-child {
  margin-top: 0;
}

.gt-group-header {
  min-height: 43px;
  padding: 10px 13px;
  background: #fff;
  color: #39465b;
  font-size: 11px;
  font-weight: 700;
}

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

.gt-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 750;
}

.gt-group-body {
  padding: 0 13px 5px;
}

.gt-tag-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  grid-gap: 14px;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid #edf1f6;
}

.gt-available-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.gt-field {
  min-width: 0;
}

.gt-field-label {
  margin-bottom: 5px;
  color: #909bad;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.65px;
}

.gt-field-value {
  overflow: hidden;
  color: #344157;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gt-status {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.gt-status i {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
}

.gt-tag-record {
  padding-bottom: 9px;
  border-top: 1px solid #edf1f6;
}

.gt-tag-record .gt-tag-row {
  padding-bottom: 9px;
  border-top: 0;
}

.gt-info {
  display: flex;
  align-items: center;
  gap: 7px;
  width: -webkit-fit-content;
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
}

.gt-info-success {
  border-color: #c9ebd5;
  background: #f0faf3;
  color: #187344;
}

.gt-info-pending {
  border-color: #f5dfab;
  background: #fffbeb;
  color: #98620b;
}

.gt-info-blue {
  border-color: #d5e4ff;
  background: #f1f6ff;
  color: #2957b8;
}

/* ================= LOADING, ERROR AND EMPTY STATES ================= */

.gt-loading {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border: 1px solid #e5eaf2;
  border-radius: 12px;
  background: #fff;
  color: #7b8799;
}

.gt-loading-copy {
  font-size: 12px;
}

.gt-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fff7f7;
  color: #b91c1c;
  font-size: 12px;
}

.gt-empty {
  padding: 38px 16px;
  border: 1px dashed #d5deeb;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.gt-empty .ant-empty {
  margin-bottom: 18px;
}

/* ================= ACCESSIBILITY ================= */

.gt-line-header:focus-visible,
.gt-group-header:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: -3px;
}

.gt-line-header:focus:not(:focus-visible),
.gt-group-header:focus:not(:focus-visible) {
  outline: none;
}

/* ================= TABLET ================= */

@media (min-width: 701px) and (max-width: 1000px) {
  .general-tag-page {
    padding: 20px 16px 30px;
  }

  .gt-overview {
    padding: 17px;
  }

  .gt-overview-stats {
    gap: 9px;
  }

  .gt-overview-stat {
    padding: 11px;
    gap: 9px;
  }

  .gt-tag-row {
    gap: 10px;
  }
}

/* ================= MOBILE ================= */

@media (max-width: 700px) {
  .general-tag-page {
    padding: 15px 11px 24px;
  }

  .gt-page-header {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 17px;
  }

  .gt-title-wrap {
    gap: 9px;
  }

  .gt-title-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 9px;
    font-size: 16px;
  }

  .gt-page-title {
    font-size: 19px !important;
  }

  .gt-page-subtitle {
    max-width: 230px;
    font-size: 11px;
  }

  .gt-header-actions {
    gap: 0;
  }

  .gt-line-count {
    display: none;
  }

  .gt-refresh-btn {
    height: 32px !important;
    padding: 0 9px !important;
    font-size: 11px !important;
  }

  .gt-overview {
    margin-bottom: 20px;
    padding: 14px;
    border-radius: 11px;
  }

  .gt-overview-top {
    margin-bottom: 14px;
  }

  .gt-overview h2 {
    font-size: 15px;
  }

  .gt-eyebrow {
    font-size: 9px;
  }

  .gt-total-count {
    font-size: 21px;
  }

  .gt-overview-stats {
    gap: 7px;
    margin-bottom: 14px;
  }

  .gt-overview-stat {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 9px;
  }

  .gt-stat-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .gt-overview-stat small {
    font-size: 10px;
  }

  .gt-overview-stat strong {
    font-size: 18px;
  }

  .gt-overview-legend {
    gap: 8px 12px;
  }

  .gt-overview-legend span {
    font-size: 10px;
  }

  .gt-lines-heading {
    align-items: flex-start;
  }

  .gt-lines-heading h2 {
    font-size: 15px;
  }

  .gt-lines-heading span {
    font-size: 10px;
    text-align: right;
  }

  .gt-line-header {
    min-height: 59px;
    padding: 10px;
  }

  .gt-line-heading {
    gap: 8px;
  }

  .gt-line-icon {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    font-size: 14px;
  }

  .gt-line-title strong {
    max-width: 37vw;
    font-size: 12px;
  }

  .gt-line-title small {
    font-size: 10px;
  }

  .gt-total-badge {
    padding: 4px 6px;
    font-size: 10px;
  }

  .gt-progress-track {
    margin: 0 10px;
  }

  .gt-line-stats {
    gap: 10px;
    padding: 10px;
  }

  .gt-line-stats span {
    gap: 5px;
    font-size: 10px;
  }

  .gt-line-stats b {
    font-size: 11px;
  }

  .gt-expanded-content {
    padding: 9px;
  }

  .gt-group-header {
    min-height: 40px;
    padding: 9px;
  }

  .gt-group-body {
    padding: 0 9px 5px;
  }

  .gt-tag-row,
  .gt-available-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
    padding: 11px 0;
  }

  .gt-tag-record .gt-tag-row {
    padding-bottom: 11px;
  }

  .gt-status {
    grid-column: 1 / -1;
  }

  .gt-info {
    align-items: flex-start;
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  .gt-page-subtitle {
    max-width: 180px;
  }

  .gt-refresh-btn {
    padding: 0 7px !important;
  }

  .gt-overview-stat {
    padding: 7px;
  }

  .gt-overview-stat strong {
    font-size: 16px;
  }

  .gt-line-title strong {
    max-width: 32vw;
  }

  .gt-line-stats {
    gap: 8px;
  }
}
/* ==========================================================================
   End Table QC - web screen
   All selectors are prefixed with .etq so nothing leaks into the rest of the app.
   ========================================================================== */

.etq {
  --etq-bg: #f4f6fb;
  --etq-surface: #ffffff;
  --etq-ink: #111827;
  --etq-ink-2: #374151;
  --etq-muted: #6b7280;
  --etq-line: #e5e9f2;
  --etq-line-soft: #eef1f7;

  --etq-primary: #2563eb;
  --etq-primary-soft: #eaf1ff;

  --etq-pass: #16a34a;
  --etq-pass-soft: #e8f8ee;
  --etq-rework: #d97706;
  --etq-rework-soft: #fff4e0;
  --etq-reject: #dc2626;
  --etq-reject-soft: #feebeb;
  --etq-wait: #a16207;
  --etq-wait-soft: #fdf6d8;
  --etq-tag: #7c3aed;
  --etq-tag-soft: #f1eaff;

  --etq-radius: 16px;
  --etq-radius-sm: 10px;
  --etq-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);

  min-height: 100%;
  padding: 20px;
  background: var(--etq-bg);
  color: var(--etq-ink);
  border-radius: 18px;
  font-feature-settings: "tnum" 1;
}

.etq *,
.etq *::before,
.etq *::after {
  box-sizing: border-box;
}

/* ---------- top bar ---------------------------------------------------- */

.etq__topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px 16px;
  background: var(--etq-surface);
  border: 1px solid var(--etq-line);
  border-radius: var(--etq-radius);
  box-shadow: var(--etq-shadow);
}

.etq__back.ant-btn {
  height: 40px;
  border-radius: 10px;
  font-weight: 600;
}

.etq__title {
  flex: 1 1;
  min-width: 0;
}

.etq__title h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--etq-ink);
}

.etq__title p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--etq-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.etq__top-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.etq-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
}

.etq-pill--neutral {
  background: #f1f4f9;
  color: var(--etq-ink-2);
  border-color: var(--etq-line);
}
.etq-pill--blue {
  background: var(--etq-primary-soft);
  color: var(--etq-primary);
  border-color: #cfe0ff;
}
.etq-pill--reject {
  background: var(--etq-reject-soft);
  color: var(--etq-reject);
  border-color: #f8c9c9;
}
.etq-pill--rework {
  background: var(--etq-rework-soft);
  color: var(--etq-rework);
  border-color: #fbdca7;
}
.etq-pill--tag {
  background: var(--etq-tag-soft);
  color: var(--etq-tag);
  border-color: #dccbff;
}

/* ---------- layout ----------------------------------------------------- */

.etq__layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  grid-gap: 18px;
  gap: 18px;
  align-items: start;
}

.etq__aside {
  position: -webkit-sticky;
  position: sticky;
  top: 12px;
}

.etq-card {
  background: var(--etq-surface);
  border: 1px solid var(--etq-line);
  border-radius: var(--etq-radius);
  box-shadow: var(--etq-shadow);
  overflow: hidden;
}

.etq-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--etq-line-soft);
}

.etq-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--etq-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.etq-card__body {
  padding: 18px;
}
.etq-card + .etq-card {
  margin-top: 14px;
}

.etq-step-no {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--etq-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- details panel --------------------------------------------- */

.etq-media {
  display: grid;
  place-items: center;
  height: 170px;
  margin-bottom: 14px;
  background: repeating-linear-gradient(
    45deg,
    #f8fafd,
    #f8fafd 10px,
    #f3f6fb 10px,
    #f3f6fb 20px
  );
  border: 1px solid var(--etq-line-soft);
  border-radius: 12px;
  overflow: hidden;
}

.etq-media .ant-image-img {
  max-height: 160px;
  object-fit: contain;
}

.etq-kv {
  margin: 0;
  display: grid;
  grid-gap: 0;
  gap: 0;
}

.etq-kv__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--etq-line);
}

.etq-kv__row:last-child {
  border-bottom: 0;
}
.etq-kv dt {
  margin: 0;
  font-size: 12.5px;
  color: var(--etq-muted);
  font-weight: 500;
}
.etq-kv dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--etq-ink);
  text-align: right;
  overflow-wrap: anywhere;
}

/* ---------- tabs ------------------------------------------------------- */

.etq .ant-tabs-nav {
  margin-bottom: 14px;
}
.etq .ant-tabs-nav::before {
  border-bottom-color: var(--etq-line);
}

.etq .ant-tabs-tab {
  padding: 11px 16px;
  font-weight: 600;
  color: var(--etq-muted);
}

.etq .ant-tabs-tab:hover {
  color: var(--etq-primary);
}
.etq .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: var(--etq-primary);
}

.etq .ant-tabs-ink-bar {
  height: 3px;
  border-radius: 3px 3px 0 0;
}

/* ---------- action buttons -------------------------------------------- */

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

.etq-action {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.etq-action .anticon {
  flex-shrink: 0;
  font-size: 15px;
}

.etq-action small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
}

.etq-action:hover:not(:disabled) {
  filter: brightness(0.96);
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.1);
}

.etq-action:active:not(:disabled) {
  transform: none;
}

.etq-action:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.etq-action:disabled {
  cursor: not-allowed;
  background: #f3f4f6;
  color: #9ca3af;
  border-color: #e5e7eb;
  box-shadow: none;
}

.etq-action--pass {
  background: var(--etq-pass);
  color: #fff;
}

.etq-action--rework {
  background: var(--etq-rework);
  color: #fff;
}

.etq-action--reject {
  background: var(--etq-reject);
  color: #fff;
}

.etq-action--tag {
  background: var(--etq-tag-soft);
  color: var(--etq-tag);
  border-color: #dccbff;
}
.etq-cooldown-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--etq-muted);
}

/* ---------- progress + stats ------------------------------------------ */

.etq-progress {
  margin-top: 14px;
}

.etq-progress__top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--etq-ink-2);
}

.etq-progress__bar {
  height: 10px;
  background: #edf1f7;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}

.etq-progress__seg {
  height: 100%;
  transition: width 0.3s ease;
}
.etq-progress__seg--pass {
  background: var(--etq-pass);
}
.etq-progress__seg--rework {
  background: var(--etq-rework);
}
.etq-progress__seg--fail {
  background: var(--etq-reject);
}
.etq-progress__seg--wait {
  background: #eab308;
}

.etq-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  grid-gap: 12px;
  gap: 12px;
  margin-top: 14px;
}

.etq-stat {
  position: relative;
  padding: 14px 16px 16px;
  border-radius: 14px;
  border: 1px solid var(--etq-line);
  background: var(--etq-surface);
  overflow: hidden;
}

.etq-stat::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--etq-muted);
  background: var(--etq-stat-color, var(--etq-muted));
  opacity: 0.85;
}

.etq-stat__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--etq-muted);
}

.etq-stat__value {
  margin-top: 4px;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--etq-ink);
  color: var(--etq-stat-color, var(--etq-ink));
}

.etq-stat--pass {
  --etq-stat-color: var(--etq-pass);
  background: var(--etq-pass-soft);
  border-color: #c8ecd5;
}
.etq-stat--rework {
  --etq-stat-color: var(--etq-rework);
  background: var(--etq-rework-soft);
  border-color: #f8dfb2;
}
.etq-stat--fail {
  --etq-stat-color: var(--etq-reject);
  background: var(--etq-reject-soft);
  border-color: #f6cccc;
}
.etq-stat--wait {
  --etq-stat-color: var(--etq-wait);
  background: var(--etq-wait-soft);
  border-color: #f1e3a0;
}
.etq-stat--tag {
  --etq-stat-color: var(--etq-tag);
  background: var(--etq-tag-soft);
  border-color: #dfd0ff;
}

.etq-section-label {
  margin: 18px 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--etq-muted);
}

/* ---------- defects tab ------------------------------------------------ */

.etq-defects__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.etq-defects__grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  grid-gap: 14px;
  gap: 14px;
}

.etq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 330px;
  overflow-y: auto;
  padding: 2px;
}

.etq-chip {
  padding: 8px 14px;
  border: 1.5px solid var(--etq-line);
  border-radius: 999px;
  background: #fff;
  color: var(--etq-ink-2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.etq-chip:hover {
  border-color: var(--etq-primary);
  color: var(--etq-primary);
}
.etq-chip[aria-pressed="true"] {
  background: var(--etq-primary);
  border-color: var(--etq-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.etq-chip:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.etq-defect-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  grid-gap: 8px;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 2px;
  margin-top: 10px;
}

.etq-defect-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--etq-line);
  border-radius: 10px;
  background: #fff;
  color: var(--etq-ink);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s ease;
}

.etq-defect-btn:hover:not(:disabled) {
  border-color: var(--etq-reject);
  background: #fff8f8;
}
.etq-defect-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.etq-defect-btn .anticon {
  color: var(--etq-muted);
}
.etq-defect-btn.is-used {
  border-color: #f6cccc;
  background: var(--etq-reject-soft);
}

.etq-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--etq-reject);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
}

.etq-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--etq-primary-soft);
  color: var(--etq-primary);
  font-size: 12.5px;
  font-weight: 600;
}

.etq-added {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.etq-added__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--etq-line);
  border-radius: 12px;
  background: #fcfdff;
}

.etq-added__idx {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eef2f9;
  font-size: 12px;
  font-weight: 700;
  color: var(--etq-ink-2);
}

.etq-added__main {
  flex: 1 1;
  min-width: 0;
}
.etq-added__defect {
  font-size: 14px;
  font-weight: 700;
  color: var(--etq-ink);
}
.etq-added__part {
  font-size: 12.5px;
  color: var(--etq-muted);
}

.etq-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.etq-thumb {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--etq-line);
}

.etq-thumb .ant-image,
.etq-thumb .ant-image-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
}

.etq-thumb__x {
  position: absolute;
  top: 1px;
  right: 1px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.75);
  color: #fff;
  font-size: 9px;
  cursor: pointer;
}

.etq-empty-inline {
  padding: 22px;
  text-align: center;
  color: var(--etq-muted);
  font-size: 13px;
  border: 1.5px dashed var(--etq-line);
  border-radius: 12px;
}

.etq-footer {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  border: 1px solid var(--etq-line);
  border-radius: var(--etq-radius);
  box-shadow: 0 -4px 18px rgba(16, 24, 40, 0.07);
}

.etq-footer__info {
  font-size: 13px;
  font-weight: 600;
  color: var(--etq-ink-2);
}
.etq-footer .ant-btn {
  height: 42px;
  border-radius: 10px;
  font-weight: 700;
  padding-inline: 20px;
}

/* ---------- scan modal ------------------------------------------------- */

.etq-scan {
  text-align: center;
  padding: 6px 0 2px;
}

.etq-scan__icon {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--etq-tag-soft);
  color: var(--etq-tag);
  font-size: 32px;
  animation: etq-pulse 1.8s ease-in-out infinite;
}

@keyframes etq-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.35);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(124, 58, 237, 0);
  }
}

.etq-scan p {
  margin: 0 0 14px;
  color: var(--etq-muted);
  font-size: 13.5px;
}

/* ---------- misc ------------------------------------------------------- */

.etq-empty {
  padding: 36px 0;
}

.etq-summary-table .ant-table-thead > tr > th {
  background: #f6f8fc;
  color: var(--etq-ink-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.etq .ant-input,
.etq .ant-input-affix-wrapper,
.etq .ant-select-selector {
  border-radius: 10px !important;
}

.etq-radio-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- responsive ------------------------------------------------- */

@media (max-width: 1100px) {
  .etq__layout {
    grid-template-columns: 1fr;
  }
  .etq__aside {
    position: static;
  }
  .etq-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 767px) {
  .etq {
    padding: 10px;
    border-radius: 0;
  }
  .etq__topbar {
    flex-wrap: wrap;
    padding: 10px 12px;
  }
  .etq__top-chips {
    width: 100%;
    justify-content: flex-start;
  }
  .etq-card__body {
    padding: 14px;
  }
  .etq-defects__grid {
    grid-template-columns: 1fr;
  }
  .etq-stat__value {
    font-size: 26px;
  }
  .etq-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .etq-footer .ant-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .etq-action,
  .etq-chip,
  .etq-defect-btn,
  .etq-progress__seg {
    transition: none;
  }
  .etq-scan__icon {
    animation: none;
  }
}
@media (max-width: 767px) {
  .etq-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .etq-action {
    min-height: 40px;
    padding: 8px;
    font-size: 12px;
  }
}
/*---------------------summary ---------*/
.etqc-dashboard {
  --etqc-bg: #f4f7fb;
  --etqc-card: #fff;
  --etqc-border: #e3e9f0;
  --etqc-text: #1e252b;
  --etqc-muted: #6f7b88;
  box-sizing: border-box;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px;
  background: var(--etqc-bg);
  color: var(--etqc-text);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.etqc-dashboard * {
  box-sizing: border-box;
}
.etqc-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--etqc-border);
  border-radius: 16px;
  box-shadow: 0 4px 18px #182d4610;
}
.etqc-page-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.etqc-page-accent {
  width: 5px;
  height: 58px;
  flex: none;
  border-radius: 8px;
  background: #14706d;
}
.etqc-blue-accent {
  background: #3478f6;
}
.etqc-eyebrow {
  margin: 0 0 5px;
  color: #14706d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
}
.etqc-page-header h1 {
  margin: 0;
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.2;
}
.etqc-page-subtitle {
  margin: 6px 0 0;
  color: var(--etqc-muted);
  font-size: 13px;
}
.etqc-live-pill,
.etqc-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eaf6f1;
  color: #13734e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
}
.etqc-live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20a46b;
  box-shadow: 0 0 0 4px #20a46b20;
}
.etqc-summary-pill {
  background: #eef4ff;
  color: #3478f6;
}
.etqc-section {
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--etqc-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 14px #182d4608;
}
.etqc-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 66px;
  padding: 13px 18px;
  border: 0;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.etqc-section-head:hover {
  background: #fbfcfe;
}
.etqc-section-mark {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 3px;
}
.etqc-section-heading {
  display: flex;
  flex: 1 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.etqc-section-heading strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.etqc-section-heading small {
  color: var(--etqc-muted);
  font-size: 12px;
}
.etqc-chevron {
  display: inline-flex;

  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--etqc-border);
  border-radius: 8px;
  color: #647180;
  font-size: 19px;
  line-height: 0.5;
  transform: rotate(0);
  transition: transform 0.18s;
}
.etqc-chevron.is-open {
  transform: rotate(180deg);
}
.etqc-section-body {
  padding: 0 14px 14px;
}
.etqc-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 12px;
  gap: 12px;
}
.etqc-chart-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--etqc-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}
.etqc-chart-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 25px;
  margin-bottom: 5px;
}
.etqc-chart-indicator {
  width: 4px;
  height: 20px;
  border-radius: 4px;
}
.etqc-chart-title h3 {
  flex: 1 1;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}
.etqc-chart-title > b {
  font-size: 16px;
  font-weight: 800;
}
.etqc-chart-layout {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(190px, 1.1fr);
  align-items: center;
  grid-gap: 8px;
  gap: 8px;
  min-height: 200px;
}
.etqc-chart-layout .apexcharts-canvas {
  max-width: 100%;
  margin: 0 auto;
}
.etqc-legend {
  min-width: 0;
}
.etqc-legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 35px;
  padding: 6px 0;
  border-bottom: 1px solid #edf0f4;
}
.etqc-legend-row:last-child {
  border-bottom: 0;
}
.etqc-legend-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
}
.etqc-legend-label {
  flex: 1 1;
  overflow: hidden;
  color: #4f5b68;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.etqc-legend-pct {
  min-width: 32px;
  color: #84909d;
  font-size: 10px;
  text-align: right;
}
.etqc-legend-row strong {
  min-width: 28px;
  font-size: 12px;
  text-align: right;
}
.etqc-empty-chart {
  display: grid;
  min-height: 190px;
  place-items: center;
  color: #8994a1;
  font-size: 12px;
}
.etqc-list {
  display: grid;
  grid-gap: 9px;
  gap: 9px;
}
.etqc-group-card {
  overflow: hidden;
  border: 1px solid var(--etqc-border);
  border-radius: 12px;
  background: #fff;
}
.etqc-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  padding: 10px 13px;
  border: 0;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.etqc-group-head:hover {
  background: #fbfcfe;
}
.etqc-group-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border-radius: 11px;
  font-size: 22px;
  font-weight: 700;
}
.etqc-group-copy {
  display: flex;
  flex: 1 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.etqc-group-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.etqc-group-copy small {
  overflow: hidden;
  color: var(--etqc-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.etqc-group-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  padding: 0 5px;
}
.etqc-group-total small {
  color: var(--etqc-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.7px;
}
.etqc-group-total strong {
  font-size: 19px;
  font-weight: 800;
}
.etqc-group-body {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--etqc-border);
  background: #fcfdff;
}
.etqc-metrics,
.etqc-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  grid-gap: 8px;
  gap: 8px;
}
.etqc-metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 68px;
  padding: 11px 12px;
  border: 1px solid var(--etqc-border);
  border-radius: 10px;
  background: #fff;
}
.etqc-metric span {
  color: #71808e;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}
.etqc-metric strong {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
}
.etqc-color-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 35px;
}
.etqc-color-info strong {
  font-size: 12px;
}
.etqc-color-swatch {
  width: 17px;
  height: 17px;
  border: 1px solid #d5dce4;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #f2f4f7;
}
.etqc-size-chip {
  padding: 5px 8px;
  border-radius: 7px;
  background: #fff4dc;
  color: #9c680a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.etqc-today-box {
  padding: 12px;
  border: 1px solid #dce7ff;
  border-radius: 10px;
  background: #f4f7ff;
}
.etqc-today-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #2c5db8;
  font-size: 12px;
}
.etqc-today-heading span {
  color: #6e7f99;
  font-size: 11px;
}
.etqc-mini-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
}
.etqc-mini-metrics .etqc-metric {
  min-height: 55px;
  padding: 8px;
  background: #fff;
}
.etqc-mini-metrics .etqc-metric strong {
  font-size: 17px;
}
.etqc-bundle-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.etqc-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 100px;
  padding: 20px;
  color: #7b8794;
  font-size: 12px;
  text-align: center;
}
.etqc-empty-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #f1f4f8;
  color: #7b8794;
  font-size: 19px;
}
@media (max-width: 900px) {
  .etqc-dashboard {
    padding: 12px;
  }
  .etqc-chart-layout {
    grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1.2fr);
  }
  .etqc-chart-layout .apexcharts-canvas {
    transform: scale(0.95);
    transform-origin: center;
  }
  .etqc-section-body {
    padding: 0 10px 10px;
  }
}
@media (max-width: 650px) {
  .etqc-dashboard {
    padding: 8px;
  }
  .etqc-page-header {
    padding: 14px;
    align-items: flex-start;
  }
  .etqc-page-subtitle {
    font-size: 11px;
  }
  .etqc-chart-grid {
    grid-template-columns: 1fr;
  }
  .etqc-chart-layout {
    grid-template-columns: minmax(130px, 0.8fr) minmax(160px, 1.2fr);
    min-height: 170px;
  }
  .etqc-chart-layout .apexcharts-canvas {
    transform: scale(0.9);
  }
  .etqc-section-head {
    min-height: 58px;
    padding: 10px 12px;
  }
  .etqc-section-heading strong {
    font-size: 12px;
  }
  .etqc-group-head {
    gap: 8px;
    padding: 9px;
  }
  .etqc-group-icon {
    width: 34px;
    height: 34px;
  }
  .etqc-group-copy strong {
    font-size: 12px;
  }
  .etqc-group-copy small {
    font-size: 10px;
  }
  .etqc-group-total strong {
    font-size: 16px;
  }
  .etqc-mini-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .etqc-bundle-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .etqc-metric {
    min-height: 58px;
    padding: 9px;
  }
  .etqc-metric strong {
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .etqc-chevron {
    transition: none;
  }
}

/* Append to EndTableQc.css - live counts strip + progress bar on the QC tab */

.etqm-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  grid-gap: 10px;
  gap: 10px;
}

.etqm {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  border-left-width: 4px;
}
.etqm__value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}
.etqm__label {
  font-size: 12px;
  font-weight: 600;
  color: #5b6470;
}

.etqm--pass {
  background: #f0fbf6;
  border-color: #22a06b;
}
.etqm--pass .etqm__value {
  color: #168653;
}
.etqm--rework {
  background: #fffbeb;
  border-color: #f59e0b;
}
.etqm--rework .etqm__value {
  color: #b45309;
}
.etqm--reject {
  background: #fef2f2;
  border-color: #ef5350;
}
.etqm--reject .etqm__value {
  color: #d9363e;
}
.etqm--waiting {
  background: #fefce8;
  border-color: #eab308;
}
.etqm--waiting .etqm__value {
  color: #a16207;
}
.etqm--tag {
  background: #eff6ff;
  border-color: #3b82f6;
}
.etqm--tag .etqm__value {
  color: #2563eb;
}

.etqm-progress-wrap {
  margin-top: 12px;
}
.etqm-progress-wrap small {
  display: block;
  margin-top: 4px;
  color: #64748b;
}
.etqm-progress {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.etqm-progress__seg {
  height: 100%;
  transition: width 0.3s ease;
}
.etqm-progress__seg--pass {
  background: #22a06b;
}
.etqm-progress__seg--waiting {
  background: #eab308;
}
.etqm-progress__seg--reject {
  background: #ef5350;
}

@media (prefers-reduced-motion: reduce) {
  .etqm-progress__seg {
    transition: none;
  }
}

.iwc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
  box-sizing: border-box;
}

.iwc-modal,
.iwc-modal * {
  box-sizing: border-box;
}

.iwc-modal {
  display: flex;
  flex-direction: column;
  width: min(820px, 100%);
  max-height: 88vh;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5eaf2;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
  color: #172033;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.iwc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #e9edf4;
}

.iwc-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.iwc-header p {
  margin: 5px 0 0;
  color: #718096;
  font-size: 13px;
}

.iwc-icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.iwc-content {
  padding: 18px 24px;
  overflow-y: auto;
  min-height: 0;
}

.iwc-comments-section,
.iwc-images-section {
  margin-bottom: 22px;
}

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

.iwc-section-heading h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.iwc-section-heading > span {
  padding: 4px 9px;
  border-radius: 20px;
  background: #eff4ff;
  color: #2856a5;
  font-size: 12px;
  font-weight: 600;
}

.iwc-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.iwc-comment-list {
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}

.iwc-comment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: #f8fafc;
}

.iwc-comment-row p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 13px;
}

.iwc-comment-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.iwc-comment-actions button {
  width: 29px;
  height: 29px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 17px;
  cursor: pointer;
}

.iwc-comment-actions .iwc-delete-text {
  color: #dc2626;
}

.iwc-empty {
  padding: 16px;
  color: #94a3b8;
  text-align: center;
  font-size: 13px;
}

.iwc-comment-editor {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 12px;
}

.iwc-comment-editor textarea,
.iwc-single-comment {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d9e0eb;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 13px;
  resize: vertical;
}

.iwc-comment-editor textarea:focus,
.iwc-single-comment:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.iwc-single-comment {
  display: block;
}

.iwc-preview-link {
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  cursor: pointer;
}

.iwc-text-preview {
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
}

.iwc-text-preview p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.iwc-text-preview button {
  border: 0;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
}

.iwc-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 230px;
  padding: 12px;
  border: 1px solid #e9edf4;
  border-radius: 10px;
  background: #f8fafc;
}

.iwc-carousel-arrow {
  flex-shrink: 0;
  width: 34px;
  height: 38px;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 25px;
  cursor: pointer;
}

.iwc-carousel-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.iwc-carousel-main {
  position: relative;
  display: flex;
  flex: 1 1;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 240px;
}

.iwc-carousel-main > img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.iwc-image-count {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 5px 8px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 11px;
}

.iwc-image-delete {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.iwc-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 2px 0 8px;
  overflow-x: auto;
}

.iwc-thumbnail {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  padding: 3px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.iwc-thumbnail.active {
  border: 2px solid #2563eb;
}

.iwc-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.iwc-no-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  text-align: center;
}

.iwc-no-images-icon {
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 30px;
}

.iwc-no-images strong {
  font-size: 14px;
}

.iwc-no-images p {
  margin: 7px 0 0;
  color: #718096;
  font-size: 12px;
}

.iwc-upload-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #2563eb;
  font-size: 13px;
}

.iwc-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: iwc-spin 0.7s linear infinite;
}

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

.iwc-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  padding: 16px 24px;
  border-top: 1px solid #e9edf4;
  background: #fff;
}

.iwc-primary-button,
.iwc-secondary-button,
.iwc-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.iwc-primary-button {
  background: #0f3460;
  color: #fff;
}

.iwc-primary-button:hover {
  background: #17477e;
}

.iwc-secondary-button {
  border-color: #d9e2ef;
  background: #fff;
  color: #334155;
}

.iwc-secondary-button:hover {
  background: #f1f5f9;
}

.iwc-close-button {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.iwc-primary-button:disabled,
.iwc-secondary-button:disabled,
.iwc-close-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.iwc-hidden-input {
  display: none;
}

@media (max-width: 600px) {
  .iwc-overlay {
    padding: 8px;
  }

  .iwc-modal {
    max-height: 94vh;
    border-radius: 10px;
  }

  .iwc-header,
  .iwc-content {
    padding: 15px;
  }

  .iwc-header h2 {
    font-size: 18px;
  }

  .iwc-carousel {
    min-height: 190px;
    gap: 6px;
    padding: 7px;
  }

  .iwc-carousel-main {
    height: 190px;
  }

  .iwc-carousel-arrow {
    width: 28px;
  }

  .iwc-footer {
    padding: 12px;
    gap: 7px;
  }

  .iwc-primary-button,
  .iwc-secondary-button,
  .iwc-close-button {
    flex: 1 1 auto;
    padding: 9px 10px;
  }

  .iwc-comment-editor {
    flex-wrap: wrap;
  }
}

/* =========================================================
   DEFECT CARD + PART CARD
   Shared styles for both types
========================================================= */

.defect-card {
  --card-accent: #c2415d;

  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.defect-card--part {
  --card-accent: #0f766e;
}

.defect-card--defect {
  --card-accent: #c2415d;
}

.defect-card:hover:not(.defect-card--disabled) {
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgb(15 23 42 / 7%);
  transform: translateY(-1px);
}

.defect-card--selected {
  border: 2px solid var(--card-accent);
  background: #f8fafc;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--card-accent) 10%, transparent);
}

.defect-card--disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Selectable card content */

.defect-card__select {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #172033;
  text-align: left;
  cursor: pointer;
}

.defect-card__select:focus-visible,
.defect-card__preview:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: -2px;
}

.defect-card__select:disabled {
  cursor: not-allowed;
}

/* Image */

.defect-card__image-wrap {
  position: relative;
  display: flex;
  width: 100%;
  height: 100px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 7px;
  background: #f1f5f9;
}

.defect-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.defect-card__placeholder {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--card-accent);
  color: #ffffff;
  font-size: 19px;
  font-weight: 700;
}

/* Selected indicator */

.defect-card__selected {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--card-accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 1px 4px rgb(15 23 42 / 15%);
}

/* Text content */

.defect-card__content {
  min-width: 0;
  padding: 7px 2px 3px;
}

.defect-card__type {
  display: inline-block;
  color: var(--card-accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  line-height: 1.3;
}

.defect-card__title {
  display: -webkit-box;
  margin: 4px 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.defect-card__meta {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Preview button */

.defect-card__preview {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  width: calc(100% - 16px);
  margin: auto 8px 8px;
  padding: 5px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.defect-card__preview:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

/* =========================================================
   IMAGE PREVIEW DIALOG
========================================================= */

.defect-preview-overlay {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(15 23 42 / 65%);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
}

.defect-preview-dialog {
  width: min(620px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgb(15 23 42 / 20%);
}

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

.defect-preview-header h3 {
  margin: 0;
  color: #172033;
  font-size: 17px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.defect-preview-header button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
}

.defect-preview-header button:hover {
  background: #e2e8f0;
}

.defect-preview-dialog > img {
  display: block;
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 8px;
  background: #f8fafc;
}

.defect-preview-dialog > p {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* =========================================================
   DEFECTS AND PARTS - MAIN COMPONENT
========================================================= */

.dap-page {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  color: #172033;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  box-sizing: border-box;
}

.dap-page *,
.dap-page *::before,
.dap-page *::after {
  box-sizing: border-box;
}

/* Header */

.dap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
}

.dap-eyebrow {
  color: #0f766e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.dap-header h2 {
  margin: 4px 0;
  color: #172033;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 750;
  letter-spacing: -0.4px;
}

.dap-header p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.dap-header-count {
  display: flex;
  min-width: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.dap-header-count span {
  color: #172033;
  font-size: 21px;
  font-weight: 750;
  line-height: 1.2;
}

.dap-header-count small {
  margin-top: 3px;
  color: #64748b;
  font-size: 10px;
}

/* Toolbar */

.dap-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.dap-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
  background: #f1f5f9;
}

.dap-tabs button {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.dap-tabs button span {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 4px;
  border-radius: 5px;
  background: #e2e8f0;
  color: #475569;
  font-size: 10px;
}

.dap-tabs button.active {
  background: #ffffff;
  color: #0f3460;
  box-shadow: 0 1px 4px rgb(15 23 42 / 9%);
}

.dap-tabs button.active span {
  background: #e0e7ff;
  color: #3730a3;
}

/* Search */

.dap-search {
  display: flex;
  width: min(300px, 45%);
  min-width: 140px;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #dbe3ed;
  border-radius: 7px;
  background: #ffffff;
}

.dap-search:focus-within {
  border-color: #64748b;
  box-shadow: 0 0 0 2px rgb(100 116 139 / 10%);
}

.dap-search > span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 18px;
}

.dap-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #172033;
  font: inherit;
  font-size: 12px;
}

.dap-search input::placeholder {
  color: #94a3b8;
}

.dap-search button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
}

/* Secondary actions */

.dap-secondary-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}

.dap-outline-button,
.dap-submit-button {
  display: inline-flex;
  min-height: 35px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}

.dap-outline-button {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.dap-outline-button:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.dap-submit-button {
  min-width: 100px;
  border: 1px solid #0f3460;
  background: #0f3460;
  color: #ffffff;
}

.dap-submit-button:hover:not(:disabled) {
  background: #174879;
}

.dap-submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Results heading */

.dap-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 10px;
}

.dap-results-heading h3 {
  margin: 0;
  color: #172033;
  font-size: 14px;
  font-weight: 750;
}

.dap-results-heading span {
  color: #64748b;
  font-size: 11px;
}

/* Cards grid */

.dap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  align-content: start;
  grid-gap: 10px;
  gap: 10px;
  padding-bottom: 18px;
}

.dap-empty {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dap-empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 23px;
}

.dap-empty h3 {
  margin: 10px 0 4px;
  color: #172033;
  font-size: 14px;
}

.dap-empty p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

/* Sticky selection footer */

.dap-footer {
  position: -webkit-sticky;
  position: sticky;
  z-index: 5;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: auto -18px -18px;
  padding: 12px 18px;
  border-top: 1px solid #e2e8f0;
  border-radius: 0 0 14px 14px;
  background: rgb(255 255 255 / 96%);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}

.dap-selection-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 11px;
}

.dap-selection-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #0f766e;
}

.dap-footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.dap-footer-actions button {
  min-height: 34px;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {
  .dap-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .dap-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dap-search {
    width: 100%;
  }
}

@media (max-width: 650px) {
  .dap-page {
    padding: 12px;
    border-radius: 10px;
  }

  .dap-header {
    gap: 8px;
    padding-bottom: 12px;
  }

  .dap-header h2 {
    font-size: 19px;
  }

  .dap-header p {
    font-size: 11px;
  }

  .dap-toolbar {
    padding: 8px;
  }

  .dap-tabs {
    width: 100%;
  }

  .dap-tabs button {
    flex: 1 1;
    padding: 7px;
    font-size: 11px;
  }

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

  .defect-card__select {
    padding: 7px;
  }

  .defect-card__image-wrap {
    height: 90px;
  }

  .defect-card__title {
    font-size: 12px;
  }

  .dap-footer {
    align-items: stretch;
    flex-direction: column;
    margin: auto -12px -12px;
    padding: 10px 12px;
  }

  .dap-selection-summary {
    flex-wrap: wrap;
  }

  .dap-footer-actions {
    width: 100%;
  }

  .dap-footer-actions button {
    flex: 1 1;
  }

  .defect-preview-overlay {
    padding: 12px;
  }

  .defect-preview-dialog {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .defect-card,
  .defect-card__preview,
  .dap-tabs button,
  .dap-outline-button,
  .dap-submit-button {
    transition: none;
  }

  .defect-card:hover:not(.defect-card--disabled) {
    transform: none;
  }
}

/* DefectsAndParts - same blue (parts) / red (defects) language as the RN app */

.dp {
  --dp-blue: #2563eb;
  --dp-blue-soft: #eff6ff;
  --dp-blue-border: #8eb3e7;
  --dp-blue-ink: #1e3a8a;
  --dp-red: #dc2626;
  --dp-red-soft: #fef2f2;
  --dp-red-border: #e9a5a5;
  --dp-red-ink: #991b1b;
  --dp-ink: #0f172a;
  --dp-muted: #64748b;
  --dp-line: #e2e8f0;
  --dp-bg: #f8fafc;
  --dp-surface: #ffffff;
  --dp-green: #16a34a;

  display: flex;
  flex-direction: column;
  background: var(--dp-bg);
  border: 1px solid var(--dp-line);
  border-radius: 12px;
  overflow: hidden;
}

/* ------------------------------- action bar ------------------------------- */
.dp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  background: var(--dp-surface);
  border-bottom: 1px solid var(--dp-line);
}
.dp-bar__left,
.dp-bar__right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}
.dp-submit.ant-btn-primary:not(:disabled) {
  background: var(--dp-green);
}
.dp-submit.ant-btn-primary:not(:disabled):hover {
  background: #15803d;
}

.dp-current {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 280px;
  padding: 3px 4px 3px 4px;
  background: var(--dp-bg);
  border: 1px solid #dbeafe;
  border-radius: 9px;
}
.dp-current__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--dp-blue-soft);
  color: var(--dp-blue);
}
.dp-current__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.dp-current__text small {
  font-size: 11px;
  color: var(--dp-muted);
}
.dp-current__text strong {
  font-size: 13px;
  color: var(--dp-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dp-current__clear {
  border: 0;
  background: none;
  padding: 4px;
  color: #94a3b8;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.dp-current__clear:hover {
  color: var(--dp-red);
}
.dp-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--dp-muted);
  font-size: 13px;
}
.dp-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.dp-pill--reject {
  background: var(--dp-red-soft);
  color: var(--dp-red-ink);
}
.dp-pill--rework {
  background: #fffbeb;
  color: #b45309;
}

/* --------------------------------- layout --------------------------------- */
.dp-body {
  display: flex;
  gap: 12px;
  padding: 12px;
  align-items: flex-start;
}
.dp-main {
  flex: 1 1;
  min-width: 0;
}

/* ------------------------------ section header ----------------------------- */
.dp-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.dp-section__bar {
  width: 4px;
  align-self: stretch;
  border-radius: 3px;
}
.dp-section__bar--part {
  background: var(--dp-blue);
}
.dp-section__bar--defect {
  background: var(--dp-red);
}
.dp-section__text {
  flex: 1 1;
  min-width: 0;
}
.dp-section__text h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--dp-ink);
}
.dp-section__text p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--dp-muted);
}
.dp-section__count {
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.dp-section__count--part {
  background: var(--dp-blue-soft);
  color: #1d4ed8;
}
.dp-section__count--defect {
  background: var(--dp-red-soft);
  color: #b91c1c;
}

/* ---------------------------------- search -------------------------------- */
.dp-search {
  margin-bottom: 12px;
}
.dp-search__result {
  display: block;
  margin: 4px 0 0 4px;
  font-size: 12px;
  color: var(--dp-muted);
}

/* ----------------------------------- grid --------------------------------- */
.dp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  grid-gap: 10px;
  gap: 10px;
}
.dp-empty {
  padding: 40px 0;
}

/* ----------------------------------- cards -------------------------------- */
.dp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 156px;
  padding: 12px 8px 10px;
  background: var(--dp-surface);
  border: 1px solid var(--dp-blue-border);
  border-radius: 10px;
  cursor: pointer;
  -webkit-user-select: none;
          user-select: none;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
}
.dp-card:hover {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}
.dp-card:active {
  transform: scale(0.98);
}
.dp-card:focus-visible {
  outline: 2px solid var(--dp-ink);
  outline-offset: 2px;
}
.dp-card--defect {
  border-color: var(--dp-red-border);
}
.dp-card--part.is-selected {
  background: #c9d9f0;
  border: 2px solid var(--dp-blue);
  padding: 11px 7px 9px;
}

.dp-card__media {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  font-size: 28px;
}
.dp-card--part .dp-card__media {
  background: #dbeafe;
  color: var(--dp-blue);
  border: 1px solid var(--dp-blue-border);
}
.dp-card--defect .dp-card__media {
  background: #fee2e2;
  color: var(--dp-red);
  border: 1px solid var(--dp-red-border);
}
.dp-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dp-card__title {
  max-width: 100%;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: #1f2937;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dp-card--part.is-selected .dp-card__title {
  color: var(--dp-blue-ink);
}
.dp-card__meta,
.dp-card__count {
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.dp-card--defect .dp-card__meta {
  background: #fee2e2;
  color: var(--dp-red-ink);
}
.dp-card__count {
  background: var(--dp-ink);
  color: #fff;
}

.dp-card__check {
  position: absolute;
  top: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--dp-blue);
  color: #fff;
  font-size: 11px;
}
.dp-card__expand {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}

.dp-card--other {
  justify-content: center;
  border: 1.5px dashed #fca5a5;
}
.dp-card--other .dp-card__title {
  color: #b91c1c;
}
.dp-card__plus {
  font-size: 30px;
  color: var(--dp-red);
}
.dp-card__sub {
  font-size: 11px;
  color: #94a3b8;
}

/* ------------------------------ defects entered --------------------------- */
.dp-side {
  flex: 0 0 300px;
  position: -webkit-sticky;
  position: sticky;
  top: 8px;
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  background: var(--dp-surface);
  border: 1px solid var(--dp-line);
  border-radius: 12px;
  padding: 8px;
}
.dp-side.is-collapsed {
  flex-basis: 64px;
}
.dp-side__head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 2px 2px 8px;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: none;
  cursor: pointer;
  text-align: left;
}
.dp-side.is-collapsed .dp-side__head {
  flex-direction: column;
  border-bottom: 0;
  padding-bottom: 0;
}
.dp-side__accent {
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--dp-red);
}
.dp-side__title {
  flex: 1 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--dp-ink);
}
.dp-side__badge {
  min-width: 24px;
  padding: 1px 6px;
  border-radius: 12px;
  background: var(--dp-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.dp-side__chev {
  font-size: 18px;
  color: #475569;
  line-height: 1;
}
.dp-side__list {
  margin-top: 8px;
  overflow-y: auto;
  padding-right: 2px;
}
.dp-side__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 36px 0;
  color: #94a3b8;
  font-size: 13px;
}
.dp-side__empty .anticon {
  font-size: 32px;
  color: #cbd5e1;
}

.dp-entry {
  margin-bottom: 8px;
  padding: 8px;
  background: var(--dp-bg);
  border: 1px solid var(--dp-line);
  border-left: 4px solid var(--dp-red);
  border-radius: 10px;
}
.dp-entry.has-warning {
  border-color: #f59e0b;
  border-left-color: #f59e0b;
  background: #fffbeb;
}
.dp-entry__head {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
}
.dp-entry__text {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dp-entry__text strong {
  font-size: 13px;
  color: var(--dp-ink);
}
.dp-entry__text span {
  font-size: 12px;
  color: var(--dp-muted);
}
.dp-entry__delete {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #fee2e2;
  color: var(--dp-red);
  cursor: pointer;
}
.dp-entry__photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dp-entry__warn {
  margin-top: 6px;
  font-size: 12px;
  color: #b45309;
}

.dp-thumb {
  position: relative;
  width: 56px;
  height: 56px;
}
.dp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background: #e5e7eb;
  cursor: zoom-in;
}
.dp-thumb button {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--dp-ink);
  color: #fff;
  font-size: 9px;
  cursor: pointer;
}
.dp-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1.5px dashed #94a3b8;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 10px;
  cursor: pointer;
}
.dp-upload .anticon {
  font-size: 16px;
}
.dp-upload:hover:not(:disabled) {
  border-color: var(--dp-blue);
  color: var(--dp-blue);
}
.dp-upload:disabled {
  cursor: progress;
  opacity: 0.7;
}

/* ------------------------------- responsive ------------------------------- */
@media (max-width: 900px) {
  .dp-body {
    flex-direction: column;
  }
  .dp-side,
  .dp-side.is-collapsed {
    flex: none;
    width: 100%;
    position: static;
    max-height: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dp-card {
    transition: none;
  }
}

/* Page print template editor — same look as the label studio (slate + indigo) */

.ptv-root {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 110px);
  min-height: 560px;
  background: #f1f4f8;
  color: #1e293b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 12px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.ptv-root *,
.ptv-root *::before,
.ptv-root *::after {
  box-sizing: border-box;
}

/* ── header ── */
.ptv-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  flex-wrap: wrap;
}
.ptv-logo {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}
.ptv-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.ptv-subtitle {
  font-size: 11px;
  color: #64748b;
  display: flex;
  gap: 6px;
  align-items: center;
}
.ptv-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  background: #eef2ff;
  color: #4338ca;
}
.ptv-tag-amber {
  background: #fef3c7;
  color: #92400e;
}
.ptv-tag-slate {
  background: #f1f5f9;
  color: #475569;
}
.ptv-spacer {
  flex: 1 1;
}
.ptv-group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.ptv-ibtn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  cursor: pointer;
}
.ptv-ibtn:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}
.ptv-ibtn:disabled {
  opacity: 0.35;
  cursor: default;
}
.ptv-ibtn.ptv-danger:hover {
  color: #e11d48;
}
.ptv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.ptv-btn:hover {
  border-color: #a5b4fc;
  color: #4338ca;
}
.ptv-btn-primary {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
.ptv-btn-primary:hover {
  background: #4338ca;
  color: #fff;
}
.ptv-btn-sm {
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
}
.ptv-btn-danger {
  color: #e11d48;
}
.ptv-btn-danger:hover {
  border-color: #fda4af;
  color: #be123c;
}
.ptv-btn-block {
  width: 100%;
  justify-content: center;
}
.ptv-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  height: 30px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  color: #64748b;
}
.ptv-zoom input {
  width: 90px;
  accent-color: #4f46e5;
}

.ptv-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 14px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 11.5px;
}

/* ── body ── */
.ptv-body {
  display: flex;
  flex: 1 1;
  min-height: 0;
}

/* left rail */
.ptv-rail {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  min-height: 0;
}
.ptv-rail-sec {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
}
.ptv-rail-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
}
.ptv-rail-title .ptv-count {
  margin-left: auto;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 0 6px;
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
}
.ptv-palette {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 5px;
  gap: 5px;
}
.ptv-pal {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
  cursor: grab;
  font-size: 11px;
  font-weight: 500;
  color: #334155;
  -webkit-user-select: none;
          user-select: none;
}
.ptv-pal:hover {
  border-color: #818cf8;
  background: #eef2ff;
  color: #4338ca;
}
.ptv-pal .anticon {
  color: #64748b;
}
.ptv-search {
  position: relative;
}
.ptv-search .anticon {
  position: absolute;
  left: 8px;
  top: 8px;
  color: #94a3b8;
  font-size: 11px;
}
.ptv-search input {
  padding-left: 24px !important;
}
.ptv-vars {
  flex: 1 1;
  min-height: 0;
  overflow: auto;
  padding: 6px 8px 12px;
}
.ptv-var {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 4px 6px;
  margin-bottom: 1px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: grab;
  -webkit-user-select: none;
          user-select: none;
}
.ptv-var:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}
.ptv-var.ptv-var-out {
  opacity: 0.55;
}
.ptv-var-icon {
  width: 16px;
  flex-shrink: 0;
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
  padding-top: 1px;
}
.ptv-var-main {
  min-width: 0;
  flex: 1 1;
}
.ptv-var-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ptv-var-list .ptv-var-key {
  color: #4338ca;
  font-weight: 600;
}
.ptv-var-sample {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ptv-var-twist {
  width: 12px;
  flex-shrink: 0;
  color: #94a3b8;
  cursor: pointer;
  font-size: 9px;
  padding-top: 3px;
}
.ptv-scope-note {
  margin: 0 0 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.45;
}
.ptv-scope-note code {
  background: #eef2ff;
  color: #4338ca;
  padding: 0 4px;
  border-radius: 3px;
}

/* canvas */
.ptv-main {
  flex: 1 1;
  min-width: 0;
  overflow: auto;
  padding: 20px 24px 40px;
  background: radial-gradient(circle, #d5dbe4 1px, transparent 1px) 0 0 / 18px 18px;
}
.ptv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.ptv-chip {
  background: #fff;
  border-radius: 999px;
  padding: 2px 10px;
  box-shadow: 0 0 0 1px #e2e8f0;
  font-size: 11px;
  color: #475569;
}
.ptv-page-wrap {
  position: relative;
  display: inline-block;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15), 0 0 0 1px #e2e8f0;
  overflow: hidden;
}
.ptv-page-wrap iframe {
  border: 0;
  display: block;
  background: #fff;
  transform-origin: top left;
}
.ptv-canvas-hint {
  margin-top: 10px;
  font-size: 11px;
  color: #94a3b8;
}
.ptv-root-drop {
  margin-top: 10px;
  padding: 10px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.6);
}
.ptv-root-drop.ptv-over {
  border-color: #6366f1;
  color: #4338ca;
  background: #eef2ff;
}

/* inspector */
.ptv-insp {
  width: 360px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  min-height: 0;
}
.ptv-tabs {
  display: flex;
  border-bottom: 1px solid #f1f5f9;
}
.ptv-tab {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 2px 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 10px;
}
.ptv-tab:hover {
  color: #0f172a;
}
.ptv-tab.ptv-active {
  color: #4338ca;
  border-bottom-color: #6366f1;
}
.ptv-insp-title {
  padding: 10px 12px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.ptv-insp-body {
  flex: 1 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 12px 24px;
}

/* form atoms */
.ptv-field {
  display: block;
  margin-bottom: 10px;
}
.ptv-label {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #94a3b8;
}
.ptv-hint {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.4;
}
.ptv-input,
.ptv-select,
.ptv-textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  padding: 5px 8px;
  font-size: 12px;
  color: #1e293b;
  outline: none;
  font-family: inherit;
}
.ptv-input:focus,
.ptv-select:focus,
.ptv-textarea:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 2px #e0e7ff;
}
.ptv-input.ptv-drop-over,
.ptv-textarea.ptv-drop-over {
  border-color: #6366f1;
  background: #eef2ff;
}
.ptv-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}
.ptv-textarea {
  resize: vertical;
  min-height: 52px;
  line-height: 1.45;
}
.ptv-code {
  width: 100%;
  border: 1px solid #1e293b;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.5;
  outline: none;
  white-space: pre;
  overflow: auto;
}
.ptv-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 8px;
  gap: 8px;
}
.ptv-grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 8px;
  gap: 8px;
}
.ptv-grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 6px;
  gap: 6px;
}
.ptv-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ptv-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11.5px;
  color: #475569;
  cursor: pointer;
}
.ptv-check input {
  accent-color: #4f46e5;
}
.ptv-tog {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  font-size: 11px;
}
.ptv-tog.ptv-on {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
.ptv-seg {
  display: flex;
  gap: 4px;
}
.ptv-seg > * {
  flex: 1 1;
}
.ptv-color {
  width: 100%;
  height: 30px;
  padding: 2px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.ptv-sec {
  margin-bottom: 14px;
}
.ptv-sec-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
}
.ptv-sec-title .ptv-right {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.ptv-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 6px;
  background: #fff;
}
.ptv-card.ptv-card-sel {
  border-color: #818cf8;
  box-shadow: 0 0 0 2px #e0e7ff;
}
.ptv-card-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px 5px 8px;
  cursor: pointer;
  font-size: 11.5px;
}
.ptv-card-head .ptv-card-name {
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.ptv-card-head .ptv-card-meta {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}
.ptv-card-body {
  padding: 8px 10px 4px;
  border-top: 1px solid #f1f5f9;
}
.ptv-mini {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 11px;
}
.ptv-mini:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.ptv-mini.ptv-danger:hover {
  color: #e11d48;
}
.ptv-add {
  width: 100%;
  padding: 6px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  cursor: pointer;
}
.ptv-add:hover {
  border-color: #818cf8;
  color: #4338ca;
}
.ptv-empty {
  padding: 22px 14px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  text-align: center;
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.55;
}
.ptv-note {
  padding: 7px 9px;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 10px;
}
.ptv-note code {
  background: #eef2ff;
  color: #4338ca;
  border-radius: 3px;
  padding: 0 3px;
}
.ptv-warn {
  padding: 7px 9px;
  border-radius: 6px;
  background: #fff1f2;
  color: #be123c;
  font-size: 10.5px;
  margin-bottom: 10px;
  white-space: pre-wrap;
}
.ptv-type-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ptv-insert {
  position: relative;
}
.ptv-insert-sel {
  margin-top: 4px;
  font-size: 11px;
  color: #4338ca;
  border: 1px dashed #c7d2fe;
  background: #f8faff;
}

/* outline */
.ptv-ol-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11.5px;
}
.ptv-ol-item:hover {
  background: #f1f5f9;
}
.ptv-ol-item.ptv-ol-sel {
  background: #4f46e5;
  color: #fff;
}
.ptv-ol-item .ptv-ol-type {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  width: 64px;
  flex-shrink: 0;
}
.ptv-ol-item.ptv-ol-sel .ptv-ol-type {
  color: #c7d2fe;
}
.ptv-ol-item .ptv-ol-text {
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ptv-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.ptv-subtab {
  padding: 3px 9px;
  border: 0;
  border-radius: 5px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  cursor: pointer;
}
.ptv-subtab.ptv-active {
  background: #0f172a;
  color: #fff;
}

.ptv-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  padding: 8px 16px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  pointer-events: none;
}

/* ── buyer-wise list page ── */
.ptb-page {
  padding: 4px 4px 24px;
}
.ptb-head {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ptb-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
}
.ptb-sub {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 12.5px;
}
.ptb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}
.ptb-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.ptb-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #f1f5f9;
}
.ptb-card-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #e0e7ff, #ede9fe);
  color: #4f46e5;
  font-size: 17px;
  flex-shrink: 0;
}
.ptb-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}
.ptb-card-type {
  font-size: 11px;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ptb-ver {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid #f8fafc;
  cursor: pointer;
}
.ptb-ver:hover {
  background: #f8fafc;
}
.ptb-ver-name {
  flex: 1 1;
  min-width: 0;
  font-size: 12.5px;
  color: #1e293b;
}
.ptb-ver-meta {
  font-size: 11px;
  color: #94a3b8;
}
.ptb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
  flex-shrink: 0;
}
.ptb-dot-default {
  background: #10b981;
}
.ptb-card-foot {
  padding: 10px 16px 14px;
}
.ptb-empty {
  padding: 40px;
  text-align: center;
  color: #94a3b8;
  background: #fff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
}

/* ── visual editor additions ── */
.ptv-chipbox {
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  font-size: 12.5px;
  line-height: 1.7;
  outline: none;
  word-break: break-word;
}
.ptv-chipbox:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 2px #e0e7ff;
}
.pt-chip {
  display: inline-block;
  padding: 0 6px;
  margin: 0 1px;
  border-radius: 4px;
  background: #e0e7ff;
  color: #3730a3;
  font-weight: 600;
  font-size: 0.92em;
  line-height: 1.5;
  white-space: nowrap;
  cursor: default;
  -webkit-user-select: all;
          user-select: all;
}
.pt-chip-helper { background: #dcfce7; color: #166534; }
.pt-chip-html { background: #fef3c7; color: #92400e; }
.pt-chip-block { background: #f1f5f9; color: #475569; font-weight: 500; }
.pt-chip-note { display: none; }
.ptv-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 10px;
}
.ptv-crumb {
  border: 0;
  border-radius: 4px;
  padding: 2px 7px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10.5px;
  cursor: pointer;
}
.ptv-crumb:hover { background: #e0e7ff; color: #3730a3; }
.ptv-crumb-on {
  background: #4f46e5;
  color: #fff;
  cursor: default;
  font-weight: 600;
}
.ptv-crumb + .ptv-crumb::before { content: ""; }
.ptv-cond {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.ptv-select-xs { width: auto; min-width: 110px; padding: 2px 6px; font-size: 11px; }
.ptv-pal { justify-content: center; }

.rq-wrap {
  margin-top: 8px;
}

.rq-muted {
  color: #8c8c8c;
}

.rq-navy {
  color: #0f3460;
}

.rq-sub {
  font-size: 10px;
  color: #8c8c8c;
}

/* filters */
.rq-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
}

.rq-filters-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f3460;
}

.rq-filters-count {
  margin-left: auto;
  font-size: 11px;
  color: #8c8c8c;
}

/* KPI cards */
.rq-kpi {
  height: 100%;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-top: 3px solid var(--c);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.04);
}

.rq-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.rq-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: #667085;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.rq-kpi-info {
  margin-left: 5px;
  color: #98a2b3;
  vertical-align: baseline;
}

.rq-kpi-value {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 700;
  color: var(--c);
}

.rq-kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f5f7fa;
}

.rq-kpi-rate {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--c);
}

.rq-kpi-foot {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.4;
}

/* charts + cards */
.rq-charts {
  margin-top: 10px;
}

.rq-card {
  height: 100%;
  border-radius: 12px;
  border: 1px solid #e8ecf2;
}

.rq-card .ant-card-head-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f3460;
}

.rq-empty {
  margin-top: 8px;
  border-radius: 12px;
  padding: 40px 0;
}

/* toolbar */
.rq-toolbar {
  display: flex;
  align-items: center;
  margin: 14px 0 8px;
}

.rq-toolbar-title {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #0f3460;
}

/* counts + rates */
.rq-count {
  font-weight: 700;
  color: var(--c);
  cursor: default;
}

.rq-count.is-zero {
  font-weight: 400;
  color: #bfbfbf;
}

.rq-rate {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rq-rate-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--c);
}

/* outcome bar */
.rq-bar {
  display: flex;
  min-width: 120px;
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: #f0f0f0;
}

.rq-bar-seg {
  height: 100%;
}

/* net time */
.rq-net {
  color: #389e0d;
}

/* time split (net + break) */
.rq-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.rq-time-bar {
  display: flex;
  width: 90px;
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: #f0f0f0;
}

.rq-time-seg {
  height: 100%;
}

.rq-time-text {
  font-size: 12px;
  font-weight: 600;
  color: #389e0d;
}

.rq-break {
  font-weight: 600;
  color: #d48806;
}

/* user cell */
.rq-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rq-user-text {
  min-width: 0;
}

.rq-user-name {
  font-weight: 700;
  color: #0f3460;
}

.rq-avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.rq-avatar-img {
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e8ecf2;
}

.rq-rank {
  font-weight: 700;
  color: #8c8c8c;
}

.rq-rank.is-top {
  color: #0f3460;
}

.rq-reqc {
  margin-left: 6px;
  font-size: 10px;
}

/* drill-down */
.rq-drill {
  padding: 4px 0;
}

.rq-drill-switch {
  margin-bottom: 8px;
}

/* grand total */
.rq-total {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 10px 0 15px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #0f3460;
  color: #fff;
  font-size: 12px;
}

@media (max-width: 768px) {
  .rq-filters-count {
    margin-left: 0;
  }

  .rq-total {
    justify-content: flex-start;
  }
}

/* ================= page ================= */

.rqr-page {
  padding: 10px 12px 16px;
}

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

.rqr-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f3460;
}

.rqr-filters {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
}

.rqr-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rqr-hint {
  margin-top: 8px;
  font-size: 11px;
  color: #8c8c8c;
}

.rqr-start {
  margin-top: 12px;
  padding: 40px 16px;
  text-align: center;
  color: #8c8c8c;
  background: #fff;
  border: 1px dashed #d9dee7;
  border-radius: 12px;
}

.rqr-view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 8px;
}

.rqr-applied {
  font-size: 12px;
  font-weight: 600;
  color: #0f3460;
}

/* ================= lot wise view ================= */

.rl-wrap {
  margin-top: 4px;
}

.rl-empty {
  padding: 40px 0;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
}

.rl-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  grid-gap: 10px;
  gap: 10px;
  margin-bottom: 10px;
}

.rl-kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-top: 3px solid var(--c);
  border-radius: 12px;
}

.rl-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: #667085;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.rl-kpi-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--c);
}

.rl-kpi-sub {
  font-size: 10px;
  color: #8c8c8c;
}

.rl-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.rl-search {
  width: 300px;
  max-width: 100%;
}

.rl-state-filter {
  width: 180px;
}

.rl-count {
  margin-left: auto;
  font-size: 11px;
  color: #8c8c8c;
}

.rl-navy {
  color: #0f3460;
}

.rl-sub {
  font-size: 10px;
  color: #8c8c8c;
  line-height: 1.4;
}

.rl-sub-inline {
  font-size: 11px;
  color: #8c8c8c;
}

.rl-zero {
  color: #bfbfbf;
}

.rl-cnt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.rl-cnt span {
  font-size: 10px;
  opacity: 0.8;
}

.rl-bar {
  display: flex;
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: #f0f0f0;
}

.rl-bar-seg {
  height: 100%;
}

.rl-net {
  color: #389e0d;
}

.rl-break {
  color: #d48806;
}

.rl-tag {
  margin: 0;
}

.rl-reqc {
  margin-left: 6px;
  font-size: 10px;
}

.rl-lot-table .ant-table-row {
  cursor: pointer;
}

.rl-rolls {
  padding: 4px 0;
}

/* light left marker per roll status */
.rl-roll-table .rl-row-second > td:first-child {
  box-shadow: inset 3px 0 0 #d46b08;
}

.rl-roll-table .rl-row-third > td:first-child {
  box-shadow: inset 3px 0 0 #fa8c16;
}

.rl-roll-table .rl-row-fail > td:first-child {
  box-shadow: inset 3px 0 0 #ff4d4f;
}

.rl-roll-table .rl-row-pending > td {
  background: #fafafa;
}

/* ================= table headers ================= */
/* written stronger than antd's hover / sorted-column rules so the
   header keeps its colour on hover and after sorting */

.rl-lot-table.ant-table-wrapper .ant-table-thead > tr > th,
.rl-lot-table.ant-table-wrapper
  .ant-table-thead
  > tr
  > th.ant-table-column-sort,
.rl-lot-table.ant-table-wrapper
  .ant-table-thead
  > tr
  > th.ant-table-column-has-sorters:hover {
  background: #0f3460;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
}

.rl-lot-table.ant-table-wrapper
  .ant-table-thead
  > tr
  > th.ant-table-column-has-sorters:hover {
  background: #16457d;
}

.rl-lot-table.ant-table-wrapper .ant-table-thead .ant-table-column-sorter,
.rl-lot-table.ant-table-wrapper .ant-table-thead .ant-table-filter-trigger {
  color: rgba(255, 255, 255, 0.5);
}

.rl-lot-table.ant-table-wrapper
  .ant-table-thead
  .ant-table-column-sorter
  .active {
  color: #fff;
}

/* ---- middle level: lots inside an order (must stay BEFORE the roll rules) ---- */

.rl-lots {
  padding: 4px 0;
}

.rl-mid-table.ant-table-wrapper .ant-table-thead > tr > th,
.rl-mid-table.ant-table-wrapper
  .ant-table-thead
  > tr
  > th.ant-table-column-sort,
.rl-mid-table.ant-table-wrapper
  .ant-table-thead
  > tr
  > th.ant-table-column-has-sorters:hover {
  background: #2a5298;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  -webkit-border-end: 1px solid rgba(255, 255, 255, 0.25);
          border-inline-end: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.rl-mid-table.ant-table-wrapper
  .ant-table-thead
  > tr
  > th.ant-table-column-has-sorters:hover {
  background: #3563ad;
}

.rl-mid-table.ant-table-wrapper .ant-table-thead .ant-table-column-sorter,
.rl-mid-table.ant-table-wrapper .ant-table-thead .ant-table-filter-trigger {
  color: rgba(255, 255, 255, 0.5);
}

.rl-mid-table.ant-table-wrapper
  .ant-table-thead
  .ant-table-column-sorter
  .active {
  color: #fff;
}

.rl-roll-table.ant-table-wrapper .ant-table-thead > tr > th,
.rl-roll-table.ant-table-wrapper
  .ant-table-thead
  > tr
  > th.ant-table-column-sort,
.rl-roll-table.ant-table-wrapper
  .ant-table-thead
  > tr
  > th.ant-table-column-has-sorters:hover,
.rq-table.ant-table-wrapper .ant-table-thead > tr > th,
.rq-table.ant-table-wrapper .ant-table-thead > tr > th.ant-table-column-sort,
.rq-table.ant-table-wrapper
  .ant-table-thead
  > tr
  > th.ant-table-column-has-sorters:hover {
  background: #eef2f8;
  color: #0f3460;
  font-size: 11px;
  white-space: nowrap;
}

.rl-roll-table.ant-table-wrapper
  .ant-table-thead
  > tr
  > th.ant-table-column-has-sorters:hover,
.rq-table.ant-table-wrapper
  .ant-table-thead
  > tr
  > th.ant-table-column-has-sorters:hover {
  background: #dfe6f1;
}

.rl-roll-table.ant-table-wrapper
  .ant-table-thead
  .ant-table-column-sorter
  .active,
.rq-table.ant-table-wrapper .ant-table-thead .ant-table-column-sorter .active {
  color: #0f3460;
}

.rl-neg {
  color: #ff4d4f;
}

/* ================= one font scale for the report ================= */
/* body cells 12px, headers / tags / sub text 11px everywhere */

.rqr-page .ant-table-wrapper .ant-table,
.rd-table.ant-table-wrapper .ant-table {
  font-size: 12px;
}

.rqr-page .ant-table-wrapper .ant-table-tbody > tr > td,
.rd-table.ant-table-wrapper .ant-table-tbody > tr > td {
  font-size: 12px;
  line-height: 1.4;
}

.rqr-page .ant-table-wrapper .ant-tag,
.rd-table.ant-table-wrapper .ant-tag {
  font-size: 11px;
  line-height: 18px;
}

.rqr-page .ant-progress-text {
  font-size: 11px;
}

.rqr-page .ant-table-wrapper .ant-pagination {
  font-size: 12px;
}

/* ================= defects ================= */

.rd-table.ant-table-wrapper .ant-table-thead > tr > th {
  background: #eef2f8;
  color: #0f3460;
  font-size: 11px;
  white-space: nowrap;
}

.rd-tag {
  margin: 0;
}

.rd-muted {
  color: #bfbfbf;
}

.rd-btn {
  font-size: 11px;
}

.rd-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.rd-img {
  border-radius: 4px;
  object-fit: cover;
}

/* ================= table borders ================= */
/* the coloured headers hide antd's pale borders, so draw them clearly */

/* lot table header */
.rl-lot-table.ant-table-wrapper .ant-table-thead > tr > th {
  -webkit-border-end: 1px solid rgba(255, 255, 255, 0.22);
          border-inline-end: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

/* roll / user / defect table headers */
.rl-roll-table.ant-table-wrapper .ant-table-thead > tr > th,
.rq-table.ant-table-wrapper .ant-table-thead > tr > th,
.rd-table.ant-table-wrapper .ant-table-thead > tr > th {
  -webkit-border-end: 1px solid #cfd8e6;
          border-inline-end: 1px solid #cfd8e6;
  border-bottom: 1px solid #cfd8e6;
}

/* roll table: draw the outer frame ourselves.
   antd removes it for tables nested inside an expanded row */
.rl-roll-table.ant-table-wrapper .ant-table {
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  overflow: hidden;
}

.rl-roll-table.ant-table-wrapper .ant-table-container {
  border: 0 !important;
}

.rq-table.ant-table-wrapper .ant-table-container,
.rd-table.ant-table-wrapper .ant-table-container {
  border-color: #cfd8e6;
}

/* body cells: explicit vertical + horizontal grid lines */
.rl-roll-table.ant-table-wrapper .ant-table-tbody > tr > td,
.rq-table.ant-table-wrapper .ant-table-tbody > tr > td,
.rd-table.ant-table-wrapper .ant-table-tbody > tr > td {
  -webkit-border-end: 1px solid #cfd8e6;
          border-inline-end: 1px solid #cfd8e6;
  border-bottom: 1px solid #e3e8f0;
}

/* fixed (sticky) columns need their own background and border,
   otherwise scrolling cells show through and the line disappears */
.rl-roll-table.ant-table-wrapper .ant-table-cell-fix-left {
  background: #fff;
  -webkit-border-end: 1px solid #cfd8e6;
          border-inline-end: 1px solid #cfd8e6;
}

.rl-roll-table.ant-table-wrapper .rl-row-pending > td.ant-table-cell-fix-left {
  background: #fafafa;
}

/* no double line under the last row */
.rl-roll-table.ant-table-wrapper .ant-table-tbody > tr:last-child > td {
  border-bottom: 0;
}

/* keep header and body columns aligned when the vertical scrollbar shows */
.rl-roll-table.ant-table-wrapper .ant-table-body {
  scrollbar-gutter: stable;
}

/* group header text centred over its columns */
.rqr-page .ant-table-wrapper .ant-table-thead > tr > th[colspan] {
  text-align: center;
}

/* ================= small screens ================= */

@media (max-width: 768px) {
  .rqr-page {
    padding: 8px;
  }

  .rl-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rl-search,
  .rl-state-filter {
    width: 100%;
  }

  .rl-count {
    margin-left: 0;
  }
}

/* ================= border colour override (keep LAST in file) ================= */
/* antd's bordered-table rules have 5+ classes of specificity and win over
   the rules above, so the colours below use !important */

.rl-roll-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  > .ant-table-container,
.rl-roll-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  > .ant-table-container
  > .ant-table-content
  > table,
.rl-roll-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  > .ant-table-container
  > .ant-table-header
  > table,
.rl-roll-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  > .ant-table-container
  > .ant-table-body
  > table {
  border-color: #b8c4d9 !important;
}

.rl-roll-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  .ant-table-thead
  > tr
  > th {
  -webkit-border-end: 1px solid #b8c4d9 !important;
          border-inline-end: 1px solid #b8c4d9 !important;
  border-bottom: 1px solid #b8c4d9 !important;
}

.rl-roll-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  .ant-table-tbody
  > tr
  > td {
  -webkit-border-end: 1px solid #b8c4d9 !important;
          border-inline-end: 1px solid #b8c4d9 !important;
  border-bottom: 1px solid #d5dce8 !important;
}

.rl-roll-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  .ant-table-tbody
  > tr
  > td.ant-table-cell-fix-left,
.rl-roll-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  .ant-table-thead
  > tr
  > th.ant-table-cell-fix-left {
  -webkit-border-end: 1px solid #b8c4d9 !important;
          border-inline-end: 1px solid #b8c4d9 !important;
}

/* same for the user-wise and defects tables */
.rq-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  .ant-table-thead
  > tr
  > th,
.rd-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  .ant-table-thead
  > tr
  > th {
  -webkit-border-end: 1px solid #b8c4d9 !important;
          border-inline-end: 1px solid #b8c4d9 !important;
  border-bottom: 1px solid #b8c4d9 !important;
}

.rq-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  .ant-table-tbody
  > tr
  > td,
.rd-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  .ant-table-tbody
  > tr
  > td {
  -webkit-border-end: 1px solid #b8c4d9 !important;
          border-inline-end: 1px solid #b8c4d9 !important;
  border-bottom: 1px solid #d5dce8 !important;
}

/* ================= order / lot level body borders ================= */

.rl-lot-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  .ant-table-tbody
  > tr:not(.ant-table-expanded-row)
  > td,
.rl-mid-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  .ant-table-tbody
  > tr:not(.ant-table-expanded-row)
  > td {
  -webkit-border-end: 1px solid #b8c4d9 !important;
          border-inline-end: 1px solid #b8c4d9 !important;
  border-bottom: 1px solid #d5dce8 !important;
}

.rl-mid-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  > .ant-table-container,
.rl-mid-table.ant-table-wrapper
  .ant-table.ant-table-bordered
  > .ant-table-container
  > .ant-table-content
  > table {
  border-color: #b8c4d9 !important;
}

