/* ===================================================================
    DASHBOARD CSS - VIVER MAIS
    Arquivo: adm/dashboard.css
    =================================================================== */

/* Reset e variáveis */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --sidebar-width: 250px; /* Mantido por precaução, mas não é mais usado para margin/width */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Navbar customizado */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
    z-index: 1030;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar-logo {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.navbar .badge {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Regras de Sidebar removidas */


/* Main content */
/* Removido o col-md-9 e ms-sm-auto, o main agora ocupa a largura total */
main {
    padding-top: 1rem;
    min-height: calc(100vh - 56px);
}

.border-bottom {
    border-bottom: 2px solid #e9ecef !important;
}

/* Cards customizados */
.card {
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.card-text {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Icon box */
.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Botões customizados */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    /* Removido o ícone de seta no PHP, mas se precisar garantir a remoção de qualquer margem extra: */
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

/* Badges customizados */
.badge {
    border-radius: 6px;
    font-weight: 500;
}

/* Dropdown */
.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: none;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    padding-left: 1.25rem;
}

.dropdown-item i {
    margin-right: 0.5rem;
}

/* Footer */
footer {
    font-size: 0.875rem;
    padding: 1.5rem 0;
}

/* Scrollbar customizada - Removidas as regras específicas de sidebar */


/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Responsividade */
@media (max-width: 767.98px) {
    /* Regras de Sidebar removidas */
    
    main {
        padding-left: 0 !important;
        padding-right: 20px;
        padding-left: 20px;
    }
    
    .container-fluid {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .user-info {
        margin: 0 0.5rem;
        padding: 0.75rem;
    }
    
    .user-info h6 {
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-logo {
        height: 30px;
        max-width: 120px;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .icon-box {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    /* Padding adicional nos cards */
    .card {
        margin-left: 0;
        margin-right: 0;
    }
    
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .row > * {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Regras para telas maiores - Main agora não tem mais margem lateral */
@media (min-width: 768px) {
    main {
        margin-left: 0; /* Removida a margin para o sidebar */
    }
    
    /* Regras de sidebar removidas */
}

/* Modo escuro (opcional - descomente para ativar) */
/*
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .card {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .card-title {
        color: #ffffff;
    }
    
    .text-muted {
        color: #a0a0a0 !important;
    }
}
*/

/* Estados de loading (opcional) */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Utilitários extras */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm-hover:hover {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-badge.status-active::before {
    background-color: #28a745;
}

.status-badge.status-inactive::before {
    background-color: #dc3545;
}

.status-badge.status-pending::before {
    background-color: #ffc107;
}