/* Purchase intake: keep document fields and lot lines easy to scan. */
form > .field-row:has(input[type="file"]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin-top: 18px;
}

.purchase-edit-actions .delete-lot-button { margin-right: auto; }

form > .field-row:has(input[type="file"]) label {
  min-width: 0;
}

form > .field-row:has(input[type="file"]) input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
}

form > section.card.user-create-card {
  padding: 20px;
  margin-top: 18px;
  border: 1px solid #d9e5e0;
  box-shadow: 0 8px 22px rgba(26, 74, 64, 0.06);
}

form > section.card.user-create-card .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e7efec;
}

form > section.card.user-create-card .field-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(150px, 1.4fr);
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}

form > section.card.user-create-card .field-row:last-child {
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr);
}

form > section.card.user-create-card label {
  min-width: 0;
  color: #2f4d47;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
}

form > section.card.user-create-card input,
form > section.card.user-create-card select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin-top: 7px;
  padding: 10px 12px;
}

@media (max-width: 720px) {
  form > .field-row:has(input[type="file"]),
  form > section.card.user-create-card .field-row,
  form > section.card.user-create-card .field-row:last-child {
    grid-template-columns: 1fr;
  }
}

.supporting-coo-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #d9e5e0;
  border-radius: 8px;
  background: #f8fbfa;
}

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

.supporting-coo-head strong,
.supporting-coo-head small { display: block; }
.supporting-coo-head small { margin-top: 3px; color: #647b74; }
.supporting-coo-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 10px; }
.supporting-coo-row label { min-width: 0; font-size: .82rem; font-weight: 650; color: #2f4d47; }
.supporting-coo-row input { width: 100%; min-height: 42px; margin-top: 6px; padding: 9px 11px; }
@media (max-width: 720px) { .supporting-coo-head, .supporting-coo-row { grid-template-columns: 1fr; display: grid; } }
.lot-validation-error { margin: 12px 0 0; color: #b42318; font-size: .82rem; font-weight: 700; }
.purchase-tax-summary { display: grid; gap: 8px; margin: 18px 0; padding: 16px; border-top: 1px solid #d9e5e0; border-bottom: 1px solid #d9e5e0; color: #2f4d47; }
.purchase-tax-summary > div { display: flex; justify-content: space-between; gap: 20px; }
.purchase-tax-summary .purchase-grand-total { margin-top: 4px; padding-top: 10px; border-top: 2px solid #2f6f62; font-size: 1.05rem; color: #174d43; }
.purchase-edit-dialog { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(15,35,32,.42); padding: 1rem; overflow-y: auto; }
.purchase-edit-panel { width: min(560px,100%); max-height: calc(100vh - 2rem); overflow-y: auto; background: #fff; border: 1px solid #d7e2de; border-radius: 8px; box-shadow: 0 18px 55px rgba(15,35,32,.22); padding: 1.25rem; }
.purchase-edit-panel h3 { margin: 0 0 1rem; color: #163b35; }
.purchase-edit-panel label { display: grid; gap: .35rem; margin: .75rem 0; font-weight: 650; }
.purchase-edit-panel input { width: 100%; box-sizing: border-box; }
.purchase-edit-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.1rem; }
.purchase-edit-error { color: #b42318; font-size: .85rem; font-weight: 650; min-height: 1.2em; margin: .65rem 0 0; }
.purchase-edit-panel { font-family: Arial, sans-serif; color: #173b35; }
.purchase-edit-panel label { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 12px 0; color: #31534d; font-size: .83rem; font-weight: 700; }
.purchase-edit-panel input, .purchase-edit-panel select { display: block; width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #cbd9d5; border-radius: 6px; background: #fff; color: #173b35; font: inherit; box-sizing: border-box; }
.purchase-edit-panel input:focus, .purchase-edit-panel select:focus { outline: 2px solid rgba(0,128,116,.2); border-color: #008b7c; }
.purchase-edit-all-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; padding-bottom: 8px; border-bottom: 1px solid #d9e5e0; }
.purchase-edit-panel h4 { margin: 16px 0 8px; color: #087f75; }
.purchase-edit-panel hr { border: 0; border-top: 1px solid #d9e5e0; margin: 16px 0; }
@media (max-width: 560px) { .purchase-edit-all-fields { grid-template-columns: 1fr; } }
.purchase-actions { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.purchase-actions button { white-space: nowrap; }
.purchase-register-row { cursor: pointer; }
.purchase-register-row:hover { background: #f4faf7; }
.purchase-view-panel { width: min(1040px,100%); }
.purchase-view-title { display:flex; justify-content:space-between; align-items:center; gap:16px; border-bottom:1px solid #d9e5e0; padding-bottom:12px; }
.purchase-view-title small, .purchase-view-summary span { display:block; color:#647b74; font-size:.78rem; }
.purchase-view-title h3 { margin:.2rem 0 0; }
.purchase-view-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:16px 0; }
.purchase-view-summary div { background:#f5f9f7; border-radius:6px; padding:10px; min-width:0; }
.purchase-view-summary strong { display:block; margin-top:4px; overflow-wrap:anywhere; }
.purchase-view-panel h4 { margin-top: 18px; padding-top: 14px; border-top: 1px solid #d9e5e0; }
.processing-dimension-detail { overflow-x: auto; }
.purchase-view-table { overflow-x:auto; }
.purchase-view-table table { width:100%; border-collapse:collapse; font-size:.82rem; }
.purchase-view-table th, .purchase-view-table td { padding:9px 8px; border-bottom:1px solid #e1ebe7; text-align:left; white-space:nowrap; }
.purchase-view-table small { display:block; color:#647b74; margin-top:3px; }
.purchase-view-note { color:#647b74; font-size:.82rem; }
.global-print-footer { display:none; }
@media print { .global-print-footer { display:block; position:fixed; bottom:8mm; left:0; right:0; text-align:center; border-top:1px solid #cbd9d5; padding-top:4px; color:#526b64; font:10px Arial,sans-serif; } }
.purchase-view-actions { display:flex; gap:8px; }
@media print { body > * { display:none !important; } .purchase-edit-dialog.printing-purchase { display:block !important; position:static; background:#fff; padding:0; } .purchase-edit-dialog.printing-purchase .purchase-edit-panel { display:block; width:100%; max-height:none; overflow:visible; border:0; box-shadow:none; } .purchase-edit-dialog.printing-purchase .view-close, .purchase-edit-dialog.printing-purchase .purchase-print { display:none; } }
@media (max-width:700px) { .purchase-view-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.purchase-lot-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 12px 0 16px; padding-bottom: 6px; border-bottom: 1px solid #d9e5e0; }
.purchase-lot-tab { border: 1px solid #cbd9d5; border-radius: 6px; padding: 8px 14px; background: #f5f9f7; color: #31534d; cursor: pointer; white-space: nowrap; }
.purchase-lot-tab.active { background: #087f75; border-color: #087f75; color: #fff; font-weight: 700; }
.finished-size-lines { margin: 16px 0; padding: 14px; border: 1px solid #d9e5e0; border-radius: 8px; background: #f8fbfa; }
.finished-size-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.finished-size-head small { display: block; margin-top: 4px; color: #647b74; }
.finished-size-row { display: grid; grid-template-columns: 1fr 1fr 1fr .8fr .9fr auto; gap: 8px; align-items: end; margin-top: 8px; }
.finished-size-row input { width: 100%; min-width: 0; box-sizing: border-box; }
.finished-size-total { margin-top: 12px; padding-top: 10px; border-top: 1px solid #d9e5e0; color: #174d43; }
@media (max-width: 850px) { .finished-size-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 650px) { .finished-size-row { grid-template-columns: 1fr 1fr; } .finished-size-row [data-thickness], .finished-size-row [data-width], .finished-size-row [data-length] { grid-column: span 1; } }
.lot-document-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #d9e5e0; }
.lot-document-fields label { display: grid; gap: 5px; font-size: .82rem; font-weight: 650; color: #2f4d47; }
.upload-preview { margin-top: 6px; text-align: left; }
@media (max-width: 720px) { .lot-document-fields { grid-template-columns: 1fr; } }
section.card.user-create-card { overflow: hidden; }
section.card.user-create-card .field-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
section.card.user-create-card .field-row > label, section.card.user-create-card .lot-document-fields > label { min-width: 0; }
section.card.user-create-card input, section.card.user-create-card select { min-width: 0; max-width: 100%; box-sizing: border-box; }
section.card.user-create-card > label { min-width: 0; }
section.card.user-create-card .lot-document-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { section.card.user-create-card .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { section.card.user-create-card .field-row, section.card.user-create-card .lot-document-fields { grid-template-columns: 1fr; } }
/* Keep the purchase drawer usable without horizontal scrolling. */
.trace-drawer { width: min(720px, calc(100vw - 32px)); max-width: 100%; overflow-x: hidden; }
.trace-drawer form { width: 100%; min-width: 0; }
.trace-drawer section.card.user-create-card { display: block; width: 100%; min-width: 0; box-sizing: border-box; }
.trace-drawer section.card.user-create-card > * { max-width: 100%; min-width: 0; box-sizing: border-box; }
.trace-drawer section.card.user-create-card .field-row,
.trace-drawer section.card.user-create-card .lot-document-fields { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trace-drawer section.card.user-create-card label { min-width: 0; overflow-wrap: anywhere; }
.trace-drawer section.card.user-create-card input,
.trace-drawer section.card.user-create-card select,
.trace-drawer section.card.user-create-card textarea { display: block; width: 100%; min-width: 0; }
@media (max-width: 680px) { .trace-drawer { width: calc(100vw - 20px); } .trace-drawer section.card.user-create-card .field-row, .trace-drawer section.card.user-create-card .lot-document-fields { grid-template-columns: 1fr; } }
.tool-purchase-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: rgba(18,45,40,.42); }
.tool-purchase-modal .purchase-modal-card { width: min(860px, 100%); max-height: 90vh; overflow: auto; box-sizing: border-box; padding: 24px; background: #fff; border: 1px solid #d9e5e0; border-radius: 10px; box-shadow: 0 18px 48px rgba(18,45,40,.22); }
.tool-purchase-modal h3 { margin: 0 0 18px; color: #123b35; }
.tool-purchase-modal label { display: grid; gap: 6px; margin-bottom: 12px; color: #31534d; font-size: .84rem; font-weight: 650; }
.tool-purchase-modal input, .tool-purchase-modal select { width: 100%; min-width: 0; box-sizing: border-box; padding: 10px 11px; border: 1px solid #cbd9d5; border-radius: 6px; background: #fff; }
.tool-items { display: grid; gap: 8px; margin: 18px 0 12px; }
.tool-items::before { content: "Item description   |   Type   |   Quantity   |   Unit   |   Unit rate   |   Discount   |   Line total"; display: block; overflow: hidden; padding: 0 10px 3px; color: #526b64; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.tool-item-row { display: grid; grid-template-columns: minmax(150px,2fr) 110px 75px 75px 100px 90px 95px auto; gap: 7px; align-items: center; padding: 10px; border: 1px solid #d9e5e0; border-radius: 7px; background: #f8fbfa; }
.tool-item-row strong { white-space: nowrap; color: #174d43; font-size: .82rem; }
.tool-totals { margin: 16px 0; padding: 14px; line-height: 1.8; text-align: right; border-top: 1px solid #d9e5e0; color: #31534d; }
.tool-totals b { color: #123b35; }
.tool-purchase-modal .purchase-edit-error { min-height: 1.2em; color: #b42318; }
.tool-purchase-modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
@media (max-width: 900px) { .tool-purchase-modal .purchase-modal-card { padding: 16px; } .tool-items::before { display: none; } .tool-item-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tool-item-row input, .tool-item-row select, .tool-item-row strong, .tool-item-row button { min-width: 0; } .tool-item-row input:first-child { grid-column: 1 / -1; } }
.invoice-register-row { cursor: pointer; }
.invoice-register-row:hover { background: #f2f8f5; }
.invoice-register-row:focus-visible { outline: 2px solid #087f75; outline-offset: -2px; }
.invoice-actions { white-space: nowrap; }
.invoice-actions .link { margin-right: 8px; }
.invoice-detail-dialog { padding: 20px; }
.invoice-detail-dialog .invoice-detail-panel { width: min(980px, calc(100vw - 40px)); max-width: 980px; max-height: calc(100vh - 40px); padding: 24px; overflow: auto; }
.invoice-detail-panel .purchase-view-title { position: sticky; top: -24px; z-index: 3; margin: -24px -24px 16px; padding: 20px 24px 14px; background: #fff; border-bottom: 1px solid #d9e5e0; }
.invoice-detail-panel .purchase-view-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.invoice-line-editor { width: 100%; margin-top: 18px; overflow-x: auto; border: 1px solid #d9e5e0; border-radius: 7px; }
.invoice-line-editor table { width: 100%; min-width: 760px; table-layout: fixed; border-collapse: collapse; }
.invoice-line-editor th:nth-child(1) { width: 15%; }
.invoice-line-editor th:nth-child(2) { width: 43%; }
.invoice-line-editor th:nth-child(3), .invoice-line-editor th:nth-child(4), .invoice-line-editor th:nth-child(5) { width: 14%; }
.invoice-line-editor th, .invoice-line-editor td { padding: 12px; vertical-align: top; text-align: left; overflow-wrap: anywhere; }
.invoice-line-editor td:nth-child(2) { max-height: 9em; overflow: auto; line-height: 1.45; color: #31534d; }
.invoice-line-editor input { display: block; width: 100%; min-width: 90px; box-sizing: border-box; padding: 9px; border: 1px solid #b9cec7; border-radius: 6px; background: #fff; color: #123b35; }
.invoice-detail-panel .purchase-view-actions { position: sticky; bottom: -24px; justify-content: flex-end; margin: 18px -24px -24px; padding: 14px 24px; background: #fff; border-top: 1px solid #d9e5e0; }
@media (max-width: 700px) { .invoice-detail-dialog { padding: 8px; } .invoice-detail-dialog .invoice-detail-panel { width: calc(100vw - 16px); max-height: calc(100vh - 16px); padding: 16px; } .invoice-detail-panel .purchase-view-title { top: -16px; margin: -16px -16px 12px; padding: 14px 16px; } .invoice-detail-panel .purchase-view-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .invoice-detail-panel .purchase-view-actions { bottom: -16px; margin: 14px -16px -16px; padding: 12px 16px; } }

/* Colorful dashboard accents */
.dashboard-page-polished { background: linear-gradient(180deg, #fff7f1 0, #f4f8ff 48%, #f7fbf8 100%); }
.dashboard-page-polished .welcome { border-color: #f2b5a1; background: linear-gradient(120deg, #fff0e7, #eef8ff 55%, #fff8dc); }
.dashboard-flow-nav { border-color: #c8d9f0; background: linear-gradient(90deg, #fff4f0, #f1f8ff, #f4fff7); }
.dashboard-flow-nav button:nth-child(1) > span { background: #e45756; }
.dashboard-flow-nav button:nth-child(3) > span { background: #2f80ed; }
.dashboard-flow-nav button:nth-child(5) > span { background: #27ae60; }
.dashboard-flow-nav button:nth-child(7) > span { background: #9b51e0; }
.dashboard-page-polished .metric:nth-child(1)::before { background: #e45756; }
.dashboard-page-polished .metric:nth-child(2)::before { background: #2f80ed; }
.dashboard-page-polished .metric:nth-child(3)::before { background: #f2a93b; }
.dashboard-page-polished .metric:nth-child(4)::before { background: #9b51e0; }
.dashboard-page-polished .grid-main > .card:first-child { background: linear-gradient(145deg, #fff, #fff7f2); }
.dashboard-page-polished .grid-main > .card:nth-child(2) { background: linear-gradient(145deg, #fff, #f1f8ff); }
.dashboard-page-polished .metric:nth-child(1) { background: linear-gradient(145deg, #fff, #fff3ee); }
.dashboard-page-polished .metric:nth-child(2) { background: linear-gradient(145deg, #fff, #eff7ff); }
.dashboard-page-polished .metric:nth-child(3) { background: linear-gradient(145deg, #fff, #fff9e8); }
.dashboard-page-polished .metric:nth-child(4) { background: linear-gradient(145deg, #fff, #f6efff); }
.dashboard-page-polished .metric:nth-child(1) .metric-value { color: #d64d4b; }
.dashboard-page-polished .metric:nth-child(2) .metric-value { color: #2875c7; }
.dashboard-page-polished .metric:nth-child(3) .metric-value { color: #c27b13; }
.dashboard-page-polished .metric:nth-child(4) .metric-value { color: #7d45b8; }
.dashboard-page-polished .metric:nth-child(1) { border: 2px solid #efaaa1; background: linear-gradient(145deg, #fff8f5, #ffe7e0); }
.dashboard-page-polished .metric:nth-child(2) { border: 2px solid #9fc8ef; background: linear-gradient(145deg, #f8fcff, #e2f1ff); }
.dashboard-page-polished .metric:nth-child(3) { border: 2px solid #f0c875; background: linear-gradient(145deg, #fffdf5, #fff0c9); }
.dashboard-page-polished .metric:nth-child(4) { border: 2px solid #c3a4e8; background: linear-gradient(145deg, #fcf9ff, #eee2ff); }
.dashboard-page-polished .grid-main > .card:nth-child(2) { border: 2px solid #8dd8b0; background: linear-gradient(145deg, #fbfffc, #e1f8e9); }
.dashboard-page-polished .grid-main > .card:nth-child(2) .card-head { border-bottom-color: #b6e7c8; }

/* Purchases page header accents */
.traceability-page .section-kicker { color: #d65a48; }
.traceability-page h2, .traceability-page h3 { color: #164f73; }
.traceability-page .table-card > .card-head { border-top: 4px solid #2f80ed; background: linear-gradient(90deg, #eef7ff, #fff); }
.traceability-page .summary-card:nth-child(1) { border-top: 4px solid #e45756; background: #fff3ee; }
.traceability-page .summary-card:nth-child(2) { border-top: 4px solid #2f80ed; background: #eff7ff; }
.traceability-page .summary-card:nth-child(3) { border-top: 4px solid #27ae60; background: #effbf3; }
.traceability-page .summary-card:nth-child(4) { border-top: 4px solid #f2a93b; background: #fff9e8; }
.traceability-page th { color: #164f73; background: #eaf4fb; }
.inventory-dimension-list {
  display: grid;
  gap: 4px;
  min-width: 260px;
}

.inventory-dimension-line {
  padding: 4px 6px;
  border-left: 2px solid #b9d8cf;
  background: #f5f9f7;
  white-space: nowrap;
  font-size: 0.82rem;
}

.processing-dimension-detail {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.dimension-detail-table {
  width: 100%;
  min-width: 430px;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.78rem;
}
.inventory-product-label { display: block; margin-bottom: 8px; color: #173b35; font-size: .86rem; }
.create-gdn-button { margin-left: 12px; }
.gdn-register-button { margin-left: 8px; }
.register-search { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 14px; }
.register-search input { width: min(360px, 100%); min-height: 40px; padding: 9px 12px; border: 1px solid #d7ded9; border-radius: 8px; background: #fff; color: #1b2a22; }
.register-search button { min-height: 40px; }
.sales-issue-hero { position: relative; overflow: hidden; align-items: center; gap: 24px; margin-bottom: 14px; padding: 28px 30px; border: 1px solid #cfe1da; border-radius: 16px; background: linear-gradient(125deg, #f3faf7 0%, #fffdf7 58%, #edf7f3 100%); box-shadow: 0 12px 30px rgba(18, 75, 64, .08); }
.sales-issue-hero::after { content: ""; position: absolute; right: -70px; bottom: -100px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(12, 139, 123, .12), transparent 68%); pointer-events: none; }
.sales-issue-hero > div:first-child { position: relative; z-index: 1; max-width: 650px; }
.sales-issue-hero h2 { color: #123f37; font-size: 30px; }
.sales-issue-hero p:not(.eyebrow) { max-width: 620px; line-height: 1.65; }
.sales-gdn-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-left: auto; }
.sales-gdn-actions .create-gdn-button, .sales-gdn-actions .create-gdn-invoice { min-height: 44px; margin: 0; padding: 11px 17px; border-radius: 10px; font-weight: 750; }
.sales-gdn-actions .create-gdn-button { order: 1; }
.sales-gdn-actions .create-gdn-invoice { order: 2; color: #fff; background: #176f63; border: 1px solid #176f63; box-shadow: 0 8px 18px rgba(23, 111, 99, .16); }
.sales-flow-guide { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; margin: 0 0 18px; padding: 15px 20px; border: 1px solid #e2e8e3; border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(22, 57, 48, .05); }
.sales-flow-guide > div { display: flex; align-items: center; gap: 12px; }
.sales-flow-guide > div > span { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #159184, #176f63); font-weight: 800; }
.sales-flow-guide p, .sales-flow-guide strong, .sales-flow-guide small { display: block; margin: 0; }
.sales-flow-guide strong { color: #183d35; font-size: 13px; }
.sales-flow-guide small { margin-top: 3px; color: #76847f; line-height: 1.45; }
.sales-flow-guide > b { color: #93aaa2; font-size: 20px; }
.sales-register-card { margin-bottom: 18px; border-color: #d8e5df; border-radius: 14px; box-shadow: 0 9px 26px rgba(24, 71, 59, .06); }
.sales-register-card .card-head { padding: 21px 20px 12px; background: linear-gradient(90deg, #fbfdfc, #f3f8f5); }
.sales-register-card .card-head h3 { color: #173f37; font-size: 20px; }
.sales-register-card tbody tr { transition: background .16s ease, transform .16s ease; }
.sales-register-card tbody tr:hover { background: #f1f8f5; }
.sales-register-card td:first-child strong { color: #087f75; }
.sales-register-card .register-search { padding-top: 14px; border-top: 1px solid #edf1ee; background: #fbfcfb; }
.sales-register-card .register-search input:focus { border-color: #138477; outline: 3px solid rgba(19, 132, 119, .1); }
@media (max-width: 850px) { .sales-issue-hero { align-items: flex-start; padding: 22px; } .sales-gdn-actions { width: 100%; justify-content: flex-start; margin-left: 0; } .sales-flow-guide { grid-template-columns: 1fr; } .sales-flow-guide > b { display: none; } }
.dashboard-page-polished .welcome { border: 1.5px solid #b9cec5; background: linear-gradient(120deg, #edf7f2, #fffaf0); box-shadow: 0 10px 28px rgba(24, 70, 58, .09); }
.dashboard-page-polished .metric { border: 1.5px solid #c9d8d1; box-shadow: 0 6px 18px rgba(24, 70, 58, .07); }
.dashboard-page-polished .metric:hover { border-color: #8eb5a7; transform: translateY(-1px); box-shadow: 0 9px 22px rgba(24, 70, 58, .11); }
.dashboard-page-polished .grid-main > .card, .dashboard-page-polished > .table-card { border: 1.5px solid #c5d5ce; box-shadow: 0 8px 24px rgba(24, 70, 58, .075); }
.dashboard-page-polished .card-head { border-bottom: 1px solid #dce6e1; padding-bottom: 13px; }
.dashboard-page-polished .quick-actions button { border: 1px solid #a9c4b8; box-shadow: 0 3px 8px rgba(24, 70, 58, .06); }
.dashboard-page-polished table { border: 1px solid #cbd8d2; }
.dashboard-page-polished th, .dashboard-page-polished td { border-right: 1px solid #dbe4df; }
.dashboard-page-polished th:last-child, .dashboard-page-polished td:last-child { border-right: 0; }
.sales-register-card .table-wrap { border-top: 1px solid #c9d9d2; }
.sales-register-card table { border-collapse: separate; border-spacing: 0; }
.sales-register-card th { color: #426158; background: #f2f7f4; border-right: 1px solid #cbdad3; border-bottom: 1px solid #bdcfc7; }
.sales-register-card td { border-right: 1px solid #d8e3de; border-bottom: 1px solid #d1ded8; background: #fff; }
.sales-register-card th:last-child, .sales-register-card td:last-child { border-right: 0; }
.sales-register-card tbody tr:last-child td { border-bottom: 0; }
.sales-register-card .invoice-actions, .sales-register-card td:last-child { background: #fafcfb; }
.sales-register-card .invoice-actions .link, .sales-register-card td:last-child button { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; margin: 2px 4px 2px 0; padding: 6px 10px; border: 1px solid #bfd3ca; border-radius: 7px; color: #0b685c; background: #f1f7f4; font-weight: 750; }
.sales-register-card .invoice-actions .link:hover, .sales-register-card td:last-child button:hover { color: #fff; border-color: #087f75; background: #087f75; }
.sales-register-card .status { display: inline-flex; border: 1px solid #e7ca8e; }
.register-search input { border-width: 1.5px; border-color: #aebfb8; box-shadow: inset 0 1px 2px rgba(20, 52, 44, .04); }
.register-search button { border: 1px solid #c2d0ca; }
.dashboard-page-polished { background: linear-gradient(180deg, #f8faf8 0, #f5f3ed 420px); }
.dashboard-page-polished .welcome { position: relative; overflow: hidden; padding: 28px 30px; }
.dashboard-page-polished .welcome::after { content: ""; position: absolute; right: -65px; top: -95px; width: 270px; height: 270px; border-radius: 50%; background: radial-gradient(circle, rgba(9, 128, 113, .13), transparent 68%); pointer-events: none; }
.dashboard-page-polished .welcome > * { position: relative; z-index: 1; }
.dashboard-page-polished .welcome h2 { color: #153f37; font-size: 29px; }
.dashboard-page-polished .quick-actions button { min-height: 42px; color: #fff; border-color: #16776b; background: linear-gradient(135deg, #158d80, #126c62); }
.dashboard-flow-nav { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 9px; margin: 14px 0 18px; padding: 12px; border: 1.5px solid #cbdad3; border-radius: 14px; background: #fff; box-shadow: 0 7px 20px rgba(23, 67, 56, .06); }
.dashboard-flow-nav button { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 11px 12px; text-align: left; border: 1px solid transparent; border-radius: 10px; background: #f6faf8; transition: border-color .16s, background .16s, transform .16s; }
.dashboard-flow-nav button:hover { border-color: #9fc3b6; background: #edf7f3; transform: translateY(-1px); }
.dashboard-flow-nav button > span { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; color: #fff; border-radius: 9px; background: #16796e; font-weight: 800; }
.dashboard-flow-nav p, .dashboard-flow-nav strong, .dashboard-flow-nav small { display: block; min-width: 0; margin: 0; }
.dashboard-flow-nav strong { color: #1d463d; font-size: 12px; }
.dashboard-flow-nav small { overflow: hidden; margin-top: 2px; color: #7a8983; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-flow-nav > i { color: #96aaa2; font-style: normal; }
.dashboard-page-polished .metrics { gap: 12px; margin-top: 0; }
.dashboard-page-polished .metric { position: relative; overflow: hidden; min-height: 142px; transition: border-color .16s, transform .16s, box-shadow .16s; }
.dashboard-page-polished .metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #168174; }
.dashboard-page-polished .metric:nth-child(2)::before { background: #4e7fa2; }
.dashboard-page-polished .metric:nth-child(3)::before { background: #b58536; }
.dashboard-page-polished .metric:nth-child(4)::before { background: #785fa2; }
.dashboard-page-polished .metric:nth-child(1) .metric-top i { color: #0e7569; background: #e0f2ed; }
.dashboard-page-polished .metric:nth-child(2) .metric-top i { color: #3e708f; background: #e5eff5; }
.dashboard-page-polished .metric:nth-child(3) .metric-top i { color: #9b6d25; background: #f7edd9; }
.dashboard-page-polished .metric:nth-child(4) .metric-top i { color: #68508f; background: #eee9f6; }
.dashboard-page-polished .grid-main { gap: 16px; }
.dashboard-page-polished .recovery-card, .dashboard-page-polished .stock-card { background: linear-gradient(180deg, #fff, #fbfdfc); }
.dashboard-page-polished .table-card tbody tr:nth-child(even) td { background: #fafcfb; }
.dashboard-page-polished .table-card tbody tr:hover td { background: #eef7f3; }
@media (max-width: 1050px) and (min-width: 681px) { .dashboard-page-polished .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dashboard-page-polished .grid-main { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) { .dashboard-flow-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dashboard-flow-nav > i { display: none; } .dashboard-page-polished .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .dashboard-flow-nav, .dashboard-page-polished .metrics { grid-template-columns: 1fr; } .dashboard-page-polished .welcome { padding: 22px; } }
.asset-register-card { overflow: hidden; border: 1.5px solid #c6d8d0; border-radius: 14px; box-shadow: 0 9px 26px rgba(24, 71, 59, .07); }
.asset-register-card .card-head { align-items: center; margin: 0; padding: 21px 20px 15px; border-bottom: 1px solid #d8e4de; background: linear-gradient(90deg, #fbfdfc, #eef7f3); }
.asset-register-card .card-head h3 { color: #173f37; font-size: 20px; }
.asset-register-card .asset-register-print { min-height: 40px; color: #fff; border: 1px solid #176f63; background: #176f63; box-shadow: 0 6px 15px rgba(23, 111, 99, .14); }
.asset-register-card .register-search { padding-top: 14px; border-bottom: 1px solid #d6e1dc; background: #fbfcfb; }
.asset-register-card .table-wrap { overflow-x: auto; }
.asset-register-card table { min-width: 1180px; border-collapse: separate; border-spacing: 0; }
.asset-register-card th { color: #426158; background: #f2f7f4; border-right: 1px solid #c7d7d0; border-bottom: 1px solid #bfcfc8; white-space: nowrap; }
.asset-register-card td { border-right: 1px solid #d9e4df; border-bottom: 1px solid #d2ded8; background: #fff; vertical-align: middle; }
.asset-register-card th:last-child, .asset-register-card td:last-child { border-right: 0; }
.asset-register-card tbody tr:nth-child(even) td { background: #fafcfb; }
.asset-register-card tbody tr:hover td { background: #edf7f3; }
.asset-register-card td:first-child strong { color: #087f75; }
@media (max-width: 760px) { .asset-register-card .card-head { align-items: flex-start; gap: 12px; } .asset-register-card .asset-register-print { white-space: nowrap; } }
@media print { .printing-asset-register .register-search, .printing-asset-register .asset-register-print { display: none !important; } .printing-asset-register { border: 0 !important; box-shadow: none !important; } .printing-asset-register .card-head { padding: 0 0 12px !important; background: #fff !important; } .printing-asset-register table { min-width: 0 !important; font-size: 8px; } .printing-asset-register th, .printing-asset-register td { padding: 5px 6px !important; } }
.equipment-page-polished > .section-intro { padding: 24px 26px; border: 1.5px solid #c3d7cf; border-radius: 15px; background: linear-gradient(125deg, #f1f8f5, #fffaf1); box-shadow: 0 9px 25px rgba(23, 67, 56, .07); }
.equipment-page-polished > .section-intro h2 { color: #143f37; font-size: 29px; }
.equipment-page-polished > .section-intro p:not(.eyebrow) { max-width: 720px; line-height: 1.6; }
.equipment-page-polished > .metrics .metric { position: relative; overflow: hidden; border: 1.5px solid #c8d8d1; box-shadow: 0 6px 18px rgba(24, 70, 58, .06); }
.equipment-page-polished > .metrics .metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #157d70; }
.equipment-page-polished > .metrics .metric:nth-child(2)::before { background: #b58132; }
.equipment-page-polished > .metrics .metric:nth-child(3)::before { background: #b15d52; }
.equipment-page-polished > .metrics .metric:nth-child(4)::before { background: #4f7e9a; }
.equipment-page-polished > .metrics .metric:nth-child(2) > strong { color: #865f24; }
.equipment-page-polished > .metrics .metric:nth-child(3) > strong { color: #91483f; }
.equipment-page-polished > .metrics .metric:nth-child(4) > strong { color: #3d6b86; }
.equipment-page-polished .equipment-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.equipment-page-polished .equipment-actions button { min-height: 42px; margin: 0; border: 1px solid #b9cec5; border-radius: 9px; }
@media (max-width: 850px) { .equipment-page-polished > .section-intro { align-items: flex-start; gap: 18px; padding: 21px; } .equipment-page-polished .equipment-actions { width: 100%; justify-content: flex-start; } }
.invoice-payment-due strong { color: #9a651d; white-space: nowrap; }
.invoice-payment-due small { white-space: nowrap; }
.invoice-actions { min-width: 250px; }
.payment-receipt-dialog { padding: 20px; }
.payment-receipt-panel { width: min(760px, calc(100vw - 40px)); max-height: calc(100vh - 40px); overflow: auto; padding: 24px; }
.payment-balance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin: 18px 0; }
.payment-balance-grid > div { padding: 15px; border: 1px solid #cbdcd4; border-radius: 10px; background: #f5faf7; }
.payment-balance-grid span, .payment-balance-grid strong { display: block; }
.payment-balance-grid span { color: #6d7e77; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.payment-balance-grid strong { margin-top: 6px; color: #173f37; font: 600 19px Georgia, serif; }
.payment-balance-grid > div:last-child { border-color: #e2c98e; background: #fff8e9; }
.payment-balance-grid > div:last-child strong { color: #93631c; }
.payment-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.payment-fields label { display: grid; gap: 6px; color: #31534d; font-size: 12px; font-weight: 700; }
.payment-fields input, .payment-fields select, .payment-fields textarea { width: 100%; min-height: 43px; padding: 10px 11px; border: 1.5px solid #b8cbc3; border-radius: 8px; background: #fff; }
.payment-fields .payment-notes { grid-column: 1 / -1; }
.payment-fields textarea { min-height: 70px; resize: vertical; }
.payment-receipt-panel .purchase-edit-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.invoice-payment-balance { border-color: #e0c784 !important; background: #fff7e4 !important; }
@media (max-width: 650px) { .payment-balance-grid, .payment-fields { grid-template-columns: 1fr; } .payment-fields .payment-notes { grid-column: auto; } }
.gdn-lines { display: grid; gap: 10px; margin: 12px 0; }
.gdn-line { display: grid; grid-template-columns: 1.2fr 1.9fr .55fr .7fr auto; gap: 8px; align-items: end; padding: 10px; background: #f5f9f7; border: 1px solid #d9e5e0; border-radius: 6px; }
.gdn-line label { margin: 0; }
.gdn-line output { min-height: 42px; display: flex; align-items: center; font-weight: 700; white-space: nowrap; }
.gdn-total { text-align: right; padding: 10px 0; border-top: 1px solid #d9e5e0; }
@media (max-width: 900px) { .gdn-line { grid-template-columns: 1fr 1fr; } .gdn-line output { min-height: 30px; } }

.dimension-detail-table th,
.dimension-detail-table td {
  padding: 5px 7px;
  border-bottom: 1px solid #dce8e3;
  text-align: left;
  white-space: nowrap;
}

.dimension-detail-table th {
  color: #386056;
  background: #eef5f1;
  font-weight: 700;
}
.dimension-detail-table tfoot th { border-top: 2px solid #8fb9ad; background: #e7f1ed; }

.ledger-print-button {
  margin-left: auto;
}

@media print {
  @page { size: landscape; margin: 8mm; }
  body > * { display: block !important; }
  body * { visibility: hidden !important; }
  .print-ledger-target, .print-ledger-target * { visibility: visible !important; }
  .print-ledger-target { position: absolute; inset: 0; width: 100%; }
  .print-lot-target, .print-lot-target * { visibility: visible !important; }
  .print-lot-target { display: table-row !important; }
  table:has(.print-lot-target) thead,
  table:has(.print-lot-target) thead * { visibility: visible !important; }
  .lot-print-button { display: none !important; }
  .purchase-edit-dialog.printing-purchase, .purchase-edit-dialog.printing-purchase * { visibility: visible !important; }
  .ledger-print-button { display: none !important; }
  .print-ledger-target { font-size: 10px; }
  .print-ledger-target table { page-break-inside: auto; }
  .print-ledger-target tr { page-break-inside: auto; page-break-after: auto; }
  .print-ledger-target thead { display: table-header-group; }
  .print-ledger-target .dimension-detail-table { font-size: 9px; min-width: 0; }
  .print-ledger-target .dimension-detail-table th,
  .print-ledger-target .dimension-detail-table td { padding: 3px 5px; }
  .print-ledger-target .dimension-detail-table tbody tr { page-break-inside: avoid; }
  .print-ledger-target .dimension-detail-table { margin-top: 4px; }
}
.profile-actions { display: flex; gap: 6px; margin-top: 8px; }
.profile-actions button { border: 0; padding: 6px 8px; border-radius: 6px; color: #fff; background: #087f75; font-size: 11px; }
