/**
 * DinControl - Estilos Customizados
 * Baseado em Tailwind CSS com variáveis CSS customizadas
 */

/* Variáveis CSS */
:root {
    /* Cores Principais */
    --primary-blue: #0EA5E9;
    --primary-dark: #0C4A6E;
    --primary-light: #E0F2FE;
    --primary-white: #ffffff;
    
    /* Cores Secundárias */
    --secondary: #1E3A8A;
    --accent: #3B82F6;
    
    /* Cores de Status */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #6366F1;
    
    /* Neutros */
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-400: #94A3B8;
    --gray-600: #475569;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    --white: #FFFFFF;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #0EA5E9 0%, #1E3A8A 100%);
    --gradient-subtle: linear-gradient(180deg, #E0F2FE 0%, #FFFFFF 100%);
    --gradient-hero: linear-gradient(135deg, #0C4A6E 0%, #0EA5E9 50%, #3B82F6 100%);
    
    /* Tipografia */
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Espaçamentos */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Importação de fontes */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--gray-900);
    background-color: var(--gray-50);
    line-height: 1.6;
    position: relative;
    overflow: hidden;
    height: 100vh;
    margin: 0;
    padding: 0;
}

.h-100vh {
    height: 100vh;
}

/* Overlay sutil para melhorar legibilidade sobre background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    z-index: -1;
    pointer-events: none;
}

/* Estilos do Menu Lateral */
.nav-menu-item {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-menu-item:hover {
    background: rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(14, 165, 233, 0.5) !important;
    color: #ffffff !important;
    transform: translateX(2px);
}

.nav-menu-item.active {
    background: rgba(14, 165, 233, 0.4) !important;
    border-color: rgba(14, 165, 233, 0.6) !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.nav-menu-item.active i[data-lucide] {
    color: #ffffff !important;
}

.nav-menu-item:hover i[data-lucide],
.nav-menu-item.active i[data-lucide] {
    color: #ffffff !important;
}

/* Ajustes para hover nos links da sidebar */
#sidebar a:hover,
#sidebar-mobile a:hover {
    background-color: rgba(14, 165, 233, 0.15) !important;
}

/* Transições suaves para navegação */
main, #sidebar {
    transition: opacity 0.3s ease-in-out;
}

/* Garantir que o background apareça */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Utilitários customizados */
.bg-primary-blue { background-color: var(--primary-blue); }
.bg-primary-dark { background-color: var(--primary-dark); }
.bg-primary-light { background-color: var(--primary-light); }
.bg-success { background-color: var(--success); }
.bg-warning { background-color: var(--warning); }
.bg-danger { background-color: var(--danger); }

.text-primary-blue { color: var(--primary-blue); }
.text-primary-dark { color: var(--primary-dark); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

/* Responsive text sizes */
@media (min-width: 576px) {
    .h1-sm { font-size: 2.5rem !important; }
    .h2-sm { font-size: 2rem !important; }
    .h4-sm { font-size: 1.5rem !important; }
    .small-sm { font-size: 1rem !important; }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Loading spinner */
.spinner {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Compatibilidade Bootstrap + Tailwind */
/* Previne conflitos entre Bootstrap e Tailwind */
.bg-primary-blue { background-color: var(--primary-blue) !important; }
.bg-primary-dark { background-color: var(--primary-dark) !important; }
.bg-primary-light { background-color: var(--primary-light) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }

.text-primary-blue { color: var(--primary-blue) !important; }
.text-primary-dark { color: var(--primary-dark) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-accent { color: var(--accent) !important; }

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue) var(--gray-100);
}

/* Scrollbar para sidebar */
#sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue) transparent;
}

#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Scrollbar personalizada para o conteúdo principal */
main::-webkit-scrollbar {
    width: 8px;
}

main::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

main::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
    transition: background 0.3s ease;
}

main::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.text-white {
    color: var(--primary-white) !important;
}

