:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #233a34;
  background: #f5f6f2;
  font-synthesis: none;
  font-size: 14px;
  --green: #173c34;
  --muted: #718078;
  --line: #e0e6dd;
  --paper: #fff;
  --accent: #d9edb8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
a {
  color: #285f4e;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--green);
  color: #edf4e8;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -1px;
  padding: 0 12px 30px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brandmark {
  background: var(--accent);
  color: var(--green);
  width: 31px;
  height: 35px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 23px;
}
.company {
  padding: 18px 12px;
  border-top: 1px solid #426057;
  border-bottom: 1px solid #426057;
  margin-bottom: 23px;
}
.company strong {
  display: block;
  font-weight: 550;
  font-size: 14px;
}
.company small {
  color: #aebfb1;
  display: block;
  margin-top: 6px;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav a {
  color: #bbcbbd;
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 7px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.nav a:hover {
  background: #24483f;
}
.nav a.active {
  color: var(--green);
  background: var(--accent);
  font-weight: 600;
}
.nav .icon {
  font-size: 18px;
  display: inline-block;
  width: 20px;
}
.sidebar footer {
  margin-top: auto;
  padding: 24px 12px 0;
  font-size: 12px;
  line-height: 1.8;
  color: #aebfb1;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 83px;
  padding: 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fbfcf9;
  gap: 20px;
}
.topbar select {
  background: transparent;
  border: 0;
  font-weight: 550;
  color: var(--green);
  max-width: 220px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #e3e9dd;
  display: grid;
  place-items: center;
  font-weight: 600;
}
.identity small {
  color: var(--muted);
}
main.content {
  max-width: 1440px;
  margin: auto;
  padding: 40px 42px 65px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 650;
  margin-bottom: 10px;
}
h1 {
  font-size: 32px;
  font-weight: 560;
  letter-spacing: -1.2px;
  margin: 0 0 9px;
}
h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0;
}
h3 {
  font-size: 14px;
  margin: 0 0 16px;
}
p.sub {
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green);
  color: white;
  border: 1px solid var(--green);
  border-radius: 6px;
  min-height: 39px;
  padding: 9px 16px;
  text-decoration: none;
  font-weight: 550;
  white-space: nowrap;
}
.btn.secondary {
  background: white;
  color: var(--green);
  border-color: #d5ded2;
}
.btn.small {
  min-height: 31px;
  font-size: 12px;
  padding: 6px 11px;
}
.btn.danger {
  background: #9c4039;
  border-color: #9c4039;
}
.link {
  border: 0;
  background: none;
  padding: 0;
  color: #356650;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin: 24px 0;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 23px;
}
.stat .label {
  color: var(--muted);
  font-size: 12px;
}
.stat .value {
  font-size: 29px;
  letter-spacing: -0.9px;
  font-weight: 550;
  margin: 18px 0 8px;
  font-variant-numeric: tabular-nums;
}
.stat .hint {
  color: var(--muted);
  font-size: 11px;
}
.stat.highlight {
  background: #e9efd9;
  border-color: #dce5c9;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 24px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 24px;
  overflow: hidden;
}
.card-head {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.card-body {
  padding: 24px;
}
.card-head small {
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}
th {
  color: var(--muted);
  background: #fcfcfa;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  font-weight: 550;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 16px 22px;
  border-bottom: 1px solid #eff1eb;
}
tr:last-child td {
  border-bottom: 0;
}
td.desc {
  white-space: normal;
  min-width: 170px;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.badge {
  font-size: 10px;
  font-weight: 600;
  background: #eaf1e3;
  color: #4a6a36;
  padding: 5px 9px;
  border-radius: 4px;
  white-space: nowrap;
}
.badge.amber {
  background: #faf0d8;
  color: #8c6e29;
}
.badge.gray {
  background: #edf0eb;
  color: #72816c;
}
.badge.red {
  background: #fbe9e5;
  color: #9b493f;
}
.empty {
  text-align: center;
  padding: 43px 25px;
  color: var(--muted);
  line-height: 1.8;
}
.empty strong {
  display: block;
  color: #4c6459;
  font-weight: 550;
  margin-bottom: 6px;
}
.task {
  display: flex;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid #eef1e9;
  padding: 17px 0;
}
.task:first-child {
  padding-top: 0;
}
.task:last-child {
  border: 0;
  padding-bottom: 0;
}
.task-icon {
  border: 1px solid #dce4d3;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #658451;
  flex-shrink: 0;
}
.task .text {
  flex: 1;
  min-width: 0;
}
.task strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
}
.task small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 11px;
}
.banner {
  background: #eaf0dd;
  border: 1px solid #dce6cb;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 25px;
  line-height: 1.7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.banner strong {
  display: block;
}
.banner p {
  margin: 3px 0 0;
  color: #637258;
  font-size: 12px;
}
.banner.warning {
  background: #fff5de;
  border-color: #f0dfae;
}
.section-label {
  font-size: 11px;
  letter-spacing: 1.1px;
  color: #7b8879;
  text-transform: uppercase;
  margin: 30px 0 12px;
}
.footer-note {
  color: #8b9686;
  font-size: 11px;
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 550;
  min-width: 0;
}
.field.full {
  grid-column: 1/-1;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd9ca;
  border-radius: 5px;
  background: white;
  color: #263c31;
  min-height: 40px;
}
.field textarea {
  resize: vertical;
  min-height: 77px;
}
.field small {
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
}
.check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
}
.check input {
  width: 16px;
  min-height: 16px;
  margin-top: 3px;
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.lines {
  margin: 24px 0 12px;
  overflow: auto;
}
.lines table th,
.lines table td {
  padding: 8px;
}
.lines input,
.lines select {
  padding: 8px;
  border: 1px solid #d5ddce;
  border-radius: 4px;
  width: 100%;
  min-width: 85px;
}
.lines .account {
  min-width: 230px;
}
.balance {
  display: flex;
  justify-content: flex-end;
  gap: 26px;
  font-size: 12px;
  margin: 20px 0;
  font-variant-numeric: tabular-nums;
}
.balanced {
  color: #477141;
}
.unbalanced {
  color: #a34335;
}
dialog {
  border: 1px solid #d5decd;
  border-radius: 12px;
  padding: 28px;
  max-width: 1100px;
  width: calc(100% - 42px);
  max-height: 90vh;
  color: #263c31;
  box-shadow: 0 30px 90px #122a3233;
}
dialog::backdrop {
  background: #12382a66;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.dialog-head h2 {
  font-size: 23px;
}
.close {
  border: 0;
  background: #f0f3ec;
  border-radius: 50%;
  width: 31px;
  height: 31px;
  font-size: 20px;
  color: #58704d;
}
.error {
  padding: 13px 16px;
  background: #fbece7;
  color: #963f32;
  border-radius: 5px;
  margin: 14px 0;
  font-size: 13px;
}
.error:empty {
  display: none;
}
#notice {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #173c34;
  color: white;
  border-radius: 7px;
  padding: 14px 22px;
  z-index: 10;
  box-shadow: 0 5px 25px #1233;
  max-width: 450px;
}
#notice:empty {
  display: none;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #eef1e7;
}
.login-card {
  background: #fff;
  border: 1px solid #dde4d5;
  border-radius: 14px;
  max-width: 440px;
  padding: 48px;
  margin: 24px;
}
.login-card .brand {
  padding: 0 0 36px;
}
.login-card h1 {
  font-size: 28px;
}
.login-card p {
  line-height: 1.8;
  color: var(--muted);
}
.login-card .btn {
  width: 100%;
  margin-top: 20px;
}
.upload-zone {
  border: 1px dashed #b9cbae;
  border-radius: 7px;
  background: #f9fbf5;
  padding: 30px;
  text-align: center;
  color: #6c7e5f;
}
.upload-zone input {
  max-width: 100%;
  margin-top: 14px;
}
.details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0;
}
.details small {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}
.details strong {
  font-weight: 550;
}
.history {
  font-family: ui-monospace, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.7;
  color: #5d7057;
  max-height: 400px;
  overflow: auto;
}
.pill-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.subnav {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.subnav button {
  border: 0;
  border-radius: 5px;
  padding: 9px 14px;
  background: transparent;
  color: var(--muted);
}
.subnav button.active {
  background: #e6edda;
  color: var(--green);
}
.loading {
  padding: 60px;
  text-align: center;
  color: var(--muted);
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    padding: 28px 12px;
  }
  main.content {
    padding: 30px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .brand {
    font-size: 21px;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 17px;
  }
  .brand {
    padding-bottom: 14px;
  }
  .company,
  .sidebar footer {
    display: none;
  }
  .nav {
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  .nav a {
    font-size: 12px;
    padding: 8px;
    white-space: nowrap;
  }
  .nav .icon {
    display: none;
  }
  .topbar {
    height: 64px;
    padding: 0 18px;
  }
  .identity small {
    display: none;
  }
  main.content {
    padding: 26px 18px;
  }
  .heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  h1 {
    font-size: 27px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat .value {
    font-size: 24px;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .details {
    grid-template-columns: 1fr 1fr;
  }
  .card-head,
  .card-body {
    padding: 18px;
  }
  .banner {
    flex-wrap: wrap;
  }
  .balance {
    flex-wrap: wrap;
    gap: 12px;
  }
  .footer-note {
    display: block;
  }
  dialog {
    padding: 20px;
    width: calc(100% - 20px);
  }
  .heading .btn {
    min-height: 35px;
  }
  .topbar select {
    max-width: 170px;
  }
}
@media print {
  .sidebar,
  .topbar,
  .heading .actions,
  .subnav,
  .btn,
  .footer-note,
  #notice {
    display: none !important;
  }
  .shell {
    display: block;
  }
  .content {
    padding: 0 !important;
  }
  .card {
    break-inside: avoid;
    border: 0;
  }
  .table-wrap {
    overflow: visible;
  }
  td,
  th {
    padding: 8px;
  }
  .stats {
    display: none;
  }
  body {
    background: white;
  }
  dialog[open] {
    position: static;
    max-height: none;
    width: 100%;
    border: 0;
    box-shadow: none;
  }
  .close {
    display: none;
  }
}
