/* Customização CABEMCE - Tema do Painel Admin */

:root {
    --cabemce-blue: #1e40af;
    --cabemce-red: #dc2626;
    --cabemce-gold: #d4af37;
    
    /* Light mode variables */
    --sidebar-active-bg: rgba(30, 64, 175, 0.08);
    --sidebar-hover-bg: rgba(30, 64, 175, 0.05);
    --topbar-bg: linear-gradient(135deg, var(--cabemce-blue) 0%, #1e3a8a 100%);
    --btn-primary-bg: linear-gradient(135deg, var(--cabemce-blue) 0%, #1e3a8a 100%);
    --btn-primary-hover: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    --border-subtle: rgba(156, 163, 175, 0.2);
}

.dark {
    /* Dark mode variables - smooth and modern */
    --cabemce-blue: #60a5fa; /* Lighter blue for dark mode readability */
    --cabemce-red: #ef4444;  /* Lighter red */
    --sidebar-active-bg: rgba(96, 165, 250, 0.15);
    --sidebar-hover-bg: rgba(96, 165, 250, 0.08);
    --topbar-bg: #0f172a; /* Smooth dark background for topbar */
    --btn-primary-bg: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --btn-primary-hover: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    --border-subtle: rgba(255, 255, 255, 0.1);
}

/* Logo size */
.fi-simple-layout .fi-logo,
.fi-logo {
    height: 3rem !important;
    width: auto !important;
}

/* Header do painel */
.fi-topbar {
    background: var(--topbar-bg) !important;
    border-bottom: 2px solid var(--cabemce-red) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark .fi-topbar {
    border-bottom: 1px solid rgba(239, 68, 68, 0.5) !important; /* Softer red border in dark mode */
}

/* Sidebar navigation */
.fi-sidebar-item-button[aria-current="page"],
.fi-sidebar-item-button.fi-active {
    background-color: var(--sidebar-active-bg) !important;
    color: var(--cabemce-blue) !important;
    font-weight: 600 !important;
    border-left: 3px solid var(--cabemce-blue) !important;
    border-radius: 0 0.5rem 0.5rem 0;
}

.fi-sidebar-item-button:hover {
    background-color: var(--sidebar-hover-bg) !important;
    color: var(--cabemce-blue) !important;
}

.fi-sidebar-group-label {
    color: var(--cabemce-blue) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* Detalhes dourados */
.fi-sidebar-group {
    border-top: 1px solid rgba(212, 175, 55, 0.3) !important;
}

/* Botões primários */
.fi-btn-primary {
    background: var(--btn-primary-bg) !important;
    border-color: transparent !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-in-out;
}

.fi-btn-primary:hover {
    background: var(--btn-primary-hover) !important;
    transform: translateY(-1px);
}

/* Botões de perigo */
.fi-btn-danger {
    background: linear-gradient(135deg, var(--cabemce-red) 0%, #b91c1c 100%) !important;
    border-color: transparent !important;
}

.dark .fi-btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
}

/* Badges */
.fi-badge-primary {
    background-color: var(--sidebar-active-bg) !important;
    color: var(--cabemce-blue) !important;
}

.fi-badge-danger {
    background-color: rgba(220, 38, 38, 0.15) !important;
    color: var(--cabemce-red) !important;
}

/* Stats widgets */
.fi-stats-card {
    border-left: 4px solid var(--cabemce-blue) !important;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

/* Section styling */
.fi-section {
    border-radius: 0.75rem !important;
}

.fi-section-header {
    border-bottom: 1px solid var(--border-subtle) !important;
}

.fi-section-header-heading {
    color: var(--cabemce-blue) !important;
    font-weight: 700 !important;
}

/* Clean up unnecessary hardcoded backgrounds so Filament handles Dark/Light mode natively */
