/* ========== MAIN CSS - CABEÇALHO E SIDEBAR ========== */
/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  font-family: 'Montserrat', sans-serif;
  min-width: 1024px;
}
/* ========== CABEÇALHO ========== */
.cabecalho-novo {
  height: 48px;
  min-width: 1024px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
}
.box-titulo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
}
.circulo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #d0d0d0;
  flex-shrink: 0;
}
.box-titulo .circulo:first-child {
  width: 62px;
  height: 32px;
  border-radius: 0;
  background: transparent;
  border: none;
  color: #333;
}
.circulo.logout {
  cursor: pointer;
}
.circulo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 200ms ease;
  position: relative;
}
.circulo-icon:hover {
  color: #333;
  border-color: #333;
}
.circulo-icon svg {
  flex-shrink: 0;
}
.texto-titulo {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}
.separador {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}
.box-usuario {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 8px;
  flex-grow: 1;
  justify-content: flex-end;
}
.texto-usuario {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #333;
  text-align: right;
  display: flex;
  align-items: center;
  height: 32px;
  cursor: default;
  position: relative;
}

.loading-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.loading-dots .dot {
  width: 6px;
  height: 6px;
  background-color: #666;
  border-radius: 50%;
  animation: loading-bounce 1.4s infinite ease-in-out both;
}

.loading-dots .dot:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots .dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loading-bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
.tooltip {
  position: relative;
}
.tooltiptext {
  visibility: hidden;
  background-color: #fff;
  color: #333;
  text-align: center;
  border-radius: 6px;
  padding: 6px 8px;
  position: absolute;
  z-index: 1000;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  opacity: 0;
  transition: all 0.2s ease-out;
  width: auto;
  min-width: auto;
}
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* ========== SIDEBAR ========== */
.sidebar {
  position: absolute;
  top: 48px;
  left: 0;
  height: calc(100vh - 48px);
  width: 48px;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  transition: width 200ms ease;
  overflow: hidden;
  z-index: 999;
}
.sidebar:hover {
  width: 256px;
}
.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
}
.sidebar-button {
  width: 32px;
  height: 32px;
  border: none;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 200ms ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 6px;
  gap: 8px;
  color: #666;
}
.sidebar-button svg {
  flex-shrink: 0;
}
.sidebar:hover .sidebar-button {
  width: 240px;
}
.sidebar-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  opacity: 0;
  transition: all 200ms ease;
  white-space: nowrap;
}
.sidebar:hover .sidebar-text {
  opacity: 1;
}
.sidebar-button:hover {
  background: #f0f0f0;
  color: #333;
}
.sidebar-button:hover .sidebar-text {
  color: #333;
}
.sidebar-button.active {
  background: #f0f0f0;
  color: #333;
}
.sidebar-button.active .sidebar-text {
  color: #333;
}
/* ========== ÁREA DE CONTEÚDO ========== */
.main-content {
  position: absolute;
  top: 48px;
  left: 48px;
  width: calc(100vw - 48px);
  min-width: 976px;
  height: calc(100vh - 48px);
  background: #fff;
  overflow-y: auto;
}
#content-area {
  width: 100%;
  height: 100%;
  padding: 0px;
}
/* ========== ESTADOS DE CARREGAMENTO ========== */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  font-size: 16px;
  color: #666;
}
.error-page {
  text-align: center;
  padding: 40px;
  color: #d32f2f;
}
.error-page h2 {
  margin-bottom: 16px;
  font-size: 24px;
}
.error-page p {
  margin-bottom: 12px;
  font-size: 16px;
}
.error-details {
  font-size: 14px;
  color: #666;
  font-style: italic;
}