:root {
  --brand-1: #0f766e;
  --brand-2: #14b8a6;
  --income: #16a34a;
  --income-bg: #ecfdf5;
  --expense: #dc2626;
  --expense-bg: #fef2f2;
  --balance: #2563eb;
  --balance-bg: #eff6ff;
  --card-radius: 16px;
  --bg-soft: #f4f7f8;
}

* { font-family: 'Hind Siliguri', 'Segoe UI', sans-serif; }

body {
  background: var(--bg-soft);
  min-height: 100vh;
}

/* ---------- Navbar ---------- */
.app-navbar {
  background: linear-gradient(120deg, var(--brand-1), var(--brand-2));
  padding: 0.65rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.navbar-brand { color: #fff !important; font-weight: 700; font-size: 1.25rem; }
.brand-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: #fff;
}
.app-navbar .nav-link {
  color: rgba(255,255,255,0.9) !important;
  font-weight: 500;
  border-radius: 8px;
  padding: 0.45rem 0.9rem !important;
}
.app-navbar .nav-link.active, .app-navbar .nav-link:hover {
  background: rgba(255,255,255,0.16);
  color: #fff !important;
}
.btn-logout {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}
.btn-logout:hover { background: rgba(255,255,255,0.28); color: #fff; }

/* ---------- Layout ---------- */
.app-main.with-bottom-nav { padding-bottom: 70px; }

/* ---------- Cards ---------- */
.stat-card {
  border-radius: var(--card-radius);
  border: none;
  padding: 1.25rem 1.4rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.stat-card .stat-icon {
  position: absolute; right: 1rem; top: 1rem; font-size: 2.2rem; opacity: 0.35;
}
.stat-card.income { background: linear-gradient(135deg, #16a34a, #22c55e); }
.stat-card.expense { background: linear-gradient(135deg, #dc2626, #f87171); }
.stat-card.balance { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.stat-card .label { font-size: 0.9rem; opacity: 0.9; }
.stat-card .value { font-size: 1.7rem; font-weight: 700; margin-top: 2px; }

.card {
  border: none;
  border-radius: var(--card-radius);
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}
.card-header {
  background: #fff;
  border-bottom: 1px solid #eef1f2;
  border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
  font-weight: 600;
}

/* ---------- Transaction list ---------- */
.tx-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #f0f2f3;
}
.tx-row:last-child { border-bottom: none; }
.tx-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.tx-icon.income { background: var(--income-bg); color: var(--income); }
.tx-icon.expense { background: var(--expense-bg); color: var(--expense); }
.tx-amount.income { color: var(--income); font-weight: 700; }
.tx-amount.expense { color: var(--expense); font-weight: 700; }

.badge-type-income { background: var(--income-bg); color: var(--income); }
.badge-type-expense { background: var(--expense-bg); color: var(--expense); }

/* ---------- Category chips ---------- */
.cat-chip {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eef1f2;
  margin-bottom: 0.6rem;
}
.cat-chip .cat-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.cat-chip.income .cat-icon { background: var(--income-bg); color: var(--income); }
.cat-chip.expense .cat-icon { background: var(--expense-bg); color: var(--expense); }
.cat-chip.inactive { opacity: 0.5; }

/* ---------- Login page ---------- */
.login-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  padding: 1rem;
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 2.2rem 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 45px rgba(0,0,0,0.25);
}
.login-logo {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.8rem;
  margin: 0 auto 1rem auto;
}

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid #eef1f2;
  display: flex; align-items: center; justify-content: space-around;
  padding: 0.4rem 0.1rem;
  z-index: 1030;
  box-shadow: 0 -4px 14px rgba(0,0,0,0.06);
}
.bn-item {
  display: flex; flex-direction: column; align-items: center;
  font-size: 0.62rem; color: #6b7280; text-decoration: none;
  gap: 2px; flex: 1; min-width: 0;
}
.bn-item span { white-space: nowrap; }
.bn-item i { font-size: 1.15rem; }
.bn-item.active { color: var(--brand-1); }
.bn-item.bn-add { color: var(--brand-1); }
.bn-item.bn-add i { font-size: 2.4rem; margin-top: -16px; }

/* ---------- Buttons ---------- */
.btn-brand {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff; border: none; font-weight: 600;
}
.btn-brand:hover { color: #fff; opacity: 0.92; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 991px) {
  .stat-card .value { font-size: 1.4rem; }
}
