/* 
 * AutoElite - Sistema de Gestão de Concessionária
 * Estilos personalizados
 */

/* Fontes e estilos gerais */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
}

/* Sidebar */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-logo {
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.sidebar-logo img {
    max-width: 40%;
    height: auto;
    margin-bottom: 0.5rem;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background-color: #fff;
    padding: 8px;
}

.sidebar-logo h4 {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.sidebar-logo p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 300;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.85rem 1.5rem;
    border-radius: 0.5rem;
    margin: 0.3rem 0.8rem;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, #4481eb 0%, #04befe 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

/* Conteúdo principal */
.content {
    padding: 20px;
    transition: all 0.3s ease;
}

/* Cards */
.card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: none;
    margin-bottom: 20px;
    border-radius: 0.75rem;
    overflow: hidden;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* Botões */
.btn-primary {
    background: linear-gradient(90deg, #4481eb 0%, #04befe 100%);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn-success {
    background: linear-gradient(90deg, #28a745 0%, #5fd080 100%);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    background: linear-gradient(90deg, #dc3545 0%, #f07380 100%);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Tabelas */
.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #1e3c72;
}

.top-navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.user-dropdown .nav-link {
    color: #1e3c72;
    font-weight: 600;
}

/* Dropdown */
.dropdown-menu {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #1e3c72;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

/* Submenus na sidebar */
.sidebar .nav-item {
    position: relative;
}

.sidebar .sub-menu {
    list-style: none;
    padding-left: 0;
    margin: 0;
    padding-bottom: 0.5rem;
    display: none;
    transition: all 0.3s ease;
}

.sidebar .nav-link.active + .sub-menu {
    display: block;
}

.sidebar .sub-menu li {
    padding: 0;
}

.sidebar .sub-nav-link {
    display: block;
    padding: 0.5rem 1.5rem 0.5rem 3.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0.3rem;
    margin: 0.2rem 1rem;
}

.sidebar .sub-nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

.sidebar .sub-nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sidebar .sub-nav-link i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}

/* Alertas */
.alert {
    border-radius: 0.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        z-index: 1050;
        transition: all 0.3s ease-in-out;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: block;
    }
    
    .sidebar-toggler {
        display: block !important;
        cursor: pointer;
        padding: 0.5rem;
        font-size: 1.25rem;
        border: none;
        background: transparent;
        color: #1e3c72;
    }
}

@media (min-width: 769px) {
    .sidebar-toggler {
        display: none !important;
    }
}

/* Animações */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Estilos específicos para módulos */
.dashboard-card {
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e3c72;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}
