@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");
:root {
  --ink: #21312e;
  --muted: #75817d;
  --paper: #f5f2eb;
  --panel: #fff;
  --forest: #294f49;
  --forest-light: #e5eeeb;
  --line: #e5e3dc;
  --orange: #d7804d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.app-shell {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  background: #203d38;
  color: #fff;
  padding: 34px 22px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand,
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  margin: 0 7px 48px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e8d8b9;
  color: #24453f;
  font: 800 20px Manrope;
}
.brand strong,
.brand small,
.login-brand strong,
.login-brand small {
  display: block;
}
.brand strong,
.login-brand strong {
  font: 700 17px Manrope;
}
.brand small,
.login-brand small {
  font-size: 11px;
  color: #adc0bb;
  margin-top: 2px;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.nav-item {
  border: 0;
  background: transparent;
  color: #c6d3cf;
  padding: 14px 15px;
  border-radius: 12px;
  text-align: left;
  font-weight: 600;
}
.nav-item span {
  display: inline-grid;
  width: 24px;
  font-size: 18px;
}
.nav-item.active {
  color: #24453f;
  background: #f0e5d1;
}
.nav-item:hover {
  color: #fff;
  background: #ffffff14;
}
.nav-item.active:hover {
  color: #24453f;
  background: #f0e5d1;
}
.sidebar-note {
  margin-top: auto;
  padding: 16px 14px;
  background: #ffffff12;
  border-radius: 15px;
  display: flex;
  gap: 10px;
}
.sidebar-note > span {
  color: #dfb55f;
}
.sidebar-note strong,
.sidebar-note small {
  display: block;
}
.sidebar-note strong {
  font-size: 13px;
}
.sidebar-note small {
  color: #9eb1ac;
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.4;
}
.content {
  margin-left: 250px;
  width: calc(100% - 250px);
  padding: 42px 4vw 64px;
  max-width: 1700px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.eyebrow {
  font: 700 10px Manrope;
  letter-spacing: 0.16em;
  color: #89938f;
  margin: 0 0 7px;
}
.topbar h1 {
  font: 800 clamp(29px, 3vw, 42px) Manrope;
  letter-spacing: -0.04em;
  margin: 0;
}
.topbar > div > p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
}
.primary-button {
  border: 0;
  border-radius: 12px;
  padding: 14px 20px;
  background: var(--forest);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 18px #294f4926;
}
.primary-button:hover {
  background: #1e3e39;
  transform: translateY(-1px);
}
.primary-button:disabled {
  opacity: 0.7;
  cursor: wait;
}
.month-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: #ebe7dd;
  width: max-content;
  border-radius: 15px;
  padding: 8px 10px;
  margin-bottom: 26px;
}
.month-switcher button {
  border: 0;
  background: #fff;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 25px;
  color: #40534f;
}
.month-switcher div {
  min-width: 140px;
  text-align: center;
}
.month-switcher small,
.month-switcher strong {
  display: block;
}
.month-switcher small {
  font: 700 8px Manrope;
  letter-spacing: 0.14em;
  color: #8a918d;
}
.month-switcher strong {
  font: 700 14px Manrope;
  text-transform: capitalize;
  margin-top: 2px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}
.summary-card {
  min-height: 142px;
  border-radius: 18px;
  padding: 25px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 4px 18px #28332f09;
}
.summary-icon {
  flex: 0 0 39px;
  height: 39px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
}
.summary-card small {
  display: block;
  font: 700 9px Manrope;
  letter-spacing: 0.12em;
  color: #89938f;
  margin: 2px 0 8px;
}
.summary-card strong {
  display: block;
  font: 800 clamp(20px, 2vw, 28px) Manrope;
  letter-spacing: -0.035em;
}
.summary-card p {
  font-size: 11px;
  color: #909995;
  margin: 7px 0 0;
}
.summary-card.total .summary-icon {
  color: #315d55;
  background: #dceae5;
}
.summary-card.paid .summary-icon {
  color: #3c6a58;
  background: #e2efe5;
}
.summary-card.pending .summary-icon {
  color: #c47b34;
  background: #fbecd8;
}
.summary-card.overdue .summary-icon {
  color: #bd604f;
  background: #f7e1dd;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.65fr);
  gap: 20px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 4px 18px #28332f09;
}
.expenses-panel {
  overflow: hidden;
}
.panel-heading {
  padding: 24px 26px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-heading h2 {
  font: 800 20px Manrope;
  letter-spacing: -0.025em;
  margin: 0;
}
.result-count {
  border-radius: 30px;
  background: #eff3f1;
  color: #65736f;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 11px;
}
.filters {
  padding: 0 26px 20px;
  display: grid;
  grid-template-columns: 1fr 170px 155px;
  gap: 10px;
  border-bottom: 1px solid #eeeae4;
}
.filters input,
.filters select,
.modal input,
.modal select,
.login-card input {
  width: 100%;
  border: 1px solid #deded7;
  background: #fbfaf7;
  border-radius: 10px;
  padding: 12px 13px;
  color: #344440;
  outline: none;
}
.filters input:focus,
.filters select:focus,
.modal input:focus,
.modal select:focus,
.login-card input:focus {
  border-color: #7d9a92;
  box-shadow: 0 0 0 3px #315d5514;
}
.search-box {
  position: relative;
}
.search-box span {
  position: absolute;
  left: 13px;
  top: 10px;
  color: #8a928f;
  font-size: 20px;
}
.search-box input {
  padding-left: 39px;
}
.expense-list {
  padding: 8px 14px 15px;
}
.expense-row {
  display: grid;
  grid-template-columns: 28px 10px minmax(150px, 1fr) 88px 83px 105px 65px;
  gap: 12px;
  align-items: center;
  padding: 15px 12px;
  border-bottom: 1px solid #efede7;
}
.expense-row:last-child {
  border: 0;
}
.expense-row.paid .expense-main strong {
  text-decoration: line-through;
  color: #84908c;
}
.check-button {
  width: 22px;
  height: 22px;
  border: 1.5px solid #b8c1bd;
  border-radius: 6px;
  background: #fff;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.paid .check-button {
  background: #3c6a58;
  border-color: #3c6a58;
}
.category-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.expense-main strong,
.expense-main span,
.expense-date small,
.expense-date span {
  display: block;
}
.expense-main strong {
  font-size: 13px;
}
.expense-main span {
  color: #8b9490;
  font-size: 10px;
  margin-top: 3px;
}
.expense-date small {
  font: 700 7px Manrope;
  letter-spacing: 0.1em;
  color: #a0a6a3;
}
.expense-date span {
  font-size: 11px;
  margin-top: 3px;
  text-transform: capitalize;
}
.expense-amount {
  font: 700 13px Manrope;
  text-align: right;
}
.status {
  display: inline-block;
  border-radius: 20px;
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 700;
  background: #f6e7cc;
  color: #a46a2f;
}
.status.paid {
  background: #e0ede4;
  color: #3b6b55;
}
.status.overdue-tag {
  background: #f5dfda;
  color: #b25444;
}
.row-actions {
  display: flex;
  gap: 4px;
}
.row-actions button {
  border: 0;
  background: transparent;
  color: #8b9591;
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
.row-actions button:hover {
  background: #f0eee9;
  color: #304c46;
}
.empty-state {
  min-height: 180px;
  display: grid;
  place-content: center;
  text-align: center;
  color: #8a9490;
  gap: 5px;
}
.empty-state strong {
  color: #53635f;
}
.right-column {
  display: grid;
  align-content: start;
  gap: 20px;
}
.distribution-panel {
  padding-bottom: 25px;
}
.distribution-total {
  margin: 0 26px 22px;
  padding: 16px 18px;
  border-radius: 13px;
  background: #f4f1e9;
}
.distribution-total small,
.distribution-total strong {
  display: block;
}
.distribution-total small {
  font: 700 8px Manrope;
  letter-spacing: 0.12em;
  color: #8b938f;
}
.distribution-total strong {
  font: 800 23px Manrope;
  margin-top: 4px;
}
.bar-chart {
  display: grid;
  gap: 15px;
  padding: 0 26px;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 7px;
}
.bar-label span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.bar-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.bar-label strong {
  font: 700 10px Manrope;
}
.bar-track {
  height: 6px;
  background: #eeeee9;
  border-radius: 20px;
  overflow: hidden;
}
.bar-track span {
  height: 100%;
  display: block;
  border-radius: 20px;
}
.tip-card {
  border-radius: 19px;
  background: #294f49;
  color: #fff;
  padding: 22px;
  display: flex;
  gap: 14px;
}
.tip-icon {
  flex: 0 0 38px;
  height: 38px;
  background: #e8d8b9;
  color: #294f49;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 20px;
}
.tip-card small,
.tip-card strong {
  display: block;
}
.tip-card small {
  font: 700 8px Manrope;
  letter-spacing: 0.12em;
  color: #adc0bb;
}
.tip-card strong {
  font: 700 14px Manrope;
  margin-top: 5px;
}
.tip-card p {
  color: #b9c8c4;
  font-size: 11px;
  line-height: 1.5;
  margin: 6px 0 0;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #1926238c;
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-backdrop[hidden] {
  display: none;
}
.modal {
  position: relative;
  width: min(560px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 24px 80px #0a191547;
}
.modal h2 {
  font: 800 25px Manrope;
  margin: 0 0 5px;
}
.modal > p:not(.eyebrow) {
  color: #7a8581;
  margin: 0 0 25px;
}
.modal-close {
  position: absolute;
  right: 18px;
  top: 16px;
  border: 0;
  background: #f1f0eb;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 20px;
  color: #65716d;
}
.modal form {
  display: grid;
  gap: 17px;
}
.modal label,
.login-card label {
  display: grid;
  gap: 7px;
  color: #52605d;
  font-size: 11px;
  font-weight: 700;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.toggle-row {
  grid-template-columns: 20px 1fr !important;
  align-items: center;
  padding: 14px;
  background: #f4f2ec;
  border-radius: 12px;
}
.toggle-row input {
  width: 17px;
}
.toggle-row strong,
.toggle-row small {
  display: block;
}
.toggle-row small {
  font-weight: 400;
  color: #84908c;
  margin-top: 2px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 5px;
}
.secondary-button {
  border: 1px solid #d8d9d4;
  background: #fff;
  color: #55625e;
  border-radius: 12px;
  padding: 13px 18px;
  font-weight: 700;
}
.form-error {
  margin: 0;
  color: #ab493b;
  font-size: 12px;
  font-weight: 600;
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #213d38, #f5f2eb);
}
.login-card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 24px;
  padding: 42px;
  box-shadow: 0 24px 80px #10292347;
}
.login-brand {
  margin-bottom: 42px;
}
.login-brand small {
  color: #75817d;
}
.login-card h1 {
  font: 800 30px Manrope;
  letter-spacing: -0.04em;
  margin: 0;
}
.login-copy {
  color: #75817d;
  margin: 8px 0 28px;
}
.login-card form {
  display: grid;
  gap: 18px;
}
.login-card .primary-button {
  margin-top: 4px;
}
@media (max-width: 1100px) {
  .sidebar {
    width: 82px;
    padding: 28px 14px;
  }
  .brand {
    margin-left: 7px;
  }
  .brand div,
  .nav-item:not(.active),
  .nav-item.active {
    font-size: 0;
  }
  .nav-item span {
    font-size: 20px;
    width: auto;
    text-align: center;
  }
  .sidebar-note {
    display: none;
  }
  .content {
    margin-left: 82px;
    width: calc(100% - 82px);
  }
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .right-column {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    height: 70px;
    padding: 9px 16px;
    flex-direction: row;
    align-items: center;
    z-index: 20;
  }
  .brand {
    margin: 0 16px 0 0;
  }
  .brand-mark {
    width: 38px;
    height: 38px;
  }
  .sidebar nav {
    display: flex;
    flex: 1;
    justify-content: space-around;
  }
  .nav-item,
  .nav-item.active {
    padding: 10px 14px;
    font-size: 0;
  }
  .content {
    margin: 0;
    width: 100%;
    padding: 25px 16px 100px;
  }
  .topbar {
    align-items: flex-start;
  }
  .topbar > div > p:last-child {
    font-size: 13px;
  }
  .primary-button {
    padding: 12px 14px;
  }
  .topbar > .primary-button {
    font-size: 0;
  }
  .topbar > .primary-button span {
    font-size: 20px;
  }
  .month-switcher {
    width: 100%;
    justify-content: space-between;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .summary-card {
    min-height: 128px;
    padding: 18px 14px;
    gap: 10px;
    flex-direction: column;
  }
  .summary-icon {
    width: 32px;
    flex-basis: 32px;
    height: 32px;
  }
  .summary-card strong {
    font-size: 19px;
  }
  .filters {
    grid-template-columns: 1fr;
    padding: 0 18px 18px;
  }
  .panel-heading {
    padding: 21px 18px 16px;
  }
  .expense-row {
    grid-template-columns: 28px 8px 1fr auto;
    gap: 9px;
    padding: 15px 7px;
  }
  .expense-date,
  .expense-status {
    display: none;
  }
  .expense-amount {
    grid-column: 3;
    text-align: left;
  }
  .row-actions {
    grid-row: 1/3;
    grid-column: 4;
  }
  .right-column {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .modal {
    padding: 27px 21px;
    max-height: 92vh;
    overflow: auto;
  }
  .login-card {
    padding: 32px 24px;
  }
}
