/* Global Base Styles */
html {
    font-size: 90%;
}

body {
    background-color: #0B0F19;
    color: #F3F4F6;
    -webkit-font-smoothing: antialiased;
}

/* Global Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0B0F19;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 2px solid #0B0F19;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(234, 179, 8, 0.3);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) #0B0F19;
}

/* Background Elements */
.bg-grid {
    background-image: 
        linear-gradient(rgba(234, 179, 8, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(234, 179, 8, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}
.orb-primary { background: #EAB308; }
.orb-secondary { background: #A16207; }

/* Dashboard Layout Wrapper */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 2rem;
    margin-left: 280px; /* Desktop Sidebar Width */
    transition: margin-left 0.3s ease;
}

@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        padding: 1.25rem;
        padding-top: 4.5rem;
    }
}

/* Otimização de Densidade para Telas Pequenas (320px - 768px) */
@media (max-width: 768px) {
    html {
        font-size: 85%;
    }

    .main-content {
        padding: 1rem;
        padding-top: 4rem;
    }

    /* Redução de espaçamentos em cards e painéis */
    .glass-panel, .card {
        padding: 1.25rem !important;
    }

    /* Ajuste de títulos para economizar espaço */
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
    h3 { font-size: 1.1rem !important; }

    /* Tabelas responsivas compactas */
    .table-responsive {
        margin: -1rem;
        padding: 0;
        border: none !important;
    }

    /* Botões mais compactos em mobile */
    .btn-premium, .btn-outline-premium {
        padding: 0.75rem 1rem !important;
        font-size: 0.8rem !important;
    }

    /* Ajuste de grids para ocupar largura total */
    .grid {
        gap: 1rem !important;
    }
}

/* Ajustes específicos para resoluções ultra-pequenas (320px) */
@media (max-width: 375px) {
    html {
        font-size: 80%;
    }

    .main-content {
        padding: 0.75rem;
        padding-top: 3.5rem;
    }

    .glass-panel {
        padding: 1rem !important;
        border-radius: 1rem !important;
    }

    /* Maximizar área útil eliminando margens externas */
    .view-container {
        padding: 0 !important;
    }
}
