/* Scrollbar customizado global */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d1d5db;
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* Tema escuro */
html.dark ::-webkit-scrollbar-thumb {
  background: #374151;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

html.dark ::-webkit-scrollbar-track {
  background: transparent;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}

html.dark * {
  scrollbar-color: #374151 transparent;
}

/* Classes utilitárias para scroll customizado */
.custom-scroll {
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}

.custom-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 8px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: #d1d5db;
}

.custom-scroll::-webkit-scrollbar-track {
  background: transparent;
}

html.dark .custom-scroll {
  scrollbar-color: #374151 transparent;
}

html.dark .custom-scroll::-webkit-scrollbar-thumb {
  background: #374151;
}

html.dark .custom-scroll::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

/* Scrollbar invisível quando necessário */
.scroll-hidden {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-hidden::-webkit-scrollbar {
  display: none;
}

/* Scroll suave para toda a aplicação */
html {
  scroll-behavior: smooth;
}

/* Em mobile, mantém scroll nativo para melhor performance */
@media (max-width: 768px) {
  ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }
}

/* Scrollbar customizado para sidebar (mantendo compatibilidade) */
.sidebar-scroll::-webkit-scrollbar {
  width: 8px;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 8px;
}
.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}
html.dark .sidebar-scroll::-webkit-scrollbar-thumb {
  background: #374151;
}
html.dark .sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}
/* Firefox */
.sidebar-scroll {
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}
html.dark .sidebar-scroll {
  scrollbar-color: #374151 transparent;
}
.field-data {
  border: 0px solid;
  border-bottom: 1px solid black;
  padding: 0.5rem;
  color: black;
}
.field-data:focus {
  outline: none;
  border-bottom: 2px solid var(--primary);
}
.muy-box-file-upload {
  padding: 1rem 2rem;
  display: none;
  background-color: var(--primary-container);
  border: 2px dotted var(--primary);
  border-radius: 5px;
}
.disabled {
  pointer-events: none;
  background-color: #a6a6a6d6 !important;
}
.field-component {
  padding: 0.5rem;
}
input[type='file'] {
  display: none;
}
.table-hover tbody {
  transition: 0.2s ease-in-out;
}
.table-hover tbody tr:hover {
  transition: 0.2s ease-in-out;
  background-color: rgba(128, 128, 128, 0.05);
}

/* Garantir background consistente para tema dark/light */
html {
  height: 100%;
  min-height: 100vh;
}

body {
  height: 100%;
  min-height: 100vh;
}

/* Forçar background em toda a viewport */
html.dark {
  background-color: #111827 !important;
}

html:not(.dark) {
  background-color: #f9fafb !important;
}

html.dark body {
  background-color: #111827 !important;
}

html:not(.dark) body {
  background-color: #f9fafb !important;
}

/* Dropdown animations */
.dropdown-enter-active, .dropdown-leave-active {
  transition: all 0.3s ease;
}

.dropdown-enter, .dropdown-leave-to {
  opacity: 0;
  transform: translateY(-10px);
}

/* Smooth icon rotation */
.rotate-180 {
  transform: rotate(180deg);
}
