:root {
  --ink: #0f1a24;
  --muted: #5b6b79;
  --surface: #ffffff;
  --panel: #ffffff;
  --brand: #2c6f7a;
  --brand-2: #e6f4f4;
  --accent: #9fd1cc;
  --nav: #2f5f6a;
  --nav-deep: #274f57;
  --nav-ink: #f5fbfb;
  --nav-muted: rgba(245, 251, 251, 0.75);
  --nav-card: rgba(255, 255, 255, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--surface);
  color: var(--ink);
}

.app-topbar {
  background: linear-gradient(120deg, #3b7f87 0%, #2f5f6a 100%);
  color: var(--nav-ink);
  padding: 0.95rem 1.6rem;
}

.app-topbar .navbar-brand {
  color: var(--nav-ink);
  font-weight: 700;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo {
  width: 96px;
  height: 72px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  padding: 0px;
  box-shadow: 0 8px 16px rgba(20, 39, 51, 0.14);
}

.brand-logo--hero {
  width: 120px;
  height: 120px;
}

.brand-logo--login {
  width: 120px;
  height: 120px;
}

.brand-mark {
  background: var(--accent);
  color: #0f1c2e;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  font-weight: 700;
}

.app-topbar .btn-outline-light {
  border-color: rgba(245, 247, 251, 0.3);
  color: var(--nav-ink);
}

.app-sidebar {
  min-height: calc(100vh - 74px);
  padding: 1.6rem 1.25rem;
  background: linear-gradient(180deg, var(--nav) 0%, var(--nav-deep) 100%);
  color: var(--nav-ink);
}

.offcanvas.app-sidebar {
  width: 280px;
}

.offcanvas.app-sidebar .offcanvas-header {
  border-bottom: 1px solid rgba(245, 247, 251, 0.12);
}

.offcanvas.app-sidebar .nav-link i {
  color: rgba(245, 247, 251, 0.6);
}

.user-chip {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
}

.user-chip .avatar {
  background: rgba(255, 255, 255, 0.2);
  color: var(--nav-ink);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-sidebar .nav-link {
  color: var(--nav-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.95rem;
  border-radius: 14px;
  margin-bottom: 0.35rem;
}

.app-sidebar .nav-link.active,
.app-sidebar .nav-link:hover {
  background: rgba(159, 209, 204, 0.35);
  color: var(--nav-ink);
}

.app-content {
  padding: 2.2rem;
}

.app-footer {
  padding: 1rem 2.5rem 1.5rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #f6f8fb;
}

.panel {
  background: var(--panel);
  border-radius: 18px;
  padding: 1.6rem;
  box-shadow: 0 14px 30px rgba(20, 39, 51, 0.06);
}

.stat-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.4rem;
  border: 1px solid #e4e7ec;
  height: 100%;
}

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

.panel.action-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.panel.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(15, 28, 46, 0.12);
}

.panel.action-card .badge {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  height: 200px;
  align-items: end;
}

.chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.chart-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 160px;
  width: 100%;
}

.chart-bar {
  flex: 1;
  min-height: 6px;
  border-radius: 8px;
}

.chart-bar.payments {
  background: #2b6f86;
}

.chart-bar.expenses {
  background: #8bb2bd;
}

.chart-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.legend-dot.payments {
  background: #2b6f86;
}

.legend-dot.expenses {
  background: #8bb2bd;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: var(--brand-2);
  color: var(--brand);
  font-weight: 600;
  font-size: 0.85rem;
}

.table-sm td,
.table-sm th {
  padding: 0.5rem;
}

@media (max-width: 991px) {
  .app-sidebar {
    min-height: auto;
  }

  .app-content {
    padding: 1.5rem;
  }

  .app-footer {
    padding: 1rem 1.5rem 1.25rem;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
  }

  .brand-logo--login {
    width: 72px;
    height: 72px;
  }

  .brand-logo--hero {
    width: 72px;
    height: 72px;
  }
}

@media (min-width: 992px) {
  .app-sidebar {
    flex: 0 0 220px !important;
    max-width: 220px !important;
    width: 220px !important;
  }

  .app-content {
    flex: 1 1 auto !important;
    max-width: calc(100% - 220px) !important;
  }
}
