/* ── RESET SCROLL ────────────────────────────────────────────── */
html, body {
  height: 100%;
  overflow: hidden;
}

/* ── LAYOUT ──────────────────────────────────────────────────── */
.layout-wrapper {
  height: calc(100vh - 56px);
  overflow: hidden;
}

#sidebar {
  width: 220px;
  min-width: 220px;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  transition: width 0.2s ease, min-width 0.2s ease;
}

#sidebar.collapsed {
  width: 0;
  min-width: 0;
  padding: 0 !important;
}

#sidebar .nav-link {
  border-radius: 6px;
  font-size: 0.9rem;
  white-space: nowrap;
}

#sidebar .nav-link.active,
#sidebar .nav-link:hover {
  background-color: var(--bs-primary-bg-subtle);
  color: var(--bs-primary);
}

#mainContent {
  height: 100%;
  overflow-y: auto;
  overflow-x: auto;
}

/* ── LOGO DARK/LIGHT ─────────────────────────────────────────── */
[data-bs-theme="light"] .logo-light { display: none; }
[data-bs-theme="dark"]  .logo-dark  { display: none; }

/* ── CARDS DO DASHBOARD ──────────────────────────────────────── */
.card-stat .card-body {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.card-stat .stat-icon {
  font-size: 2rem;
  opacity: 0.75;
}
.card-stat .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}
.card-stat .stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
}

/* ── BADGES DE STATUS ────────────────────────────────────────── */
.badge-ok   { background-color: #198754 !important; }
.badge-erro { background-color: #dc3545 !important; }

/* ── TABELAS ─────────────────────────────────────────────────── */
.table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── LOGIN ───────────────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bs-body-bg);
}
.login-card {
  width: 100%;
  max-width: 400px;
}

/* ── TOPBAR ──────────────────────────────────────────────────── */
#topbar {
  height: 56px;
  flex-shrink: 0;
}

/* ── RESPONSIVO ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    height: calc(100vh - 56px);
    z-index: 1000;
    background: var(--bs-body-bg);
    border-right: 1px solid var(--bs-border-color) !important;
  }
}
