@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/Onest-Light.38341c3f675e.ttf") format("truetype");
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/Onest-Regular.c3dd47ab44dd.ttf") format("truetype");
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/Onest-Medium.4bb7ad08749e.ttf") format("truetype");
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/Onest-SemiBold.ac8fbd37d8b9.ttf") format("truetype");
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/Onest-Bold.fdabc79db7d0.ttf") format("truetype");
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

.production-stock-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid #b9d9d4;
  border-radius: 8px;
  background: #eef9f7;
  color: #23433f;
}

.production-stock-control.is-disabled {
  border-color: #e2bd78;
  background: #fff7e6;
  color: #684a15;
}

.production-stock-control strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.production-stock-control p {
  margin: 0;
  line-height: 1.45;
}

.production-stock-control form {
  flex: 0 0 auto;
  margin: 0;
}

.production-stock-control-switch {
  min-width: 190px;
  padding: 11px 16px;
  border: 0;
  border-radius: 22px;
  background: #168f87;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.production-stock-control.is-enabled .production-stock-control-switch {
  background: #c27b18;
}

.production-stock-control-switch:focus-visible {
  outline: 3px solid rgba(22, 143, 135, 0.28);
  outline-offset: 3px;
}

.source-dashboard-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0 0 12px;
}

.source-dashboard-header .source-dashboard-title {
  flex: 0 0 auto;
  margin: 0;
}

.source-dashboard-header .production-stock-control.is-compact {
  flex: 1 1 auto;
  width: auto;
  max-width: calc((100% - 24px) / 2);
  min-height: 58px;
  margin: 0 0 0 auto;
  padding: 9px 12px;
  gap: 12px;
}

.source-dashboard-header .production-stock-control.is-compact > div {
  min-width: 0;
  overflow: hidden;
}

.production-stock-control.is-compact strong {
  margin-bottom: 1px;
  font-size: 14px;
  line-height: 18px;
}

.production-stock-control.is-compact p {
  overflow: hidden;
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-stock-control.is-compact .production-stock-control-switch {
  min-width: 160px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 18px;
  white-space: nowrap;
}

.source-dashboard-header + .accounting-module-grid {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .source-dashboard-header {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .source-dashboard-header .production-stock-control.is-compact {
    width: 100%;
    max-width: none;
    margin-left: 0;
  }

  .production-stock-control.is-compact p {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
}

@media (max-width: 700px) {
  .production-stock-control {
    align-items: stretch;
    flex-direction: column;
  }

  .production-stock-control-switch {
    width: 100%;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --teal: #2fb5b2;
  --blue: #3f82f6;
  --violet: #c36be4;
  --orange: #f1983a;
  --ink: #3f4247;
  --muted: #9b9da1;
  --line: #dedede;
  --soft: #f1f1f1;
  --panel: #ffffff;
}

body {
  margin: 0;
  background: #f2f2f2;
  color: var(--ink);
  font-family: Onest, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
}

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

a { color: inherit; text-decoration: none; }
.inline { display: inline; }

.container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 20px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.module-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 12px 14px;
  border-radius: 6px;
  color: #ffffff;
  font-weight: 700;
}

.module-balance { background: var(--teal); }
.module-report { background: var(--blue); }
.module-admin { background: var(--violet); }
.module-docs { background: var(--orange); }
.module-icon { font-size: 32px; line-height: 1; color: rgba(255,255,255,.95); }

.workshop-anchor {
  scroll-margin-top: 18px;
}

.workshop-section { margin-top: 12px; }
.workshop-section h2 {
  display: flex;
  align-items: center;
  margin: 12px 0 14px;
  font-size: 18px;
  line-height: 1.2;
}

.workshop-section h2::after {
  content: "";
  height: 1px;
  flex: 1;
  margin-left: 8px;
  background: var(--line);
}

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

.workshop-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 14px;
  background: var(--soft);
  border-radius: 5px;
  color: #29313b;
}

.workshop-tile:hover { background: #e9f7f7; }
.workshop-name {
  display: grid;
  gap: 4px;
  padding-right: 12px;
  font-size: 14px;
  line-height: 1.35;
}

.workshop-name strong {
  font-size: 14px;
}

.workshop-name small {
  color: #777f89;
  font-size: 12px;
  font-weight: 700;
}

.workshop-icon { font-size: 26px; font-weight: 700; color: #5d9bff; }
.workshop-tile:nth-child(4n+2) .workshop-icon { color: #ff5f6d; }
.workshop-tile:nth-child(4n+3) .workshop-icon { color: #25c7bc; }
.workshop-tile:nth-child(4n+4) .workshop-icon { color: #ff941f; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  margin: -20px -20px 20px;
  padding: 0 20px;
  background: #ffffff;
  border-bottom: 14px solid #f2f2f2;
}

.page-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compact-head {
  min-height: 64px;
  margin-bottom: 18px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 32px;
  font-weight: 700;
}

.breadcrumbs a,
.breadcrumbs span { color: #a3a3a3; }
.breadcrumbs strong,
.breadcrumbs h1 {
  margin: 0;
  color: #3c3f43;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: 0;
}

.document-filter {
  display: grid;
  grid-template-columns: 120px 170px minmax(220px, 1fr) 170px 170px auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px;
  background: #f4f4f4;
  border-radius: 6px;
}

.document-filter label {
  display: grid;
  gap: 5px;
}

.document-filter span {
  color: #8a8c91;
  font-size: 12px;
  font-weight: 400;
}

.document-filter input,
.document-filter select {
  width: 100%;
  height: 38px;
  background: #ffffff;
}

.movement-filter {
  grid-template-columns: 120px 140px minmax(190px, 1fr) minmax(220px, 1.2fr) 160px 160px auto auto auto;
}

.movement-result-bar,
.result-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.movement-result-bar span,
.result-summary-bar span {
  color: #777f89;
  font-size: 12px;
  font-weight: 400;
  text-align: right;
}

.movement-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.movement-total-card {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.movement-total-card span,
.movement-total-card small {
  color: #777f89;
  font-size: 12px;
  font-weight: 700;
}

.movement-total-card strong {
  color: #2f343a;
  font-size: 18px;
  line-height: 1;
}

.movement-total-in {
  border-color: #a9d9d7;
  background: #f2fbfa;
}

.movement-total-out {
  border-color: #ffd9a8;
  background: #fff8ed;
}

.movement-total-net {
  border-color: #d6dde7;
  background: #f7f9fc;
}

.audit-filter {
  grid-template-columns: 150px 120px minmax(180px, 1fr) 150px 150px auto auto auto;
}

.active-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #edf7f7;
  border: 1px solid #a9d9d7;
  border-radius: 6px;
  color: #24494a;
}

.active-filter-bar h2 {
  margin: 0;
  font-size: 14px;
}

.active-filter-bar div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.active-filter-bar span {
  padding: 5px 8px;
  background: #ffffff;
  border: 1px solid #a9d9d7;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.list-panel {
  background: #ffffff;
}

.document-table {
  table-layout: fixed;
}

.document-table th,
.document-table td {
  height: 44px;
}

.document-table th:nth-child(1),
.document-table td:nth-child(1) { width: 110px; }
.document-table th:nth-child(2),
.document-table td:nth-child(2) { width: 120px; }
.document-table th:nth-child(3),
.document-table td:nth-child(3) { width: 140px; }
.document-table th:nth-child(5),
.document-table td:nth-child(5) { width: 165px; }
.document-table th:nth-child(6),
.document-table td:nth-child(6) { width: 130px; }
.document-table th:nth-child(8),
.document-table td:nth-child(8) { width: 90px; }

.movement-table th:nth-child(1),
.movement-table td:nth-child(1) { width: 100px; }
.movement-table th:nth-child(2),
.movement-table td:nth-child(2) { width: 105px; }
.movement-table th:nth-child(3),
.movement-table td:nth-child(3) { width: 140px; }
.movement-table th:nth-child(6),
.movement-table td:nth-child(6) { width: 70px; }
.movement-table th:nth-child(7),
.movement-table td:nth-child(7),
.movement-table th:nth-child(8),
.movement-table td:nth-child(8) {
  width: 95px;
  text-align: right;
}
.movement-table th:nth-child(9),
.movement-table td:nth-child(9) { width: 290px; }

.audit-table th:nth-child(1),
.audit-table td:nth-child(1) { width: 125px; }
.audit-table th:nth-child(2),
.audit-table td:nth-child(2) { width: 120px; }
.audit-table th:nth-child(3),
.audit-table td:nth-child(3) { width: 120px; }
.audit-table th:nth-child(4),
.audit-table td:nth-child(4) { width: 105px; }
.audit-table th:nth-child(5),
.audit-table td:nth-child(5) { width: 145px; }
.audit-table th:nth-child(10),
.audit-table td:nth-child(10) { width: 300px; }

.audit-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.muted-cell {
  color: #7d8085;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  display: inline-block;
  min-width: 94px;
  padding: 5px 8px;
  border-radius: 5px;
  text-align: center;
  font-size: 12px;
  font-weight: 400;
}
.open-link { color: var(--teal); font-weight: 700; }

.movement-document-link {
  display: inline-block;
  padding: 5px 8px;
  border: 1px solid #a9d9d7;
  border-radius: 999px;
  background: #edf7f7;
  color: #24494a;
  font-size: 12px;
  font-weight: 700;
}

.movement-document-link:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.balance-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  table-layout: fixed;
}

.balance-table th,
.balance-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  line-height: 1.3;
}

.balance-table th {
  color: #a2a2a2;
  font-size: 12px;
  font-weight: 400;
}

.balance-table th:nth-child(n+2),
.balance-table td:nth-child(n+2) {
  width: 72px;
  text-align: center;
}

.line-flow-badge {
  width: max-content;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
}

.line-flow-badge.flow-out {
  background: #fff0f0;
  color: #991b1b;
}

.line-flow-badge.flow-in {
  background: #eaf7f6;
  color: #128b8b;
}

.empty-cell {
  text-align: center !important;
  color: #3f4247;
}

.empty-cell-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.card {
  background: white;
  border-radius: 6px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.card h2 {
  font-size: 14px;
}
.button, button {
  border: 1px solid #cbd5e1;
  background: white;
  border-radius: 6px;
  padding: 8px 12px;
  display: inline-block;
  cursor: pointer;
}

.primary { background: #0f5ca8; color: white; border-color: #0f5ca8; }
.tab { padding: 9px 12px; border-radius: 6px; background: white; margin-right: 8px; color: #1f2937; }
.tab.active { background: #0f5ca8; color: white; }

table { width: 100%; border-collapse: collapse; background: white; border-radius: 6px; overflow: hidden; margin-bottom: 18px; }
th, td { border-bottom: 1px solid #e5e7eb; padding: 9px 10px; text-align: left; }
th { background: #f1f5f9; font-weight: 700; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.messages { margin-bottom: 16px; }
.msg { padding: 10px 12px; border-radius: 6px; background: #e0f2fe; margin: 6px 0; }
.msg.error { background: #fee2e2; }
.msg.success { background: #dcfce7; }
.negative { background: #fee2e2; color: #991b1b; font-weight: 700; }
input, select, textarea { padding: 7px; border-radius: 6px; border: 1px solid #cbd5e1; max-width: 100%; }
textarea { width: 100%; min-height: 70px; }

.form-error-panel {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff0f0;
  color: #991b1b;
  font-weight: 700;
}

.form-error-panel p {
  margin: 0;
}

.form-errors {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff0f0;
  color: #991b1b;
}

.form-errors .errorlist {
  margin: 0;
}

.errorlist {
  margin: 6px 0 0;
  padding: 0;
  color: #991b1b;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.field-error {
  display: block;
  margin-top: 6px;
  color: #991b1b;
  font-size: 12px;
  font-weight: 700;
}

.document-date,
.document-operation-type,
.document-comment {
  width: 100%;
}

.table-action {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.movement-list-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.line-select,
.line-number {
  width: 100%;
  height: 38px;
  background: #ffffff;
}

@media (max-width: 1000px) {
  .module-grid,
  .document-filter,
  .movement-totals {
    grid-template-columns: 1fr;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 20px;
  }

  .page-tools { flex-wrap: wrap; }
  .breadcrumbs { font-size: 26px; }
}

/* Interface pass: shared Wood PTZ web shell for every app page. */
:root {
  --page-gap: 14px;
  --surface: #ffffff;
  --surface-soft: #f2f2f2;
  --tile: #eeeeee;
  --border: #dedede;
  --text: #3f4247;
  --subtle: #8d8f94;
  --teal: #2fb5b2;
  --teal-dark: #239895;
  --blue: #3f82f6;
  --violet: #c36be4;
  --orange: #f1983a;
}

html {
  min-width: 320px;
}

body {
  background: var(--surface);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.container {
  padding: var(--page-gap);
}

.page-head {
  min-height: 74px;
  margin: calc(var(--page-gap) * -1) calc(var(--page-gap) * -1) 20px;
  padding: 0 20px;
  border-bottom: 14px solid var(--surface-soft);
}

.compact-head {
  min-height: 64px;
}

.breadcrumbs {
  min-width: 0;
  gap: 12px;
  font-size: 20px;
  letter-spacing: 0;
}

.breadcrumbs a,
.breadcrumbs span {
  color: #a6a8ab;
}

.breadcrumbs strong,
.breadcrumbs h1 {
  min-width: 0;
  margin: 0;
  color: #3c3f43;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.page-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button,
button,
input[type="submit"] {
  min-height: 38px;
  border-radius: 6px;
  border-color: #cfd8df;
  color: #3f4247;
  font-weight: 700;
  line-height: 1.2;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

button:disabled,
button:disabled:hover,
input[type="submit"]:disabled,
input[type="submit"]:disabled:hover {
  background: #eef2f4;
  border-color: #d9e0e5;
  color: #9aa3aa;
  cursor: not-allowed;
}

.button.disabled-button,
.button.disabled-button:hover {
  background: #eef2f4;
  border-color: #d9e0e5;
  color: #9aa3aa;
  cursor: not-allowed;
}

.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #ffffff;
}

input,
select,
textarea {
  border-radius: 6px;
  border-color: #cbd5dc;
  color: #3f4247;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(47, 181, 178, .22);
  border-color: var(--teal);
}

.module-grid {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.accounting-module-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  margin-bottom: 16px;
}

.module-card {
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 6px;
}

.module-icon {
  font-size: 24px;
}

.workshop-anchor {
  scroll-margin-top: 10px;
}

.workshop-section {
  margin-top: 10px;
}

.workshop-section h2 {
  margin: 10px 0 9px;
}

.workshop-grid {
  gap: 10px;
}

.workshop-tile {
  min-height: 46px;
  padding: 9px 12px;
}

.workshop-name {
  gap: 0;
  padding-right: 8px;
  line-height: 1.2;
}

.workshop-icon {
  font-size: 22px;
}

.active-filter-bar,
.movement-result-bar,
.result-summary-bar,
.movement-totals {
  max-width: 100%;
}

.workshop-tile {
  border-radius: 6px;
}

.workshop-tile {
  background: var(--tile);
}

.workshop-tile:hover {
  background: #e7f4f4;
}

.document-filter {
  border: 1px solid #ececec;
  background: #f4f4f4;
}

.quick-date-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 14px;
  color: #8a8c91;
  font-size: 12px;
  font-weight: 400;
}

.quick-date-links .button {
  min-height: 34px;
  padding: 7px 12px;
}

.quick-date-links .button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.list-panel {
  width: 100%;
  overflow-x: auto;
}

table {
  border-radius: 0;
  box-shadow: none;
}

th {
  background: #f4f6f7;
  color: #81858b;
  font-size: 12px;
  font-weight: 400;
}

td {
  color: #3f4247;
}

.document-table {
  min-width: 980px;
}

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

.movement-table {
  min-width: 1110px;
}

.audit-table {
  min-width: 1220px;
}

.card,
.movement-total-card {
  border-radius: 6px;
  box-shadow: none;
}

.card {
  border: 1px solid #e1e5e8;
}

.document-summary-card {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
  padding: 10px 16px;
  margin-bottom: 12px;
  font-size: 13px;
}

.document-summary-card p {
  min-width: 0;
  white-space: nowrap;
}

.document-summary-card .status-badge {
  padding: 5px 18px;
}

.document-summary-comment {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-summary-card {
  max-width: 1680px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1180px) {
  .document-summary-card {
    flex-wrap: wrap;
    gap: 8px 14px;
  }
}

/* Purchase cost is requested in a separate window after receipt material is added. */
html body.source-shell .source-stage-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

html body.source-shell .source-purchase-cost-open {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #29b4b2;
  border-radius: 5px;
  background: #ffffff;
  color: #168f8d;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
}

html body.source-shell .source-purchase-cost-open:hover,
html body.source-shell .source-purchase-cost-open:focus-visible {
  background: #eaf9f8;
}

html body.source-shell .source-purchase-cost-modal {
  z-index: 3100;
}

html body.source-shell .source-purchase-cost-modal-panel {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 55px rgba(31, 53, 64, .28);
  overflow: auto;
}

html body.source-shell .source-purchase-cost-modal-panel > header {
  min-height: 64px;
  padding: 0 20px;
}

html body.source-shell .source-purchase-cost-modal-panel > header h2 {
  font-size: 22px;
}

html body.source-shell .source-purchase-cost-modal-form {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 22px 24px 18px;
}

html body.source-shell .source-purchase-cost-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

html body.source-shell .source-purchase-cost-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  margin: 0;
  color: #777777;
  font-size: 16px;
  line-height: 24px;
}

html body.source-shell .source-purchase-cost-field input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #d8d8d8;
  border-radius: 5px;
  background: #ffffff;
  color: #494949;
  font-family: inherit;
  font-size: 20px;
  line-height: 30px;
}

html body.source-shell .source-purchase-cost-field input[readonly] {
  background: #f2f2f2;
  color: #696969;
}

html body.source-shell .source-purchase-cost-errors {
  color: #b32d29;
  font-size: 14px;
  line-height: 20px;
}

html body.source-shell .source-purchase-cost-result {
  margin: 0;
  padding: 12px 14px;
  border-radius: 5px;
  background: #f2f7f7;
  color: #5b6468;
  font-size: 16px;
  line-height: 24px;
}

html body.source-shell .source-purchase-cost-result output {
  color: #168f8d;
  font-weight: 800;
}

html body.source-shell .source-purchase-cost-actions {
  padding: 0;
}

html body.source-shell .source-purchase-cost-readonly {
  display: grid;
  gap: 12px;
  padding: 24px;
  color: #494949;
  font-size: 18px;
  line-height: 26px;
}

html body.source-shell .source-purchase-cost-readonly > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

html body.source-shell .source-purchase-cost-readonly strong {
  color: #8f8f8f;
  font-weight: 600;
}

@media (max-width: 700px) {
  html body.source-shell .source-purchase-cost-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  html body.source-shell .source-purchase-cost-modal-form,
  html body.source-shell .source-purchase-cost-readonly {
    padding: 16px 12px 12px;
  }

  html body.source-shell .source-purchase-cost-open {
    min-height: 40px;
    padding: 0 12px;
    font-size: 14px;
  }
}

.balance-table th {
  background: #ffffff;
}

.balance-table td,
.balance-table th {
  height: 51px;
}

.messages {
  margin: 0 0 16px;
}

.msg {
  border: 1px solid #bee3f8;
  background: #eef8ff;
  color: #1f5e78;
  font-weight: 700;
}

.msg.error {
  border-color: #fecaca;
  background: #fff0f0;
  color: #991b1b;
}

.msg.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.login-shell {
  min-height: calc(100vh - 82px);
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.login-panel {
  width: min(100%, 484px);
  padding: 32px 0;
  border: 1px solid #e1e5e8;
  border-radius: 16px;
  background: #ffffff;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  margin: -4px 80px 16px;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 700;
}

.login-brand strong {
  font-size: 14px;
}

.login-panel h1 {
  margin: 0 80px 16px;
  font-size: 24px;
  font-weight: 700;
  line-height: normal;
}

.login-form {
  padding: 0 80px;
}

.login-form p {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

.login-form label {
  color: #7d8085;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
}

.login-form > label:not(.remember-login) {
  display: block;
}

.login-form > label:not(.remember-login):first-of-type {
  margin-bottom: 36px;
}

.login-form > label:not(.remember-login):nth-of-type(2) {
  margin-bottom: 28px;
}

.login-form > label:not(.remember-login) > span {
  display: block;
  margin: 0 0 4px 8px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
  display: block;
  width: 300px;
  max-width: 100%;
  height: 26px;
  margin: 0 auto;
  padding: 1px 2px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
}

.remember-login {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-form .remember-login input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
}

.source-shell .login-form button {
  display: block;
  width: 160px;
  max-width: 100%;
  height: 56px;
  min-height: 56px;
  margin: 24px auto 0;
  padding: 0 16px;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
}

@media (max-width: 540px) {
  .login-brand,
  .login-panel h1 {
    margin-left: 24px;
    margin-right: 24px;
  }

  .login-form {
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 1180px) {

  .module-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

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

  .movement-filter {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

  .audit-filter {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --page-gap: 12px;
  }

  .module-grid,
  .workshop-grid,
  .document-filter,
  .movement-filter,
  .audit-filter,
  .columns,
  .movement-totals {
    grid-template-columns: 1fr;
  }

  .page-head {
    margin: -12px -12px 16px;
    padding: 12px;
  }

  .breadcrumbs {
    font-size: 20px;
  }

  .page-tools {
    justify-content: flex-start;
  }
}

/* Source program skin: closer to the old working interface, while logic stays shared. */
.source-shell {
  background: #f2f2f2;
  overflow-x: hidden;
}

.source-shell .container {
  max-width: none;
  margin: 0 auto;
  padding: 22px;
  background: #ffffff;
}

.source-shell .page-head {
  min-height: 58px;
  margin: -22px -22px 22px;
  padding: 12px 22px;
  border-bottom: 10px solid #f2f2f2;
  background: #ffffff;
}

.source-shell .compact-head {
  min-height: 54px;
}

.source-shell .breadcrumbs {
  gap: 8px;
  font-size: 24px;
}

.source-shell .breadcrumbs a,
.source-shell .breadcrumbs span {
  color: #9fa2a6;
}

.source-shell .breadcrumbs h1,
.source-shell .breadcrumbs strong {
  color: #3f4247;
}

.source-shell .page-tools {
  gap: 8px;
}

.source-shell .button,
.source-shell button,
.source-shell input[type="submit"] {
  min-height: 36px;
  border-radius: 5px;
}

.source-shell .document-filter {
  grid-template-columns: 110px 170px minmax(220px, 1fr) 145px 145px auto auto auto;
  gap: 10px;
  padding: 12px;
  border-radius: 5px;
  background: #f5f5f5;
}

.source-shell .list-panel,
.source-shell .card {
  border: 1px solid #dfe5e8;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: none;
}

.source-shell table {
  width: 100%;
  border-collapse: collapse;
}

.source-shell th {
  height: 34px;
  padding: 8px 10px;
  background: #eeeeee;
  color: #7d838a;
  font-size: 12px;
  font-weight: 700;
}

.source-shell td {
  padding: 9px 10px;
  border-bottom: 1px solid #dddddd;
}

.source-shell .document-summary-card {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding: 10px 14px;
  background: #ffffff;
}

.source-shell .card h2 {
  margin-top: 0;
  font-size: 16px;
}

.source-catalog-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.source-catalog-tree {
  border: 1px solid #dfe5e8;
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
}

.source-catalog-tree a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: #31373d;
  text-decoration: none;
  border-bottom: 1px solid #edf0f2;
}

.source-catalog-tree a:last-child {
  border-bottom: 0;
}

.source-catalog-tree a.active,
.source-catalog-tree a:hover {
  background: #eaf7f6;
  color: #16847d;
}

.source-catalog-tree small {
  color: #7b858d;
  font-weight: 700;
}

.source-catalog-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: #f4f4f4;
  border-bottom: 1px solid #dfe5e8;
}

.source-catalog-detail-head > span {
  color: #7b858d;
  font-weight: 700;
  white-space: nowrap;
}

.source-catalog-detail-head h2 {
  margin: 0 0 4px;
}

.source-catalog-detail-head p {
  margin: 0;
  color: #6f767d;
}

.source-catalog-table th,
.source-catalog-table td {
  text-align: left;
}

@media (max-width: 900px) {
  .source-catalog-layout {
    grid-template-columns: 1fr;
  }
}

/* НАША: рабочее время и быстрый выбор смены в окне исполнителей. */
.source-employee-picker-form:has(.source-employee-time-compact) {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
}

.source-employee-picker-form:has(.source-employee-time-compact) .source-employee-search {
  margin-bottom: 0;
}

.source-employee-time-compact {
  display: grid;
  grid-template-columns: auto minmax(245px, auto) auto auto minmax(110px, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 2px 0;
  color: #4a4a4a;
  font-size: 16px;
}

.source-employee-time-compact strong {
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.source-employee-shift-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.source-employee-shift-buttons button {
  height: 32px;
  min-width: 40px;
  padding: 0 9px;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  background: #ffffff;
  color: #4a4a4a;
  font: inherit;
  cursor: pointer;
}

.source-employee-shift-buttons button.is-active {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.source-employee-time-compact label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  white-space: nowrap;
}

.source-employee-time-compact select {
  height: 32px;
  min-width: 70px;
  padding: 0 7px;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  background: #ffffff;
  color: #2f3a45;
  font-size: 16px;
}

.source-employee-hours-summary {
  justify-self: end;
  color: #0a8f8b;
  font-weight: 700;
  white-space: nowrap;
}

/* НАША: единая карточка сушилки с выбором одной из четырёх камер. */
.source-dryer-select-card {
  margin: 0;
  padding: 24px;
  border-radius: 8px;
  background: #ffffff;
}

.source-dryer-select-card h2 {
  margin: 0 0 18px;
  color: #494949;
  font-size: 26px;
}

.source-dryer-select-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 18px;
}

.source-dryer-select-grid form {
  margin: 0;
}

.source-dryer-select-tile {
  display: flex;
  width: 100%;
  min-height: 180px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 0;
  border-radius: 8px;
  background: #eeeeee;
  color: #494949;
  cursor: pointer;
  text-align: left;
}

.source-dryer-select-tile:hover,
.source-dryer-select-tile:focus-visible {
  outline: 3px solid rgba(46, 196, 182, .28);
  background: #e5f7f5;
}

.source-dryer-select-tile strong {
  font-size: 24px;
}

.source-dryer-select-tile .source-workshop-mark {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
}

a.source-create-document-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 1180px) {
  .source-employee-time-compact {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .source-employee-hours-summary {
    justify-self: start;
  }

  .source-dryer-select-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 700px) {
  .source-dryer-select-grid {
    grid-template-columns: 1fr;
  }
}

.source-report-filter {
  grid-template-columns: repeat(2, minmax(190px, 240px)) auto;
}

.source-dashboard-title {
  margin-bottom: 24px;
}

.source-dashboard-title h1 {
  margin: 0;
  color: #494949;
  font-size: 40px;
  line-height: 60px;
  font-weight: 700;
}

.source-dashboard .accounting-module-grid {
  /* Live ASTOX uses the same auto-fit grid for modules and workshops. */
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.source-dashboard .module-card {
  height: 110px;
  min-height: 110px;
  padding: 24px;
  border-radius: 8px;
  font-size: 20px;
  line-height: 30px;
  font-weight: 500;
}

.source-dashboard .module-icon {
  font-size: 54px;
}

.source-dashboard .workshop-section {
  margin-top: 24px;
}

.source-dashboard .workshop-section h2 {
  margin: 0 0 28px;
  font-size: 36px;
  line-height: 44px;
  font-weight: 600;
}

.source-dashboard .workshop-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

html body.source-shell main.source-container:has(.source-dashboard) {
  background: #ffffff;
  border-radius: 0;
}

.source-dashboard .workshop-tile {
  height: 110px;
  min-height: 110px;
  padding: 24px;
  border-radius: 8px;
  background: #f2f2f2;
}

.source-dashboard .workshop-name strong {
  font-size: 20px;
  line-height: 30px;
  font-weight: 500;
}

.source-dashboard .workshop-icon {
  width: 42px;
  height: 42px;
  font-size: 42px;
}

@media (max-width: 820px) {
  .source-shell .container {
    padding: 16px;
  }

  .source-dashboard .accounting-module-grid,
  .source-dashboard .workshop-grid {
    grid-template-columns: 1fr;
  }

  .source-shell .page-head {
    margin: -16px -16px 16px;
    padding: 12px 16px;
  }

  .source-shell .document-filter {
    grid-template-columns: 1fr;
  }
}

.source-page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -20px -20px 14px;
  padding: 26px 32px;
  background: #ffffff;
  border-bottom: 12px solid #f0f0f0;
}

.source-balance-title {
  gap: 10px;
  margin-bottom: 18px;
  padding-left: 24px;
  padding-right: 24px;
}

.source-balance-title .source-breadcrumbs {
  flex-wrap: nowrap;
  gap: 12px;
  font-size: 38px;
  line-height: 54px;
}

.source-container {
  background: #eeeeee;
  min-height: 100vh;
}

.source-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: #9a9a9a;
  font-size: 30px;
  font-weight: 700;
}

.source-breadcrumbs h1 {
  margin: 0;
  color: #424242;
  font-size: inherit;
  line-height: inherit;
}

.source-document-list-card {
  padding: 20px;
  background: #ffffff;
  border-radius: 4px;
}

.source-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 20px;
  overflow: hidden;
  background: #eeeeee;
  border-radius: 4px;
}

.source-tabs a {
  min-height: 56px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #4d4d4d;
}

.source-tabs a.active {
  background: var(--teal);
  color: #ffffff;
}

.source-balance-tabs {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 22px;
}

.source-date-pill {
  display: flex;
  align-items: center;
  min-height: 54px;
  overflow: visible;
  background: #f1f1f1;
  border-radius: 5px;
}

.source-date-pill label {
  padding: 0 12px 0 16px;
  color: #8a8a8a;
  font-weight: 700;
  white-space: nowrap;
}

.source-date-pill input {
  width: 148px;
  height: 54px;
  border: 0;
  background: #f1f1f1;
  padding: 0 10px;
  color: #28313b;
  font-size: 18px;
  line-height: 54px;
  cursor: pointer;
  outline: 0;
}

.source-date-pill input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1;
}

.source-date-pill button {
  width: 58px;
  height: 54px;
  border: 0;
  border-radius: 0 5px 5px 0;
  background-color: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3Cpath d='M8 14h2M12 14h2M16 14h2M8 18h2M12 18h2'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 26px 26px;
  color: #ffffff;
  cursor: pointer;
  font-size: 0;
}

.source-balance-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.source-balance-material-layout {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 50px;
  min-height: 620px;
  padding: 28px 24px 24px;
  background: #ffffff;
  border-radius: 0 0 8px 8px;
  box-sizing: border-box;
}

.source-workshop-sidebar,
.source-balance-column,
.source-material-sidebar,
.source-material-balance-panel {
  background: #ffffff;
  border-radius: 4px;
}

.source-sidebar-search {
  display: flex;
  align-items: center;
  height: 50px;
  margin-bottom: 12px;
  background: #eeeeee;
  border-bottom: 1px solid #d5d5d5;
}

.source-sidebar-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  background: transparent;
  font-size: 20px;
  font-weight: 400;
  line-height: 30px;
}

.source-sidebar-search span {
  width: 50px;
  text-align: center;
  color: #777777;
  font-size: 24px;
}

.source-workshop-list {
  max-height: 620px;
  overflow: auto;
  padding-bottom: 10px;
}

.source-material-list {
  max-height: 620px;
  overflow: auto;
  padding: 0 6px 10px 0;
  scrollbar-color: #777777 transparent;
  scrollbar-width: thin;
}

.source-workshop-list h3 {
  margin: 14px 18px 8px;
  color: #9a9a9a;
  font-size: 16px;
}

.source-material-list h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 12px 10px;
  color: #9a9a9a;
  font-size: 16px;
  white-space: nowrap;
}

.source-material-list h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dddddd;
}

.source-workshop-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  margin: 0 10px 8px;
  padding: 16px 18px;
  background: #eeeeee;
  border-radius: 5px;
  color: #4a4a4a;
  font-size: 20px;
  font-weight: 500;
  line-height: 30px;
}

.source-material-list a {
  display: flex;
  align-items: center;
  min-height: 64px;
  margin: 0 0 8px;
  padding: 8px 24px;
  background: #eeeeee;
  border-radius: 5px;
  color: #424242;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
}

.source-workshop-list a.active {
  background: var(--teal);
  color: #ffffff;
}

.source-material-list a.active {
  background: var(--teal);
  color: #ffffff;
}

.source-workshop-list .source-workshop-mark {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
}

.source-workshop-list .source-workshop-mark.source-inline-icon {
  display: block;
}

.source-balance-table {
  background: #ffffff;
}

.source-balance-table th {
  height: 57px;
  background: #ffffff;
  color: #999999;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
}

.source-balance-table td {
  height: 62px;
  color: #424242;
  font-size: 20px;
  font-weight: 400;
  line-height: 29px;
}

.source-balance-table td:first-child,
.source-balance-table th:first-child {
  text-align: left;
}

.source-balance-table td:nth-child(n+2),
.source-balance-table th:nth-child(n+2) {
  width: 78px;
  text-align: center;
}

.source-balance-table tr.negative td {
  color: #b00020;
}

.source-material-workshop-table th:first-child,
.source-material-workshop-table td:first-child {
  width: auto;
  padding-left: 20px;
}

.source-material-workshop-table tbody tr:not(.source-material-total) td {
  height: 68px;
  font-size: 18px;
}

.source-material-workshop-table .source-material-total td {
  color: #a0a0a0;
  font-size: 18px;
}

.source-material-workshop-table .source-material-total.negative td {
  color: #b00020;
}

@media (max-width: 720px) {
  .source-balance-layout {
    grid-template-columns: 330px minmax(190px, 1fr);
    gap: 24px;
  }

  .source-balance-material-layout {
    grid-template-columns: 330px minmax(300px, 1fr);
    gap: 24px;
    overflow-x: auto;
  }

  .source-balance-layout > .source-workshop-sidebar {
    grid-row: 1 / span 2;
  }

  .source-balance-layout > .source-balance-column {
    grid-column: 2;
  }
}

.source-catalog-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
}

.source-catalog-tree,
.source-catalog-main {
  background: #ffffff;
  border-radius: 4px;
}

.source-catalog-tree {
  padding: 10px;
}

.source-catalog-tree a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  color: #444444;
  border-bottom: 1px solid #eeeeee;
}

.source-catalog-tree a.active {
  background: #e8f7f6;
  color: #078b88;
}

.source-catalog-tree small {
  color: #999999;
}

.source-catalog-main {
  overflow: hidden;
}

.source-catalog-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid #dddddd;
}

.source-catalog-detail-head h2 {
  margin: 0 0 8px;
  color: #424242;
  font-size: 24px;
}

.source-catalog-detail-head p {
  margin: 0;
  color: #666666;
}

.source-catalog-detail-head > span {
  color: #999999;
}

.source-catalog-table {
  width: 100%;
  border-collapse: collapse;
}

.source-catalog-table th,
.source-catalog-table td {
  height: 50px;
  padding: 10px 18px;
  border-bottom: 1px solid #dddddd;
  text-align: left;
}

.source-catalog-table th {
  color: #999999;
  font-size: 12px;
  font-weight: 700;
}

.source-report-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
}

.source-report-menu a,
.source-report-filter {
  background: #ffffff;
  border-radius: 4px;
}

.source-report-menu a {
  display: grid;
  gap: 10px;
  min-height: 96px;
  padding: 22px;
}

.source-report-menu strong {
  color: #424242;
  font-size: 22px;
}

.source-report-menu span {
  color: #777777;
}

.source-report-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
}

.source-report-filter label {
  display: grid;
  gap: 7px;
  color: #999999;
  font-weight: 700;
}

.source-report-filter input,
.source-report-filter select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d6d6d6;
  border-radius: 4px;
  background: #ffffff;
  color: #444444;
}

.source-report-filter a,
.source-report-filter button {
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 4px;
  text-align: center;
  font-weight: 700;
}

.source-report-filter a {
  border: 1px solid #d6d6d6;
  background: #ffffff;
}

.source-filter-icon {
  color: #bbbbbb;
  font-size: 18px;
}

.source-error,
.source-warning {
  margin: 12px 0;
  padding: 12px 14px;
  background: #fff7df;
  border: 1px solid #f0d389;
  border-radius: 4px;
  color: #7a5400;
}

.source-empty {
  padding: 28px;
  text-align: center;
  color: #999999;
}

.source-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .42);
}

.source-picker-form {
  display: block;
}

.source-real-fields {
  display: none;
}

.source-picker-source-list,
.source-picker-material-list {
  max-height: 520px;
  overflow: auto;
}

.source-picker-source-list button,
.source-picker-material-list button {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 0;
  border-radius: 5px;
  background: #ffffff;
  color: #4a4a4a;
  cursor: pointer;
  text-align: left;
  font-size: 18px;
}

.source-picker-source-list button.active,
.source-picker-material-list button.active {
  background: var(--teal);
  color: #ffffff;
}

.source-picker-material-list span,
.source-picker-material-list small {
  display: block;
}

.source-picker-material-list small {
  margin-top: 4px;
  color: #777777;
  font-size: 14px;
}

.source-picker-material-list button.active small {
  color: rgba(255, 255, 255, .85);
}

.source-picker-quantity input {
  width: 100%;
  height: 58px;
  margin-bottom: 18px;
  padding: 0 16px;
  border: 1px solid #d6d6d6;
  border-radius: 6px;
  background: #ffffff;
  font-size: 24px;
}

@media (max-width: 1020px) {

  .source-breadcrumbs {
    font-size: 24px;
  }
}

.source-page-head {
  gap: 16px;
}

.source-list-panel {
  overflow-x: auto;
}

.source-wide-table {
  min-width: 980px;
}

.source-movement-filter,
.source-audit-filter {
  grid-template-columns: 120px 150px minmax(190px, 1fr) minmax(220px, 1.2fr) 150px 150px auto auto auto;
}

.source-audit-filter {
  grid-template-columns: 150px 120px minmax(220px, 1fr) 150px 150px auto auto auto;
}

.source-quick-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.source-quick-links > span {
  color: #777777;
  font-weight: 700;
}

.source-quick-links .button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

@media (max-width: 1280px) {
  .source-movement-filter,
  .source-audit-filter,
  .source-report-filter {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .source-movement-filter button,
  .source-movement-filter a,
  .source-audit-filter button,
  .source-audit-filter a,
  .source-report-filter button,
  .source-report-filter a {
    min-height: 38px;
  }
}

.source-workshop-list-head,
.source-original-draft-head {
  margin: 0;
  padding: 24px 20px;
  background: #ffffff;
}

.source-workshop-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: -24px -24px 16px;
  height: 108px;
  padding: 0 24px;
  border-radius: 8px;
  border-bottom: 0;
}

.source-workshop-list-head:has(.source-header-control) {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) 227px;
}

.source-workshop-list-head .source-breadcrumbs,
.source-workshop-list-head form {
  transform: none;
}

.source-workshop-list-head .source-breadcrumbs {
  flex: 0 0 auto;
  min-width: 0;
}

.source-workshop-list-head .source-header-control {
  flex: 1 1 480px;
  width: auto;
  max-width: 1060px;
  min-width: 0;
  min-height: 78px;
  margin: 0;
  padding: 9px 12px;
  gap: 12px;
}

.source-workshop-list-head .source-header-control > div {
  min-width: 0;
  overflow: hidden;
}

.source-workshop-list-head .source-header-control p {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 1000px) {
  .source-workshop-list-head:has(.source-header-control) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 227px;
    height: auto;
    min-height: 108px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .source-workshop-list-head:has(.source-header-control) .source-breadcrumbs {
    grid-column: 1;
    grid-row: 1;
  }

  .source-workshop-list-head .source-header-control {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
  }

  .source-workshop-list-head:has(.source-header-control) .source-create-document-menu {
    grid-column: 2;
    grid-row: 1;
  }
}

.source-original-draft-head {
  margin: -20px -20px 16px;
}

.source-documents-title {
  margin: -24px -24px 16px;
  height: 108px;
  padding: 0 24px;
  border-bottom: 0;
  border-radius: 8px;
}

.source-breadcrumbs-large {
  gap: 16px;
  font-size: 40px;
  line-height: 60px;
}

.source-breadcrumbs-large a,
.source-breadcrumbs-large span {
  color: #a5a5a5;
}

.source-breadcrumbs-large h1 {
  color: #3f4247;
  font-size: inherit;
}

.source-dashboard-title.source-breadcrumbs-large {
  font-size: 40px;
  line-height: 60px;
}

.source-dashboard-title.source-breadcrumbs-large h1 {
  color: #494949;
  font-size: 40px;
  line-height: 60px;
  font-weight: 700;
}

.source-create-document-button {
  width: 227px;
  height: 60px;
  min-height: 60px;
  padding: 0 16px;
  border: 0;
  border-radius: 5px;
  background: var(--teal);
  color: #ffffff;
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
  white-space: nowrap;
}

.source-create-document-menu {
  position: relative;
  z-index: 40;
  flex: 0 0 227px;
}

.source-create-document-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.source-create-document-menu > summary::-webkit-details-marker {
  display: none;
}

.source-create-document-menu[open] > summary {
  background: #269c9b;
}

.source-create-document-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(390px, calc(100vw - 48px));
  padding: 8px;
  border: 1px solid #d7dfe2;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(37, 56, 66, 0.18);
}

.source-create-document-menu-panel form {
  width: 100%;
  margin: 0;
}

.source-dryer-select-grid form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.source-create-document-menu-panel a,
.source-create-document-menu-panel button {
  display: flex;
  width: 100%;
  min-height: 68px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 10px 14px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #42484c;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.source-create-document-menu-panel a:hover,
.source-create-document-menu-panel a:focus-visible,
.source-create-document-menu-panel button:hover,
.source-create-document-menu-panel button:focus-visible {
  background: #eef8f8;
  outline: none;
}

.source-create-document-menu-panel strong {
  color: #2e3438;
  font-size: 18px;
  font-weight: 600;
}

.source-create-document-menu-panel span {
  color: #7c858a;
  font-size: 14px;
  font-weight: 400;
  line-height: 19px;
}

.source-document-list-card {
  margin: 0 -24px -24px;
  padding: 26px 24px 0;
  border-radius: 8px 8px 0 0;
}

.source-workshop-document-card {
  margin: 0 -24px -24px;
  padding: 26px 24px 0;
  background: #ffffff;
  border-radius: 8px 8px 0 0;
  position: relative;
}

.source-workshop-document-card::after {
  content: "";
  position: absolute;
  top: 111px;
  right: 28px;
  width: 6px;
  height: 220px;
  border-radius: 999px;
  background: #777777;
  pointer-events: none;
}

.source-workshop-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  height: 66px;
  margin: 0 0 14px;
  padding: 5px;
  background: #efefef;
  border-radius: 7px;
}

.source-workshop-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 17px;
  border-radius: 5px;
  color: #3f4247;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
}

.source-workshop-tabs a.active {
  background: var(--teal);
  color: #ffffff;
}

.source-workshop-scroll {
  max-height: calc(100vh - 295px);
  overflow-y: scroll;
  padding: 0 7px 48px 0;
  scrollbar-color: #777777 transparent;
  scrollbar-width: auto;
}

.source-workshop-scroll::-webkit-scrollbar {
  width: 10px;
}

.source-workshop-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.source-workshop-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #777777;
}

.source-original-filter-row {
  display: grid;
  align-items: center;
  min-height: 48px;
  margin-bottom: 0;
}

.source-document-list-card .source-original-filter-row.source-global-document-filter {
  grid-template-columns: 30% 10% 50% 10%;
  column-gap: 0;
  transform: none;
}

.source-document-list-card .source-global-document-filter > label.source-filter-date-control {
  grid-column: 2;
}

.source-document-list-card .source-global-document-filter > label.source-workshop-filter-control {
  grid-column: 3;
}

.source-workshop-document-card .source-original-filter-row.source-workshop-document-filter {
  grid-template-columns: 45% 45% 10%;
  column-gap: 0;
  transform: none;
}

.source-document-list-card .source-global-document-filter > label.source-filter-number-control,
.source-document-list-card .source-global-document-filter > label.source-workshop-filter-control,
.source-workshop-document-card .source-workshop-document-filter > label {
  width: min(237px, 100%);
}

.source-document-list-card .source-global-document-filter > label.source-filter-date-control {
  width: min(159px, 100%);
}

.source-original-filter-row > label.source-filter-number-control {
  grid-column: 1;
}

.source-original-filter-row > label.source-filter-date-control {
  grid-column: 2;
}

.source-original-filter-row > label.source-workshop-filter-control {
  grid-column: 3;
}

.source-original-filter-row label {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  height: 36px;
  min-height: 36px;
  margin: 0;
  overflow: visible;
}

.source-original-filter-row .source-filter-icon {
  grid-column: 1;
  width: 24px;
  height: 24px;
  align-self: center;
  background-color: #b7b7b7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20viewBox%3D%270%200%2024%2024%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%3E%3Cpath%20d%3D%27M3%205h18l-7%208v5l-4%202v-7L3%205z%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272.2%27%20stroke-linejoin%3D%27round%27/%3E%3C/svg%3E") center / 22px 22px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20viewBox%3D%270%200%2024%2024%27%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%3E%3Cpath%20d%3D%27M3%205h18l-7%208v5l-4%202v-7L3%205z%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272.2%27%20stroke-linejoin%3D%27round%27/%3E%3C/svg%3E") center / 22px 22px no-repeat;
}

.source-filter-label {
  position: absolute;
  left: 32px;
  top: 0;
  max-width: calc(100% - 32px);
  color: #9d9d9d;
  font-size: 16px;
  line-height: 36px;
  pointer-events: none;
}

.source-original-filter-row label.has-value .source-filter-label,
.source-original-filter-row label.source-filter-filled .source-filter-label,
.source-original-filter-row label:focus-within .source-filter-label {
  display: none;
}

.source-original-filter-row input,
.source-original-filter-row select {
  grid-column: 2;
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #ebebeb;
  border-radius: 0;
  background: transparent;
  color: #28313b;
  font-size: 16px;
  line-height: 36px;
  outline: 0;
  -moz-appearance: textfield;
}

.source-original-filter-row select {
  padding-right: 28px;
}

.source-original-filter-row input::placeholder,
.source-original-filter-row input[type="date"]::placeholder {
  color: transparent;
  opacity: 0;
  -webkit-text-fill-color: transparent;
}

.source-original-filter-row input::-webkit-outer-spin-button,
.source-original-filter-row input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.source-original-filter-row label.source-filter-date-control {
  cursor: pointer;
}

.source-original-filter-row label.source-filter-date-control input[data-source-document-date-display] {
  padding-right: 40px;
  pointer-events: none;
}

.source-original-filter-row label.source-filter-date-control input[type="date"][data-source-document-date-picker] {
  position: absolute;
  top: 0;
  right: 0;
  left: auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border-bottom: 0;
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
  background: transparent;
  color: transparent !important;
  font-size: 0 !important;
  -webkit-text-fill-color: transparent !important;
}

.source-original-filter-row label.source-filter-date-control input[type="date"][data-source-document-date-picker]::-webkit-datetime-edit,
.source-original-filter-row label.source-filter-date-control input[type="date"][data-source-document-date-picker]::-webkit-date-and-time-value {
  color: transparent;
  opacity: 0;
  -webkit-text-fill-color: transparent;
}

.source-original-filter-row label.source-filter-date-control input[type="date"][data-source-document-date-picker]::-webkit-calendar-picker-indicator {
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

@media (max-width: 1320px) {
  .source-document-list-card .source-original-filter-row.source-global-document-filter {
    grid-template-columns: 30% 10% 50% 10%;
    column-gap: 0;
  }

  .source-workshop-document-card .source-original-filter-row.source-workshop-document-filter {
    grid-template-columns: 45% 45% 10%;
    column-gap: 0;
  }
}

.source-filter-hidden-submit {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.source-original-document-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.source-workshop-scroll .source-original-document-table {
  margin-top: 5px;
  border-top: 1px solid #d9d9d9;
}

.source-original-document-table tr:nth-child(even) td {
  background: #ffffff;
}

.source-original-document-table td {
  height: 66px;
  padding: 0 32px;
  border-bottom: 1px solid #d9d9d9;
  color: #28313b;
  font-size: 20px;
  font-weight: 400;
  background: #ffffff;
}

.source-original-document-table td:first-child {
  width: 45%;
  padding-left: 32px;
}

.source-document-operation-label {
  display: block;
  margin-top: 4px;
  color: #6f7780;
  font-size: 13px;
  font-weight: 500;
}

.source-original-document-table .source-workshop-empty-cell {
  padding: 0 40px;
  color: #28313b;
  text-align: center;
}

.source-original-document-table .source-empty-row .source-workshop-empty-spacer {
  border-bottom: 0;
}

.source-global-document-table td:first-child {
  width: 30%;
}

.source-global-document-table td:nth-child(2) {
  width: 10%;
}

.source-global-document-table td:nth-child(3) {
  width: 50%;
}

.source-global-document-table td:nth-child(4) {
  width: 10%;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

.source-workshop-scroll .source-original-document-table td:nth-child(2) {
  width: 45%;
}

.source-workshop-scroll .source-original-document-table td.source-workshop-row-spacer {
  width: 10%;
  padding: 0;
}

.source-document-eye {
  position: relative;
  display: inline-block;
  width: 23px;
  height: 14px;
  vertical-align: middle;
  border: 2px solid #8a8a8a;
  border-radius: 50%;
}

.source-document-eye::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8a8a8a;
  transform: translate(-50%, -50%);
}

@media (max-width: 720px) {
  .source-document-list-card .source-original-filter-row.source-global-document-filter {
    grid-template-columns: 205px 130px 170px;
    column-gap: 24px;
  }

  .source-original-document-table {
    width: 560px;
    min-width: 560px;
  }

  .source-original-document-table td {
    padding-left: 18px;
    padding-right: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
  }

  .source-original-document-table td:first-child,
  .source-global-document-table td:first-child {
    width: 205px;
    padding-left: 31px;
  }

  .source-global-document-table td:nth-child(2) {
    width: 130px;
  }

  .source-global-document-table td:nth-child(3) {
    width: 170px;
  }

  .source-global-document-table td:nth-child(4) {
    width: 55px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

.source-original-draft-head {
  border-radius: 4px;
}

.source-original-draft-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.source-original-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.source-original-actions form {
  margin: 0;
}

.source-original-meta-row {
  display: flex;
  align-items: stretch;
  gap: 22px;
  margin-bottom: 20px;
}

.source-original-checker {
  display: grid;
  align-content: center;
  min-width: 150px;
  color: #34383e;
  font-size: 20px;
}

.source-original-checker strong {
  color: #9a9a9a;
}

.source-original-pill {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) 64px;
  align-items: center;
  min-width: 290px;
  min-height: 64px;
  background: #eeeeee;
  border-radius: 5px;
  overflow: hidden;
  color: #333840;
  font-size: 22px;
}

.source-original-pill strong {
  padding-left: 18px;
  color: #999999;
  font-size: 20px;
}

.source-original-pill span:not(.source-original-pill-action) {
  padding: 0 18px;
}

.source-original-pill-action {
  display: grid;
  place-items: center;
  align-self: stretch;
  background: var(--teal);
  color: #ffffff;
  font-size: 28px;
}

.source-original-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.source-original-comment-form input {
  width: 100%;
  min-height: 64px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  background: #eeeeee;
  color: #4a4a4a;
  font-size: 22px;
}

.source-original-comment-form .source-comment-save {
  min-width: 132px;
  min-height: 64px;
  padding: 0 18px;
  border-radius: 5px;
  font-size: 18px;
  font-weight: 700;
}

.source-original-warning {
  margin: 0 0 16px;
  padding: 14px 18px;
  border: 1px solid #f2d086;
  border-radius: 5px;
  background: #fff6dc;
  color: #765000;
  font-size: 18px;
}

.source-original-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  min-height: 380px;
}

.source-original-stage-grid.source-only-output .source-stage-output {
  grid-column: 2;
}

.source-original-stage-grid.source-only-input .source-stage-input {
  grid-column: 1;
}

.source-original-stage {
  align-self: start;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .16);
}

.source-original-stage header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 106px;
  padding: 20px 22px 20px 16px;
}

.source-original-stage h2 {
  margin: 0;
  color: #3e4247;
  font-size: 26px;
}

.source-original-plus {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 7px;
  background: var(--teal);
  color: #ffffff;
  font-size: 46px;
  line-height: 1;
}

.source-original-line-list {
  border-top: 1px solid #dddddd;
}

.source-original-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px auto;
  gap: 16px;
  align-items: center;
  min-height: 72px;
  padding: 10px 18px;
  border-bottom: 1px solid #e1e1e1;
}

.source-original-line strong,
.source-original-line span {
  display: block;
}

.source-original-line strong {
  color: #333840;
  font-size: 22px;
  font-weight: 400;
}

.source-original-line span {
  color: #8c8c8c;
  font-size: 16px;
  font-weight: 700;
}

.source-original-line b {
  color: #333840;
  text-align: right;
  font-size: 22px;
  font-weight: 400;
}

.source-original-line-delete button {
  border: 0;
  background: transparent;
  color: #e33e3a;
  font-size: 30px;
  font-weight: 700;
}

.source-original-modal {
  padding: 0;
  place-items: start center;
  overflow-y: auto;
}

.source-original-modal-panel {
  width: min(1660px, 100%);
  background: #eeeeee;
  border-radius: 0 0 5px 5px;
  overflow: hidden;
}

.source-original-modal-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 24px;
  background: var(--teal);
  color: #ffffff;
}

.source-original-modal-panel > header h2 {
  margin: 0;
  font-size: 26px;
}

.source-original-modal-panel > header button {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 46px;
  line-height: 1;
}

.source-employee-modal-panel {
  width: min(1440px, calc(100vw - 8px));
  max-height: calc(100vh - 4px);
  display: flex;
  flex-direction: column;
  border-radius: 10px;
}

.source-employee-picker-modal {
  z-index: 3100;
}

.source-employee-picker-form {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
  padding: 22px 24px 8px;
}

.source-employee-picker-form [data-source-employee-hidden] {
  display: none;
}

.source-employee-search {
  position: relative;
  width: 100%;
  margin-bottom: 18px;
}

.source-employee-search input {
  width: 100%;
  height: 62px;
  padding: 0 74px 0 16px;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #333333;
  font-size: 24px;
}

.source-employee-search span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #777777;
  font-size: 42px;
  line-height: 1;
  pointer-events: none;
}

.source-employee-picker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  min-height: 0;
}

.source-employee-picker-grid section {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.source-employee-picker-grid h3 {
  margin: 0 0 16px;
  color: #4a4a4a;
  font-size: 28px;
  line-height: 1.1;
}

.source-employee-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: min(342px, calc(100vh - 310px));
  min-height: 230px;
  overflow-y: auto;
  padding-right: 6px;
}

.source-employee-list button,
.source-employee-list p {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: #ffffff;
  color: #2f3842;
  text-align: left;
  font-size: 22px;
  line-height: 48px;
}

.source-employee-selected-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 50px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 5px 0 5px 16px;
  box-sizing: border-box;
  border-radius: 4px;
  background: #ffffff;
  color: #2f3842;
}

.source-employee-selected-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 21px;
  font-weight: 600;
  line-height: 26px;
}

.source-employee-hours-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6d6d6d;
  font-size: 16px;
  font-weight: 600;
}

.source-employee-hours-label select {
  width: 92px;
  height: 46px;
  padding: 0 10px;
  box-sizing: border-box;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  background: #ffffff;
  color: #2f3842;
  font-size: 20px;
}

.source-employee-hours-label select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgb(47 177 179 / 18%);
  outline: 0;
}

.source-employee-selected-row.is-invalid .source-employee-hours-label select {
  border-color: #e53935;
}

.source-employee-selected-row .source-employee-remove {
  width: 50px;
  min-height: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #e53935;
  color: #ffffff;
  text-align: center;
  font-size: 34px;
  line-height: 45px;
  cursor: pointer;
}

.source-employee-list p {
  background: transparent;
  color: #888888;
}

@media (max-width: 700px) {
  .source-employee-picker-form {
    width: 100%;
    min-width: 0;
    padding: 12px 10px 6px;
  }

  .source-employee-picker-form:has(.source-employee-time-compact) {
    gap: 8px;
  }

  .source-employee-search,
  .source-employee-time-compact,
  .source-employee-picker-grid,
  .source-employee-picker-form .source-original-modal-actions {
    width: 100%;
    min-width: 0;
  }

  .source-employee-search input {
    min-width: 0;
  }

  .source-employee-time-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .source-employee-time-compact > strong,
  .source-employee-shift-buttons,
  .source-employee-hours-summary {
    grid-column: 1 / -1;
  }

  .source-employee-shift-buttons {
    min-width: 0;
    flex-wrap: wrap;
  }

  .source-employee-time-compact label {
    min-width: 0;
  }

  .source-employee-time-compact select {
    min-width: 0;
    max-width: 100%;
  }

  .source-employee-picker-form .source-original-modal-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding-right: 0;
    padding-left: 0;
  }

  .source-employee-picker-form .source-original-modal-actions button {
    width: 100%;
    min-width: 0;
  }

  .source-employee-picker-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    overflow-y: auto;
  }

  .source-employee-list {
    height: min(260px, calc(50vh - 80px));
    min-height: 180px;
  }

  .source-employee-selected-row {
    grid-template-columns: minmax(0, 1fr) 50px;
    padding: 8px 0 8px 12px;
  }

  .source-employee-selected-name {
    grid-column: 1 / 3;
  }

  .source-employee-hours-label {
    justify-content: flex-end;
  }

}

.source-original-picker-grid {
  display: grid;
  grid-template-columns: minmax(340px, .75fr) minmax(460px, 1.35fr) minmax(430px, 1fr);
  gap: 8px;
  padding: 24px 18px 18px;
}

.source-original-picker-column {
  min-width: 0;
}

.source-original-picker-column h3 {
  margin: 0 0 14px;
  color: #777777;
  font-size: 40px;
  line-height: 1.1;
}

.source-original-picker-column p {
  margin: 0;
  padding: 14px;
  background: #ffffff;
  color: #999999;
  border-radius: 5px;
}

.source-original-picker-column.source-picker-source-list button,
.source-original-picker-column.source-picker-material-list button {
  display: block;
  width: 100%;
  min-height: 72px;
  margin-bottom: 10px;
  padding: 0 22px;
  border: 0;
  border-radius: 5px;
  background: #ffffff;
  color: #4a4a4a;
  text-align: left;
  font-size: 28px;
  line-height: 1.15;
}

.source-original-picker-column.source-picker-source-list button.active,
.source-original-picker-column.source-picker-material-list button.active {
  background: var(--teal);
  color: #ffffff;
}

.source-original-picker-column.source-picker-source-column {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.source-picker-source-options {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  max-height: 555px;
  padding: 0 6px 10px 0;
}

.source-original-picker-column.source-picker-source-column .source-current-workshop-stock-button {
  flex: 0 0 auto;
  margin: auto 6px 0 0;
}

.source-original-picker-column.source-picker-material-list {
  max-height: 586px;
  overflow-y: auto;
  padding-right: 6px;
}

.source-original-quantity-field {
  display: grid;
  grid-template-columns: 1fr 64px;
  align-items: center;
  min-height: 100px;
  margin-bottom: 16px;
  padding: 10px;
  background: #ffffff;
  border-radius: 7px;
}

.source-original-quantity-field input {
  width: 100%;
  height: 78px;
  border: 1px solid #d6d6d6;
  border-radius: 5px;
  color: #444444;
  font-size: 30px;
}

.source-original-quantity-field button {
  border: 0;
  background: transparent;
  color: #bbbbbb;
  font-size: 34px;
}

.source-original-keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #ffffff;
  border-radius: 7px;
  overflow: hidden;
}

.source-original-keypad button {
  min-height: 112px;
  border: 0;
  border-right: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
  background: #ffffff;
  color: #65c9c6;
  font-size: 30px;
}

.source-original-keypad button:nth-child(4n) {
  border-right: 0;
}

.source-original-keypad button:nth-last-child(-n+4) {
  border-bottom: 0;
}

.source-original-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 3px 6px;
}

.source-original-modal-actions button {
  min-height: 64px;
  border: 0;
  border-radius: 5px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
}

.source-original-modal-actions button:first-child {
  background: #8d8d8d;
}

.source-original-modal-actions button:last-child {
  background: #d9d9d9;
}

.source-original-modal-actions button:last-child:not(:disabled) {
  background: var(--teal);
}

@media (max-width: 1180px) {
  .source-original-picker-grid {
    grid-template-columns: 1fr;
  }

  .source-original-picker-column.source-picker-source-column {
    height: auto;
    max-height: none;
  }

  .source-picker-source-options {
    max-height: 360px;
  }

  .source-original-stage-grid,
  .source-original-stage-grid.source-only-output .source-stage-output,
  .source-original-stage-grid.source-only-input .source-stage-input {
    grid-template-columns: 1fr;
    grid-column: auto;
  }
}

/* Final ASTOX-compatible source shell layout. */
html,
html body.source-shell {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
  overscroll-behavior: auto;
}

html body.source-shell .source-astox-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 20px 0 12px;
  background: #29b4b2;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .16);
}

html body.source-shell .source-astox-brand {
  display: inline-flex;
  align-items: center;
  min-height: 64px;
  color: #ffffff;
  font-weight: 700;
}

html body.source-shell .source-nasha-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 182px;
  height: 50px;
  color: #ffffff;
  font-family: Mistral, "Segoe Script", cursive;
  font-size: 44px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

html body.source-shell .source-astox-logo-text {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin-left: 0;
  padding-left: 32px;
  border-left: 1px solid rgba(255, 255, 255, .9);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container {
  width: calc(100vw - 120px);
  margin: 14px 32px 32px 88px;
  padding: 24px;
  min-height: calc(100vh - 112px);
  background: #ffffff;
  border-radius: 8px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-document-list-card),
html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-workshop-document-card),
html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title),
html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-original),
html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) {
  padding: 0;
  background: transparent;
  border-radius: 0;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-document-list-card) .source-documents-title,
html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-workshop-document-card) .source-workshop-list-head {
  margin: 0 0 16px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-document-list-card) .source-document-list-card,
html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-workshop-document-card) .source-workshop-document-card {
  margin: 0;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-title {
  height: 112px;
  margin: 0 0 16px;
  padding: 0 24px;
  border-bottom: 0;
  border-radius: 8px;
  box-sizing: border-box;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-title .source-breadcrumbs {
  gap: 16px;
  font-size: 40px;
  line-height: 60px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-title .source-date-pill {
  width: 290px;
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 110px 64px;
  align-items: center;
  gap: 18px;
  background: transparent;
  overflow: visible;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-title .source-date-pill input {
  width: 110px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #494949;
  font-size: 20px;
  line-height: 30px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-title .source-date-pill button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: transparent;
  color: #828282;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-title .source-date-pill label {
  color: #a6a6a6;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-tabs {
  margin: 0;
  padding: 28px 24px 0;
  border-radius: 8px 8px 0 0;
  background: #ffffff;
  box-sizing: border-box;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-layout {
  grid-template-columns: 708px minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  min-height: calc(100vh - 376px);
  padding: 28px 24px 24px;
  border-radius: 0 0 8px 8px;
  background: #ffffff;
  box-sizing: border-box;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-material-layout {
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 50px;
  min-height: calc(100vh - 376px);
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-sidebar-search {
  height: 60px;
  margin-bottom: 14px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-workshop-list {
  max-height: calc(100vh - 450px);
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-material-list {
  max-height: calc(100vh - 450px);
}

@media (min-width: 901px) {
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-layout > .source-workshop-sidebar,
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-material-layout > .source-material-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-workshop-list,
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-material-list {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
  }
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-workshop-list a {
  min-height: 64px;
  margin: 0 0 8px;
  padding: 0 24px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-original) .source-report-index-title {
  height: 112px;
  margin: 0 0 14px;
  padding: 0 24px;
  border-bottom: 0;
  border-radius: 8px;
  box-sizing: border-box;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-original) .source-report-index-title .source-breadcrumbs {
  gap: 16px;
  font-size: 40px;
  line-height: 60px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-original) .source-report-menu-original {
  height: 158px;
  min-height: 158px;
  margin: 0;
  padding: 24px;
  grid-template-columns: repeat(2, 360px);
  justify-content: start;
  gap: 24px;
  border-radius: 8px;
  background: #ffffff;
  box-sizing: border-box;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-original) .source-report-menu-original a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 110px;
  min-height: 110px;
  padding: 24px;
  border-radius: 8px;
  background: #f2f2f2;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-original) .source-report-menu-original strong {
  max-width: 260px;
  color: #494949;
  font-size: 20px;
  font-weight: 500;
  line-height: 30px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-original) .source-report-menu-original .source-icon-report {
  position: relative;
  display: inline-block;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  color: var(--teal);
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-extended) .source-report-menu-original.source-report-menu-extended {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-extended) .source-report-menu-original.source-report-menu-extended strong {
  max-width: calc(100% - 78px);
}

html body.source-shell .source-report-additional {
  margin-top: 24px;
}

html body.source-shell .source-report-additional > h2 {
  margin: 0 0 14px;
  color: #494949;
  font-size: 24px;
  font-weight: 600;
}

html body.source-shell .source-report-menu-additional {
  grid-template-columns: minmax(260px, 360px);
  padding: 24px;
  border-radius: 8px;
  background: #ffffff;
}

html body.source-shell .source-report-menu-additional a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 110px;
  min-height: 110px;
  padding: 24px;
  border-radius: 8px;
  background: #f2f2f2;
}

html body.source-shell .source-report-menu-additional strong {
  color: #494949;
  font-size: 20px;
  font-weight: 500;
  line-height: 30px;
}

html body.source-shell .source-report-menu-additional .source-icon-report {
  position: relative;
  display: inline-block;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  color: var(--teal);
}

html body.source-shell .source-snapshot-report-title {
  min-height: 112px;
  margin: 0 0 16px;
  padding: 16px 24px;
  border-bottom: 0;
  border-radius: 8px;
  box-sizing: border-box;
}

html body.source-shell .source-snapshot-report-title .source-breadcrumbs {
  flex-wrap: wrap;
  gap: 12px;
}

html body.source-shell .source-snapshot-report-filter {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-left: auto;
}

html body.source-shell .source-snapshot-report-filter label {
  display: grid;
  gap: 5px;
  color: #777777;
  font-size: 13px;
  font-weight: 600;
}

html body.source-shell .source-snapshot-report-filter input,
html body.source-shell .source-snapshot-report-filter button {
  height: 48px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 8px;
  font: inherit;
}

html body.source-shell .source-snapshot-report-filter input {
  border: 1px solid #d6d6d6;
  background: #ffffff;
  color: #494949;
}

html body.source-shell .source-snapshot-report-filter button {
  border: 0;
  background: #e7f5f3;
  color: #167d74;
  font-weight: 600;
}

html body.source-shell .source-snapshot-report {
  display: grid;
  gap: 24px;
}

html body.source-shell .source-snapshot-site,
html body.source-shell .source-snapshot-section,
html body.source-shell .source-snapshot-grand-total {
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
}

html body.source-shell .source-snapshot-site {
  display: grid;
  gap: 16px;
  padding: 20px;
}

html body.source-shell .source-snapshot-site-header,
html body.source-shell .source-snapshot-section > header,
html body.source-shell .source-snapshot-grand-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

html body.source-shell .source-snapshot-site-header {
  padding: 2px 4px;
}

html body.source-shell .source-snapshot-site-header h2,
html body.source-shell .source-snapshot-grand-total h2,
html body.source-shell .source-snapshot-section h3 {
  margin: 0;
  color: #494949;
}

html body.source-shell .source-snapshot-site-header h2,
html body.source-shell .source-snapshot-grand-total h2 {
  font-size: 24px;
}

html body.source-shell .source-snapshot-site-header > div,
html body.source-shell .source-snapshot-section > header > div,
html body.source-shell .source-snapshot-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

html body.source-shell .source-snapshot-site-header span,
html body.source-shell .source-snapshot-section > header span,
html body.source-shell .source-snapshot-metrics span {
  padding: 7px 11px;
  border-radius: 999px;
  background: #eef7f6;
  color: #286b65;
  white-space: nowrap;
}

html body.source-shell .source-snapshot-section {
  border: 1px solid #e5e5e5;
}

html body.source-shell .source-snapshot-section > header {
  min-height: 58px;
  padding: 12px 18px;
  background: #f6f6f6;
}

html body.source-shell .source-snapshot-section h3 {
  font-size: 18px;
}

html body.source-shell .source-snapshot-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  color: #494949;
}

html body.source-shell .source-snapshot-table th,
html body.source-shell .source-snapshot-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e5e5;
  text-align: left;
  vertical-align: top;
}

html body.source-shell .source-snapshot-table th {
  color: #828282;
  font-size: 13px;
  font-weight: 600;
}

html body.source-shell .source-snapshot-table th:nth-child(1) { width: 17%; }
html body.source-shell .source-snapshot-table th:nth-child(2) { width: 18%; }
html body.source-shell .source-snapshot-table th:nth-child(3) { width: 35%; }
html body.source-shell .source-snapshot-table th:nth-child(4) { width: 8%; }
html body.source-shell .source-snapshot-table th:nth-child(5),
html body.source-shell .source-snapshot-table th:nth-child(6) { width: 11%; }

html body.source-shell .source-snapshot-table td:nth-child(5),
html body.source-shell .source-snapshot-table td:nth-child(6),
html body.source-shell .source-snapshot-table tfoot td {
  font-variant-numeric: tabular-nums;
}

html body.source-shell .source-snapshot-table tfoot td {
  border-bottom: 0;
  background: #f7f7f7;
  font-weight: 600;
}

html body.source-shell .source-snapshot-negative td {
  background: #fff3f1;
  color: #9b3228;
}

html body.source-shell .source-snapshot-grand-total {
  padding: 20px 24px;
  background: #dff2ef;
}

@media (max-width: 1280px) {
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-extended) .source-report-menu-original.source-report-menu-extended {
    height: auto;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-extended) .source-report-menu-original.source-report-menu-extended {
    grid-template-columns: minmax(0, 1fr);
  }

  html body.source-shell .source-report-menu-additional {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }

  html body.source-shell .source-snapshot-report-title,
  html body.source-shell .source-snapshot-site-header,
  html body.source-shell .source-snapshot-section > header,
  html body.source-shell .source-snapshot-grand-total {
    align-items: stretch;
    flex-direction: column;
  }

  html body.source-shell .source-snapshot-report-filter {
    width: 100%;
    flex-wrap: wrap;
    margin-left: 0;
  }
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-index > h1 {
  margin: 0 0 26px;
  color: #494949;
  font-size: 24px;
  font-weight: 600;
  line-height: 38px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-card {
  min-height: 544px;
  padding: 24px;
  border-radius: 8px;
  background: #ffffff;
  box-sizing: border-box;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-search {
  position: relative;
  display: block;
  height: 50px;
  margin: 0 0 18px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-search input {
  width: calc(100% - 37px);
  height: 50px;
  padding: 0 64px 0 16px;
  border: 1px solid #dddddd;
  border-radius: 5px;
  background: #ffffff;
  color: #494949;
  font-size: 16px;
  outline: 0;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-search span {
  position: absolute;
  right: 18px;
  top: 50%;
  width: 24px;
  height: 24px;
  color: #777777;
  transform: translateY(-50%);
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-search span::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1px;
  width: 14px;
  height: 14px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-search span::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 17px;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-card h2 {
  margin: 0 0 24px;
  color: #494949;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-pinned {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 34px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-pinned a {
  position: relative;
  display: grid;
  flex: 0 0 360px;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  width: 360px;
  height: 80px;
  min-height: 80px;
  padding: 12px 18px;
  border: 1px solid #e2e2e2;
  border-radius: 5px;
  color: #494949;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border: 5px solid var(--teal);
  border-radius: 4px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-icon::before,
html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 4px;
  border-radius: 2px;
  background: var(--teal);
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-icon::before {
  top: 9px;
  box-shadow: 0 9px 0 var(--teal);
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-icon::after {
  top: 27px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-pinned-text {
  display: grid;
  gap: 3px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-pinned strong,
html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-grid strong {
  color: #494949;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-pinned em,
html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-grid em {
  color: var(--teal);
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 22px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-pin {
  position: relative;
  width: 18px;
  height: 18px;
  color: #777777;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-pin::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 1px;
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: currentColor;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-pin::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 10px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-grid a {
  display: grid;
  flex: 0 0 360px;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 0;
  width: 360px;
  height: 60px;
  padding-left: 16px;
  color: #494949;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-number {
  color: #bbbbbb;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-grid em {
  grid-column: 2;
}

html body.source-shell:not(:has(.login-shell)) .page-head {
  margin: -24px -24px 22px;
  padding: 12px 24px;
}

@media (max-width: 900px) {
  html body.source-shell:not(:has(.login-shell)) main.source-container {
    width: 100%;
    margin: 0;
    padding: 16px;
    border-radius: 0;
  }

  html body.source-shell:not(:has(.login-shell)) .page-head {
    margin: -16px -16px 16px;
    padding: 12px 16px;
  }
}

html body.source-shell .source-module-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  color: rgba(255, 255, 255, .96);
}

html body.source-shell .source-icon-balance::before {
  content: "x -\A+ =";
  position: absolute;
  inset: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 5px solid currentColor;
  border-radius: 14px;
  white-space: pre;
  color: currentColor;
  font-size: 29px;
  font-weight: 900;
  line-height: .75;
}

html body.source-shell .source-icon-report::before,
html body.source-shell .source-icon-document::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 48px;
  height: 54px;
  border: 5px solid currentColor;
  border-radius: 11px;
}

html body.source-shell .source-icon-report::after,
html body.source-shell .source-icon-document::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 30px;
  height: 5px;
  border-radius: 3px;
  background: currentColor;
  box-shadow: 0 13px 0 currentColor, 0 26px 0 currentColor;
}

html body.source-shell .source-icon-report::before {
  border-bottom-right-radius: 20px;
}

html body.source-shell .source-icon-search::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 7px;
  width: 36px;
  height: 36px;
  border: 5px solid currentColor;
  border-radius: 50%;
}

html body.source-shell .source-icon-search::after {
  content: "";
  position: absolute;
  left: 43px;
  top: 43px;
  width: 24px;
  height: 5px;
  border-radius: 3px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

html body.source-shell main.source-container,
html body.source-shell .source-document-list-card,
html body.source-shell .source-workshop-document-card {
  max-height: none;
  overflow-y: visible;
}

html body.source-shell .source-global-document-scroll,
html body.source-shell .source-workshop-scroll {
  max-height: calc(100vh - 330px);
  overflow-y: auto;
  overscroll-behavior: auto;
}

html body.source-shell .source-global-document-scroll {
  max-height: calc(100vh - 390px);
}

html body.source-shell .source-original-actions {
  position: static;
  inset: auto;
  transform: none;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 30px;
  flex: 0 0 auto;
  margin-left: auto;
}

html body.source-shell .source-original-actions form {
  margin: 0;
}

/* Live ASTOX parity: document draft inside the Accounting tab (portal sidebar excluded). */
html body.source-shell main.source-container:has(.source-original-draft-head) {
  width: calc(100vw - 120px);
  margin: 14px 32px 32px 88px;
  padding: 24px;
  background: #f2f2f2;
  border-radius: 0;
}

html body.source-shell .source-original-draft-head {
  margin: 0;
  padding: 24px;
  border-radius: 8px;
  background: #ffffff;
}

html body.source-shell .source-original-draft-top {
  display: block;
  margin: 0 0 8px;
}

html body.source-shell .source-original-draft-top .source-breadcrumbs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  gap: 16px;
  white-space: nowrap;
}

html body.source-shell .source-original-draft-top .source-breadcrumbs h1 {
  margin: 0;
  line-height: 60px;
}

html body.source-shell .source-original-draft-top .source-breadcrumbs .source-posted-breadcrumb-label {
  color: #3f4247;
  font-size: inherit;
  font-weight: inherit;
  line-height: 60px;
}

html body.source-shell .source-original-draft-top .source-breadcrumbs .source-posted-breadcrumb-number {
  margin-left: -8px;
}

html body.source-shell .source-original-meta-row {
  display: flex;
  align-items: center;
  min-height: 74px;
  gap: 40px;
  margin: 0 0 14px;
}

html body.source-shell .source-original-checker {
  display: grid;
  align-content: center;
  flex: 0 0 149px;
  min-width: 149px;
  font-size: 20px;
  line-height: 30px;
}

html body.source-shell .source-original-meta-control {
  display: grid;
  grid-template-columns: auto auto 64px;
  align-items: center;
  gap: 32px;
  min-width: 274px;
  min-height: 64px;
  color: #494949;
  font-size: 20px;
  line-height: 30px;
}

html body.source-shell .source-original-meta-control strong {
  padding: 0;
  color: #a6a6a6;
  font-size: 20px;
  line-height: 30px;
}

html body.source-shell .source-original-meta-control .source-original-date-input {
  width: 126px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #494949;
  font-family: inherit;
  font-size: 20px;
  line-height: 30px;
  pointer-events: none;
}

html body.source-shell .source-original-date-pill {
  position: relative;
}

html body.source-shell .source-original-date-native {
  position: absolute;
  right: 64px;
  bottom: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
  pointer-events: none;
}

html body.source-shell .source-original-round-button {
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #828282;
}

html body.source-shell .source-original-meta-control.source-original-pill-clickable {
  cursor: pointer;
}

html body.source-shell .source-draft-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

html body.source-shell .source-original-action-circle {
  position: relative;
  display: block;
  width: 74px;
  min-width: 74px;
  height: 74px;
  min-height: 74px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #828282;
  box-shadow: none;
}

html body.source-shell .source-original-action-circle:disabled {
  color: #e0e0e0;
  opacity: 1;
}

html body.source-shell .source-action-delete::before,
html body.source-shell .source-action-delete::after,
html body.source-shell .source-action-post::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 5px;
  border-radius: 3px;
  background: currentColor;
}

html body.source-shell .source-action-delete::before { transform: translate(-50%, -50%) rotate(45deg); }
html body.source-shell .source-action-delete::after { transform: translate(-50%, -50%) rotate(-45deg); }

html body.source-shell .source-action-post::before {
  width: 27px;
  height: 15px;
  border-left: 5px solid currentColor;
  border-bottom: 5px solid currentColor;
  border-radius: 0;
  background: transparent;
  transform: translate(-50%, -62%) rotate(-45deg);
}

html body.source-shell .source-action-eraser::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 25px;
  width: 29px;
  height: 18px;
  border: 5px solid currentColor;
  border-radius: 5px;
  transform: rotate(-45deg);
}

html body.source-shell .source-original-comment-form input {
  min-height: 61px;
  border: 1px solid #d8d8d8;
  border-radius: 5px;
  background: #ffffff;
  font-size: 20px;
}

html body.source-shell .source-original-comment-form .source-comment-save {
  min-height: 61px;
}

html body.source-shell .source-original-stage-grid {
  gap: 24px;
  margin-top: 24px;
}

html body.source-shell .source-original-stage {
  border-radius: 0;
  box-shadow: none;
}

html body.source-shell .source-original-stage header {
  min-height: 106px;
  padding: 20px 16px;
}

html body.source-shell .source-original-stage h2 {
  font-size: 24px;
}

html body.source-shell .source-original-plus {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: transparent;
  color: #828282;
  font-size: 42px;
}

html body.source-shell .source-posted-head .source-original-draft-top {
  display: flex;
  align-items: center;
}

html body.source-shell .source-posted-head .source-posted-actions {
  margin-left: auto;
}

html body.source-shell .source-posted-head .source-posted-delete {
  padding: 5px;
  color: #ffffff;
}

html body.source-shell .source-posted-head .source-posted-delete::before,
html body.source-shell .source-posted-head .source-posted-delete::after {
  content: none;
}

html body.source-shell .source-posted-delete-icon {
  display: block;
  width: 64px;
  height: 64px;
}

html body.source-shell .source-posted-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin: 8px 0 0;
  font-size: 20px;
  line-height: 32px;
}

html body.source-shell .source-posted-meta > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

html body.source-shell .source-posted-meta strong,
html body.source-shell .source-posted-comment strong {
  color: #a6a6a6;
  font-size: 20px;
  line-height: 32px;
}

html body.source-shell .source-posted-meta span,
html body.source-shell .source-posted-comment span {
  color: #494949;
  font-size: 20px;
  line-height: 30px;
}

html body.source-shell .source-posted-meta-employees {
  flex: 0 0 100%;
}

html body.source-shell .source-posted-comment {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

html body.source-shell .source-posted-stage-grid {
  margin-top: 38px;
}

html body.source-shell .source-posted-stage-grid .source-original-stage header {
  min-height: 64px;
  padding: 16px;
  box-sizing: border-box;
}

html body.source-shell .source-posted-stage-grid .source-original-stage header h2 {
  line-height: 32px;
}

html body.source-shell .source-posted-stage-grid .source-original-line {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 16px;
  min-height: 76px;
  padding: 8px 16px;
}

html body.source-shell .source-posted-stage-grid .source-original-line > div {
  display: contents;
}

html body.source-shell .source-posted-stage-grid .source-original-line span {
  grid-column: 1 / -1;
  color: #a6a6a6;
  font-size: 16px;
  line-height: 24px;
}

html body.source-shell .source-posted-stage-grid .source-original-line strong,
html body.source-shell .source-posted-stage-grid .source-original-line b {
  color: #494949;
  font-size: 20px;
  line-height: 32px;
}

html body.source-shell .source-posted-stage-grid .source-original-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

html body.source-shell .source-posted-stage-grid .source-original-line b {
  white-space: nowrap;
}

html body.source-shell main.source-container:has(.source-dashboard) {
  background: #ffffff;
  border-radius: 0;
}

/* Live ASTOX parity: cumulative workshop report uses two paired tables. */
html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-paired-grid) {
  padding: 0;
  background: transparent;
  border-radius: 0;
}

html body.source-shell main.source-container:has(.source-report-paired-grid) .source-report-title {
  min-height: 112px;
  margin: 0 0 16px;
  padding: 0 24px;
  border-bottom: 0;
  border-radius: 8px;
  box-sizing: border-box;
}

html body.source-shell main.source-container:has(.source-report-paired-grid) .source-report-title .source-breadcrumbs {
  flex-wrap: nowrap;
  gap: 16px;
  font-size: 40px;
  line-height: 60px;
  white-space: nowrap;
}

html body.source-shell .source-report-filter-inline {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 0 auto;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

html body.source-shell .source-report-workshop-pill,
html body.source-shell .source-report-date-pill {
  position: relative;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #f2f2f2;
  color: #494949;
  font-weight: 400;
}

html body.source-shell .source-report-workshop-pill {
  width: 300px;
  padding: 0 16px;
}

html body.source-shell .source-report-workshop-pill select {
  width: 100%;
  height: 64px;
  padding: 0 36px 0 0;
  border: 0;
  background: transparent;
  color: #494949;
  font: inherit;
  font-size: 18px;
  font-weight: 400;
  outline: 0;
}

html body.source-shell .source-report-workshop-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-right: 12px;
  border: 2px solid #a6a6a6;
  border-radius: 50%;
}

html body.source-shell .source-report-date-pill {
  display: grid;
  grid-template-columns: auto 118px 56px;
  width: 268px;
  padding-left: 16px;
}

html body.source-shell .source-report-date-pill > span {
  color: #a6a6a6;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
}

html body.source-shell .source-report-date-pill input[type="text"] {
  width: 118px;
  height: 40px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #494949;
  font: inherit;
  font-size: 20px;
  font-weight: 400;
  line-height: 30px;
  outline: 0;
}

html body.source-shell .source-report-date-pill button {
  width: 56px;
  height: 64px;
  min-height: 64px;
  padding: 0;
  border: 0;
  border-radius: 0 8px 8px 0;
  background-color: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}

html body.source-shell .source-report-hidden-submit {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html body.source-shell .source-report-export-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  font-size: 16px;
}

html body.source-shell .source-report-paired-grid {
  display: grid;
  gap: 24px;
}

html body.source-shell .source-report-paired-card {
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
}

html body.source-shell .source-report-table-scroll {
  width: 100%;
  overflow-x: auto;
}

html body.source-shell .source-report-paired-table {
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
  border-collapse: collapse;
  color: #494949;
}

html body.source-shell .source-report-paired-table .source-report-material-column { width: 34%; }
html body.source-shell .source-report-paired-table .source-report-number-column { width: 8%; }
html body.source-shell .source-report-paired-table .source-report-divider-column { width: 2%; }

html body.source-shell .source-report-paired-table th,
html body.source-shell .source-report-paired-table td {
  height: 62px;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
  font-size: 20px;
  line-height: 29px;
}

html body.source-shell .source-report-paired-table th {
  height: 57px;
  color: #828282;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
}

html body.source-shell .source-report-paired-table th:nth-child(2),
html body.source-shell .source-report-paired-table th:nth-child(3),
html body.source-shell .source-report-paired-table th:nth-child(6),
html body.source-shell .source-report-paired-table th:nth-child(7),
html body.source-shell .source-report-paired-table td:nth-child(2),
html body.source-shell .source-report-paired-table td:nth-child(3),
html body.source-shell .source-report-paired-table td:nth-child(6),
html body.source-shell .source-report-paired-table td:nth-child(7) {
  text-align: center;
}

html body.source-shell .source-report-paired-table .source-report-divider {
  padding: 0;
  border-bottom-color: transparent;
  background: #f2f2f2;
}

html body.source-shell .source-report-paired-table tbody tr:last-child td:not(.source-report-divider) {
  border-bottom: 0;
}

html body.source-shell .source-report-paired-table .source-report-total-row td {
  border-top: 1px solid #e0e0e0;
  border-bottom: 0;
  color: #494949;
  font-weight: 700;
}

html body.source-shell .source-report-paired-table .source-report-total-row .source-report-divider {
  border-top-color: transparent;
}

html body.source-shell .source-report-paired-table .source-report-empty-row td {
  height: 62px;
  border-bottom: 0;
  color: #a6a6a6;
  text-align: center;
}

html body.source-shell .source-workshop-tabs a,
html body.source-shell .source-document-list-card > .source-tabs a {
  border-radius: 4px;
}

/* ASTOX catalogue-root detail parity. */
html body.source-shell main.source-container:has(.source-catalog-detail-page) {
  min-height: calc(100vh - 64px);
  padding: 0 24px 32px;
  background: #f2f2f2;
}

html body.source-shell .source-catalog-detail-page {
  width: 100%;
  color: #494949;
}

html body.source-shell .source-catalog-page-title {
  margin: 0 -24px 24px;
  padding: 24px 32px 28px;
  background: #ffffff;
}

html body.source-shell .source-catalog-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #a5a5a5;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
}

html body.source-shell .source-catalog-breadcrumbs a:hover {
  color: #168f8b;
}

html body.source-shell .source-catalog-page-title h1 {
  margin: 12px 0 0;
  color: #494949;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

html body.source-shell .source-catalog-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

html body.source-shell .source-catalog-tree,
html body.source-shell .source-catalog-main {
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

html body.source-shell .source-catalog-tree {
  padding: 8px;
  overflow: hidden;
}

html body.source-shell .source-catalog-tree a.source-catalog-tree-root {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  justify-content: initial;
  gap: 8px;
  min-height: 52px;
  padding: 12px 14px;
  border: 0;
  border-radius: 5px;
  color: #494949;
  font-size: 14px;
  line-height: 22px;
}

html body.source-shell .source-catalog-tree a.source-catalog-tree-root.active {
  background: #e4f5f4;
  color: #168f8b;
}

html body.source-shell .source-catalog-tree-toggle {
  display: inline-grid;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 17px;
  font-weight: 400;
  line-height: 18px;
}

html body.source-shell .source-catalog-tree-root strong {
  overflow-wrap: anywhere;
  font-weight: 400;
}

html body.source-shell .source-catalog-main {
  overflow: hidden;
}

html body.source-shell .source-catalog-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 88px;
  padding: 18px 24px;
  border-bottom: 1px solid #e0e0e0;
  background: #ffffff;
}

html body.source-shell .source-catalog-detail-head h2 {
  margin: 0;
  color: #494949;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

html body.source-shell .source-catalog-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 5px;
  background: #29b4b2;
  color: #ffffff;
  font-size: 12px;
  font-weight: 400;
  line-height: 26px;
  white-space: nowrap;
}

html body.source-shell .source-catalog-add-button:hover {
  background: #209f9d;
}

html body.source-shell .source-catalog-add-button > span {
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

html body.source-shell .source-catalog-metadata {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 38px;
  min-height: 64px;
  margin: 0;
  padding: 14px 24px;
  border-bottom: 1px solid #e0e0e0;
  color: #8f8f8f;
  font-size: 14px;
  line-height: 24px;
}

html body.source-shell .source-catalog-metadata > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

html body.source-shell .source-catalog-metadata dt {
  font-weight: 400;
}

html body.source-shell .source-catalog-metadata dd {
  margin: 0;
  color: #494949;
}

html body.source-shell .source-catalog-history {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 14px 24px;
  border-bottom: 1px solid #e0e0e0;
  color: #494949;
  font-size: 12px;
  font-weight: 600;
  line-height: 26px;
}

html body.source-shell .source-catalog-history:hover {
  color: #168f8b;
}

html body.source-shell .source-catalog-history-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid #8d8d8d;
  border-radius: 50%;
}

html body.source-shell .source-catalog-history-icon::before,
html body.source-shell .source-catalog-history-icon::after {
  position: absolute;
  left: 7px;
  top: 3px;
  width: 2px;
  height: 6px;
  border-radius: 2px;
  background: #8d8d8d;
  content: "";
}

html body.source-shell .source-catalog-history-icon::after {
  top: 8px;
  width: 5px;
  height: 2px;
}

html body.source-shell .source-catalog-history-arrow {
  color: #a5a5a5;
  font-size: 28px;
  font-weight: 400;
}

html body.source-shell .source-catalog-description {
  border-bottom: 1px solid #e0e0e0;
  background: #ffffff;
}

html body.source-shell .source-catalog-description summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 60px;
  padding: 14px 24px;
  cursor: pointer;
  color: #494949;
  font-size: 16px;
  font-weight: 600;
  list-style: none;
}

html body.source-shell .source-catalog-description summary::-webkit-details-marker {
  display: none;
}

html body.source-shell .source-catalog-description-toggle {
  width: 10px;
  height: 10px;
  border-right: 2px solid #8f8f8f;
  border-bottom: 2px solid #8f8f8f;
  transform: rotate(45deg);
  transition: transform .15s ease;
}

html body.source-shell .source-catalog-description[open] .source-catalog-description-toggle {
  transform: rotate(225deg);
}

html body.source-shell .source-catalog-description p {
  margin: 0;
  padding: 0 24px 20px;
  color: #7f7f7f;
  font-size: 15px;
  line-height: 24px;
}

html body.source-shell .source-catalog-table-wrap {
  width: 100%;
  overflow-x: auto;
}

html body.source-shell .source-catalog-table {
  min-width: 700px;
  table-layout: auto;
}

html body.source-shell .source-catalog-table th,
html body.source-shell .source-catalog-table td {
  height: 54px;
  padding: 11px 18px;
  border-bottom: 1px solid #e0e0e0;
  color: #494949;
  font-size: 14px;
  line-height: 24px;
  text-align: left;
  vertical-align: middle;
}

html body.source-shell .source-catalog-table th {
  height: 48px;
  background: #f2f2f2;
  color: #8f8f8f;
  font-size: 14px;
  font-weight: 600;
}

html body.source-shell .source-catalog-table tbody tr:last-child td {
  border-bottom: 0;
}

html body.source-shell .source-catalog-table tbody tr:hover td {
  background: #fafafa;
}

html body.source-shell .source-catalog-table .source-catalog-checkbox-cell {
  width: 56px;
  min-width: 56px;
  padding-left: 20px;
  padding-right: 8px;
}

html body.source-shell .source-catalog-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #29b4b2;
  vertical-align: middle;
}

@media (max-width: 900px) {
  html body.source-shell .source-catalog-layout {
    grid-template-columns: 1fr;
  }

  html body.source-shell .source-catalog-tree {
    width: 100%;
  }
}

@media (max-width: 600px) {
  html body.source-shell main.source-container:has(.source-catalog-detail-page) {
    padding: 0 12px 20px;
  }

  html body.source-shell .source-catalog-page-title {
    margin: 0 -12px 16px;
    padding: 18px 16px 20px;
  }

  html body.source-shell .source-catalog-page-title h1 {
    margin-top: 8px;
    font-size: 24px;
    line-height: 32px;
  }

  html body.source-shell .source-catalog-detail-head {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  html body.source-shell .source-catalog-add-button {
    align-self: flex-start;
  }

  html body.source-shell .source-catalog-metadata,
  html body.source-shell .source-catalog-history,
  html body.source-shell .source-catalog-description summary {
    padding-left: 18px;
    padding-right: 18px;
  }

  html body.source-shell .source-catalog-description p {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* ASTOX common-by-construction-timber report parity. */
html body.source-shell main.source-container:has(.source-block-report) {
  background: #f2f2f2;
  border-radius: 0;
}

html body.source-shell .source-block-report {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border-radius: 8px;
  background: #ffffff;
  color: #494949;
}

html body.source-shell .source-block-group {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #ffffff;
}

html body.source-shell .source-block-section + .source-block-section {
  margin-top: 16px;
}

html body.source-shell .source-block-section > h2 {
  min-height: 48px;
  margin: 0;
  padding: 8px 16px;
  border-radius: 0;
  box-sizing: border-box;
  color: #494949;
  font-size: 20px;
  font-weight: 500;
  line-height: 32px;
}

html body.source-shell .source-block-group > .source-block-section:first-child > h2 {
  border-radius: 8px 8px 0 0;
}

html body.source-shell .source-block-section.source-block-tone-raw > h2,
html body.source-shell .source-block-summary.source-block-tone-raw,
html body.source-shell .source-block-section.source-block-tone-final > h2,
html body.source-shell .source-block-summary.source-block-tone-final {
  background: #d8f6ff;
}

html body.source-shell .source-block-section.source-block-tone-dry > h2,
html body.source-shell .source-block-summary.source-block-tone-dry {
  background: #ffe8d0;
}

html body.source-shell .source-block-section.source-block-tone-work > h2,
html body.source-shell .source-block-summary.source-block-tone-work {
  background: #dff9cb;
}

html body.source-shell .source-block-section.source-block-tone-glued > h2,
html body.source-shell .source-block-summary.source-block-tone-glued {
  background: #e5daff;
}

html body.source-shell .source-block-section.source-block-tone-planed > h2,
html body.source-shell .source-block-summary.source-block-tone-planed {
  background: #ffe2ee;
}

html body.source-shell .source-block-table-scroll {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
}

html body.source-shell .source-block-table {
  width: 100%;
  margin: 0;
  table-layout: fixed;
  border-collapse: collapse;
  background: #ffffff;
  color: #494949;
}

html body.source-shell .source-block-table th:first-child,
html body.source-shell .source-block-table td:first-child {
  width: 20%;
  text-align: left;
}

html body.source-shell .source-block-table th:not(:first-child),
html body.source-shell .source-block-table td:not(:first-child) {
  width: 13%;
  text-align: center;
}

html body.source-shell .source-block-table th {
  height: 64px;
  padding: 16px;
  background: transparent;
  border-bottom: 1px solid #e0e0e0;
  box-sizing: border-box;
  color: #a6a6a6;
  font-size: 18px;
  font-weight: 600;
  line-height: normal;
  white-space: nowrap;
}

html body.source-shell .source-block-table td {
  height: 56px;
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
  box-sizing: border-box;
  color: #494949;
  font-size: 16px;
  line-height: 24px;
}

html body.source-shell .source-block-table tfoot td,
html body.source-shell .source-block-empty-row td {
  height: 64px;
  border-bottom: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 32px;
}

html body.source-shell .source-block-summary {
  min-height: 72px;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  box-sizing: border-box;
}

html body.source-shell .source-block-summary-head,
html body.source-shell .source-block-summary-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30% 30%;
  align-items: center;
  gap: 40px;
}

html body.source-shell .source-block-summary-head strong {
  color: #828282;
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;
}

html body.source-shell .source-block-summary-values strong {
  color: #494949;
  font-size: 20px;
  font-weight: 700;
  line-height: 32px;
}

html body.source-shell .source-block-summary sup {
  font-size: 0.7em;
  line-height: 0;
}

html body.source-shell .source-block-summary-head strong:not(:first-child),
html body.source-shell .source-block-summary-values strong:not(:first-child) {
  text-align: center;
}

/* Keep one ASTOX-style calendar control instead of the native black glyph plus an empty button. */
html body.source-shell .source-date-pill input::-webkit-calendar-picker-indicator,
html body.source-shell .source-original-date-native::-webkit-calendar-picker-indicator {
  width: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-title .source-date-pill {
  width: 290px;
  grid-template-columns: auto 126px 64px;
  gap: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #f2f2f2;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-title .source-date-pill input {
  width: 126px;
  padding: 0 8px;
  background: transparent;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-title .source-date-pill button,
html body.source-shell .source-original-date-pill .source-pill-calendar,
html body.source-shell .source-original-meta-control .source-pill-pencil {
  width: 64px;
  min-width: 64px;
  height: 64px;
  min-height: 64px;
  border: 0;
  border-radius: 0 8px 8px 0;
  background-color: var(--teal);
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-title .source-date-pill button,
html body.source-shell .source-original-date-pill .source-pill-calendar {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3Cpath d='M8 14h2M12 14h2M16 14h2M8 18h2M12 18h2'/%3E%3C/svg%3E");
  background-size: 28px 28px;
}

html body.source-shell .source-original-meta-control .source-pill-pencil {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
  background-size: 28px 28px;
}

html body.source-shell .source-original-meta-control.source-original-date-pill,
html body.source-shell .source-original-meta-control:has(.source-pill-pencil) {
  width: 290px;
  min-width: 290px;
  grid-template-columns: auto minmax(80px, 1fr) 64px;
  gap: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #f2f2f2;
}

html body.source-shell .source-original-meta-control.source-original-date-pill strong,
html body.source-shell .source-original-meta-control:has(.source-pill-pencil) strong {
  padding-left: 16px;
}

html body.source-shell .source-posted-head .source-posted-delete::before,
html body.source-shell .source-posted-head .source-posted-delete::after {
  transform: none;
}

@media (max-width: 1100px) {
  html body.source-shell .source-block-table {
    min-width: 920px;
  }

  html body.source-shell .source-block-report {
    padding: 16px;
  }
}

/* Functional notices must stay inside the two-column ASTOX document layout. */
html body.source-shell .source-original-meter-warning,
html body.source-shell .source-original-warning,
html body.source-shell .source-original-notice {
  grid-column: 1 / -1;
  box-sizing: border-box;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #f0cf7a;
  border-radius: 6px;
  background: #fff8df;
  color: #6c5520;
  font-size: 16px;
  line-height: 24px;
}

html body.source-shell .source-original-warning,
html body.source-shell .source-original-notice {
  margin: 16px 0 0;
}

html body.source-shell .source-original-warning > div + div,
html body.source-shell .source-original-notice > div + div {
  margin-top: 6px;
}

html body.source-shell .source-original-notice.is-deleted {
  border-color: #d6d6d6;
  background: #f2f2f2;
  color: #555555;
}

html body.source-shell .source-original-meter-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

html body.source-shell .source-original-package-tools {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  margin: 0;
  padding: 4px 6px;
  border: 1px solid #cce8e7;
  border-radius: 6px;
  background: #f2fbfa;
  box-sizing: border-box;
}

html body.source-shell .source-original-package-tools[hidden] {
  display: none;
}

html body.source-shell .source-original-package-tools label {
  display: grid;
  grid-template-rows: 18px 32px;
  gap: 2px;
  color: #6e6e6e;
  font-size: 12px;
}

html body.source-shell .source-original-package-tools label > span {
  line-height: 18px;
  white-space: nowrap;
}

html body.source-shell .source-original-package-tools input,
html body.source-shell .source-original-package-tools select {
  width: 100%;
  min-width: 0;
  height: 32px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid #d7d7d7;
  border-radius: 4px;
  background: #ffffff;
  box-sizing: border-box;
}

html body.source-shell .source-meter-warning-icon {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

html body.source-shell .source-meter-warning-icon::before {
  content: "!";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
}

@media (max-width: 1280px) {
  html body.source-shell .source-original-meta-row {
    flex-wrap: wrap;
    gap: 16px 24px;
  }

  html body.source-shell .source-draft-actions {
    margin-left: 0;
  }

}

@media (max-width: 900px) {
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-layout,
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-material-layout,
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-original) .source-report-menu-original,
  html body.source-shell .source-original-stage-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-layout,
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-material-layout {
    gap: 16px;
    min-height: 0;
    padding: 16px;
  }

  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-layout > *,
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-balance-title) .source-balance-material-layout > * {
    grid-column: 1;
    grid-row: auto;
    min-width: 0;
  }

  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-original) .source-report-menu-original,
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-pinned {
    width: 100%;
  }

  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-original) .source-report-menu-original {
    height: auto;
    min-height: 0;
    padding: 16px;
  }

  html body.source-shell main.source-container:has(.source-report-paired-grid) .source-report-title {
    height: auto;
    min-height: 0;
    flex-wrap: wrap;
    padding: 16px;
  }

  html body.source-shell main.source-container:has(.source-report-paired-grid) .source-report-title .source-breadcrumbs {
    flex-wrap: wrap;
    font-size: 30px;
    white-space: normal;
  }

  html body.source-shell .source-report-filter-inline {
    width: 100%;
    flex-wrap: wrap;
    margin-left: 0;
  }

  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-original) .source-report-menu-original a,
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-pinned a,
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-grid a {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  html body.source-shell main.source-container:has(.source-original-draft-head) {
    width: 100%;
    margin: 0;
    padding: 16px;
  }

  html body.source-shell .source-original-draft-head {
    padding: 16px;
  }

  html body.source-shell .source-original-draft-top .source-breadcrumbs {
    flex-wrap: wrap;
    gap: 8px 12px;
    white-space: normal;
  }

  html body.source-shell .source-original-draft-top .source-breadcrumbs h1 {
    line-height: 42px;
  }
}

/* Live ASTOX parity: material picker shared by every workshop. */
html body.source-shell .source-material-picker-modal {
  place-items: center;
  padding: 32px;
  overflow: auto;
}

html body.source-shell .source-material-picker-modal .source-original-modal-panel {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  width: min(1164px, calc(100vw - 64px));
  height: min(720px, calc(100vh - 64px));
  max-height: calc(100vh - 64px);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(96, 108, 128, .05);
  overflow: hidden;
}

html body.source-shell .source-material-picker-modal .source-original-modal-panel > header {
  min-height: 64px;
  height: 64px;
  padding: 0 24px;
  background: #29b4b2;
}

html body.source-shell .source-material-picker-modal .source-original-modal-panel > header h2 {
  font-family: Onest, Roboto, Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
}

html body.source-shell .source-material-picker-modal .source-original-modal-panel > header button {
  display: grid;
  place-items: center;
  width: 45px;
  min-width: 45px;
  height: 45px;
  min-height: 45px;
  padding: 5px;
  font-family: Onest, Roboto, Helvetica, Arial, sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
}

html body.source-shell .source-material-picker-modal .source-picker-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 80px;
  min-height: 0;
}

html body.source-shell .source-material-picker-modal .source-original-picker-grid {
  display: grid;
  grid-template-columns: 300px 400px minmax(382px, 1fr);
  gap: 8px;
  min-height: 0;
  padding: 20px 24px;
  background: #f2f2f2;
  overflow: auto;
}

html body.source-shell .source-material-picker-modal .source-original-picker-column {
  min-width: 0;
  min-height: 0;
}

html body.source-shell .source-material-picker-modal .source-original-picker-column h3 {
  flex: 0 0 48px;
  height: 48px;
  margin: 0;
  color: #494949;
  font-family: Onest, Roboto, Helvetica, Arial, sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 48px;
}

html body.source-shell .source-material-picker-modal .source-picker-source-column,
html body.source-shell .source-material-picker-modal .source-picker-material-list,
html body.source-shell .source-material-picker-modal .source-picker-quantity {
  height: min(536px, calc(100vh - 248px));
}

html body.source-shell .source-material-picker-modal .source-picker-source-options {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  max-height: none;
  padding: 8px 0;
  overflow: auto;
}

html body.source-shell .source-material-picker-modal .source-original-picker-column.source-picker-source-list button,
html body.source-shell .source-material-picker-modal .source-original-picker-column.source-picker-material-list button {
  min-height: 48px;
  padding: 8px 16px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #494949;
  font-family: Onest, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

html body.source-shell .source-material-picker-modal .source-picker-source-options > button {
  flex: 0 0 64px;
  height: 64px;
  margin: 0;
}

html body.source-shell .source-material-picker-modal .source-original-picker-column.source-picker-source-list button.active,
html body.source-shell .source-material-picker-modal .source-original-picker-column.source-picker-material-list button.active {
  border-radius: 6px;
  background: #29b4b2;
  color: #ffffff;
}

html body.source-shell .source-material-picker-modal .source-original-picker-column.source-picker-source-column .source-current-workshop-stock-button {
  flex: 0 0 56px;
  height: 56px;
  margin: 8px 0 0;
  border-radius: 6px;
}

html body.source-shell .source-material-picker-modal .source-picker-material-list {
  display: flex;
  flex-direction: column;
  max-height: none;
  padding: 0;
  overflow: auto;
}

html body.source-shell .source-material-picker-modal .source-picker-material-list > button {
  display: flex;
  flex: 1 1 64px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-height: 64px;
  margin: 0 0 8px;
  text-align: left;
}

html body.source-shell .source-material-picker-modal .source-picker-material-list > h3 + button {
  margin-top: 8px;
}

html body.source-shell .source-material-picker-modal .source-picker-material-list span,
html body.source-shell .source-material-picker-modal .source-picker-material-list small {
  display: block;
  min-width: 0;
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

html body.source-shell .source-material-picker-modal .source-picker-material-list small {
  flex: 0 0 auto;
  white-space: nowrap;
}

html body.source-shell .source-material-picker-modal .source-original-calculator-paper {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: 312px;
  height: auto;
  margin: 8px auto;
  padding: 4px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(96, 108, 128, .05);
  overflow: hidden;
}

html body.source-shell .source-material-picker-modal .source-original-quantity-field {
  display: block;
  flex: 0 0 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
}

html body.source-shell .source-material-picker-modal .source-original-quantity-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px 36px;
  align-items: center;
  width: 100%;
  max-width: none;
  height: 60px;
  margin: 0 auto;
  padding: 0 7px 0 0;
  border: 1px solid #c8c8c8;
  border-radius: 8px;
  background: #ffffff;
}

html body.source-shell .source-material-picker-modal .source-original-quantity-control:focus-within {
  border-color: #828282;
}

html body.source-shell .source-material-picker-modal .source-original-quantity-field input {
  width: 100%;
  min-width: 0;
  height: 58px;
  margin: 0;
  padding: 16px 0 16px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(0, 0, 0, .87);
  font-family: Onest, Roboto, Helvetica, Arial, sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 34px;
  outline: 0;
}

html body.source-shell .source-material-picker-modal .source-original-quantity-field button {
  display: grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b8b8b8;
  font-family: Onest, Roboto, Helvetica, Arial, sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

html body.source-shell .source-material-picker-modal .source-original-backspace::before {
  content: "⌫";
  font-size: 24px;
  line-height: 1;
}

html body.source-shell .source-material-picker-modal .source-original-quantity-error {
  margin: 6px 0 0;
  padding: 4px 8px;
  color: #d32f2f;
  font-size: 12px;
  line-height: 18px;
}

html body.source-shell .source-material-picker-modal .source-original-package-tools {
  flex: 0 0 auto;
  margin: 0;
}

html body.source-shell .source-material-picker-modal .source-original-keypad {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  margin: 0;
  border-radius: 0;
  background: #ffffff;
  overflow: hidden;
}

html body.source-shell .source-material-picker-modal .source-original-keypad button {
  min-width: 0;
  min-height: 0;
  padding: 4px;
  border: 0;
  border-right: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 0;
  background: transparent;
  color: #29b4b2;
  font-family: Onest, Roboto, Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 24px;
}

html body.source-shell .source-material-picker-modal .source-original-keypad button:nth-child(4n),
html body.source-shell .source-material-picker-modal .source-original-keypad button[data-source-number-key="="] {
  border-right: 0;
}

html body.source-shell .source-material-picker-modal .source-original-keypad button:nth-child(n+13) {
  border-bottom: 0;
}

html body.source-shell .source-material-picker-modal .source-original-keypad button[data-source-number-key="0"] {
  grid-column: span 2;
}

html body.source-shell .source-material-picker-modal .source-original-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  height: 80px;
  padding: 8px;
  background: #ffffff;
}

html body.source-shell .source-material-picker-modal .source-original-modal-actions button {
  height: 64px;
  min-height: 64px;
  padding: 6px 16px;
  border-radius: 6px;
  font-family: Onest, Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 26px;
}

html body.source-shell .source-material-picker-modal .source-original-modal-actions button:first-child {
  background: #828282;
}

html body.source-shell .source-material-picker-modal .source-original-modal-actions button:last-child {
  background: #e0e0e0;
}

html body.source-shell .source-material-picker-modal .source-original-modal-actions button:last-child:not(:disabled) {
  background: #29b4b2;
}

@media (max-width: 1180px) {
  html body.source-shell .source-material-picker-modal {
    align-items: start;
    padding: 16px;
  }

  html body.source-shell .source-material-picker-modal .source-original-modal-panel {
    width: calc(100vw - 32px);
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
  }

  html body.source-shell .source-material-picker-modal .source-original-picker-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html body.source-shell .source-material-picker-modal .source-picker-source-column,
  html body.source-shell .source-material-picker-modal .source-picker-material-list,
  html body.source-shell .source-material-picker-modal .source-picker-quantity {
    width: 100%;
    height: auto;
    min-height: 0;
  }

  html body.source-shell .source-material-picker-modal .source-original-calculator-paper {
    width: min(312px, 100%);
    height: auto;
    margin: 0 auto;
  }

  html body.source-shell .source-material-picker-modal .source-original-quantity-control,
  html body.source-shell .source-material-picker-modal .source-original-keypad {
    width: 100%;
    min-width: 0;
  }
}
