/* Menu de perfil CG isolado dos estilos globais da CGL Tech */
.profile-menu {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
}

.profile-menu #profileButton {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: #1E293B !important;
  color: #FFFFFF !important;
  opacity: 1 !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .18) !important;
  font-weight: 900 !important;
}

.profile-dropdown-cgl {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  right: 0 !important;
  width: min(320px, calc(100vw - 32px)) !important;
  max-width: 320px !important;
  max-height: 500px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px !important;
  padding: 14px !important;
  border: 1px solid rgba(226, 232, 240, .14) !important;
  border-radius: 16px !important;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, .10), rgba(15, 23, 42, 0) 38%),
    #0F172A !important;
  color: #E5EDF7 !important;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: 0 22px 56px rgba(15, 23, 42, .28) !important;
  z-index: 9999 !important;
}

.profile-dropdown-cgl.hidden {
  display: none !important;
}

.profile-dropdown-cgl * {
  opacity: 1 !important;
  visibility: visible !important;
  box-sizing: border-box !important;
}

.profile-dropdown-cgl .profile-dropdown-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 10px 14px !important;
  border-bottom: 1px solid rgba(226, 232, 240, .12) !important;
  background: transparent !important;
  color: #E5EDF7 !important;
}

.profile-dropdown-cgl .profile-avatar {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #2563EB, #0F766E) !important;
  color: #FFFFFF !important;
  font-weight: 900 !important;
}

.profile-dropdown-cgl strong {
  display: block !important;
  color: #FFFFFF !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}

.profile-dropdown-cgl small {
  display: block !important;
  margin-top: 3px !important;
  color: #AFC0D6 !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.profile-dropdown-cgl .profile-dropdown-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  color: #E5EDF7 !important;
}

.profile-dropdown-cgl .profile-dropdown-group > span {
  display: block !important;
  padding: 8px 4px 2px !important;
  color: #93A8C5 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

.profile-dropdown-cgl .profile-brand-signature {
  display: grid !important;
  gap: 3px !important;
  padding: 12px 10px 14px !important;
  border-bottom: 1px solid rgba(226, 232, 240, .12) !important;
}

.profile-dropdown-cgl .profile-brand-signature strong {
  color: #FFFFFF !important;
  font-size: .9rem !important;
}

.profile-dropdown-cgl .profile-brand-signature small {
  color: #AFC0D6 !important;
  font-size: .73rem !important;
}

.profile-dropdown-cgl button,
.profile-dropdown-cgl a,
.profile-dropdown-cgl .profile-menu-item {
  width: 100% !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 11px 13px !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background: #1E293B !important;
  color: #FFFFFF !important;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: none !important;
  filter: none !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  text-decoration: none !important;
  white-space: normal !important;
  cursor: pointer !important;
  gap: 10px !important;
}

.profile-dropdown-cgl button::before,
.profile-dropdown-cgl a::before,
.profile-dropdown-cgl .profile-menu-item::before {
  content: attr(data-icon) !important;
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  display: grid !important;
  place-items: center !important;
  color: #DBEAFE !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.profile-dropdown-cgl button:hover,
.profile-dropdown-cgl button:focus-visible,
.profile-dropdown-cgl a:hover,
.profile-dropdown-cgl a:focus-visible,
.profile-dropdown-cgl .profile-menu-item:hover {
  background: #2563EB !important;
  border-color: #2563EB !important;
  color: #FFFFFF !important;
  outline: none !important;
}

.profile-dropdown-cgl button:hover::before,
.profile-dropdown-cgl button:focus-visible::before,
.profile-dropdown-cgl a:hover::before,
.profile-dropdown-cgl a:focus-visible::before,
.profile-dropdown-cgl .profile-menu-item:hover::before {
  color: #FFFFFF !important;
}

.profile-dropdown-cgl .profile-logout,
.profile-dropdown-cgl #logoutButton {
  display: flex !important;
  background: rgba(220, 38, 38, .92) !important;
  border-color: rgba(254, 226, 226, .24) !important;
  color: #FFFFFF !important;
}

.profile-dropdown-cgl .profile-logout:hover,
.profile-dropdown-cgl .profile-logout:focus-visible,
.profile-dropdown-cgl #logoutButton:hover,
.profile-dropdown-cgl #logoutButton:focus-visible {
  background: #B91C1C !important;
  color: #FFFFFF !important;
}

.profile-notice-modal {
  width: min(440px, calc(100vw - 32px)) !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 18px !important;
  padding: 0 !important;
  background: #FFFFFF !important;
  color: #1E293B !important;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .22) !important;
}

.profile-notice-modal::backdrop {
  background: rgba(15, 23, 42, .28) !important;
}

.profile-notice-modal .dialog-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 18px 20px !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

.profile-notice-modal h3 {
  margin: 0 !important;
  color: #0F172A !important;
}

.profile-notice-modal p {
  margin: 0 !important;
  padding: 18px 20px 6px !important;
  color: #475569 !important;
  line-height: 1.55 !important;
}

.profile-notice-modal .modal-actions {
  display: flex !important;
  justify-content: flex-end !important;
  padding: 16px 20px 20px !important;
}

.profile-notice-modal button {
  color: #FFFFFF !important;
}

.sidebar {
  position: sticky !important;
  top: 0 !important;
  overflow: hidden !important;
}

.sidebar-toggle-row {
  position: static !important;
  width: auto !important;
  height: auto !important;
  display: flex !important;
  padding: 0 14px 14px !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  z-index: 1 !important;
}

.sidebar-toggle {
  position: static !important;
  width: 100% !important;
  height: 42px !important;
  min-width: 0 !important;
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .10) !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  z-index: 1 !important;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  background: #2563EB !important;
  color: #FFFFFF !important;
  outline: none !important;
}

.app.sidebar-compact .sidebar-toggle-row {
  padding: 0 8px 14px !important;
  justify-content: center !important;
}

.app.sidebar-compact .sidebar-toggle {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  justify-content: center !important;
  padding: 0 !important;
}

.app.sidebar-compact .sidebar-toggle-label {
  display: none !important;
}

.app.sidebar-hidden .sidebar-toggle-row {
  display: flex !important;
}

/* Navegação premium CGL TECH: sidebar recolhida por padrão e expandida por hover */
.app {
  grid-template-columns: 72px minmax(0, 1fr) !important;
  transition: grid-template-columns .22s ease !important;
}

.app:not(.sidebar-compact):not(.sidebar-hidden) {
  grid-template-columns: 280px minmax(0, 1fr) !important;
}

.app .sidebar {
  width: 72px !important;
  min-width: 72px !important;
  height: 100vh !important;
  padding: 18px 10px !important;
  border-right: 1px solid rgba(148, 163, 184, .16) !important;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, .10), rgba(15, 23, 42, 0) 34%),
    #0F172A !important;
  color: #E5EDF7 !important;
  box-shadow: 12px 0 34px rgba(15, 23, 42, .10) !important;
  transition: width .22s ease, min-width .22s ease, padding .22s ease !important;
}

.app:not(.sidebar-compact):not(.sidebar-hidden) .sidebar {
  width: 280px !important;
  min-width: 280px !important;
  padding: 22px 16px !important;
}

.sidebar .brand {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 52px !important;
  padding: 0 !important;
  margin: 0 0 18px !important;
}

.sidebar .brand-mark {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 14px !important;
  display: grid !important;
  place-items: center !important;
  background: linear-gradient(135deg, #2563EB, #0F766E) !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  font-weight: 900 !important;
}

.app.sidebar-compact .brand {
  justify-content: center !important;
  margin-bottom: 18px !important;
}

.app.sidebar-compact .brand div {
  display: none !important;
}

.sidebar .brand strong {
  color: #FFFFFF !important;
  font-size: 15px !important;
  letter-spacing: .02em !important;
}

.sidebar .brand small {
  color: #AFC0D6 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.sidebar-toggle-row {
  padding: 0 !important;
  margin: 0 0 18px !important;
}

.sidebar-toggle {
  height: 38px !important;
  min-height: 38px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(226, 232, 240, .12) !important;
  background: rgba(255, 255, 255, .06) !important;
  color: #F8FAFC !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  background: rgba(37, 99, 235, .92) !important;
  border-color: rgba(37, 99, 235, .92) !important;
}

.app.sidebar-compact .sidebar-toggle-row {
  padding: 0 !important;
  justify-content: center !important;
}

.app.sidebar-compact .sidebar-toggle {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  border-radius: 14px !important;
}

.sidebar .menu {
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
  padding: 0 !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
}

.sidebar .menu button {
  width: 100% !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 0 12px !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  background: transparent !important;
  color: #C9D5E6 !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  transition: background .18s ease, color .18s ease, border-color .18s ease !important;
}

.sidebar .menu button::before {
  content: attr(data-icon) !important;
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  display: grid !important;
  place-items: center !important;
  color: #93A8C5 !important;
  font-size: 15px !important;
  line-height: 1 !important;
}

.sidebar .menu button:hover {
  background: rgba(255, 255, 255, .075) !important;
  border-color: rgba(226, 232, 240, .10) !important;
  color: #FFFFFF !important;
}

.sidebar .menu button:hover::before {
  color: #FFFFFF !important;
}

.sidebar .menu button.active {
  background: linear-gradient(135deg, #2563EB, #1D4ED8) !important;
  border-color: rgba(255, 255, 255, .16) !important;
  color: #FFFFFF !important;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .18) !important;
}

.sidebar .menu button.active::before {
  color: #FFFFFF !important;
}

.app.sidebar-compact .menu {
  align-items: center !important;
  gap: 9px !important;
}

.app.sidebar-compact .menu button {
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  justify-content: center !important;
  font-size: 0 !important;
  color: transparent !important;
}

.app.sidebar-compact .menu button::before {
  width: 100% !important;
  height: 100% !important;
  font-size: 16px !important;
}

.sidebar-footer {
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
