:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  color: #173b40;
  background: #f3f7f6;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  display: flex;
}
aside {
  width: 252px;
  background: #123f43;
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.7px;
}
.brand span {
  background: #bde9b1;
  color: #17483d;
  border-radius: 12px;
  display: inline-block;
  padding: 8px;
  margin-right: 7px;
}
.caption {
  font-size: 10px;
  letter-spacing: 1.6px;
  margin-top: 42px;
  color: #acd0cb;
}
nav {
  display: grid;
  gap: 8px;
}
nav button {
  text-align: left;
  background: none;
  color: #c6ddda;
  border: 0;
  padding: 13px 12px;
  font-size: 14px;
}
nav button.active {
  background: #285358;
  color: #fff;
}
.aside-bottom {
  margin-top: auto;
  line-height: 1.8;
  font-size: 13px;
  color: #bbd8d3;
}
small {
  color: #6a8080;
}
main {
  margin-left: 252px;
  padding: 38px 42px;
  max-width: 1600px;
  width: calc(100% - 252px);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #5a8179;
  font-weight: 700;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin: 10px 0;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
  margin-top: 0;
}
p {
  line-height: 1.7;
  color: #657b7a;
}
.panel {
  background: #fff;
  border: 1px solid #e0e9e5;
  border-radius: 16px;
  padding: 26px;
  margin-bottom: 22px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.card {
  background: #fff;
  padding: 23px;
  border: 1px solid #e0e9e5;
  border-radius: 14px;
}
.card strong {
  font-size: 28px;
  display: block;
  margin: 15px 0 4px;
  font-weight: 650;
}
.card span {
  font-size: 13px;
  color: #648079;
}
form {
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  flex: 1;
}
input,
select {
  font: inherit;
  font-size: 15px;
  border: 1px solid #cddbd6;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  min-width: 0;
  width: 100%;
  color: #204641;
}
input:focus,
select:focus {
  outline: 2px solid #58ad98;
  outline-offset: 1px;
}
button {
  font: inherit;
  font-size: 14px;
  border: 0;
  background: #176b58;
  color: white;
  padding: 13px 19px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
button:hover {
  filter: brightness(1.1);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.secondary {
  background: #e8f2ed;
  color: #26584b;
}
.wide {
  grid-column: 1/-1;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #718681;
  background: #f6f9f7;
}
th,
td {
  padding: 14px 11px;
  border-bottom: 1px solid #edf1ee;
  white-space: nowrap;
}
td button {
  padding: 7px 12px;
  font-size: 12px;
}
.badge {
  border-radius: 20px;
  padding: 5px 9px;
  background: #e8f3ee;
  font-size: 12px;
}
#notice:not(:empty) {
  background: #fff3db;
  border: 1px solid #edcf94;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 18px;
}
footer {
  font-size: 12px;
  color: #78918b;
  margin-top: 32px;
}
.financial-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #edf1ee;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  main {
    padding: 25px;
  }
}
@media (max-width: 700px) {
  body {
    display: block;
  }
  aside {
    position: static;
    width: 100%;
    padding: 20px;
  }
  .caption,
  .aside-bottom {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 16px;
  }
  nav button {
    white-space: nowrap;
  }
  main {
    margin: 0;
    width: 100%;
    padding: 20px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .card strong {
    font-size: 22px;
  }
  h1 {
    font-size: 27px;
  }
  header {
    align-items: start;
  }
  form {
    align-items: stretch;
  }
  label {
    flex-basis: 100%;
  }
}
.document-line {
  border: 1px solid #ceddd9;
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
  min-width: 0;
}
.document-line legend {
  font-weight: 600;
  padding: 0 6px;
}
#allocation-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
#statement-table,
#accounts-table {
  margin-top: 24px;
}
input[type="file"] {
  max-width: 100%;
}

.sales-hero,
.sales-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.sales-hero {
  padding: 16px 0 26px;
}
.sales-hero h2 {
  font-size: 28px;
  letter-spacing: -0.7px;
  margin: 8px 0;
}
.sales-hero p {
  margin: 8px 0;
  color: #607878;
}
.sales-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.sales-metrics > div {
  background: white;
  border: 1px solid #d9e5e1;
  border-radius: 14px;
  padding: 22px;
}
.sales-metrics strong {
  display: block;
  font-size: 25px;
  margin-top: 12px;
}
.sales-tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 0 0 20px;
}
.sales-tabs button {
  white-space: nowrap;
  background: #e5efeb;
  color: #21514b;
}
.sales-tabs .selected {
  background: #216e5b;
  color: white;
}
.sales-toolbar > label {
  min-width: 180px;
}
.sales-search {
  flex: 1;
}
.sales-toolbar button {
  margin: 3px;
}
.sales-editor {
  border: 2px solid #74a795;
}
.wide {
  grid-column: 1/-1;
}
.sales-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  margin: 12px 0;
  border: 1px solid #ccdcd5;
  border-radius: 10px;
}
.sales-line legend {
  font-weight: 650;
}
.sales-line button {
  align-self: end;
}
#sales-workspace textarea {
  width: 100%;
  min-height: 90px;
  padding: 12px;
  border: 1px solid #bfd3ce;
  border-radius: 8px;
  font: inherit;
}
#sales-workspace input[type="checkbox"] {
  width: auto;
}
#sales-workspace .table-wrap {
  overflow-x: auto;
}
#sales-workspace td button {
  margin: 3px;
  font-size: 13px;
  padding: 8px 10px;
}
#sales-workspace [hidden] {
  display: none !important;
}
aside {
  overflow-y: auto;
}
@media (max-width: 850px) {
  .sales-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sales-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .sales-line {
    grid-template-columns: 1fr;
  }
  .sales-hero h2 {
    font-size: 23px;
  }
  .sales-metrics > div {
    padding: 14px;
  }
  .sales-metrics strong {
    font-size: 20px;
  }
}
@media print {
  body.sales-printing {
    display: block;
    background: white;
  }
  body.sales-printing * {
    visibility: hidden;
  }
  body.sales-printing #sales-print,
  body.sales-printing #sales-print * {
    visibility: visible;
  }
  body.sales-printing #sales-print {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 20px;
  }
  body.sales-printing aside {
    display: none;
  }
}

@media print {
  body.sales-printing {
    display: block !important;
  }
  body.sales-printing main {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }
  body.sales-printing main > header,
  body.sales-printing #notice,
  body.sales-printing #login,
  body.sales-printing main > footer,
  body.sales-printing #workspace > section:not([data-page="sales"]),
  body.sales-printing #sales-workspace > div:not(#sales-detail),
  body.sales-printing #sales-detail > .card > :not(#sales-print) {
    display: none !important;
  }
  body.sales-printing #sales-print {
    position: static !important;
    width: 100%;
    padding: 0;
  }
  body.sales-printing #sales-detail > .card {
    border: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
  }
  body.sales-printing table {
    min-width: 0 !important;
    width: 100%;
  }
}
#sales-detail {
  margin-top: 20px;
  min-width: 0;
}
#sales-detail .card {
  overflow-x: auto;
}
#sales-workspace {
  min-width: 0;
  max-width: 100%;
}

@media print {
  body.sales-printing #sales-detail .card {
    overflow: visible;
  }
  body.sales-printing th,
  body.sales-printing td {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
@page {
  margin: 14mm;
}
@media print {
  html:has(body.sales-printing) {
    background: #fff;
  }
  body.sales-printing {
    background: #fff !important;
  }
}

.operations-enabled nav [data-legacy-nav] {
  display: none !important;
}
.ops-workspace {
  min-width: 0;
  max-width: 100%;
}
.ops-workspace .panel {
  overflow-x: auto;
}
.ops-workspace textarea {
  width: 100%;
  min-height: 90px;
  border: 1px solid #bfd3ce;
  border-radius: 8px;
  padding: 12px;
  font: inherit;
}
.ops-workspace td button {
  margin: 3px;
  padding: 8px 10px;
  font-size: 13px;
}
.ops-workspace [hidden] {
  display: none !important;
}
.ops-workspace .sales-tabs {
  margin-top: 8px;
}

.error-text {
  color: #a62020;
  font-weight: 600;
}
.import-errors tbody tr,
.import-error-row {
  background: #fff0f0;
  color: #a62020;
}
#import-results {
  margin: 20px 0;
}
.bill-section {
  grid-column: 1/-1;
  border: 1px solid #d9e5e1;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.bill-section h3 {
  margin-top: 0;
}

#bill-lines .sales-line {
  align-items: end;
  gap: 10px;
}
#bill-lines .sales-line[data-item="false"] {
  grid-template-columns:
    minmax(150px, 1fr) minmax(180px, 2fr) minmax(100px, 1fr)
    auto;
}
#bill-lines .sales-line[data-item="true"] {
  grid-template-columns:
    minmax(160px, 2fr) minmax(80px, 1fr) minmax(150px, 2fr)
    75px 90px 85px 90px auto;
}
#bill-lines output {
  display: block;
  padding: 12px 0;
  font-weight: 600;
}
#bill-lines .sales-line button {
  padding: 12px 10px;
}
@media (max-width: 1350px) {
  #bill-lines .sales-line[data-item="true"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  #bill-lines .sales-line[data-item] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  #bill-lines .sales-line[data-item] {
    grid-template-columns: minmax(0, 1fr);
  }
}

.field-invalid,
[aria-invalid="true"] {
  border: 2px solid #b42318 !important;
  background: #fff1f0 !important;
}
#bank-workbench .sales-toolbar button {
  margin: 4px;
}
#bank-upload-notice:empty,
#notice:empty {
  display: none;
}
#bank-upload-notice {
  padding: 12px;
  color: #165d39;
  background: #e9f7ee;
  margin: 12px 0;
}
#bank-workbench input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
#action-approvals:has(tbody tr:only-child td[colspan]) {
  margin-bottom: 16px;
}

#ops-banks > .sales-hero {
  display: none;
}
#bank-workbench td button {
  margin: 2px;
}
