/* === Layout base: header fixo + sidebar === */
:root {
  --header-height: 70px;
  --sidebar-width: 240px;
  --content-gap: 16px;
  --content-padding: 24px;
  --sidebar-bg: #cf2e2e;
  --sidebar-hover: #e76b6b;
}

html, body {
  height: 100%;
}

body {
  padding-top: var(--header-height);
  overflow: auto;
  background: #f6f7f9;
}

.main-container {
  display: flex;
  min-height: calc(100vh - var(--header-height));
}

/* Sidebar */
.sidebar {
  flex: 0 0 var(--sidebar-width);
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  margin: 6px 10px;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.2s, transform 0.2s;
}

.sidebar .nav-link:hover {
  background-color: var(--sidebar-hover);
  transform: translateX(4px);
}

.sidebar .nav-link.active {
  background-color: #b42727;
}

/* Conteudo */
.content {
  flex: 1;
  background: #fff;
  margin: var(--content-gap);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: var(--content-padding);
  overflow: auto;
  transition: all 0.3s ease;
}

/* Ajustes responsivos */
@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    z-index: 1040;
  }
}
