:root {
  --lb-primary: #4C6EF5;
  --lb-dark: #1A1B2E;
  --lb-income: #12B886;
  --lb-expense: #FA5252;
  --lb-surface: #ffffff;
  --lb-border: #e9ecef;
}

body {
  background-color: #f4f6fb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.app-navbar {
  background-color: var(--lb-dark);
}

.app-main {
  max-width: 1320px;
  margin: 0 auto;
}

.card {
  border: 1px solid var(--lb-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #868e96;
}

.text-income { color: var(--lb-income); }
.text-expense { color: var(--lb-expense); }

.table-responsive-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.category-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.badge-days-left {
  font-size: 0.75rem;
}

/* ---- Mobile responsiveness ---- */
@media (max-width: 767.98px) {
  .app-main {
    padding-left: 10px;
    padding-right: 10px;
  }
  .stat-card .stat-value {
    font-size: 1.3rem;
  }
  table.table-mobile-stack thead {
    display: none;
  }
  table.table-mobile-stack tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid var(--lb-border);
    border-radius: 8px;
    padding: 0.5rem;
  }
  table.table-mobile-stack td {
    display: flex;
    justify-content: space-between;
    border: none;
    padding: 0.25rem 0.25rem;
  }
  table.table-mobile-stack td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #868e96;
    margin-right: 1rem;
  }
  .navbar-nav .nav-link {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}

.chart-wrap {
  position: relative;
  height: 280px;
}

.chart-wrap-sm {
  position: relative;
  height: 180px;
}

