/* ============================================================
   WhatsApp Meta Dashboard - CSS Principal
   v5.0.0 Node.js
   ============================================================ */

/* Variáveis CSS */
:root {
    --wpp-green: #25D366;
    --wpp-dark-green: #128C7E;
    --wpp-light-green: #DCF8C6;
    --sidebar-width: 250px;
}

/* Body */
body {
    background-color: #f5f6fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
    font-size: 1.1rem;
}

.navbar-brand i {
    color: var(--wpp-green);
    margin-right: 6px;
}

/* Cards */
.card {
    border-radius: 0.75rem;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    border-radius: 0.75rem 0.75rem 0 0 !important;
    font-weight: 600;
}

/* Badges */
.badge {
    font-size: 0.75em;
    font-weight: 600;
    padding: 0.4em 0.7em;
    border-radius: 0.4rem;
}

/* Tabelas */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.table td {
    vertical-align: middle;
}

/* Botões */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn-sm {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
}

/* Formulários */
.form-control, .form-select {
    border-radius: 0.5rem;
    border-color: #dee2e6;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Alertas */
.alert {
    border-radius: 0.75rem;
    border: none;
}

/* Paginação */
.pagination .page-link {
    border-radius: 0.4rem;
    margin: 0 2px;
    border: 1px solid #dee2e6;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Código */
code {
    font-size: 0.85em;
    background-color: #f8f9fa;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    color: #e83e8c;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Spinner de carregamento */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert {
    animation: fadeIn 0.3s ease;
}

/* Dashboard - Cards de Estatísticas */
.stat-card {
    border-left: 4px solid;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.primary { border-left-color: #0d6efd; }
.stat-card.success { border-left-color: #198754; }
.stat-card.warning { border-left-color: #ffc107; }
.stat-card.info { border-left-color: #0dcaf0; }

/* Responsividade */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .btn-group .btn {
        padding: 0.2rem 0.4rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Tooltip personalizado */
[title] {
    cursor: help;
}

/* Ícone WhatsApp */
.bi-whatsapp {
    color: var(--wpp-green);
}

/* Status badges específicos */
.badge-connected { background-color: #198754; }
.badge-pending { background-color: #ffc107; color: #000; }
.badge-disconnected { background-color: #dc3545; }
.badge-approved { background-color: #198754; }
.badge-rejected { background-color: #dc3545; }
.badge-quality-green { background-color: #198754; }
.badge-quality-yellow { background-color: #ffc107; color: #000; }
.badge-quality-red { background-color: #dc3545; }
