﻿* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

.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;
}

/* Secondary Alpha reports remain available below the four primary reports. */
html body.source-shell .source-alpha-report-section {
  margin-top: 24px;
  padding: 24px;
  border-radius: 8px;
  background: #ffffff;
  box-sizing: border-box;
}

html body.source-shell .source-alpha-report-section > h2 {
  margin: 0 0 20px;
  color: #494949;
  font-size: 24px;
  font-weight: 600;
  line-height: 36px;
}

html body.source-shell .source-alpha-report-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 360px));
  justify-content: start;
  gap: 24px;
}

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

html body.source-shell .source-alpha-report-menu strong {
  max-width: 250px;
  font-size: 20px;
  font-weight: 500;
  line-height: 30px;
}

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

html body.source-shell .source-alpha-snapshot-title {
  min-height: 112px;
  height: auto;
}

html body.source-shell .source-alpha-snapshot-actions {
  align-items: center;
}

html body.source-shell .source-alpha-snapshot-export {
  min-width: 84px;
  min-height: 64px;
  box-sizing: border-box;
}

html body.source-shell .source-alpha-snapshot-export.is-disabled {
  cursor: not-allowed;
  opacity: .45;
}

html body.source-shell .source-alpha-snapshot-report {
  min-height: 360px;
}

html body.source-shell .source-alpha-report-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 16px;
}

html body.source-shell .source-alpha-report-overview > div {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 16px;
  border-radius: 8px;
  background: #f2f2f2;
  box-sizing: border-box;
}

html body.source-shell .source-alpha-report-overview span {
  color: #828282;
  font-size: 14px;
  line-height: 22px;
}

html body.source-shell .source-alpha-report-overview strong {
  color: #494949;
  font-size: 26px;
  line-height: 32px;
}

html body.source-shell .source-alpha-report-overview .has-warning {
  background: #ffe2e2;
}

html body.source-shell .source-alpha-report-warning {
  padding: 14px 16px;
  border: 1px solid #ef9a9a;
  border-radius: 8px;
  background: #fff2f2;
  color: #9b1c1c;
  font-weight: 700;
}

html body.source-shell .source-block-section.source-block-tone-defect > h2,
html body.source-shell .source-block-summary.source-block-tone-defect {
  background: #ffe2e2;
}

html body.source-shell .source-alpha-snapshot-table {
  min-width: 1100px;
}

html body.source-shell .source-alpha-snapshot-table th:first-child,
html body.source-shell .source-alpha-snapshot-table td:first-child,
html body.source-shell .source-alpha-snapshot-table th:not(:first-child),
html body.source-shell .source-alpha-snapshot-table td:not(:first-child) {
  width: auto;
}

html body.source-shell .source-alpha-snapshot-table th:nth-child(-n+3),
html body.source-shell .source-alpha-snapshot-table td:nth-child(-n+3) {
  text-align: left;
}

html body.source-shell .source-alpha-snapshot-table th:nth-child(n+4),
html body.source-shell .source-alpha-snapshot-table td:nth-child(n+4) {
  text-align: center;
}

html body.source-shell .source-alpha-snapshot-table .source-alpha-col-workshop { width: 18%; }
html body.source-shell .source-alpha-snapshot-table .source-alpha-col-group { width: 17%; }
html body.source-shell .source-alpha-snapshot-table .source-alpha-col-material { width: 27%; }
html body.source-shell .source-alpha-snapshot-table .source-alpha-col-length { width: 9%; }
html body.source-shell .source-alpha-snapshot-table .source-alpha-col-unit { width: 7%; }
html body.source-shell .source-alpha-snapshot-table .source-alpha-col-number { width: 11%; }

html body.source-shell .source-alpha-snapshot-table td a {
  color: var(--teal);
  text-decoration: none;
}

html body.source-shell .source-alpha-snapshot-table tr.negative td {
  background: #fff0f0;
  color: #991b1b;
  font-weight: 700;
}

html body.source-shell .source-alpha-snapshot-table tfoot td:first-child {
  text-align: right;
}

html body.source-shell .source-alpha-report-grand-total {
  border-radius: 8px;
}

@media (max-width: 1300px) {
  html body.source-shell .source-alpha-report-menu {
    grid-template-columns: repeat(2, minmax(240px, 360px));
  }

  html body.source-shell .source-alpha-report-overview {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 900px) {
  html body.source-shell .source-alpha-report-menu,
  html body.source-shell .source-alpha-report-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  html body.source-shell .source-alpha-report-menu a {
    width: 100%;
  }

  html body.source-shell .source-alpha-snapshot-title {
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
  }

  html body.source-shell .source-alpha-snapshot-title .source-breadcrumbs {
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 30px;
    line-height: 42px;
    white-space: normal;
  }

  html body.source-shell .source-alpha-snapshot-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  html body.source-shell .source-alpha-report-section,
  html body.source-shell .source-alpha-snapshot-report {
    padding: 16px;
  }

  html body.source-shell .source-alpha-snapshot-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-alpha-snapshot-report) .source-alpha-snapshot-title .source-date-pill {
    width: 100%;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr) 56px;
  }

  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-alpha-snapshot-report) .source-alpha-snapshot-title .source-date-pill input {
    width: 100%;
    min-width: 0;
  }

  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-alpha-snapshot-report) .source-alpha-snapshot-title .source-date-pill button {
    width: 56px;
    min-width: 56px;
  }

  html body.source-shell .source-alpha-snapshot-export {
    width: 100%;
  }
}

a { color: inherit; text-decoration: none; }

.topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 54px;
  padding: 0 20px;
  background: #ffffff;
  border-bottom: 1px solid #eeeeee;
}

.topbar a { color: #4d4f53; margin-right: 16px; font-weight: 700; }
.logo { font-size: 18px; color: #33363a; }
.userbox { margin-left: auto; color: #777; }
.inline { display: inline; }

.container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 20px;
}

.page-title {
  margin: 0 0 22px;
  font-size: 20px;
  line-height: 1.2;
}

.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-drafts { background: #b98225; }
.module-docs { background: var(--orange); }
.module-movements { background: #248a8a; }
.module-audit { background: #5967c9; }
.module-icon { font-size: 32px; line-height: 1; color: rgba(255,255,255,.95); }

.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #dce3e7;
  border-radius: 6px;
  color: #29313b;
  font-weight: 700;
}

.dashboard-action.primary-action {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.dashboard-action strong {
  padding: 4px 8px;
  background: #f4f6f7;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 400;
}

.dashboard-action.primary-action strong {
  background: rgba(255,255,255,.95);
  color: var(--teal);
}

.dashboard-drafts {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #fff7df;
  border: 1px solid #f0d389;
  border-radius: 6px;
}

.dashboard-drafts h2 {
  margin: 0;
  font-size: 14px;
}

.dashboard-drafts p {
  margin: 4px 0 0;
  color: #735000;
}

.dashboard-draft-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-draft-list a {
  display: grid;
  gap: 2px;
  min-width: 190px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #f0d389;
  border-radius: 6px;
  color: #3f4247;
}

.dashboard-draft-list span {
  font-weight: 700;
}

.dashboard-draft-list small {
  color: #735000;
}

.dashboard-draft-empty {
  padding: 8px 10px;
  color: #735000;
  background: #ffffff;
  border: 1px solid #f0d389;
  border-radius: 6px;
  font-weight: 700;
}

.dashboard-posted {
  background: #eaf7f6;
  border-color: #a8d9d6;
}

.dashboard-posted p,
.dashboard-posted small,
.dashboard-posted .dashboard-draft-empty {
  color: #2f6764;
}

.dashboard-posted .dashboard-draft-list a,
.dashboard-posted .dashboard-draft-empty {
  border-color: #a8d9d6;
}

.workshop-anchor {
  scroll-margin-top: 18px;
}

.dashboard-workshop-tools {
  display: flex;
  justify-content: flex-start;
  margin: 2px 0 14px;
}

.dashboard-workshop-tools .search-box {
  width: min(100%, 430px);
}

.dashboard-workshop-empty {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: #777777;
  font-weight: 700;
}

.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;
}

.date-pill {
  display: flex;
  align-items: stretch;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f3f3;
}

.date-pill label {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #8a8c91;
  font-weight: 700;
}

.date-pill input[type="date"] {
  width: 142px;
  border: 0;
  background: #f3f3f3;
  color: #45484d;
  font-size: 14px;
}

.date-button {
  width: 54px;
  border: 0;
  background: var(--teal);
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
}

.balance-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.balance-tab {
  min-height: 50px;
  padding: 15px;
  text-align: center;
  background: #f0f0f0;
  border-radius: 5px;
  font-weight: 700;
}

.balance-tab.active { background: var(--teal); color: #ffffff; }

.status-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.status-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 14px;
  background: #f0f0f0;
  border-radius: 5px;
  font-weight: 700;
}

.status-tab.active {
  background: var(--teal);
  color: #ffffff;
}

.status-tab strong {
  min-width: 28px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  color: #3f4247;
  text-align: center;
}

.status-tab.active strong {
  background: rgba(255,255,255,.95);
  color: var(--teal);
}

.draft-shortcuts {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px;
  background: #fff7df;
  border: 1px solid #f0d389;
  border-radius: 6px;
}

.draft-shortcuts h2 {
  margin: 0 0 4px;
  font-size: 14px;
}

.draft-shortcuts p {
  margin: 0;
  color: #735000;
}

.draft-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.draft-links a {
  display: grid;
  gap: 2px;
  min-width: 190px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #f0d389;
  border-radius: 6px;
  color: #3f4247;
}

.draft-links span {
  font-weight: 700;
}

.draft-links small {
  color: #735000;
}

.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;
}

.report-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.report-total-card {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.report-total-card span,
.report-total-card small {
  color: #777f89;
  font-size: 12px;
  font-weight: 700;
}

.report-total-card strong {
  color: #2f343a;
  font-size: 18px;
  line-height: 1;
}

.report-total-input_raw,
.report-total-product_in {
  border-color: #a9d9d7;
  background: #f2fbfa;
}

.report-total-consumed_raw,
.report-total-product_out {
  border-color: #ffd9a8;
  background: #fff8ed;
}

.audit-filter {
  grid-template-columns: 150px 120px minmax(180px, 1fr) 150px 150px auto auto auto;
}

.report-filter {
  grid-template-columns: minmax(260px, 1fr) 160px 160px 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;
}

.empty-state {
  padding: 22px;
  background: #ffffff;
  border: 1px solid #e1e5e8;
  border-radius: 6px;
  color: #3f4247;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.empty-state p {
  margin: 0;
  color: #7d8085;
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.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; }

.document-row-draft td {
  background: #fffaf0;
}

.document-users-cell {
  color: #5f666b;
  font-size: 12px;
  line-height: 1.35;
}

.document-users-cell span {
  display: block;
}

.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; }

.doc-head {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px 18px;
}

.doc-head p {
  margin: 0;
}

.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;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.report-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
  max-width: 900px;
}

.report-choice-card {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 18px;
  border: 1px solid #a9d9d7;
  border-radius: 6px;
  background: #eaf7f6;
  color: #24494a;
}

.report-choice-card strong {
  font-size: 18px;
  line-height: 1.15;
}

.report-choice-card span {
  color: #4f696b;
}

.report-choice-card-muted {
  border-color: #d6dde7;
  background: #f4f6f7;
  color: #3f4247;
}

.catalog-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
}

.catalog-choice-card {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid #e1e5e8;
  border-radius: 6px;
  background: #f4f6f7;
}

.catalog-choice-card strong {
  color: #29313b;
  font-size: 14px;
}

.catalog-choice-card span {
  color: #6f767d;
  font-size: 12px;
  line-height: 1.35;
}

.report-panel {
  min-width: 0;
  border: 1px solid #e1e5e8;
  border-radius: 6px;
  overflow: hidden;
}

.report-section-head {
  min-height: 46px;
  margin: 0;
  padding: 12px 14px;
  background: #f4f6f7;
  border-bottom: 1px solid #e1e5e8;
}

.report-section-head h2 {
  font-size: 14px;
}

.report-table {
  margin: 0;
  border-radius: 0;
}

.report-table th:nth-child(1),
.report-table td:nth-child(1) { width: auto; }
.report-table th:nth-child(2),
.report-table td:nth-child(2) { width: 70px; }
.report-table th:nth-child(3),
.report-table td:nth-child(3),
.report-table th:nth-child(4),
.report-table td:nth-child(4) {
  width: 105px;
  text-align: right;
}
.report-table th:nth-child(5),
.report-table td:nth-child(5) {
  width: 105px;
  text-align: right;
}

.report-total-row td {
  background: #f4f6f7;
  font-weight: 700;
}

.report-total-row td:first-child {
  color: #29313b;
}

.doc-number {
  font-weight: 700;
}

.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;
}

.status-posted { background: #dbf7f2; color: #16847d; }
.status-draft { background: #fff1cf; color: #9a6500; }
.status-deleted { background: #eeeeee; color: #777777; }
.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-document-link {
  background: #fff6e7;
  border-color: #ffd9a8;
  color: #6f4a12;
}

.balance-document-link:hover {
  background: #f59f33;
  border-color: #f59f33;
  color: #ffffff;
}

.report-document-link {
  background: #eef4ff;
  border-color: #bdd2ff;
  color: #2452a3;
}

.report-document-link:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.balance-layout {
  display: grid;
  grid-template-columns: 30% 1fr 1fr;
  gap: 34px;
  align-items: start;
}

.workshop-sidebar {
  max-height: calc(100vh - 190px);
  overflow: hidden;
}

.search-box {
  display: flex;
  align-items: center;
  height: 50px;
  margin-bottom: 12px;
  background: #eeeeee;
  border-bottom: 1px solid #cfcfcf;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 12px;
  font-size: 14px;
}

.search-box span {
  width: 48px;
  text-align: center;
  color: #777;
  font-size: 30px;
}

.workshop-list {
  max-height: calc(100vh - 255px);
  overflow-y: auto;
  padding-right: 5px;
}

.workshop-list h3 {
  margin: 10px 8px;
  color: #a0a0a0;
  font-size: 14px;
}

.workshop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin-bottom: 7px;
  padding: 0 20px;
  background: #eeeeee;
  border-radius: 6px;
  font-weight: 700;
}

.workshop-row.active {
  background: var(--teal);
  color: #ffffff;
}

.row-mark { font-size: 24px; color: #5d9bff; }
.workshop-row.active .row-mark { color: #5d9bff; }

.workshop-search-empty {
  margin: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: #777777;
  font-weight: 700;
}

.balance-panel {
  padding: 16px 0;
}

.balance-warning-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff1f2;
  color: #991b1b;
}

.balance-warning-panel .button {
  margin-left: auto;
  background: #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;
}

.balance-material-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.balance-material-stack {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.balance-material-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.balance-negative-badge {
  width: max-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 5px;
  background: #ffffff;
  color: #991b1b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.movement-chip {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid #a9d9d7;
  border-radius: 999px;
  background: #edf7f7;
  color: #24494a;
  font-size: 12px;
  font-weight: 700;
}

.movement-chip:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #ffffff;
}

.line-flow-cell {
  display: grid;
  gap: 3px;
}

.line-flow-cell strong {
  font-weight: 700;
}

.line-flow-cell small {
  color: #7d8085;
  font-size: 12px;
}

.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-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-section-head h2 {
  margin: 0;
}

.card h2,
.card-section-head h2 {
  font-size: 14px;
}

.narrow { max-width: 420px; margin: 60px auto; }
.toolbar { margin-bottom: 22px; }
.button, button {
  border: 1px solid #cbd5e1;
  background: white;
  border-radius: 6px;
  padding: 8px 12px;
  display: inline-block;
  cursor: pointer;
}

.export-button {
  height: 52px;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}

.primary { background: #0f5ca8; color: white; border-color: #0f5ca8; }
.danger { background: #dc2626; color: white; border-color: #dc2626; }
.tabs { margin-bottom: 16px; }
.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; }
.filter-form p { display: inline-block; margin-right: 18px; }
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-create-page {
  max-width: 860px;
  margin: 0 auto;
}

.document-create-card {
  padding: 22px;
}

.document-create-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.document-create-head h1 {
  margin: 0 0 8px;
}

.document-create-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #4b5563;
}

.operation-badge {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 6px;
  background: #2fb4b2;
  color: #ffffff;
  font-weight: 700;
}

.document-create-guide {
  margin-bottom: 20px;
}

.document-header-form {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr);
  gap: 14px;
  align-items: start;
}

.document-header-form label {
  display: grid;
  gap: 6px;
}

.document-header-form label span {
  color: #8a8c91;
  font-size: 12px;
  font-weight: 700;
}

.document-comment-field,
.document-create-actions {
  grid-column: 1 / -1;
}

.document-date,
.document-operation-type,
.document-comment {
  width: 100%;
}

.document-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.document-comment-edit form {
  display: grid;
  gap: 10px;
}

.document-comment-edit label {
  display: grid;
  gap: 5px;
}

.document-comment-edit span {
  color: #8a8c91;
  font-size: 12px;
  font-weight: 700;
}

.document-comment-edit textarea {
  width: 100%;
  min-height: 78px;
}

.document-comment-edit button {
  justify-self: start;
}

.table-action {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.document-list-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.movement-list-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.link-danger {
  border: 0;
  background: transparent;
  color: #dc2626;
  padding: 0;
  font-weight: 700;
}

.employee-list {
  padding-left: 18px;
}

.employee-list li {
  margin: 8px 0;
}

.employee-list form {
  margin-left: 12px;
}

.posted-change-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 420px);
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: #ecf9f8;
  border: 1px solid #9bd8d4;
  border-radius: 6px;
}

.posted-change-panel h2 {
  margin: 0 0 6px;
  font-size: 14px;
}

.posted-change-panel p {
  margin: 0;
  color: #5f666b;
}

.posted-change-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
}

.posted-change-links a {
  color: var(--teal);
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
}

.posted-change-links a:hover {
  text-decoration: underline;
}

.posted-change-panel label {
  display: grid;
  gap: 5px;
}

.posted-change-panel span {
  color: #576066;
  font-size: 12px;
  font-weight: 700;
}

.posted-change-panel input {
  width: 100%;
  height: 38px;
  background: #ffffff;
}

.add-line-panel {
  margin-top: 14px;
  padding: 12px;
  background: #f4f4f4;
  border-radius: 6px;
}

.add-line-panel h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.material-picker {
  margin-bottom: 12px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #e1e5eb;
  border-radius: 6px;
}

.material-picker-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 260px);
  gap: 10px;
  margin-bottom: 10px;
}

.material-picker-tools input,
.material-picker-tools select {
  width: 100%;
  height: 38px;
  background: #ffffff;
}

.material-candidates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  max-height: 230px;
  overflow-y: auto;
  padding-right: 4px;
}

.output-candidates {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.material-candidate {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: var(--ink);
  text-align: left;
  border-radius: 5px;
}

.material-candidate:hover,
.material-candidate.is-selected {
  border-color: var(--teal);
  background: #e9f7f7;
}

.candidate-source,
.candidate-meta {
  color: #7d8085;
  font-size: 12px;
  line-height: 1.25;
}

.material-candidate strong {
  font-size: 14px;
  line-height: 1.25;
}

.material-empty {
  padding: 12px;
  color: #7d8085;
  background: #f8fafc;
  border-radius: 5px;
}

.material-filter-empty {
  margin-top: 8px;
  padding: 10px 12px;
  color: #777777;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
}

.line-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(220px, 1.4fr) 120px minmax(150px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.line-form-output {
  grid-template-columns: minmax(220px, 1.4fr) 120px minmax(150px, 1fr) auto;
}

.line-form label,
.employee-form label {
  display: grid;
  gap: 5px;
}

.line-form span,
.employee-form span {
  color: #8a8c91;
  font-size: 12px;
  font-weight: 700;
}

.line-select,
.line-number,
.line-note {
  width: 100%;
  height: 38px;
  background: #ffffff;
}

.field-hint {
  color: #667085;
  font-size: 12px;
  line-height: 1.25;
}

.package-tools {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(100px, 0.7fr) minmax(170px, 1fr) minmax(120px, 1.2fr);
  gap: 8px;
  align-items: end;
  padding: 10px;
  background: #f3fbfb;
  border: 1px solid #cfe9e8;
  border-radius: 6px;
}

.package-tools[hidden] {
  display: none;
}

.package-tools label {
  margin: 0;
}

.package-tools input,
.package-tools select {
  width: 100%;
  height: 36px;
  background: #ffffff;
}

.package-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.package-buttons button {
  height: 36px;
  padding: 0 11px;
  border: 1px solid #b8dedd;
  background: #ffffff;
  color: #177c7d;
  font-weight: 700;
}

.package-buttons button:hover {
  background: #e5f6f5;
}

.package-result {
  grid-column: 1 / -1;
}

.material-selected-summary {
  margin-top: 10px;
  padding: 8px 10px;
  background: #e9f7f7;
  border: 1px solid #c6e7e6;
  border-radius: 6px;
  color: #344054;
  font-size: 12px;
  font-weight: 400;
}

.line-note {
  min-height: 38px;
  resize: vertical;
}

.employee-form {
  display: grid;
  grid-template-columns: minmax(240px, 360px) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  padding: 12px;
  background: #f4f4f4;
  border-radius: 6px;
}

.route-warning-card {
  margin-bottom: 18px;
  padding: 14px 18px;
  background: #fff7df;
  border: 1px solid #f0d389;
  border-radius: 6px;
  color: #735000;
}

.route-warning-card h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.route-warning-card ul {
  margin: 0;
  padding-left: 18px;
}

.operation-guide-card {
  margin-bottom: 18px;
  padding: 14px 18px;
  background: #f4f6f7;
  border: 1px solid #d9e0e4;
  border-radius: 6px;
  color: #3f4a50;
}

.operation-guide-card h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.operation-guide-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.operation-guide-card li {
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #dce3e7;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 400;
}

.posting-check-card {
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 6px;
  border: 1px solid #dbe3ea;
}

.posting-check-card h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.posting-check-card p,
.posting-check-card ul {
  margin: 0;
}

.posting-check-card ul {
  padding-left: 18px;
}

.posting-check-card.check-ok {
  background: #e9f9f1;
  border-color: #9bd8b4;
  color: #17633b;
}

.posting-check-card.check-errors {
  background: #fff7df;
  border-color: #f0d389;
  color: #735000;
}

.auto-preview-card {
  margin-bottom: 18px;
  padding: 14px 18px;
  background: #edf7f7;
  border: 1px solid #a9d9d7;
  border-radius: 6px;
  color: #24494a;
}

.auto-preview-card h2 {
  margin: 0 0 10px;
  font-size: 14px;
}

.auto-preview-card table {
  margin: 0;
  background: transparent;
}

@media (max-width: 1000px) {
  .module-grid,
  .dashboard-actions,
  .dashboard-drafts,
  .balance-tabs,
  .status-tabs,
  .document-filter,
  .draft-shortcuts,
  .material-picker-tools,
  .posted-change-panel,
  .line-form,
  .line-form-output,
  .package-tools,
  .employee-form,
  .document-header-form,
  .balance-layout,
  .doc-head,
  .movement-totals,
  .report-totals,
  .report-grid {
    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; }
  .document-create-head,
  .document-create-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .workshop-sidebar,
  .workshop-list { max-height: none; overflow: visible; }
}

/* 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;
}

.topbar {
  min-height: 40px;
  padding: 0 20px;
  gap: 18px;
  border-bottom: 1px solid #eeeeee;
  background: #ffffff;
}

.logo {
  margin-right: 4px !important;
  color: #313438 !important;
  font-size: 18px;
  letter-spacing: 0;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.topbar nav a {
  margin: 0;
  padding: 6px 8px;
  border-radius: 5px;
  color: #686b70;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.topbar nav a:hover {
  background: #f3f6f7;
  color: #33363a;
}

.topbar nav a.active,
.topbar nav a[aria-current="page"] {
  background: #eaf7f6;
  color: #128b8b;
}

.topbar-search {
  display: flex;
  align-items: center;
  width: 230px;
  height: 30px;
  margin-left: 14px;
  background: #f1f1f1;
  border: 1px solid #dce3e7;
  border-radius: 5px;
  overflow: hidden;
}

.topbar-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 8px;
  border: 0;
  background: transparent;
  font-size: 14px;
}

.topbar-search span {
  width: 30px;
  text-align: center;
  color: #777777;
  font-size: 18px;
  line-height: 1;
}

.userbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.user-name {
  color: #7f8388;
  font-weight: 400;
}

.topbar-logout {
  padding: 5px 8px;
  border: 1px solid #dde2e5;
  background: #ffffff;
  color: #686b70;
  font-size: 12px;
}

.container {
  padding: var(--page-gap);
}

.page-title {
  margin: 0 0 10px;
  color: #33363a;
  font-size: 20px;
  font-weight: 700;
}

.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;
}

.page-tool-form {
  display: inline-flex;
  margin: 0;
}

.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;
}

.danger {
  background: #dc2626;
  border-color: #dc2626;
  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;
}

.dashboard-actions {
  gap: 10px;
  margin-bottom: 10px;
}

.dashboard-action {
  min-height: 44px;
  gap: 10px;
  padding: 8px 12px;
}

.dashboard-action strong {
  padding: 2px 7px;
}

.dashboard-drafts {
  grid-template-columns: minmax(165px, 220px) 1fr auto;
  gap: 10px;
  margin-bottom: 13px;
  padding: 8px 12px;
}

.dashboard-drafts h2 {
  line-height: 1.1;
}

.dashboard-drafts p {
  margin-top: 2px;
  line-height: 1.15;
}

.dashboard-draft-list {
  gap: 6px;
}

.dashboard-draft-list a,
.dashboard-draft-empty {
  min-width: 175px;
  padding: 5px 8px;
  line-height: 1.15;
}

.dashboard-drafts .button {
  min-height: 32px;
  padding: 6px 10px;
}

.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;
}

.dashboard-actions,
.dashboard-drafts,
.draft-shortcuts,
.active-filter-bar,
.movement-result-bar,
.result-summary-bar,
.movement-totals,
.report-totals {
  max-width: 100%;
}

.dashboard-action,
.workshop-tile,
.workshop-row,
.balance-tab,
.status-tab {
  border-radius: 6px;
}

.dashboard-action,
.workshop-tile,
.workshop-row {
  background: var(--tile);
}

.dashboard-action:hover,
.workshop-tile:hover,
.workshop-row:hover {
  background: #e7f4f4;
}

.dashboard-action.primary-action,
.status-tab.active,
.balance-tab.active,
.workshop-row.active {
  background: var(--teal);
  color: #ffffff;
}

.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;
}

.document-list-actions {
  white-space: nowrap;
}

.movement-table {
  min-width: 1110px;
}

.audit-table {
  min-width: 1220px;
}

.report-table {
  min-width: 560px;
}

.card,
.document-create-card,
.operation-guide-card,
.route-warning-card,
.posting-check-card,
.auto-preview-card,
.empty-state,
.movement-total-card,
.report-total-card {
  border-radius: 6px;
  box-shadow: none;
}

.document-create-page {
  max-width: 960px;
}

.document-create-card {
  padding: 18px;
  margin-bottom: 18px;
  background: #ffffff;
  border: 1px solid #e1e5e8;
}

.document-create-head h1 {
  color: #33363a;
  font-size: 20px;
}

.operation-badge {
  background: var(--teal);
}

.doc-head {
  border: 1px solid #e1e5e8;
}

.card {
  border: 1px solid #e1e5e8;
}

.document-detail-head {
  min-height: 48px;
  margin-bottom: 12px;
  border-bottom-width: 8px;
}

.document-detail-head .breadcrumbs {
  font-size: 18px;
}

.document-detail-head .page-tools {
  gap: 8px;
}

.document-detail-head .button,
.document-detail-head button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.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-detail-head + .document-summary-card,
.document-summary-card + .operation-guide-card,
.operation-guide-card + .document-lines {
  margin-top: 0;
}

.document-summary-card,
.document-summary-card + .operation-guide-card,
.document-lines,
.document-secondary-grid {
  max-width: 1680px;
  margin-left: auto;
  margin-right: auto;
}

.document-summary-card + .operation-guide-card {
  margin-bottom: 12px;
  padding: 10px 14px;
}

.document-summary-card + .operation-guide-card h2 {
  margin-bottom: 6px;
}

.document-summary-card + .operation-guide-card li {
  padding: 5px 9px;
}

.document-lines {
  gap: 16px;
}

.document-lines:not(.output-only):not(.input-only) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.document-lines.output-only,
.document-lines.input-only {
  grid-template-columns: 1fr;
}

.document-line-card {
  padding: 14px 18px;
  margin-bottom: 12px;
}

.document-line-card table {
  margin-bottom: 10px;
}

.document-lines:not(.output-only):not(.input-only) .document-line-card {
  min-width: 0;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.document-lines:not(.output-only):not(.input-only) .document-line-card h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.document-lines:not(.output-only):not(.input-only) .line-empty-state {
  margin: 2px 0 7px;
  padding: 7px 9px;
}

.document-lines:not(.output-only):not(.input-only) .add-line-panel {
  margin-top: 7px;
  padding: 9px;
}

.document-lines:not(.output-only):not(.input-only) .add-line-panel h3 {
  margin-bottom: 8px;
  font-size: 14px;
}

.document-lines:not(.output-only):not(.input-only) .material-picker {
  min-width: 0;
  gap: 7px;
}

.document-lines:not(.output-only):not(.input-only) .material-picker-tools {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 7px;
  margin-bottom: 7px;
}

.document-lines:not(.output-only):not(.input-only) .material-picker-tools input,
.document-lines:not(.output-only):not(.input-only) .material-picker-tools select {
  height: 34px;
}

.document-lines:not(.output-only):not(.input-only) .material-candidates {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
  max-height: 110px;
}

.document-lines:not(.output-only):not(.input-only) .material-candidate {
  min-height: 48px;
  padding: 6px 7px;
  gap: 2px;
}

.document-lines:not(.output-only):not(.input-only) .material-candidate strong {
  font-size: 12px;
  line-height: 1.12;
}

.document-lines:not(.output-only):not(.input-only) .candidate-source,
.document-lines:not(.output-only):not(.input-only) .candidate-meta {
  font-size: 10px;
  line-height: 1.12;
}

.document-lines:not(.output-only):not(.input-only) .line-form,
.document-lines:not(.output-only):not(.input-only) .line-form-output {
  gap: 7px;
}

.document-lines:not(.output-only):not(.input-only) .line-form {
  grid-template-columns: minmax(110px, 0.75fr) minmax(145px, 1fr) minmax(95px, 0.55fr) minmax(125px, 0.8fr) minmax(104px, auto);
}

.document-lines:not(.output-only):not(.input-only) .line-form-output {
  grid-template-columns: minmax(145px, 1fr) minmax(95px, 0.55fr) minmax(125px, 0.8fr) minmax(126px, auto);
}

.document-lines:not(.output-only):not(.input-only) .line-form span {
  font-size: 11px;
}

.document-lines:not(.output-only):not(.input-only) .line-select,
.document-lines:not(.output-only):not(.input-only) .line-number,
.document-lines:not(.output-only):not(.input-only) .line-note {
  height: 34px;
}

.document-lines:not(.output-only):not(.input-only) .package-tools {
  grid-template-columns: minmax(80px, 0.5fr) minmax(135px, 0.8fr) minmax(110px, 1fr);
  gap: 6px;
  padding: 7px;
}

.document-lines:not(.output-only):not(.input-only) .package-tools input,
.document-lines:not(.output-only):not(.input-only) .package-tools select,
.document-lines:not(.output-only):not(.input-only) .package-buttons button {
  height: 32px;
}

.line-empty-state {
  margin: 4px 0 8px;
  padding: 8px 10px;
  border: 1px dashed #d7dee5;
  border-radius: 6px;
  color: #7d858c;
  background: #fafbfc;
}

.document-lines.output-only .material-candidates,
.document-lines.input-only .material-candidates {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  max-height: 118px;
}

.document-lines.output-only .output-candidates,
.document-lines.input-only .output-candidates {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  max-height: 118px;
}

.document-lines.output-only .material-candidate,
.document-lines.input-only .material-candidate {
  min-height: 52px;
  padding: 7px 8px;
}

.document-lines.output-only .output-candidates .material-candidate,
.document-lines.input-only .output-candidates .material-candidate {
  align-content: center;
}

.document-lines.output-only .material-candidate strong,
.document-lines.input-only .material-candidate strong {
  font-size: 13px;
  line-height: 1.15;
}

.document-lines.output-only .candidate-source,
.document-lines.input-only .candidate-source,
.document-lines.output-only .candidate-meta,
.document-lines.input-only .candidate-meta {
  font-size: 11px;
  line-height: 1.15;
}

.document-lines.output-only .add-line-panel,
.document-lines.input-only .add-line-panel {
  margin-top: 8px;
  padding: 10px;
}

.document-lines.output-only .line-form-output {
  grid-template-columns: minmax(240px, 1fr) 130px minmax(190px, 0.8fr) auto;
}

.document-lines.input-only .line-form {
  grid-template-columns: minmax(170px, 0.8fr) minmax(240px, 1fr) 130px minmax(190px, 0.8fr) auto;
}

.document-secondary-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 10px;
  align-items: start;
}

.document-secondary-grid.has-actions {
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1fr) minmax(320px, 1fr) minmax(170px, 0.45fr);
}

.document-secondary-grid.without-employees {
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
}

.document-secondary-grid.without-employees.has-actions {
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr) minmax(170px, 0.45fr);
}

.document-secondary-grid > .card,
.document-secondary-grid > .posting-check-card {
  min-height: 0;
  margin-bottom: 8px;
  padding: 12px 16px;
}

.document-employees-card .employee-list {
  margin: 4px 0 8px;
  padding-left: 16px;
}

.document-employees-card .employee-list li {
  margin: 4px 0;
}

.document-employees-card .employee-form {
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
  margin-top: 6px;
  padding: 8px;
}

.document-employees-card .employee-form button,
.document-comment-edit button {
  min-height: 36px;
}

.document-comment-edit form {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.document-comment-edit label {
  min-width: 0;
}

.document-comment-edit textarea {
  min-height: 38px;
}

.document-posting-check ul {
  line-height: 1.35;
}

.document-actions-card {
  display: grid;
  gap: 8px;
  align-self: stretch;
}

.document-actions-card form,
.document-actions-card button {
  width: 100%;
}

.document-actions-card button {
  min-height: 36px;
  padding: 8px 10px;
}

@media (max-width: 1180px) {
  .document-summary-card {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .document-secondary-grid {
    grid-template-columns: 1fr;
  }

  .document-secondary-grid.has-actions {
    grid-template-columns: 1fr;
  }
}

.balance-layout {
  gap: 28px;
}

.search-box {
  border-radius: 6px 6px 0 0;
}

.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%, 380px);
  padding: 24px;
  border: 1px solid #e1e5e8;
  border-radius: 6px;
  background: #ffffff;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  margin: -4px 0 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 0 16px;
  font-size: 20px;
}

.login-form p {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

.login-form label {
  color: #7d8085;
  font-size: 12px;
  font-weight: 400;
}

.login-form input {
  width: 100%;
  height: 40px;
}

.login-form button {
  width: 100%;
  margin-top: 4px;
}

@media (max-width: 1180px) {
  .dashboard-actions {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .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,
  .report-filter {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

  .balance-layout {
    grid-template-columns: 280px 1fr;
  }

  .balance-column:last-child {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  :root {
    --page-gap: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
  }

  .userbox {
    margin-left: 0;
  }

  .module-grid,
  .workshop-grid,
  .dashboard-actions,
  .dashboard-drafts,
  .draft-shortcuts,
  .status-tabs,
  .balance-tabs,
  .document-filter,
  .movement-filter,
  .audit-filter,
  .report-filter,
  .balance-layout,
  .columns,
  .doc-head,
  .movement-totals,
  .report-totals,
  .report-grid,
  .document-header-form,
  .line-form,
  .line-form-output,
  .employee-form,
  .posted-change-panel,
  .package-tools,
  .material-picker-tools {
    grid-template-columns: 1fr;
  }

  .page-head {
    margin: -12px -12px 16px;
    padding: 12px;
  }

  .breadcrumbs {
    font-size: 20px;
  }

  .page-tools {
    justify-content: flex-start;
  }

  .topbar-search {
    width: min(100%, 260px);
    margin-left: 0;
  }

  .document-create-actions {
    align-items: stretch;
    width: 100%;
  }

  .document-create-actions .primary {
    width: 100%;
  }
}

/* Source program skin: closer to the old working interface, while logic stays shared. */
.source-shell {
  background: #f2f2f2;
  overflow-x: hidden;
}

.source-shell .topbar {
  min-height: 44px;
  background: #ffffff;
}

.source-shell .logo {
  min-width: 118px;
  color: #33363a !important;
  font-size: 18px;
}

.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 .status-tabs,
.source-shell .balance-tabs {
  gap: 10px;
}

.source-shell .status-tab,
.source-shell .balance-tab {
  min-height: 44px;
  border-radius: 5px;
}

.source-shell .list-panel,
.source-shell .report-panel,
.source-shell .card,
.source-shell .document-create-card,
.source-shell .document-line-card,
.source-shell .source-catalog-detail {
  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-create-page {
  max-width: 980px;
}

.source-shell .document-create-card {
  padding: 18px;
}

.source-shell .document-create-head {
  align-items: flex-start;
}

.source-shell .document-create-head h1 {
  font-size: 22px;
}

.source-shell .operation-guide-card {
  padding: 12px 14px;
  background: #f3f4f5;
  border: 1px solid #dfe5e8;
  border-radius: 4px;
}

.source-shell .operation-guide-card h2 {
  font-size: 14px;
}

.source-shell .operation-guide-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.source-shell .operation-guide-card li {
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #dfe5e8;
  border-radius: 4px;
}

.source-shell .document-header-form {
  gap: 12px;
}

.source-shell .document-operation-fixed-field {
  justify-content: end;
}

.source-shell .document-operation-fixed {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  background: #f3f4f5;
  border: 1px solid #d5dde2;
  border-radius: 4px;
}

.source-shell .document-comment-field textarea {
  min-height: 96px;
}

.source-shell .document-summary-card {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding: 10px 14px;
  background: #ffffff;
}

.source-shell .document-lines,
.source-shell .document-secondary-grid,
.source-shell .document-summary-card + .operation-guide-card {
  max-width: none;
}

.source-shell .document-line-card h2,
.source-shell .card h2,
.source-shell .source-catalog-detail h2 {
  margin-top: 0;
  font-size: 16px;
}

.source-shell .add-line-panel {
  background: #f2f2f2;
  border-radius: 4px;
}

.source-shell .material-candidates {
  border-radius: 4px;
}

.source-shell .material-candidate {
  border-radius: 4px;
  background: #f7f9fa;
}

.source-shell .material-candidate:hover,
.source-shell .material-candidate.is-selected {
  background: #eaf7f6;
  border-color: #2fb5b2;
}

.source-catalog-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.source-catalog-card {
  min-height: 96px;
  padding: 16px;
  background: #f0f0f0;
  border-color: #e2e2e2;
}

.source-catalog-card small {
  color: #16847d;
  font-weight: 700;
}

.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 {
  overflow: hidden;
}

.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-report-filter {
  grid-template-columns: repeat(2, minmax(190px, 240px)) auto;
}

.source-report-totals {
  margin-top: 14px;
}

.source-report-section {
  margin-top: 18px;
}

.source-report-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.source-report-section-head h2 {
  margin: 0;
  font-size: 18px;
}

.source-report-section-head div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #5d6872;
  font-weight: 700;
}

.source-dashboard .page-title {
  margin-bottom: 32px;
  font-size: 40px;
  line-height: 60px;
  font-weight: 700;
}

.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 {
  grid-template-columns: repeat(4, minmax(220px, 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-search {
  display: flex;
  align-items: center;
  width: min(100%, 430px);
  height: 46px;
  margin: -8px 0 18px;
  background: #f1f1f1;
  border: 1px solid #dce3e7;
  border-radius: 5px;
  overflow: hidden;
}

.source-dashboard-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  background: transparent;
  font-size: 16px;
}

.source-dashboard-search span {
  width: 46px;
  text-align: center;
  color: #777777;
  font-size: 24px;
}

.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(5, minmax(220px, 1fr));
  gap: 24px;
}

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

/* Alpha-only tools live on a separate page so the Source-compatible screens
   remain visually identical. */
.source-alpha-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 16px;
  margin: 0 0 24px;
}

.source-alpha-stats > div {
  display: flex;
  min-height: 84px;
  padding: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f2f2f2;
  border-radius: 8px;
}

.source-alpha-stats span {
  color: #777777;
  font-size: 15px;
}

.source-alpha-stats strong {
  color: #494949;
  font-size: 26px;
}

@media (max-width: 1280px) {
  .source-alpha-stats {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 640px) {
  .source-alpha-stats {
    grid-template-columns: 1fr;
  }
}

.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: 1400px) {
  .source-dashboard .workshop-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
  }
}

@media (max-width: 1280px) {
  .source-dashboard .accounting-module-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .source-dashboard .workshop-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 820px) {
  .source-shell .container {
    padding: 16px;
  }

  .source-dashboard .accounting-module-grid,
  .source-dashboard .workshop-grid {
    grid-template-columns: 1fr;
  }

  .source-dashboard .page-title {
    font-size: 28px;
  }

  .source-shell .page-head {
    margin: -16px -16px 16px;
    padding: 12px 16px;
  }

  .source-shell .document-filter,
  .source-catalog-grid {
    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-balance-title .global-back-button {
  display: none !important;
}

.source-shell .topbar-logout {
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #d6d6d6;
  border-radius: 4px;
  background: #ffffff;
  color: #555555;
  cursor: pointer;
  font-weight: 700;
}

.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: 1.1;
}

.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-workshop-sidebar,
.source-balance-column,
.source-balance-materials {
  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: 16px;
}

.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-workshop-list h3 {
  margin: 14px 18px 8px;
  color: #9a9a9a;
  font-size: 16px;
}

.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: 17px;
  font-weight: 700;
}

.source-workshop-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: 44px;
  background: #ffffff;
  color: #999999;
  font-size: 12px;
  font-weight: 700;
}

.source-balance-table td {
  height: 52px;
  color: #424242;
  font-size: 16px;
}

.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;
}

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

  .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-section,
.source-report-filter,
.source-report-totals > div {
  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-report-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.source-report-totals > div {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.source-report-totals span {
  color: #777777;
}

.source-report-totals strong {
  color: #424242;
  font-size: 22px;
}

.source-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.source-report-section {
  overflow: hidden;
}

.source-report-section h2 {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid #dddddd;
  color: #424242;
  font-size: 20px;
}

.source-filter-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(160px, 220px) minmax(220px, 300px) auto auto 1fr;
  gap: 18px;
  align-items: end;
  margin-bottom: 8px;
}

.source-filter-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.source-filter-icon {
  color: #bbbbbb;
  font-size: 18px;
}

.source-filter-name {
  flex: 0 0 auto;
  color: #9a9a9a;
  font-size: 16px;
}

.source-filter-row input,
.source-filter-row select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid #bbbbbb;
  background: transparent;
  color: #555555;
  font-size: 16px;
}

.source-filter-row input::placeholder {
  color: transparent;
}

.source-filter-submit,
.source-filter-reset {
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  background: #ffffff;
  color: #555555;
  font-weight: 700;
}

.source-error,
.source-warning {
  margin: 12px 0;
  padding: 12px 14px;
  background: #fff7df;
  border: 1px solid #f0d389;
  border-radius: 4px;
  color: #7a5400;
}

.source-document-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.source-document-table td {
  height: 58px;
  border-top: 1px solid #e5e5e5;
  color: #555555;
  font-size: 17px;
}

.source-doc-number {
  width: 30%;
  padding-left: 26px;
}

.source-doc-date {
  width: 18%;
}

.source-doc-workshop {
  width: 38%;
}

.source-doc-open {
  width: 70px;
  text-align: center;
  color: #888888;
  font-size: 24px;
}

.source-empty {
  padding: 28px;
  text-align: center;
  color: #999999;
}

.source-document-title {
  align-items: flex-start;
  margin-bottom: 14px;
  border-bottom: 0;
  border-radius: 4px;
}

.source-document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  margin-top: 28px;
  color: #555555;
  font-size: 16px;
}

.source-document-meta b {
  color: #999999;
}

.source-meta-wide {
  flex-basis: 100%;
}

.source-post-form,
.source-delete-form {
  margin: 0;
}

.source-action,
.source-action-primary,
.source-small-button {
  border: 0;
  border-radius: 4px;
  background: var(--teal);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.source-action {
  min-height: 42px;
  padding: 0 18px;
}

.source-action:disabled,
.source-action-primary:disabled {
  background: #d8d8d8;
  color: #999999;
  cursor: default;
}

.source-delete-button {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 6px;
  background: #df3d3d;
  color: #ffffff;
  cursor: pointer;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.source-document-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.source-document-card,
.source-employee-card {
  overflow: hidden;
  background: #ffffff;
  border-radius: 4px;
}

.source-document-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px;
  border-bottom: 1px solid #dddddd;
}

.source-document-card h2,
.source-employee-card h2 {
  margin: 0;
  color: #424242;
  font-size: 18px;
}

.source-small-button {
  min-height: 32px;
  padding: 0 12px;
}

.source-line-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e5e5;
}

.source-line-row small {
  display: block;
  margin-bottom: 8px;
  color: #999999;
  font-size: 14px;
  font-weight: 700;
}

.source-line-row strong {
  color: #424242;
  font-size: 20px;
  font-weight: 400;
}

.source-line-qty {
  min-width: 90px;
  text-align: right;
  color: #424242;
  font-size: 20px;
}

.source-line-delete button,
.source-employee-chip button {
  border: 0;
  background: transparent;
  color: #df3d3d;
  cursor: pointer;
  font-size: 24px;
  font-weight: 700;
}

.source-line-empty {
  padding: 22px 14px;
  color: #999999;
}

.source-employee-card {
  margin-top: 20px;
  padding: 14px;
}

.source-employee-form {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.source-employee-form select {
  min-width: 280px;
  height: 38px;
}

.source-employee-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 8px 0 0;
  padding: 6px 10px;
  background: #f2f2f2;
  border-radius: 4px;
}

.source-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .42);
}

.source-modal-panel {
  width: min(960px, 100%);
  overflow: hidden;
  background: #eeeeee;
  border-radius: 10px;
}

.source-modal-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 22px;
  background: var(--teal);
  color: #ffffff;
}

.source-modal-panel h2 {
  margin: 0;
  font-size: 28px;
}

.source-modal-panel header button {
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font-size: 46px;
  line-height: 1;
}

.source-modal-form {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(260px, 2fr) minmax(180px, 1fr);
  gap: 18px;
  padding: 24px;
}

.source-picker-form {
  display: block;
}

.source-real-fields {
  display: none;
}

.source-picker-grid {
  display: grid;
  grid-template-columns: 240px minmax(320px, 1fr) 280px;
  gap: 18px;
}

.source-picker-column h3 {
  margin: 0 0 12px;
  color: #444444;
  font-size: 24px;
}

.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;
}

.source-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #dddddd;
  border-radius: 6px;
  overflow: hidden;
}

.source-keypad button {
  min-height: 74px;
  border: 0;
  border-right: 1px solid #dddddd;
  border-bottom: 1px solid #dddddd;
  background: #f7f7f7;
  color: #61c9c6;
  cursor: pointer;
  font-size: 26px;
}

.source-keypad button:nth-child(3n) {
  border-right: 0;
}

.source-keypad button:nth-last-child(-n+3) {
  border-bottom: 0;
}

.source-picker-column p {
  margin: 0;
  padding: 12px;
  color: #999999;
  background: #ffffff;
  border-radius: 4px;
}

.source-modal-form label {
  display: grid;
  gap: 8px;
  color: #555555;
  font-size: 18px;
  font-weight: 700;
}

.source-modal-form input,
.source-modal-form select,
.source-modal-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #d5d5d5;
  border-radius: 5px;
  background: #ffffff;
  font-size: 16px;
}

.source-modal-form textarea {
  min-height: 44px;
  resize: vertical;
}

.source-modal-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.source-modal-actions button {
  min-height: 58px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
}

.source-modal-actions button:first-child {
  background: #888888;
  color: #ffffff;
}

@media (max-width: 1020px) {
  .source-document-columns,
  .source-modal-form {
    grid-template-columns: 1fr;
  }

  .source-filter-row {
    grid-template-columns: 1fr;
  }

  .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;
  margin: -24px -24px 16px;
  height: 108px;
  padding: 0 24px;
  border-radius: 8px;
  border-bottom: 0;
}

.source-workshop-list-head .source-breadcrumbs,
.source-workshop-list-head form {
  transform: none;
}

.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: 700;
  white-space: nowrap;
}

.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-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-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}

.source-original-icon:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.source-original-gray { background: #b8b8b8; }
.source-original-red { background: #e33e3a; }
.source-original-teal { background: #87d8d6; }

.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 input,
.source-original-comment-read {
  width: 100%;
  min-height: 64px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  background: #eeeeee;
  color: #4a4a4a;
  font-size: 22px;
}

.source-original-comment-read {
  display: flex;
  align-items: center;
  color: #9d9d9d;
}

.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-empty {
  padding: 22px 18px;
  color: #9b9b9b;
  font-size: 18px;
}

.source-original-employee-card {
  margin-top: 20px;
  padding: 16px;
  background: #ffffff;
  border-radius: 4px;
}

.source-original-employee-card h2 {
  margin: 0 0 12px;
}

.source-original-employee-form {
  display: flex;
  gap: 10px;
}

.source-original-employee-form select {
  min-width: 280px;
  height: 40px;
}

.source-original-employee-form button,
.source-original-employee-chip {
  min-height: 40px;
}

.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-form {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
  padding: 22px 24px 8px;
}

.source-employee-picker-controls {
  width: 100%;
  margin-bottom: 18px;
}

.source-employee-picker-controls.has-brigade-hours {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: end;
  gap: 20px;
}

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

.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-brigade-hours-field {
  position: relative;
  min-width: 0;
}

.source-brigade-hours-field > label {
  display: block;
  margin: 0 0 6px;
  color: #4a4a4a;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
}

.source-brigade-hours-control {
  position: relative;
}

.source-brigade-hours-control input {
  width: 100%;
  height: 42px;
  padding: 0 44px 0 14px;
  box-sizing: border-box;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  background: #ffffff;
  color: #2f3842;
  font-size: 22px;
  text-align: right;
}

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

.source-brigade-hours-control span {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: #6d6d6d;
  font-size: 18px;
  font-weight: 600;
  pointer-events: none;
}

.source-brigade-hours-field.is-invalid .source-brigade-hours-control input {
  border-color: #e53935;
}

.source-brigade-hours-field small {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  color: #c62828;
  font-size: 13px;
  line-height: 16px;
  text-align: right;
}

.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 24px 50px;
  align-items: center;
  gap: 8px;
  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 input {
  width: 96px;
  height: 46px;
  padding: 0 10px;
  box-sizing: border-box;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  background: #ffffff;
  color: #2f3842;
  font-size: 21px;
  text-align: right;
}

.source-employee-hours-label input: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 input {
  border-color: #e53935;
}

.source-employee-hours-unit {
  color: #6d6d6d;
  font-size: 18px;
  font-weight: 600;
}

.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;
}

.source-employee-hours-error {
  grid-column: 2 / 5;
  color: #c62828;
  font-size: 13px;
  line-height: 16px;
  text-align: right;
}

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

@media (max-width: 900px) {
  .source-employee-picker-form {
    overflow-y: auto;
  }

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

  .source-employee-picker-controls.has-brigade-hours {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .source-brigade-hours-field small {
    position: static;
    display: block;
    margin-top: 2px;
  }

  .source-employee-list {
    height: auto;
    min-height: 150px;
    max-height: 28vh;
  }
}

@media (max-width: 600px) {
  .source-employee-picker-form {
    padding: 16px 12px 8px;
  }

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

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

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

  .source-employee-hours-label input {
    width: 100px;
  }

  .source-employee-hours-error {
    grid-column: 1 / 4;
  }
}

.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-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-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-alpha-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 .source-astox-topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  color: #ffffff;
}

html body.source-shell .source-astox-bell {
  display: block;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

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-materials {
  margin: 0;
  padding: 28px 24px 24px;
  border-radius: 0 0 8px 8px;
}

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-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: auto;
  min-height: 158px;
  margin: 0;
  padding: 24px;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  justify-content: stretch;
  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;
  gap: 0;
  height: 110px;
  min-height: 110px;
  padding: 24px;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
}

html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-report-menu-original) .source-report-menu-original strong {
  min-width: 0;
  color: #ffffff;
  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: #ffffff;
}

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

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

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: 600;
  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-page-title-has-actions,
html body.source-shell .source-workshop-list-head.source-page-title-has-actions,
html body.source-shell .source-page-head.source-page-title-has-actions,
html body.source-shell .source-balance-title.source-page-title-has-actions,
html body.source-shell .source-block-report-title.source-page-title-has-actions,
html body.source-shell .source-reference-index.source-page-title-has-actions {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-right: 22px;
}

html body.source-shell .source-title-actions,
html body.source-shell .source-original-actions,
html body.source-shell .source-page-title-has-actions > .source-title-actions,
html body.source-shell .source-workshop-list-head.source-page-title-has-actions > .source-title-actions,
html body.source-shell .source-page-head.source-page-title-has-actions > .source-title-actions,
html body.source-shell .source-balance-title.source-page-title-has-actions > .source-title-actions,
html body.source-shell .source-block-report-title.source-page-title-has-actions > .source-title-actions,
html body.source-shell .source-reference-index.source-page-title-has-actions > .source-title-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-title-actions form,
html body.source-shell .source-original-actions form {
  margin: 0;
}

html body.source-shell button.global-back-button[data-global-back-button],
html body.source-shell .source-title-actions button.global-back-button[data-global-back-button],
html body.source-shell .source-original-actions button.global-back-button[data-global-back-button],
html body.source-shell .source-original-actions button.source-original-delete-button,
html body.source-shell .source-original-actions form button.source-original-delete-button {
  position: static;
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  border-radius: 6px;
  font-family: Verdana, Arial, sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 52px;
  padding: 0 18px;
  text-align: center;
  white-space: nowrap;
}

html body.source-shell button.global-back-button[data-global-back-button],
html body.source-shell .source-title-actions button.global-back-button[data-global-back-button],
html body.source-shell .source-original-actions button.global-back-button[data-global-back-button] {
  background: #ff981a;
  color: #ffffff;
  border: 0;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .16);
}

html body.source-shell .source-original-actions button.source-original-delete-button,
html body.source-shell .source-original-actions form button.source-original-delete-button {
  background: #e53935;
  color: #fff;
  border: 0;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
}

html body.source-shell:has(.login-shell) button.global-back-button[data-global-back-button],
html body.source-shell:has(.login-card) button.global-back-button[data-global-back-button],
html body.source-shell:has(.login-wrap) button.global-back-button[data-global-back-button],
html body.source-shell:has(form[action*="login"]) button.global-back-button[data-global-back-button] {
  display: none;
}

/* 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,
html body.source-shell .source-original-comment-read {
  min-height: 61px;
  border: 1px solid #d8d8d8;
  border-radius: 5px;
  background: #ffffff;
  font-size: 20px;
}

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: 500;
  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: 262px;
  padding-left: 16px;
}

html body.source-shell .source-report-date-pill > span {
  color: #a6a6a6;
  font-size: 16px;
  font-weight: 600;
}

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: 16px;
  font-weight: 400;
  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: 56px;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
  font-size: 16px;
  line-height: 24px;
}

html body.source-shell .source-report-paired-table th {
  height: 64px;
  color: #828282;
  font-size: 18px;
  font-weight: 600;
}

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-empty-row td {
  height: 72px;
  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: 18px;
  font-weight: 600;
  line-height: 28px;
}

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: 44px;
  font-weight: 700;
  line-height: 56px;
}

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: 16px;
  line-height: 28px;
}

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: 600;
}

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: 28px;
  font-weight: 700;
  line-height: 40px;
}

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: 16px;
  font-weight: 700;
  line-height: 24px;
  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: 600;
}

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: 16px;
  font-weight: 600;
}

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: 700;
  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: 15px;
  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: 13px;
  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: 32px;
    line-height: 40px;
  }

  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-planed-grand-total {
  margin-top: 24px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

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: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 8px;
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid #cce8e7;
  border-radius: 6px;
  background: #f2fbfa;
}

html body.source-shell .source-original-package-tools[hidden] {
  display: none;
}

html body.source-shell .source-original-package-tools label {
  display: grid;
  gap: 4px;
  color: #6e6e6e;
  font-size: 12px;
}

html body.source-shell .source-original-package-tools input,
html body.source-shell .source-original-package-tools select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #d7d7d7;
  border-radius: 4px;
  background: #ffffff;
}

html body.source-shell .source-original-package-buttons {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

html body.source-shell .source-original-package-buttons button {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid #9ed8d5;
  border-radius: 4px;
  background: #ffffff;
  color: #16847d;
}

html body.source-shell .source-original-package-tools small {
  grid-column: 1 / -1;
  color: #5f6d6c;
  line-height: 18px;
}

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 .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 {
    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 > * {
    grid-column: 1;
    grid-row: auto;
    min-width: 0;
  }

  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-reference-index) .source-reference-pinned {
    width: 100%;
  }

  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-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;
  }
}

@media (max-width: 900px) {
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-alpha-snapshot-report) .source-alpha-snapshot-title {
    height: auto;
    min-height: 0;
    padding: 20px 24px;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 16px;
  }

  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-alpha-snapshot-report) .source-alpha-snapshot-title .source-breadcrumbs,
  html body.source-shell:not(:has(.login-shell)) main.source-container:has(.source-alpha-snapshot-report) .source-alpha-snapshot-actions {
    width: 100%;
  }
}

html body.source-shell .source-alpha-report-site {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #f8f8f8;
  box-sizing: border-box;
}

html body.source-shell .source-alpha-report-site-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: -16px -16px 0;
  padding: 12px 16px;
  border-radius: 8px 8px 0 0;
}

html body.source-shell .source-alpha-report-site-heading.source-block-tone-planed {
  background: #ffe2ee;
}

html body.source-shell .source-alpha-report-site-heading.source-block-tone-dry {
  background: #ffe8d0;
}

html body.source-shell .source-alpha-report-site-heading h2 {
  margin: 0;
  color: #494949;
  font-size: 24px;
  font-weight: 600;
  line-height: 34px;
}

html body.source-shell .source-alpha-report-site-heading span {
  color: #6f6f6f;
  font-size: 14px;
  font-weight: 700;
  line-height: 22px;
  text-align: right;
}

html body.source-shell .source-alpha-report-site-total {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

@media (max-width: 520px) {
  html body.source-shell .source-alpha-report-site {
    padding: 12px;
  }

  html body.source-shell .source-alpha-report-site-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    margin: -12px -12px 0;
    padding: 12px;
  }

  html body.source-shell .source-alpha-report-site-heading span {
    text-align: left;
  }

  html body.source-shell .source-alpha-report-site-total .source-block-summary-head,
  html body.source-shell .source-alpha-report-site-total .source-block-summary-values,
  html body.source-shell .source-block-planed-grand-total .source-block-summary-head,
  html body.source-shell .source-block-planed-grand-total .source-block-summary-values {
    gap: 12px;
  }
}

html body.source-shell .source-alpha-general-pm-summary {
  overflow: hidden;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #ffffff;
}

html body.source-shell .source-alpha-general-pm-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 18px;
  background: #d8f6ff;
}

html body.source-shell .source-alpha-general-pm-heading strong {
  color: #494949;
  font-size: 20px;
  line-height: 30px;
}

html body.source-shell .source-alpha-general-pm-heading span {
  color: #6f6f6f;
  font-size: 14px;
  font-weight: 700;
  line-height: 22px;
}

html body.source-shell .source-alpha-general-pm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

html body.source-shell .source-alpha-general-pm-grid > div {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  border-right: 1px solid #e0e0e0;
  box-sizing: border-box;
}

html body.source-shell .source-alpha-general-pm-grid > div:last-child {
  border-right: 0;
}

html body.source-shell .source-alpha-general-pm-grid span {
  color: #828282;
  font-size: 15px;
  font-weight: 700;
  line-height: 24px;
}

html body.source-shell .source-alpha-general-pm-grid strong {
  color: #494949;
  font-size: 24px;
  line-height: 32px;
  overflow-wrap: anywhere;
}

html body.source-shell .source-alpha-general-pm-grid small {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 700px) {
  html body.source-shell .source-alpha-general-pm-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  html body.source-shell .source-alpha-general-pm-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html body.source-shell .source-alpha-general-pm-grid > div {
    border-right: 0;
    border-bottom: 1px solid #e0e0e0;
  }

  html body.source-shell .source-alpha-general-pm-grid > div:last-child {
    border-bottom: 0;
  }
}

html body.source-shell .source-norm-report {
  display: grid;
  gap: 18px;
}

html body.source-shell .source-norm-report-filter .source-report-date-pill {
  grid-template-columns: auto minmax(142px, 1fr);
  width: 248px;
  gap: 8px;
  padding: 0 14px;
  box-sizing: border-box;
}

html body.source-shell .source-norm-report-filter .source-report-date-pill input[type="date"] {
  width: 100%;
  min-width: 142px;
  height: 40px;
  padding: 0 6px;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  box-sizing: border-box;
  background: #fff;
  color: #494949;
  font: inherit;
  font-size: 15px;
}

html body.source-shell .source-norm-report-section {
  display: grid;
  gap: 10px;
}

html body.source-shell .source-norm-report-section > h2 {
  margin: 0;
  color: #4b4b4b;
  font-size: 22px;
  line-height: 30px;
}

html body.source-shell .source-norm-report-card {
  overflow: hidden;
  padding: 0;
}

html body.source-shell .source-norm-report-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  color: #454545;
  background: #fff;
}

html body.source-shell .source-norm-brigade-summary-table {
  min-width: 1440px;
}

html body.source-shell .source-norm-report-table th,
html body.source-shell .source-norm-report-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #e6e6e6;
  text-align: right;
  vertical-align: top;
}

html body.source-shell .source-norm-report-table th {
  color: #777;
  background: #f3f3f3;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

html body.source-shell .source-norm-report-table th:nth-child(-n+3),
html body.source-shell .source-norm-report-table td:nth-child(-n+3),
html body.source-shell .source-norm-report-table th:last-child,
html body.source-shell .source-norm-report-table td:last-child {
  text-align: left;
}

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

html body.source-shell .source-norm-brigade {
  min-width: 260px;
  font-weight: 700;
}

html body.source-shell .source-norm-documents {
  min-width: 120px;
}

html body.source-shell .source-norm-documents a {
  color: #20aaa9;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

html body.source-shell .source-norm-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

html body.source-shell .source-norm-status.is-completed {
  color: #167f55;
  background: #dff7eb;
}

html body.source-shell .source-norm-status.is-not-completed {
  color: #b95622;
  background: #fff0df;
}

html body.source-shell .source-norm-status.is-incomplete {
  color: #a23232;
  background: #ffe3e3;
}

html body.source-shell .source-norm-reasons {
  display: block;
  max-width: 260px;
  margin-top: 7px;
  color: #a23232;
  font-weight: 700;
  line-height: 1.35;
}

html body.source-shell .source-norm-report-table td > small:not(.source-norm-reasons) {
  display: block;
  margin-top: 4px;
  color: #777;
  font-weight: 700;
}

html body.source-shell .source-norm-report-total {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #b9e8e8;
  border-radius: 8px;
  background: #e8fafa;
}

html body.source-shell .source-norm-report-total > div {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-right: 1px solid #c8ebeb;
}

html body.source-shell .source-norm-report-total > div:last-child {
  border-right: 0;
}

html body.source-shell .source-norm-report-total span,
html body.source-shell .source-norm-report-total small {
  color: #737373;
  font-size: 13px;
  font-weight: 700;
}

html body.source-shell .source-norm-report-total strong {
  color: #454545;
  font-size: 20px;
}

@media (max-width: 1000px) {
  html body.source-shell .source-norm-report-title {
    align-items: stretch;
    flex-direction: column;
  }

  html body.source-shell .source-norm-report-total {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html body.source-shell .source-norm-report-total > div {
    border-bottom: 1px solid #c8ebeb;
  }
}

@media (max-width: 620px) {
  html body.source-shell .source-norm-report-total {
    grid-template-columns: minmax(0, 1fr);
  }

  html body.source-shell .source-norm-report-total > div {
    border-right: 0;
  }
}


