/* ==================== TOPBAR (light mode only) ==================== */

/* Faixa fixa no topo — sempre pintada, elimina flash no Livewire navigate */
:root:not(.dark) body:has(.fi-topbar)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4rem;
    background-color: #263238;
    z-index: 0;
    pointer-events: none;
}

:root.dark body:has(.fi-topbar)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4rem;
    background-color: #18181b;
    z-index: 0;
    pointer-events: none;
}


:root:not(.dark) .fi-topbar,
:root:not(.dark) .fi-topbar nav,
:root:not(.dark) .fi-sidebar-header {
    background-color: #263238 !important;
}

/* ==================== SIDEBAR LOGO & COLLAPSE BUTTON ==================== */

.fi-sidebar-header .fi-logo {
    height: 2.5rem !important;
    object-fit: contain !important;
}

.fi-sidebar-header .fi-icon-btn.ms-auto {
    margin-left: auto;
    padding-left: 1rem;
}

/* ==================== LOGIN ==================== */

:root:not(.dark) .fi-simple-main {
    background-color: #263238 !important;
    color: #ffffff !important;
}

:root:not(.dark) .fi-simple-main label,
:root:not(.dark) .fi-simple-main .fi-simple-header-heading,
:root:not(.dark) .fi-simple-main .fi-simple-header-subheading,
:root:not(.dark) .fi-simple-main .fi-fo-field-wrp-label span,
:root:not(.dark) .fi-simple-main .fi-fo-field-wrp label span,
:root:not(.dark) .fi-simple-main p,
:root:not(.dark) .fi-simple-main a {
    color: #ffffff !important;
}

/* ==================== CUSTOM SCROLLBAR ==================== */

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

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

::-webkit-scrollbar-thumb {
    background: #d4d4d8;
    border-radius: 9999px;
}

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

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

/* Dark mode scrollbar */
:root.dark ::-webkit-scrollbar-thumb {
    background: #3f3f46;
}

:root.dark ::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

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

:root.dark * {
    scrollbar-color: #3f3f46 transparent;
}
