@font-face {
  font-family: Vazir;
  src: url("/fonts/Vazir.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: Vazir;
  src: url("/fonts/Vazir-Bold.woff2") format("woff2");
  font-display: swap;
  font-weight: 600 900;
}
@font-face {
  font-family: Yekan;
  src: url("/fonts/Yekan.woff2") format("woff2");
  font-display: swap;
}
:root {
  --bg: #f7f8f4;
  --paper: #fff;
  --ink: #1f332e;
  --muted: #818b84;
  --green: #183e34;
  --lime: #d8edb6;
  --line: #e8ece5;
  --red: #ba645b;
  --font: Vazir;
  --radius: 20px;
}
.entry-strip {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin: -8px 0 25px;
  padding: 10px 15px;
  border: 1px solid #dce6cf;
  border-radius: 10px;
  background: #edf3e5;
  font-size: 11px;
  color: #6e815e;
}
.entry-strip strong {
  color: #35553b;
}
.entry-strip button:last-child {
  margin-right: auto;
}
.report-controls {
  margin-bottom: 20px;
}
.report-tabs {
  width: fit-content;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.report-tabs button {
  font-size: 12px;
  padding: 8px 16px;
}
.report-selectors {
  display: flex;
  align-items: flex-end;
  gap: 15px;
  flex-wrap: wrap;
}
.report-selectors .field {
  min-width: 150px;
  flex: 1;
  margin: 0;
}
.report-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.report-category {
  padding: 17px;
  background: #f8faf4;
  border: 1px solid #e6ecdc;
  border-radius: 13px;
  text-align: right;
  transition: border-color 0.2s;
}
.report-category:hover {
  border-color: #9bb78c;
}
.report-category > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}
.report-category strong {
  font-size: 13px;
}
.report-category p {
  font-size: 21px;
  font-weight: 700;
  margin: 10px 0;
}
.report-category p small {
  font-size: 10px;
  font-weight: 400;
  color: #91a17f;
}
.report-category > small {
  font-size: 9px;
  color: #8a987c;
}
.category-track {
  height: 5px;
  background: #e4eadb;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.category-track i {
  display: block;
  height: 100%;
  background: #6f9360;
  border-radius: 10px;
}
.coverage-table {
  min-width: 510px;
}
.coverage-table td {
  line-height: 2.2;
}
.coverage-table .btn {
  font-size: 10px;
  min-height: 32px;
  padding: 5px 10px;
}
.month-checkboxes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 20px 0;
}
.month-checkboxes label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}
.analysis-panel .panel-head {
  flex-wrap: wrap;
}
.analysis-summary {
  font-size: 13px;
  line-height: 2.3;
  white-space: pre-line;
  margin-bottom: 20px;
}
.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 15px 0 20px;
}
.insight-grid article {
  border: 1px solid #e2e8d9;
  background: #f8faf5;
  border-radius: 12px;
  padding: 16px;
}
.insight-grid article strong {
  font-size: 12px;
}
.insight-grid article p {
  font-size: 11px;
  line-height: 2.2;
  color: #849077;
  margin-top: 6px;
  white-space: pre-line;
}
.device-code {
  font-size: 26px;
  letter-spacing: 4px;
  text-align: center;
  margin: 20px 0;
  padding: 18px;
}
.report-stats .stat-value {
  font-size: 26px;
}
.archive-card .actions {
  flex-wrap: wrap;
}
.archive-card .actions button {
  font-size: 10px;
}
.report-controls .field select {
  min-height: 44px;
}
@media (max-width: 760px) {
  .entry-strip {
    gap: 9px;
    margin-top: -8px;
    margin-bottom: 20px;
    font-size: 10px;
    padding: 10px;
  }
  .entry-strip .subtle-link {
    font-size: 10px;
  }
  .report-category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .report-category {
    padding: 12px;
  }
  .report-category p {
    font-size: 17px;
  }
  .report-category strong {
    font-size: 11px;
  }
  .report-category .tag {
    font-size: 8px;
    padding: 1px 4px;
  }
  .report-category > small {
    font-size: 8px;
  }
  .report-stats .stat-value {
    font-size: 19px;
  }
  .report-stats .stat.dark {
    grid-column: 1/-1;
    grid-row: 2;
  }
  .month-checkboxes {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .report-tabs {
    display: flex;
    width: 100%;
    gap: 4px;
  }
  .report-tabs button {
    font-size: 10px;
    padding: 6px 9px;
  }
  .report-selectors {
    gap: 10px;
  }
  .report-selectors .field {
    min-width: 100px;
  }
  .insight-grid {
    grid-template-columns: 1fr;
  }
  .analysis-panel .btn {
    font-size: 11px;
  }
  .nav button {
    padding-right: 5px;
    padding-left: 5px;
    min-width: 45px;
  }
  .coverage-table {
    min-width: 480px;
  }
  .entry-strip button:last-child {
    margin-right: 0;
  }
  .report-selectors input,
  .report-selectors select {
    font-size: 16px;
  }
  .analysis-summary {
    font-size: 12px;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.85 var(--font),
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  border: 0;
  background: none;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #8bb68d;
  outline-offset: 3px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #88ad88;
  outline-offset: 1px;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  letter-spacing: -1px;
  font-weight: 700;
}
h2 {
  font-size: 17px;
  font-weight: 700;
}
h3 {
  font-size: 15px;
}
small,
.small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.boot {
  display: grid;
  place-content: center;
  height: 100vh;
  text-align: center;
  font-size: 45px;
  font-weight: 700;
}
.boot span {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}
.layout {
  max-width: 1700px;
  margin: auto;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #eff2eb;
  border-left: 1px solid var(--line);
  padding: 30px 22px;
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 12px 34px;
}
.brand img {
  width: 43px;
  height: 43px;
  border-radius: 14px;
}
.brand strong {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -1.5px;
}
.brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1px;
  color: #919b91;
  padding: 0 14px 9px;
}
.nav {
  display: grid;
  gap: 8px;
}
.nav button {
  display: flex;
  gap: 13px;
  align-items: center;
  text-align: right;
  padding: 12px 15px;
  border-radius: 12px;
  color: #6c786e;
  font-size: 13px;
}
.nav button.active {
  background: var(--green);
  color: #f5f8f0;
  box-shadow: 0 5px 10px #183e3410;
}
.nav button:hover:not(.active) {
  background: #e4eadd;
}
.nav .badge {
  margin-right: auto;
  background: #f1f2e7;
  border-radius: 5px;
  font-size: 9px;
  padding: 0 5px;
}
.sidebar-bottom {
  margin-top: auto;
}
.connection {
  background: #e4ebde;
  padding: 15px;
  border-radius: 14px;
  margin: 22px 0 18px;
}
.connection .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #71996b;
  border-radius: 50%;
  margin-left: 5px;
}
.connection p {
  font-size: 11px;
  color: #64735d;
  margin-top: 7px;
  line-height: 1.9;
}
.connection button {
  font-size: 11px;
  color: #466139;
  padding: 7px 0 0;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 5px;
  border-top: 1px solid #dfe5d9;
  font-size: 12px;
}
.avatar {
  border: 1px solid #d2dcc8;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  background: #e4eada;
}
.profile small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.main {
  min-width: 0;
  padding: 0 40px 40px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 31px;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #78877a;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.today {
  font-size: 11px;
  color: #7b867b;
}
.local-tag {
  font-size: 10px;
  color: #718565;
  border: 1px solid #dfe6d7;
  padding: 4px 9px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.topbar .icon {
  width: 15px;
  height: 15px;
}
.greeting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}
.greeting p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--green);
  color: white;
  font-size: 12px;
  white-space: nowrap;
  min-height: 42px;
  font-weight: 600;
}
.btn .icon {
  width: 17px;
  height: 17px;
}
.btn.secondary {
  background: white;
  border: 1px solid #e0e6dc;
  color: var(--ink);
}
.btn.soft {
  background: #edf2e5;
  color: #42613e;
}
.btn.danger {
  background: #f8e9e5;
  color: #a05048;
}
.btn:hover {
  filter: brightness(0.96);
}
.period-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.period-bar label {
  color: var(--muted);
  font-size: 11px;
  margin-left: 5px;
}
.period-bar select {
  border: 1px solid #e0e6dc;
  background: #fff;
  padding: 7px 12px;
  border-radius: 9px;
  min-width: 115px;
  font-size: 12px;
}
.period-bar .unit {
  margin-right: auto;
  font-size: 10px;
  color: #8a958b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stats {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}
.stat {
  padding: 23px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  position: relative;
  overflow: hidden;
  min-height: 163px;
}
.stat.dark {
  background: var(--green);
  color: white;
  border: 0;
}
.stat.dark:after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border: 1px solid #ffffff0e;
  border-radius: 50%;
  left: -35px;
  top: 8px;
  box-shadow:
    0 0 0 18px #ffffff06,
    0 0 0 39px #ffffff04;
}
.stat-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #7b887b;
}
.stat-heading .circle {
  background: #f3f5ef;
  color: #778f6c;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
}
.stat.dark .stat-heading {
  color: #d2dece;
}
.stat.dark .circle {
  background: #ffffff12;
  color: #d0e8b6;
}
.stat-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 15px;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}
.stat-value small {
  font-size: 11px;
  font-weight: 400;
  margin-right: 7px;
  color: #9aaa98;
}
.stat.dark .stat-value small {
  color: #b9c9b0;
}
.stat-foot {
  font-size: 10px;
  color: #889583;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat.dark .stat-foot {
  color: #c6dcb2;
}
.stat-foot span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.two-col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}
.panel-head p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.panel-head h2 {
  font-size: 15px;
}
.subtle-link {
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #7c8b73;
  white-space: nowrap;
}
.subtle-link .icon {
  width: 14px;
}
.legend {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: #7f897e;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #355e49;
}
.chart {
  height: 205px;
  display: flex;
  gap: 13px;
  align-items: stretch;
  position: relative;
  padding-top: 8px;
}
.chart-grid {
  position: absolute;
  inset: 8px 0 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.chart-grid div {
  border-top: 1px dashed #edf0e8;
  font-size: 8px;
  color: #acb3a8;
  line-height: 1;
}
.chart-columns {
  position: relative;
  display: flex;
  flex: 1;
  justify-content: space-around;
  gap: 12px;
  direction: ltr;
  padding: 0 10px;
}
.chart-col {
  display: flex;
  flex: 1;
  max-width: 70px;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}
.bars {
  height: 165px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  justify-content: center;
  width: 100%;
}
.bar {
  width: 19px;
  border-radius: 5px 5px 2px 2px;
  background: #315b47;
  min-height: 2px;
  transition: height 0.4s ease;
  position: relative;
}
.bar.income {
  background: #d6e6b9;
}
.bar.current {
  background: #8eaf78;
}
.chart-col label {
  font-size: 9px;
  color: #87917e;
  white-space: nowrap;
}
.donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 23px;
  min-height: 202px;
}
.donut {
  width: 155px;
  height: 155px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.donut:before {
  content: "";
  position: absolute;
  inset: 20px;
  background: white;
  border-radius: 50%;
}
.donut-center {
  position: relative;
  text-align: center;
}
.donut-center strong {
  display: block;
  font-size: 22px;
}
.donut-center small {
  font-size: 9px;
  color: var(--muted);
}
.category-legend {
  display: grid;
  gap: 13px;
  font-size: 10px;
  min-width: 110px;
}
.category-legend div {
  display: flex;
  align-items: center;
  gap: 6px;
}
.category-legend b {
  margin-right: auto;
  font-size: 10px;
  color: #7f8c79;
  font-weight: 400;
}
.import-callout {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #eef2e5;
  border: 1px dashed #ccd8bc;
  border-radius: 15px;
  padding: 16px 20px;
  margin-bottom: 22px;
}
.import-illustration {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e1e9d2;
  color: #6a8656;
  transform: rotate(-5deg);
}
.import-illustration .icon {
  width: 24px;
  height: 24px;
}
.import-callout h3 {
  font-size: 13px;
}
.import-callout p {
  font-size: 10px;
  color: #849075;
  margin-top: 2px;
}
.import-callout button {
  margin-right: auto;
  font-size: 11px;
}
.table-panel {
  padding-bottom: 10px;
}
.table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
}
.table-head h2 {
  font-size: 15px;
}
.table-head h2 small {
  font-size: 10px;
  color: #89927f;
  font-weight: 400;
  margin-right: 7px;
}
.tabs {
  display: flex;
  background: #f3f5ee;
  padding: 3px;
  border-radius: 8px;
  gap: 3px;
}
.tabs button {
  font-size: 10px;
  color: #82907b;
  border-radius: 6px;
  padding: 5px 12px;
}
.tabs button.active {
  background: white;
  color: #355841;
  box-shadow: 0 1px 4px #00000008;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: right;
}
th {
  color: #9aa28f;
  font-size: 10px;
  font-weight: 400;
  border-bottom: 1px solid var(--line);
  padding: 10px 5px;
}
td {
  padding: 13px 5px;
  border-bottom: 1px solid #f0f2eb;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
.tx-title {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 150px;
}
.tx-icon {
  width: 33px;
  height: 33px;
  border-radius: 10px;
  background: #f2f4ed;
  display: grid;
  place-items: center;
  color: #7d9270;
  flex-shrink: 0;
}
.tx-icon .icon {
  width: 16px;
  height: 16px;
}
.tx-title strong {
  font-size: 11px;
  font-weight: 400;
}
.tx-title small {
  display: block;
  font-size: 9px;
  color: #99a18f;
}
.tag {
  display: inline-flex;
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 9px;
  background: #eef2e4;
  color: #758361;
  white-space: nowrap;
}
.tag.income {
  background: #e5f2e9;
  color: #608769;
}
.tag.warning {
  background: #faf0da;
  color: #aa8741;
}
.amount {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.amount.positive {
  color: #538563;
}
.amount small {
  font-size: 9px;
  font-weight: 400;
  color: #9ba38f;
}
.row-actions {
  display: flex;
  gap: 4px;
}
.icon-btn {
  border-radius: 7px;
  padding: 6px;
  color: #87927e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover {
  background: #eef1e8;
}
.icon-btn .icon {
  width: 15px;
  height: 15px;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #9aa28e;
  padding: 12px 0 3px;
}
.empty {
  padding: 35px 15px;
  text-align: center;
  color: #8e9b85;
  font-size: 12px;
}
.empty .icon {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
}
.empty strong {
  display: block;
  color: #5c7057;
  margin-bottom: 5px;
}
.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search input {
  width: 100%;
  padding: 10px 38px 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
}
.search > .icon {
  position: absolute;
  right: 12px;
  top: 13px;
  width: 16px;
  color: #9aa58d;
}
.filter-select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 8px 12px;
  font-size: 11px;
  max-width: 180px;
}
.year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 20px 0;
}
.year-card {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
}
.year-card strong {
  font-size: 25px;
  display: block;
}
.year-card small {
  color: var(--muted);
  font-size: 10px;
}
.year-card p {
  font-size: 13px;
  margin-top: 10px;
}
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.archive-card {
  text-align: right;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  transition: border-color 0.2s;
}
.archive-card:hover {
  border-color: #9ab78b;
}
.archive-card strong {
  display: block;
  font-size: 14px;
}
.archive-card span {
  font-size: 10px;
  color: var(--muted);
}
.archive-card p {
  font-size: 19px;
  margin-top: 13px;
}
.archive-card p small {
  font-size: 9px;
}
.notice {
  padding: 13px 16px;
  border-radius: 10px;
  background: #f7f0df;
  border: 1px solid #eee1bf;
  font-size: 11px;
  color: #9d8245;
  line-height: 2;
  margin-bottom: 15px;
}
.notice.info {
  background: #eef3e8;
  color: #728168;
  border-color: #dfe8d5;
}
.notice.error {
  background: #faeeea;
  color: #ab6357;
  border-color: #efd7d0;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.category-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  display: flex;
  gap: 10px;
  align-items: center;
}
.category-card p {
  font-size: 11px;
  color: var(--muted);
}
.category-card .icon-btn {
  margin-right: auto;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}
.field label {
  font-size: 11px;
  color: #7d8b74;
}
.field input,
.field select,
.field textarea,
.input {
  border: 1px solid #dfe5d8;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  width: 100%;
  font-size: 13px;
}
.field textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 2.2;
}
.field .help {
  font-size: 10px;
  color: #95a087;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.provider-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
  cursor: pointer;
}
.provider-card.selected {
  border-color: #90ab7c;
  background: #f5f8ef;
}
.provider-card p {
  font-size: 10px;
  color: #8d9982;
}
.provider-card strong {
  font-size: 13px;
}
.provider-card input {
  accent-color: var(--green);
}
.provider-card .tag {
  margin-right: auto;
}
.code {
  direction: ltr;
  text-align: left;
  font-family: monospace;
  background: #f2f4ed;
  border-radius: 8px;
  padding: 10px;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #102e2470;
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}
.modal {
  background: var(--bg);
  border-radius: 23px;
  width: 100%;
  max-width: 550px;
  max-height: 92dvh;
  overflow: auto;
  box-shadow: 0 25px 100px #0e2a3440;
}
.modal.wide {
  max-width: 950px;
}
.modal-header {
  padding: 23px 26px 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
  border-radius: 23px 23px 0 0;
}
.modal-header p {
  font-size: 10px;
  color: var(--muted);
}
.modal-body {
  padding: 24px 26px;
}
.modal-footer {
  border-top: 1px solid var(--line);
  padding: 17px 26px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: white;
  position: sticky;
  bottom: 0;
}
.modal-footer small {
  font-size: 10px;
  color: var(--muted);
}
.toggle {
  display: flex;
  background: #e9eee1;
  padding: 4px;
  border-radius: 11px;
  margin-bottom: 20px;
}
.toggle button {
  flex: 1;
  border-radius: 8px;
  padding: 7px;
  font-size: 12px;
  color: #7d8a72;
}
.toggle button.active {
  background: white;
  box-shadow: 0 2px 4px #00000005;
  color: #31533b;
}
.note-input {
  min-height: 260px !important;
  font-size: 14px !important;
}
.steps {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #8b9781;
  font-size: 10px;
  margin-bottom: 19px;
}
.steps .current {
  color: #305d3b;
  font-weight: 700;
}
.steps span {
  background: #edf1e7;
  padding: 3px 9px;
  border-radius: 5px;
}
.preview-table {
  font-size: 11px;
}
.preview-table input:not([type="checkbox"]) {
  border: 1px solid #dfe5d8;
  border-radius: 6px;
  padding: 6px 7px;
  width: 100%;
  min-width: 80px;
  font-size: 11px;
  background: white;
}
.preview-table .row-title {
  min-width: 140px;
}
.preview-table .row-amount {
  max-width: 100px;
}
.preview-table .question {
  background: #fff6df;
}
.preview-table .question td {
  padding-top: 0;
  font-size: 10px;
  color: #9d844d;
}
.preview-table .question input {
  margin: 6px 0;
}
.preview-table .selected-row {
  background: #fffdf6;
}
.preview-summary {
  display: flex;
  gap: 25px;
  align-items: center;
  background: #eaf0e0;
  border-radius: 12px;
  padding: 15px 20px;
  margin: 15px 0;
}
.preview-summary strong {
  font-size: 21px;
}
.preview-summary small {
  display: block;
  font-size: 10px;
  color: #80916e;
}
.checkbox {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11px;
  color: #7a886d;
  margin: 12px 0;
}
.checkbox input {
  accent-color: var(--green);
  margin-top: 5px;
  flex-shrink: 0;
}
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #afc49b;
  border-top-color: #365740;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-left: 7px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(25px);
  background: #254738;
  color: white;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 12px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  max-width: 90vw;
  box-shadow: 0 8px 30px #183e3420;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%);
}
#toast.error {
  background: #9e5649;
}
.offline-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #fff4dd;
  padding: 10px 15px;
  border: 1px solid #dfd0ad;
  z-index: 10;
  border-radius: 10px;
  font-size: 11px;
}
.mobile-brand {
  display: none;
}
.danger-text {
  color: #a65e52;
}
.source-note {
  font-size: 10px;
  color: #8c9880;
  padding: 10px 0;
}
.footer-note {
  text-align: center;
  color: #a1aa98;
  font-size: 9px;
  margin-top: 25px;
}
.hidden {
  display: none !important;
}
.summary-strip {
  display: flex;
  gap: 20px;
  font-size: 11px;
  color: #7b8b73;
  margin-bottom: 17px;
}
.summary-strip strong {
  font-size: 15px;
  color: #335540;
  margin-right: 5px;
}
.wrap {
  white-space: normal;
  overflow-wrap: anywhere;
}
.status-line {
  font-size: 10px;
  color: #86967b;
  min-height: 20px;
  margin-top: 12px;
}
input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}
.pager {
  display: flex;
  gap: 10px;
  align-items: center;
}
.transaction-detail {
  padding: 12px;
  background: #edf1e6;
  border-radius: 10px;
  margin-bottom: 15px;
  font-size: 10px;
  overflow-wrap: anywhere;
}
@media (min-width: 1500px) {
  .main {
    padding: 0 55px 40px;
  }
  .two-col {
    grid-template-columns: 1.5fr 1fr;
  }
  .donut-wrap {
    gap: 35px;
  }
}
@media (max-width: 1180px) {
  .layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 28px 13px;
  }
  .main {
    padding: 0 25px 30px;
  }
  .stat {
    padding: 19px 17px;
  }
  .stat-value {
    font-size: 24px;
  }
  .panel {
    padding: 19px;
  }
  .donut-wrap {
    flex-direction: column;
    gap: 15px;
  }
  .category-legend {
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    width: 100%;
  }
  .donut {
    width: 130px;
    height: 130px;
  }
  .chart {
    height: 250px;
  }
  .bars {
    height: 205px;
  }
  .greeting {
    align-items: flex-start;
  }
  .greeting .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .category-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  body {
    font-size: 13px;
  }
  .layout {
    display: block;
  }
  .sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    height: auto;
    background: #fff;
    border: 0;
    border-top: 1px solid #e5eade;
    z-index: 30;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .brand,
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    display: flex;
    gap: 0;
    justify-content: space-around;
  }
  .nav button {
    flex-direction: column;
    gap: 3px;
    padding: 6px 9px;
    font-size: 9px;
    min-width: 52px;
    border-radius: 10px;
  }
  .nav button .icon {
    width: 20px;
    height: 20px;
  }
  .nav button.active {
    background: #edf3e3;
    color: #385d3d;
    box-shadow: none;
  }
  .nav button span {
    line-height: 1.7;
  }
  .main {
    padding: 0 18px 100px;
  }
  .topbar {
    height: 72px;
    margin-bottom: 25px;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 24px;
    font-weight: 700;
  }
  .mobile-brand img {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }
  .crumb {
    display: none;
  }
  .today {
    font-size: 9px;
  }
  .local-tag {
    font-size: 8px;
    padding: 3px 6px;
  }
  .top-right {
    gap: 8px;
  }
  .greeting {
    display: block;
    margin-bottom: 20px;
  }
  .greeting h1 {
    font-size: 24px;
  }
  .greeting p {
    font-size: 11px;
  }
  .greeting .actions {
    flex-direction: row;
    align-items: center;
    margin-top: 17px;
  }
  .greeting .btn {
    flex: 1;
    font-size: 11px;
    min-height: 43px;
  }
  .period-bar {
    margin-bottom: 16px;
    gap: 7px;
  }
  .period-bar select {
    min-width: 85px;
    padding: 7px 10px;
    font-size: 11px;
  }
  .period-bar label {
    display: none;
  }
  .period-bar .unit {
    font-size: 8px;
  }
  .period-bar .unit .icon {
    display: none;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }
  .stat {
    min-height: 139px;
    padding: 17px 15px;
    border-radius: 15px;
  }
  .stat.dark {
    grid-column: 1/-1;
    min-height: 147px;
  }
  .stat.dark .stat-value {
    font-size: 31px;
  }
  .stat-value {
    font-size: 21px;
    margin-top: 13px;
  }
  .stat-value small {
    font-size: 8px;
    margin-right: 4px;
  }
  .stat-heading {
    font-size: 11px;
  }
  .stat-heading .circle {
    width: 26px;
    height: 26px;
  }
  .stat-heading .circle .icon {
    width: 15px;
  }
  .stat-foot {
    font-size: 8px;
    margin-top: 7px;
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 16px;
  }
  .panel {
    border-radius: 16px;
    padding: 18px 16px;
  }
  .panel-head {
    margin-bottom: 20px;
  }
  .panel-head h2 {
    font-size: 14px;
  }
  .chart {
    height: 195px;
  }
  .bars {
    height: 160px;
  }
  .chart-columns {
    gap: 6px;
    padding: 0 2px;
  }
  .chart-col label {
    font-size: 8px;
  }
  .bar {
    width: 17px;
  }
  .donut-wrap {
    flex-direction: row;
    gap: 25px;
    min-height: 155px;
  }
  .donut {
    width: 140px;
    height: 140px;
  }
  .category-legend {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    width: auto;
    flex: 1;
  }
  .import-callout {
    padding: 15px 12px;
    gap: 10px;
    border-radius: 13px;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  .import-callout h3 {
    font-size: 11px;
  }
  .import-callout p {
    font-size: 9px;
  }
  .import-callout button {
    font-size: 10px;
    margin-right: 55px;
    padding: 0;
  }
  .import-illustration {
    width: 37px;
    height: 37px;
    flex-shrink: 0;
  }
  .table-head {
    gap: 8px;
    flex-wrap: wrap;
  }
  .table-head h2 {
    font-size: 13px;
  }
  .tabs button {
    padding: 4px 9px;
    font-size: 9px;
  }
  table {
    font-size: 10px;
  }
  td {
    padding: 12px 3px;
  }
  .tx-title {
    gap: 7px;
    min-width: 120px;
  }
  .tx-icon {
    width: 27px;
    height: 27px;
    border-radius: 8px;
  }
  .tx-title strong {
    font-size: 10px;
  }
  .tx-title small {
    font-size: 8px;
  }
  .amount {
    font-size: 11px;
  }
  .amount small {
    display: none;
  }
  .optional-col {
    display: none;
  }
  .table-footer {
    font-size: 9px;
  }
  .search-row {
    gap: 8px;
  }
  .search {
    flex-basis: 100%;
  }
  .search input {
    font-size: 11px;
  }
  .filter-select {
    font-size: 10px;
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  .year-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .year-card {
    padding: 15px;
  }
  .year-card strong {
    font-size: 21px;
  }
  .year-card p {
    font-size: 12px;
  }
  .archive-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .archive-card {
    padding: 13px;
  }
  .archive-card strong {
    font-size: 12px;
  }
  .archive-card p {
    font-size: 17px;
  }
  .category-grid {
    grid-template-columns: 1fr;
  }
  .settings-grid {
    gap: 15px;
  }
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    border-radius: 20px 20px 0 0;
    max-height: 96dvh;
  }
  .modal-header {
    padding: 18px;
    border-radius: 20px 20px 0 0;
  }
  .modal-body {
    padding: 19px 17px;
  }
  .modal-footer {
    padding: 15px 17px calc(15px + env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }
  .modal-footer .btn {
    font-size: 11px;
    flex: 1;
  }
  .modal-footer small {
    font-size: 9px;
  }
  .field-row {
    gap: 10px;
  }
  .field input,
  .field textarea,
  .field select {
    font-size: 16px;
  }
  .note-input {
    font-size: 16px !important;
    min-height: 230px !important;
  }
  .preview-summary {
    padding: 12px 15px;
    gap: 20px;
  }
  .preview-summary strong {
    font-size: 19px;
  }
  .preview-table {
    min-width: 620px;
  }
  .modal .table-wrap {
    margin: 0 -5px;
  }
  .summary-strip {
    flex-wrap: wrap;
    gap: 5px 15px;
  }
  .summary-strip strong {
    font-size: 13px;
  }
  .notice {
    font-size: 10px;
  }
  .provider-card {
    padding: 12px;
  }
  .provider-card strong {
    font-size: 12px;
  }
  .panel-head p {
    font-size: 9px;
  }
  .footer-note {
    font-size: 8px;
  }
  .offline-banner {
    bottom: 85px;
    right: 15px;
    left: 15px;
  }
  #toast {
    bottom: 90px;
  }
  .row-actions {
    gap: 0;
  }
  .icon-btn {
    padding: 7px;
  }
  .tx-title .tx-icon {
    display: none;
  }
  .table-head .subtle-link {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 760px) {
  .preview-table {
    display: block;
    min-width: 0;
  }
  .preview-table thead {
    display: none;
  }
  .preview-table tbody {
    display: grid;
    gap: 10px;
  }
  .preview-table tr {
    display: grid;
    grid-template-columns: 23px minmax(0, 1fr) 105px;
    gap: 8px;
    background: #fff;
    border: 1px solid #e2e7da;
    border-radius: 12px;
    padding: 12px;
  }
  .preview-table td {
    border: 0;
    padding: 0;
    min-width: 0;
  }
  .preview-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }
  .preview-table td:nth-child(2) {
    display: none;
  }
  .preview-table td:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
  }
  .preview-table td:nth-child(4) {
    grid-column: 3;
    grid-row: 1;
  }
  .preview-table td:nth-child(5) {
    grid-column: 2/4;
    grid-row: 2;
  }
  .preview-table td:nth-child(5):before {
    content: "دسته‌بندی";
    display: block;
    font-size: 9px;
    color: #95a185;
    margin-bottom: 4px;
  }
  .preview-table td:nth-child(6) {
    grid-column: 2/4;
    grid-row: 3;
  }
  .preview-table input:not([type="checkbox"]) {
    font-size: 16px;
    min-width: 0;
    width: 100%;
    max-width: none;
  }
  .preview-table tr.question {
    background: #fff6df;
    margin-top: -12px;
    border-top: 0;
    border-radius: 0 0 12px 12px;
  }
  .preview-table tr.question td:first-child {
    display: none;
  }
  .preview-table tr.question td:nth-child(2) {
    display: block;
    grid-column: 1/4;
    grid-row: 1;
    line-height: 2.1;
  }
  .preview-table tr.question .actions {
    display: flex;
    flex-wrap: wrap;
  }
  .preview-table tr.question .actions .btn {
    min-height: 36px;
    font-size: 10px;
  }
  .preview-table .row-title {
    min-width: 0;
  }
}
