:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #19352c;
  background: #f4f6f3;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 7px;
  padding: 11px 17px;
  background: #193c30;
  color: #fff;
  font-weight: 600;
}
button:hover {
  filter: brightness(1.12);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: #e6ede7;
  color: #19352c;
}
.layout {
  display: grid;
  grid-template-columns: 235px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #12372b;
  color: #c6d5cd;
  padding: 32px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.brand {
  font-size: 25px;
  color: #fff;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 34px;
}
.brand span {
  color: #b7e492;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #80958a;
  margin: 0 0 14px;
}
.sidebar button {
  background: transparent;
  color: #bdd0c4;
  text-align: left;
  font-weight: 500;
  margin: 2px 0;
}
.sidebar button.active {
  background: #285140;
  color: #dcf5bd;
}
.sidebar .foot {
  margin-top: auto;
  border-top: 1px solid #345448;
  padding-top: 20px;
  font-size: 12px;
  line-height: 1.7;
}
.main {
  padding: 28px 44px;
  max-width: 1600px;
  width: 100%;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #dce3dc;
  padding-bottom: 22px;
  margin-bottom: 35px;
  gap: 20px;
}
.topbar select {
  max-width: 260px;
  background: transparent;
  border: 0;
  font-weight: 600;
}
.account {
  font-size: 12px;
  color: #64786c;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin: 0 0 9px;
  font-weight: 650;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.3px;
  margin: 0 0 20px;
}
p {
  color: #6c7c71;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}
.card,
.panel {
  background: #fff;
  border: 1px solid #e0e6de;
  border-radius: 12px;
  padding: 24px;
}
.card small {
  color: #6d7d72;
  font-size: 12px;
}
.card strong {
  display: block;
  font-size: 28px;
  letter-spacing: -1px;
  margin: 17px 0 8px;
}
.card.accent {
  background: #deefcc;
  border-color: #d0e4bc;
}
.card p {
  font-size: 11px;
}
.split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
}
.panel {
  margin-bottom: 22px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.panel-head h2 {
  margin: 0;
}
.panel-head button {
  font-size: 12px;
  padding: 8px 12px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  text-align: left;
  color: #879287;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e6ebe4;
  padding: 13px 10px;
}
td {
  padding: 17px 10px;
  border-bottom: 1px solid #edf0eb;
}
td:last-child,
th:last-child {
  text-align: right;
}
.badge {
  border-radius: 5px;
  padding: 5px 8px;
  background: #edf4e9;
  color: #46743e;
  font-size: 11px;
}
.empty {
  text-align: center;
  padding: 45px 16px;
  color: #829080;
  font-size: 14px;
}
.empty strong {
  display: block;
  color: #38513e;
  margin-bottom: 8px;
  font-size: 17px;
}
.notice {
  padding: 16px;
  background: #f5f7ef;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.7;
  color: #697357;
  margin-bottom: 20px;
}
.steps {
  display: grid;
  gap: 22px;
}
.step {
  display: flex;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.step i {
  font-style: normal;
  background: #e8efe1;
  color: #406535;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.step small {
  display: block;
  color: #86907e;
  margin-top: 4px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
label {
  font-size: 12px;
  color: #566c5d;
  display: grid;
  gap: 8px;
}
input,
select,
textarea {
  border: 1px solid #d6dfd3;
  border-radius: 6px;
  padding: 11px;
  background: #fff;
  color: #213e2d;
  width: 100%;
  outline-offset: 3px;
}
textarea {
  min-height: 80px;
}
.wide {
  grid-column: 1/-1;
}
.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
.auth {
  max-width: 440px;
  margin: 9vh auto;
  padding: 38px;
}
.auth .brand {
  color: #12372b;
  margin-bottom: 28px;
}
.auth form {
  display: grid;
  gap: 20px;
  margin-top: 25px;
}
.auth button {
  width: 100%;
}
.auth .switch {
  background: transparent;
  color: #436f3e;
  margin-top: 10px;
}
.line {
  display: grid;
  grid-template-columns: 1fr 140px 45px;
  gap: 12px;
  margin-top: 12px;
}
.line button {
  padding: 5px;
  background: #f2e9e3;
  color: #9a5640;
}
.table-wrap {
  overflow-x: auto;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  max-width: 420px;
  background: #193c30;
  color: white;
  border-radius: 8px;
  padding: 15px 22px;
  box-shadow: 0 6px 25px #0002;
  display: none;
  z-index: 100;
}
.report-total {
  font-size: 22px;
  font-weight: 650;
}
.invoice-sheet {
  max-width: 850px;
  margin: auto;
  background: white;
  padding: 45px;
}
.invoice-sheet header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #193c30;
  padding-bottom: 25px;
}
.invoice-sheet section {
  margin: 25px 0;
}
.invoice-sheet .totals {
  margin-left: auto;
  width: 300px;
}
.totals div {
  display: flex;
  justify-content: space-between;
  padding: 9px;
}
.totals div:last-child {
  border-top: 1px solid #ccd6c8;
  font-weight: 700;
}
.muted {
  font-size: 12px;
  color: #7c8d7d;
}
.error {
  background: #fff0e9;
  padding: 12px;
  color: #98502d;
  border-radius: 5px;
  font-size: 13px;
}
.footer-note {
  font-size: 11px;
  color: #869382;
  margin-top: 25px;
}
.welcome {
  margin-top: 12px;
  color: #697a69;
  font-size: 12px;
}
@media (max-width: 1000px) {
  .main {
    padding: 25px;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .layout {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    padding: 25px 14px;
  }
}
@media (max-width: 650px) {
  .layout {
    display: block;
  }
  .sidebar {
    padding: 17px;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    align-items: center;
    gap: 5px;
  }
  .sidebar .brand {
    font-size: 19px;
    margin: 0 15px 0 0;
  }
  .sidebar .eyebrow,
  .sidebar .foot {
    display: none;
  }
  .sidebar button {
    font-size: 12px;
    white-space: nowrap;
    padding: 10px;
  }
  .main {
    padding: 22px 16px;
  }
  .cards {
    gap: 10px;
  }
  .card {
    padding: 17px;
  }
  .card strong {
    font-size: 22px;
  }
  .heading {
    align-items: flex-start;
  }
  h1 {
    font-size: 27px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .account {
    display: none;
  }
  .panel {
    padding: 17px;
  }
  .line {
    grid-template-columns: 1fr 85px 35px;
  }
  .auth {
    margin: 5vh 15px;
  }
}
@media print {
  body {
    background: white;
  }
  .layout,
  .actions,
  #toast {
    display: none !important;
  }
  .invoice-sheet {
    padding: 0;
    width: 100%;
    max-width: none;
  }
  table {
    font-size: 12px;
  }
  @page {
    size: A4;
    margin: 18mm;
  }
}
.period-field {
  max-width: 230px;
  margin-bottom: 22px;
}
.export-settings {
  margin: 24px 0;
}
.review-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.7;
  margin-top: 24px;
}
.review-check input {
  width: auto;
  margin-top: 5px;
  flex-shrink: 0;
}
.print-actions {
  max-width: 850px;
  margin: 20px auto;
}
.invoice-brand {
  color: #12372b;
  margin-bottom: 12px;
}
.main, .panel, .card, .split > *, .form-grid > *, .topbar > *, .line > * { min-width: 0; }
.card strong, .invoice-sheet p, .notice, td { overflow-wrap: anywhere; }
.heading .actions { margin-top: 0; flex-wrap: wrap; }
button, input, select { min-height: 44px; }
button:focus-visible, a:focus-visible { outline: 3px solid #7ba95b; outline-offset: 3px; }
@media screen and (max-width: 650px) {
  .sidebar { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); overflow: visible; padding: 14px; gap: 6px; }
  .sidebar .brand { grid-column: 1/-1; margin: 0 0 8px; font-size: 23px; }
  .sidebar button { white-space: normal; margin: 0; text-align: center; font-size: 12px; padding: 10px 4px; }
  .main { padding: 18px 12px; }
  .topbar { gap: 8px; margin-bottom: 22px; }
  .topbar > div:first-child { flex: 1 1 100%; }
  .topbar select { max-width: 100%; width: 100%; border: 1px solid #d6dfd3; }
  .topbar button { flex: 1; }
  .heading { flex-direction: column; align-items: stretch; gap: 12px; }
  .heading > button, .heading .actions button { flex: 1 1 130px; }
  .actions { flex-wrap: wrap; justify-content: stretch; }
  .actions button { flex: 1 1 120px; }
  .form-grid input, .form-grid select, .form-grid textarea, .auth input { font-size: 16px; }
  .line { grid-template-columns: minmax(0,1fr) 44px; }
  .line select { grid-column: 1/-1; font-size: 16px; }
  .line input { font-size: 16px; }
  .auth { padding: 24px 18px; }
  .auth .brand { font-size: 28px; }
  .layout .table-wrap { overflow: visible; }
  .layout table, .layout tbody, .layout tr, .layout td { display: block; width: 100%; }
  .layout thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .layout tr { border: 1px solid #dce3dc; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
  .layout td { display: grid; grid-template-columns: minmax(85px,35%) minmax(0,1fr); gap: 10px; padding: 9px 0; text-align: left; }
  .layout td::before { content: attr(data-label); color: #64786c; font-size: 12px; }
  .layout td:last-child { border: 0; text-align: left; }
  .layout td button { width: 100%; }
  .report-total { font-size: 19px; }
  .invoice-sheet { padding: 20px 14px; }
  .invoice-sheet header { flex-direction: column; gap: 18px; }
  .invoice-sheet .totals { width: 100%; }
  .print-actions { margin: 12px; }
  #toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
@media screen and (max-width: 420px) {
  .cards { grid-template-columns: minmax(0,1fr); }
  .card strong { margin: 10px 0; }
}
