/* ── Layout ────────────────────────────────────────────────────────────────── */

#wrapper {
  min-height: 100vh;
}

#sidebar {
  width: 230px;
  min-height: 100vh;
  background: #1c2f3e;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.sidebar-brand {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  background: #243647;
  flex-shrink: 0;   /* don't compress logo when nav overflows */
}

/* Ensure nav list itself can grow and leaves scroll room below last item */
#sidebar .nav.flex-column {
  padding-bottom: 1.5rem;
}

#sidebar .nav-link {
  color: rgba(255,255,255,0.65);
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.88rem;
  transition: background 0.15s, color 0.15s;
}

#sidebar .nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

#sidebar .nav-link.active {
  background: #1a5276;
  color: #fff;
}

#topbar {
  display: flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  min-height: 48px;
}

#page-content {
  flex: 1;
  background: #f5f7fa;
  min-height: 100vh;
}

/* ── Stat cards ────────────────────────────────────────────────────────────── */

.stat-card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.stat-revenue  { background: linear-gradient(135deg, #1a7a4a, #27ae60); }
.stat-expense  { background: linear-gradient(135deg, #922b21, #e74c3c); }
.stat-net-pos  { background: linear-gradient(135deg, #1a5276, #2980b9); }
.stat-net-neg  { background: linear-gradient(135deg, #7d3c98, #a569bd); }

/* ── Drag-drop zone ────────────────────────────────────────────────────────── */

.drop-zone {
  border: 2px dashed #adb5bd;
  border-radius: 12px;
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fff;
}

.drop-zone.drag-over {
  border-color: #1a5276;
  background: #eaf2f8;
}

.drop-icon {
  font-size: 2.5rem;
  color: #adb5bd;
  display: block;
  margin-bottom: 0.5rem;
}

/* ── Tiny buttons ──────────────────────────────────────────────────────────── */

.btn-xs {
  padding: 0.1rem 0.4rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

/* ── Tables ────────────────────────────────────────────────────────────────── */

.table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */

.card {
  border-radius: 8px;
}

.card-header {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}
