/* =============================================== */
/* === 1. IMPORTS & VARIÁVEIS ROOT             === */
/* =============================================== */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* =============================================== */
/* === 2. ESTILOS GLOBAIS DA PÁGINA            === */
/* =============================================== */
body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
}

.wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.sidebar-logo img {
  height: 38px; 
  width: auto;
  transition: opacity 0.2s ease;
}

/* Dark mode: inverte o logo se for preto */
[data-theme="dark"] .sidebar-logo img {
  filter: brightness(0) invert(1);
}

.sidebar-logo:hover img {
  opacity: 0.8; 
}

#sidebar:not(.expand) .sidebar-logo {
  opacity: 0;
  display: none;
}
/* =============================================== */
/* === 3. SIDEBAR PRINCIPAL                    === */
/* =============================================== */
#sidebar {
  width: 90px;
  min-width: 90px;
  z-index: 1000;
  transition: all 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-default);
}

#sidebar.expand {
  width: 260px;
  min-width: 260px;
}

/* =============================================== */
/* === 4. CABEÇALHO DA SIDEBAR (LOGO & BOTÃO)  === */
/* =============================================== */
.sidebar-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.3s ease;
}

#sidebar:not(.expand) .sidebar-header {
  justify-content: center;
  padding: 20px 0;
}

.sidebar-logo {
  color: var(--color-primary);
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.3s ease;
  animation: fadein 0.5s ease-in-out;
}

#sidebar:not(.expand) .sidebar-logo {
  opacity: 0;
  display: none;
}

.toggle-btn {
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.toggle-btn:hover {
  color: var(--color-primary);
}

/* =============================================== */
/* === 5. NAVEGAÇÃO E LINKS                    === */
/* =============================================== */
.sidebar-nav {
  padding: 10px 0;
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-item {
  position: relative;
}

.sidebar-link {
  display: flex;
  align-items: center;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  padding: 14px 30px;
  padding: 16px 30px;
  white-space: nowrap;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover {
  background-color: var(--bg-hover);
  color: var(--color-primary);
}

.sidebar-item.disabled .sidebar-link {
  cursor: default;
}

.sidebar-item.disabled .sidebar-link:hover {
  background-color: transparent;
}

.sidebar-link:hover i {
  color: var(--color-primary);
}

.sidebar-item.active .sidebar-link {
  background-color: var(--bg-hover);
  color: var(--color-primary);
  font-weight: 600;
}

.sidebar-item.active .sidebar-link i {
  color: var(--color-primary);
}

.sidebar-link i {
  font-size: 20px;
  min-width: 30px;
  text-align: center;
  margin-right: 18px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.sidebar-link.disabled i {
  color: var(--state-disabled-text);
}

.sidebar-link span {
  opacity: 1;
  transition: opacity 0.3s ease, width 0.3s ease;
  overflow: hidden;
}

#sidebar:not(.expand) .sidebar-link span {
  opacity: 0;
  width: 0;
}

.sidebar-item.disabled .sidebar-link {
  color: var(--state-disabled-text);
}

.sidebar-item.disabled .sidebar-link i {
  color: var(--state-disabled-text);
}

.sidebar-item.disabled {
  pointer-events: none;
  opacity: 0.6;
}

/* =============================================== */
/* === 6. RODAPÉ (LOGOUT)                      === */
/* =============================================== */
.sidebar-footer {
  padding-bottom: 20px;
  border-top: 1px solid var(--border-default);
}

/* =============================================== */
/* === 7. CONTEÚDO PRINCIPAL                   === */
/* =============================================== */
.main-content {
  flex-grow: 1;
  overflow-y: auto;
  height: 100vh;
  background-color: var(--bg-body);

  /*flex: 1; 
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center;    
  padding: 20px;
  box-sizing: border-box;*/
}

/* =============================================== */
/* === 8. ANIMAÇÕES                             === */
/* =============================================== */
@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

