/* =============================================================================
   FLYBIZZ API DOCS v6.5.0 - CSS DEFINITIVO ULTRA-AGRESSIVO
   Prioridade MÁXIMA: sobrescreve TODO inline style
   ============================================================================= */

/* =============================================================================
   1. BADGES - MINI E CORES CORRETAS
   ============================================================================= */

/* FORÇA TODOS OS BADGES A SEREM MINI */
.sidebar span[class*="badge"],
.sidebar span[class*="operation"],
.sidebar .operation-badge,
.sidebar [class*="badge-"] {
  display: inline-block !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  padding: 2px 4px !important;
  font-size: 7px !important;
  line-height: 12px !important;
  font-weight: 600 !important;
  text-align: center !important;
  border-radius: 3px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

/* FORÇA COR VERDE CLARO - GET */
.sidebar span[class*="GET"],
.sidebar .badge-GET,
.sidebar .badge-query,
.sidebar .operation-badge[class*="GET"] {
  background: #10B981 !important;
  color: white !important;
  border: none !important;
}

/* FORÇA COR AZUL CLARO - POST */
.sidebar span[class*="POST"],
.sidebar .badge-POST,
.sidebar .badge-create,
.sidebar .operation-badge[class*="POST"] {
  background: #3B82F6 !important;
  color: white !important;
  border: none !important;
}

/* FORÇA COR LARANJA - PUT/PATCH */
.sidebar span[class*="PUT"],
.sidebar span[class*="PATCH"],
.sidebar .badge-PUT,
.sidebar .badge-PATCH,
.sidebar .badge-update,
.sidebar .operation-badge[class*="PUT"],
.sidebar .operation-badge[class*="PATCH"] {
  background: #F59E0B !important;
  color: white !important;
  border: none !important;
}

/* FORÇA COR VERMELHO - DELETE */
.sidebar span[class*="DELETE"],
.sidebar .badge-DELETE,
.sidebar .badge-delete,
.sidebar .operation-badge[class*="DELETE"] {
  background: #EF4444 !important;
  color: white !important;
  border: none !important;
}

/* FORÇA SOBRESCREVER INLINE STYLES */
.sidebar span[style*="background"],
.sidebar span[style*="color"],
.sidebar span[style*="font-size"] {
  /* Força cores corretas mesmo com inline style */
}

.sidebar span[class*="GET"][style],
.sidebar .badge-GET[style] {
  background: #10B981 !important;
  color: white !important;
}

.sidebar span[class*="POST"][style],
.sidebar .badge-POST[style] {
  background: #3B82F6 !important;
  color: white !important;
}

.sidebar span[class*="PUT"][style],
.sidebar .badge-PUT[style],
.sidebar span[class*="PATCH"][style],
.sidebar .badge-PATCH[style] {
  background: #F59E0B !important;
  color: white !important;
}

.sidebar span[class*="DELETE"][style],
.sidebar .badge-DELETE[style] {
  background: #EF4444 !important;
  color: white !important;
}

/* =============================================================================
   2. ÍCONES - TAMANHO UNIFORME
   ============================================================================= */

/* TODOS OS ÍCONES NORMAIS */
.sidebar i,
.sidebar .fa,
.sidebar .fas,
.sidebar .far,
.sidebar svg:not([class*="chevron"]) {
  font-size: 10px !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
}

/* CHEVRONS E ARROWS - MENORES */
.sidebar .fa-chevron-down,
.sidebar .fa-chevron-up,
.sidebar .fa-chevron-right,
.sidebar .fa-arrow-down,
.sidebar .fa-arrow-up,
.sidebar svg[class*="chevron"] {
  font-size: 8px !important;
  width: 10px !important;
  height: 10px !important;
  min-width: 10px !important;
  min-height: 10px !important;
  max-width: 10px !important;
  max-height: 10px !important;
}

/* =============================================================================
   3. LAYOUT COMPACTO - SIDEBAR
   ============================================================================= */

.sidebar {
  width: 280px !important;
  min-width: 280px !important;
  max-width: 280px !important;
  padding: 0 !important;
  background: var(--bg-secondary, #F9FAFB) !important;
  border-right: 1px solid var(--border-color, #E5E7EB) !important;
  overflow-y: auto !important;
}

/* MÓDULOS */
.sidebar .menu-module,
.sidebar [class*="module"] {
  padding: 6px 12px !important;
  min-height: 34px !important;
  max-height: 36px !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  gap: 8px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  cursor: pointer !important;
  background: var(--bg-primary, white) !important;
  border-bottom: 1px solid var(--border-color, #E5E7EB) !important;
}

/* ENTIDADES */
.sidebar .menu-entity,
.sidebar [class*="entity"] {
  padding: 5px 16px !important;
  min-height: 30px !important;
  max-height: 32px !important;
  font-size: 11px !important;
  line-height: 1.4 !important;
  gap: 6px !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  cursor: pointer !important;
  background: var(--bg-secondary, #F9FAFB) !important;
  border-bottom: 1px solid var(--border-color, #E5E7EB) !important;
}

/* ENDPOINTS */
.sidebar .menu-item,
.sidebar button[data-endpoint-id] {
  padding: 4px 20px !important;
  min-height: 28px !important;
  max-height: 30px !important;
  font-size: 10px !important;
  line-height: 1.4 !important;
  gap: 6px !important;
  font-weight: 400 !important;
  display: flex !important;
  align-items: center !important;
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
  width: 100% !important;
  text-align: left !important;
  transition: background 0.15s !important;
}

.sidebar .menu-item:hover {
  background: rgba(0, 145, 213, 0.08) !important;
}

.sidebar .menu-item.active {
  background: rgba(0, 145, 213, 0.15) !important;
  border-left: 3px solid #0091D5 !important;
}

/* TEXTO DOS ITENS - VISÍVEL COMPLETO */
.sidebar .menu-item span:not([class*="badge"]),
.sidebar .menu-entity span:not([class*="badge"]),
.sidebar .menu-module span:not([class*="badge"]) {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  flex: 1 !important;
  min-width: 0 !important;
}

/* =============================================================================
   4. RESPONSIVIDADE
   ============================================================================= */

@media (max-width: 992px) {
  .sidebar {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
  }
  
  .sidebar .menu-module {
    font-size: 11px !important;
    padding: 5px 10px !important;
  }
  
  .sidebar .menu-entity {
    font-size: 10px !important;
    padding: 4px 14px !important;
  }
  
  .sidebar .menu-item {
    font-size: 9px !important;
    padding: 3px 18px !important;
  }
  
  .sidebar span[class*="badge"] {
    width: 36px !important;
    font-size: 6px !important;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 100% !important;
    max-width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-color, #E5E7EB) !important;
  }
}

/* =============================================================================
   5. DARK MODE
   ============================================================================= */

[data-theme="dark"] .sidebar {
  background: #1A1A1A !important;
  border-color: #2D2D2D !important;
}

[data-theme="dark"] .sidebar .menu-module {
  background: #2D2D2D !important;
  border-color: #404040 !important;
  color: #E5E5E5 !important;
}

[data-theme="dark"] .sidebar .menu-entity {
  background: #1A1A1A !important;
  border-color: #2D2D2D !important;
  color: #D4D4D4 !important;
}

[data-theme="dark"] .sidebar .menu-item {
  color: #A3A3A3 !important;
}

[data-theme="dark"] .sidebar .menu-item:hover {
  background: rgba(0, 145, 213, 0.12) !important;
}

[data-theme="dark"] .sidebar .menu-item.active {
  background: rgba(0, 145, 213, 0.20) !important;
  color: #33A9E0 !important;
}
