* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Tahoma, "Vazirmatn", sans-serif;
  background: #f4f6f8;
  color: #222;
}

.topbar { background: #1f3a5f; color: #fff; padding: 1rem 2rem; }
.topbar h1 { margin: 0; font-size: 1.3rem; }

.container { max-width: 1000px; margin: 1.5rem auto; padding: 0 1rem; }

.card {
  background: #fff;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.card h2 { margin-top: 0; font-size: 1.05rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  align-items: end;
}
.wide { grid-column: 1 / -1; }

label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; }
input, select { padding: 0.5rem; border: 1px solid #ccd3da; border-radius: 6px; font: inherit; }

button {
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 6px;
  background: #1f3a5f;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
button.secondary { background: #6b7785; }
button.danger { background: #c0392b; padding: 0.3rem 0.7rem; font-size: 0.8rem; }

.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1.25rem; }
.summary .box {
  background: #fff;
  border-radius: 10px;
  padding: 0.9rem;
  text-align: center;
  font-size: 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.summary strong { display: block; font-size: 1.25rem; margin-top: 0.3rem; }
.income strong, .income-text { color: #1e8449; }
.expense strong, .expense-text { color: #c0392b; }
.balance strong { color: #1f3a5f; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.55rem; text-align: right; border-bottom: 1px solid #e5e9ed; }
th { font-size: 0.8rem; color: #6b7785; }
.empty { color: #6b7785; text-align: center; }

.item-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.item-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e9ed;
}
.alert {
  background: #fdecea;
  color: #c0392b;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.topbar nav { display: flex; gap: 1rem; margin-top: 0.5rem; }
.topbar nav a { color: #cfd8e3; text-decoration: none; font-size: 0.9rem; }
.topbar nav a:hover { color: #fff; }
.month-picker { max-width: 220px; }
.chart-box { position: relative; height: 320px; }

.goal-head { display: flex; justify-content: space-between; align-items: center; }
.goal-head h2 { margin: 0; }
.progress {
  background: #e5e9ed;
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
  margin: 0.9rem 0 0.5rem;
}
.progress-fill { background: #1f3a5f; height: 100%; transition: width 0.3s; }
.progress-fill.done { background: #1e8449; }
.goal-numbers { margin: 0 0 0.8rem; font-size: 0.9rem; }
.inline-form { display: flex; gap: 0.5rem; max-width: 360px; }
.inline-form input { flex: 1; }

.info {
  background: #eaf4ea;
  color: #1e8449;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
tr.paused td { opacity: 0.5; }

a.btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  background: #1f3a5f;
  color: #fff;
  text-decoration: none;
}
a.btn.secondary { background: #6b7785; }
.export-links { font-size: 0.85rem; margin: 0 0 0.75rem; }
code { background: #eef1f4; padding: 0.1rem 0.35rem; border-radius: 4px; }