:root {
  --ink: #17212b;
  --muted: #718091;
  --line: #e6ebef;
  --paper: #fff;
  --ground: #f6f8fa;
  --accent: #126b5e;
  --accent-soft: #e1f3ee;
  --danger: #b34949;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font:
    14px Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
aside {
  position: fixed;
  width: 250px;
  inset: 0 auto 0 0;
  background: #102925;
  color: #e4f4ef;
  padding: 28px 16px;
}
.brand {
  display: block;
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  text-decoration: none;
  margin: 3px 12px 32px;
}
.brand span {
  color: #6ee0bc;
}
nav a {
  display: block;
  color: #bad0ca;
  text-decoration: none;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 3px 0;
  font-size: 13px;
}
nav a:hover,
nav a.active {
  background: #1c4a43;
  color: #fff;
}
main {
  margin-left: 250px;
  padding: 42px;
  max-width: 1600px;
}
header {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}
h1 {
  font-size: 30px;
  margin: 0;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 16px;
  margin: 0 0 17px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin: 0 0 6px;
}
.panel,
.metric {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 2px 5px #15202208;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.metrics,
.grid-two,
.grid-three {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}
.metrics {
  grid-template-columns: repeat(3, 1fr);
}
.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.metric span {
  display: block;
  color: var(--muted);
  margin-bottom: 9px;
}
.metric b {
  font-size: 23px;
}
form {
  margin: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.stack {
  display: grid;
  gap: 10px;
}
.inline {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pay-form {
  display: grid;
  grid-template-columns: 110px 110px 90px 120px 55px;
  gap: 5px;
}
input,
select,
button {
  font: inherit;
  border-radius: 7px;
  border: 1px solid #d6dfe5;
  background: #fff;
  min-height: 37px;
  padding: 8px 10px;
  width: 100%;
  color: var(--ink);
}
label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}
label input {
  color: var(--ink);
  font-size: 14px;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  border: 0;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  padding: 9px 13px;
}
button:hover,
.button:hover {
  background: #0e594e;
}
.hint,
.muted {
  color: var(--muted);
  font-size: 12px;
}
.formula {
  background: var(--accent-soft);
  color: #155649;
  padding: 10px;
  border-radius: 7px;
  font-weight: 600;
}
.list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border-bottom: 0;
}
.list-row span {
  display: grid;
  gap: 3px;
}
.list-row small,
td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  margin-top: 3px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--muted);
  font-weight: 700;
  padding: 0 8px 10px;
}
td {
  border-top: 1px solid var(--line);
  padding: 11px 8px;
  vertical-align: top;
}
td input,
td select {
  min-width: 70px;
  min-height: 32px;
  padding: 5px;
  font-size: 12px;
}
.badge {
  font-style: normal;
  padding: 3px 7px;
  border-radius: 99px;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
  background: #edf1f3;
  color: #60707c;
}
.badge.paid {
  background: #dff3e9;
  color: #16734d;
}
.badge.overdue {
  background: #fce6e5;
  color: #a23939;
}
.badge.partial {
  background: #fff1cc;
  color: #896609;
}
.spaced {
  margin-top: 14px;
  width: auto;
}
.edit-form {
  display: grid;
  gap: 5px;
  min-width: 160px;
  padding: 8px;
  margin-top: 6px;
  background: #f5f8f8;
  border-radius: 7px;
}
.edit-form input,
.edit-form select {
  min-height: 29px;
  font-size: 12px;
}
summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}
@media (max-width: 1050px) {
  aside {
    position: static;
    width: auto;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
  }
  nav a {
    padding: 7px 9px;
  }
  .brand {
    margin-bottom: 10px;
  }
  main {
    margin: 0;
    padding: 20px;
  }
  .grid-three,
  .metrics,
  .grid-two {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .pay-form {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 650px) {
  main {
    padding: 14px;
  }
  header {
    align-items: flex-start;
    flex-direction: column;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 14px;
    overflow: auto;
  }
  .pay-form {
    min-width: 470px;
  }
  .inline {
    flex-wrap: wrap;
  }
  table {
    min-width: 650px;
  }
}
:root {
  --ground: #f4f7f8;
  --ink: #16221f;
  --accent: #157663;
  --line: #e7ecea;
}
aside {
  background: #102823;
  padding: 24px 14px;
}
.brand i {
  color: #6ee0bc;
  font-style: normal;
}
.logout {
  position: absolute;
  bottom: 20px;
  left: 14px;
  width: 222px;
  background: transparent;
  border: 1px solid #326057;
  color: #b9d0ca;
}
main {
  max-width: none;
  padding: 36px 42px;
}
header span {
  display: block;
  color: #71827c;
  font-size: 11px;
  letter-spacing: 1.1px;
  font-weight: 800;
  margin-bottom: 5px;
}
.head-actions {
  display: flex;
  gap: 8px;
}
.primary {
  width: auto;
  background: #157663;
}
.secondary,
.link {
  width: auto;
  background: #fff;
  color: #24685b;
  border: 1px solid #cfe0db;
}
.grid {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  box-shadow: 0 2px 8px #10282008;
}
.grid table {
  min-width: 700px;
}
.grid th {
  background: #f8faf9;
  padding: 13px 16px;
}
.grid td {
  padding: 13px 16px;
}
.metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.metrics > div,
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.metrics small,
.card small {
  display: block;
  color: #76847f;
}
.metrics b {
  font-size: 25px;
  display: block;
  margin-top: 8px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.cards.small {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}
.card h2 {
  margin: 0 0 12px;
  font-size: 14px;
}
.card p {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 10px 0;
  margin: 0;
}
.card p span {
  display: grid;
  gap: 3px;
}
.empty {
  color: #91a09b;
}
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.form button {
  grid-column: 1/-1;
}
dialog {
  border: 0;
  border-radius: 14px;
  width: min(570px, calc(100vw - 30px));
  padding: 22px;
  box-shadow: 0 20px 65px #10282044;
}
dialog::backdrop {
  background: #10282088;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-head h2 {
  margin: 0;
}
.icon {
  width: 32px;
  min-height: 32px;
  padding: 0;
  background: #edf3f1;
  color: #36534b;
  font-size: 22px;
}
.inline-form {
  display: inline-block;
  margin-left: 8px;
}
.status {
  font-size: 10px;
  text-transform: uppercase;
  font-style: normal;
  font-weight: 800;
  padding: 4px 7px;
  border-radius: 10px;
  background: #edf1ef;
  color: #60736c;
}
.status.paid {
  background: #dff3e9;
  color: #16734d;
}
.status.overdue {
  background: #fce6e5;
  color: #a23939;
}
.login {
  background: linear-gradient(135deg, #102823, #1d5148);
}
.login main {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login section {
  width: min(410px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 42px;
}
.login i {
  font-style: normal;
  color: #157663;
  font-size: 21px;
  font-weight: 800;
}
.login h1 {
  margin: 14px 0 5px;
}
.login p {
  color: #71817c;
  margin: 0 0 24px;
}
.login form {
  display: grid;
  gap: 10px;
}
.error {
  color: #b33b3b;
}
.field {
  display: grid;
  gap: 5px;
  color: #60736c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15px;
}
.field input,
.field select {
  width: 100%;
}
@media (max-width: 900px) {
  aside {
    position: static;
    width: auto;
  }
  .logout {
    position: static;
    margin-top: 12px;
    width: auto;
  }
  main {
    margin: 0;
    padding: 22px;
  }
  .cards,
  .metrics,
  .cards.small {
    grid-template-columns: 1fr;
  }
}
