:root {
  --sidebar-width: 240px;
  --brand: #0d6efd;
  --brand-dark: #0a58ca;
  --bg: #f5f7fb;
}

body {
  background: var(--bg);
  font-size: 0.95rem;
}

/* Layout com sidebar fixa */
.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: #1e293b;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform .2s ease;
}
.app-sidebar .brand {
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  color: #fff;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  line-height: 1.2;
}
.app-sidebar .nav-link {
  color: #cbd5e1;
  padding: .6rem 1.25rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.app-sidebar .nav-link:hover { background: rgba(255,255,255,.06); color:#fff; }
.app-sidebar .nav-link.active { background: var(--brand); color:#fff; }
.app-sidebar .nav-section {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #64748b;
  padding: 1rem 1.25rem .35rem;
}

.app-main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}
.app-navbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: .6rem 1.25rem;
}
.app-content { padding: 1.5rem; }

/* KPI cards */
.kpi-card { border: none; border-radius: .75rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.kpi-card .kpi-label { color:#64748b; font-size:.8rem; text-transform:uppercase; letter-spacing:.03em; }
.kpi-card .kpi-value { font-size:1.5rem; font-weight:700; }

.card { border: none; border-radius: .75rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.table { font-size: .9rem; }
.table thead th { background: #f1f5f9; border-bottom: 2px solid #e2e8f0; }

.sidebar-toggle { display: none; }

@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.show { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
}
