:root {
  --cor-primaria: #c0161d;
  --cor-primaria-escura: #8f0f14;
  --cor-preto: #1a1a1a;
  --cor-branco: #ffffff;
  --cor-cinza-claro: #f4f5f7;
}

body {
  background-color: var(--cor-cinza-claro);
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  background: var(--cor-preto);
  color: #fff;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: transform .2s ease;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .5rem;
  padding: 1.2rem 1rem; font-size: 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: var(--cor-primaria);
}
.sidebar-brand strong { color: #fff; }
.sidebar-nav { display: flex; flex-direction: column; padding: .75rem 0; }
.sidebar-nav a {
  color: #ddd; text-decoration: none; padding: .65rem 1.2rem;
  display: flex; align-items: center; gap: .6rem; font-size: .92rem;
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(192,22,29,.15);
  color: #fff;
  border-left-color: var(--cor-primaria);
}
.sidebar-divider { border-color: rgba(255,255,255,.1); margin: .5rem 1rem; }

.app-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: var(--cor-preto);
  color: #fff;
  height: 56px;
  position: sticky; top: 0; z-index: 10;
}
.topbar-title { color: #fff; }

.card-indicador {
  border: none;
  border-radius: .6rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  border-left: 4px solid var(--cor-primaria);
}
.card-indicador .valor { font-size: 1.8rem; font-weight: 700; color: var(--cor-preto); }
.card-indicador .rotulo { color: #777; font-size: .85rem; }

.btn-primary {
  background-color: var(--cor-primaria);
  border-color: var(--cor-primaria);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--cor-primaria-escura);
  border-color: var(--cor-primaria-escura);
}
.text-primary-app { color: var(--cor-primaria) !important; }

.table thead { background: var(--cor-preto); color: #fff; }
.table-responsive { border-radius: .5rem; overflow: hidden; }

.login-wrapper {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--cor-preto) 0%, var(--cor-primaria-escura) 100%);
}
.login-card {
  background: #fff; border-radius: .75rem; padding: 2.5rem;
  width: 100%; max-width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,.25);
}

@media (max-width: 991px) {
  .sidebar { position: fixed; z-index: 1050; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
}

.section-box { border: 1px solid #e3e5e8; border-radius: .65rem; padding: 1rem; background: #fff; }
.section-title { color: var(--cor-primaria); font-weight: 700; border-bottom: 1px solid #eee; padding-bottom: .65rem; margin-bottom: 1rem; }
@media (max-width: 991px) { .sidebar { position: fixed; z-index: 1050; transform: translateX(-100%); } .sidebar.open { transform: translateX(0); box-shadow: 8px 0 24px rgba(0,0,0,.25); } .topbar { z-index: 1040; } .table-responsive { -webkit-overflow-scrolling: touch; } }
