/* New Sidebar Styles - Modern Design */

.sidebar-new {
  position: fixed;
  left: 0;
  top: 70px;
  width: 240px;
  height: calc(100vh - 70px);
  background: #f5f5f5;
  border-right: 1px solid #e0e0e0;
  padding: 40px 0;
  z-index: 998; /* Sidebar layer - below modals (1000) - see z-index hierarchy in main.css */
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav-new {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  padding: 0 12px;
  margin: 0;
  flex: 1;
  overflow: visible;
}

.sidebar-nav-item-new[data-section="configuracoes"] {
  margin-top: auto;
  margin-bottom: 2px;
}

.sidebar-nav-item-new {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #666;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sidebar-nav-item-new:hover {
  background: transparent;
  color: #00D9FF;
  transform: translateX(4px);
}

.sidebar-nav-item-new.active {
  background: transparent;
  color: #666;
  box-shadow: inset 0 0 0 1px #e0e0e0;
  border-left: none;
  padding-left: 16px;
}

.sidebar-nav-item-new.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background-color: transparent;
}

.nav-icon-new {
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  opacity: 0.8;
  transition: all 0.3s ease;
  color: #666;
  font-weight: 700;
}

.nav-icon-new svg {
  width: 22px;
  height: 22px;
  stroke: #666;
  transition: stroke 0.3s ease;
}

.sidebar-nav-item-new:hover .nav-icon-new {
  opacity: 1;
  color: #00D9FF;
}

.sidebar-nav-item-new:hover .nav-icon-new svg {
  stroke: #00D9FF;
}

.sidebar-nav-item-new.active .nav-icon-new {
  opacity: 0.8;
  color: #666;
  font-weight: 700;
}

.nav-label-new {
  font-size: 15px;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sidebar-new {
    width: 240px;
    padding: 20px 0;
  }

  .sidebar-nav-new {
    padding: 0 12px;
    gap: 6px;
  }

  .sidebar-nav-item-new {
    padding: 12px 16px;
    justify-content: flex-start;
    border-radius: 6px;
  }

  .nav-label-new {
    display: inline;
    font-size: 14px;
  }

  .sidebar-nav-item-new.active {
    padding-left: 16px;
  }
}

/* Main content adjustment handled by flexbox in app-container */


/* Module Items with Tabs */

.sidebar-separator {
  height: 1px;
  background: #e0e0e0;
  margin: 12px 0;
}

.sidebar-module-item {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-module-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #666;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sidebar-module-button:hover {
  background: transparent;
  color: #00D9FF;
  transform: translateX(4px);
}

.sidebar-module-button.active {
  background: transparent;
  color: #666;
  box-shadow: inset 0 0 0 1px #e0e0e0;
}

.module-expand-icon {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.3s ease;
  opacity: 0.6;
}

.sidebar-module-item.expanded .module-expand-icon {
  transform: rotate(180deg);
}

.sidebar-module-tabs {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px 8px 40px;
  background: rgba(0, 217, 255, 0.05);
  border-left: 2px solid #e0e0e0;
  margin-left: 12px;
}

.sidebar-module-tabs.active {
  display: flex;
}

.sidebar-module-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #999;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.sidebar-module-tab:hover {
  background: rgba(0, 217, 255, 0.1);
  color: #00D9FF;
}

.sidebar-module-tab.active {
  background: rgba(0, 217, 255, 0.15);
  color: #00D9FF;
  font-weight: 600;
}

.tab-icon {
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.tab-label {
  font-size: 13px;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Module Tab Bar in Main Content */

.module-tab-bar {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  background: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
  overflow-x: auto;
  overflow-y: hidden;
}

.module-tab-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.module-tab-button:hover {
  background: #f5f5f5;
  border-color: #00D9FF;
  color: #00D9FF;
}

.module-tab-button.active {
  background: #00D9FF;
  border-color: #00D9FF;
  color: #fff;
}

.module-tab-content {
  display: none;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.module-tab-content[style*="display: block"] {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments for module tabs */
@media (max-width: 768px) {
  .sidebar-module-tabs {
    padding: 8px 8px 8px 32px;
  }

  .sidebar-module-tab {
    padding: 8px 10px;
    font-size: 12px;
  }

  .tab-icon {
    width: 18px;
    height: 18px;
    font-size: 12px;
  }

  .module-tab-bar {
    padding: 12px 16px;
  }

  .module-tab-button {
    padding: 8px 12px;
    font-size: 12px;
  }
}


/* Module Container Styles */

.module-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overflow-x: hidden;
}

.module-tab-bar {
  flex-shrink: 0;
}

.module-tab-content {
  flex: 1;
  overflow: hidden;
  overflow-x: hidden;
}

/* Ensure no infinite scroll */
body {
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}
