/* Container do Grid */
.container-integracoes {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.header-pagina {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.header-pagina h2 {
    margin: 0;
    font-size: 2rem;
    color: var(--primary-dark);
    font-weight: 700;
}

.header-pagina p {
    margin: 5px 0 0;
    color: var(--primary-color);
    font-weight: 500;
}

.grupo-integracao {
    margin-bottom: 2.5rem;
}

.titulo-grupo-integracao {
    color: var(--primary-dark);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 10px 0;
}

/* Card Base */
.integration-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.integration-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--primary-color);
}

/* Logos das Plataformas */
.card-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 10px;
}

.card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Títulos */
.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0 0 5px 0;
}

/* Status Indicator */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
    background: rgba(243, 244, 246, 0.8);
    color: #6b7280;
}

.status-badge.active {
    background: rgba(220, 252, 231, 0.8);
    color: #166534;
}

/* [NOVO] Estilo de Erro */
.status-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #9ca3af;
}

.status-badge.active .status-dot {
    background-color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-badge.error .status-dot {
    background-color: #ef4444;
}

/* Botão Configurar */
.btn-config {
    width: 100%;
    padding: 10px;
    border-radius: var(--border-radius);
    border: 1px solid #cbd5e1;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--primary-dark);
}

.btn-config:hover {
    background: #f1f5f9;
    border-color: var(--primary-dark);
}

/* Card Destaque (WhatsApp) */
.integration-card.highlight {
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid rgba(255, 255, 255, 1);
    box-shadow: 0 10px 25px -5px rgba(37, 211, 102, 0.15);
}

.integration-card.highlight .btn-config {
    background: #dcfce7;
    color: #166534;
}

.integration-card.highlight .btn-config:hover {
    background: #bbf7d0;
}

/* Modais de Configuração - Estilo Premium */
.modal-overlay {
    display: none; /* [FIX] Oculto por padrão */
    backdrop-filter: blur(8px);
    background: rgba(15, 23, 42, 0.6);
    transition: opacity 0.3s ease;
}

.modal-content {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    /* Deep shadow + subtle ring */
    padding: 32px;
    max-width: 500px;
    width: 90%;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

/* Efeito de brilho no topo do modal */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), #60a5fa);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(40px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.5px;
}

.btn-close-modal {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
}

.btn-close-modal:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Status Card dentro do Modal (Whats/Face) */
.status-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    text-align: center;
}

.status-icon {
    /* font-size: 3rem; Removed, using images now */
    margin-bottom: 16px;
    display: inline-block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.status-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.status-info p {
    margin: 5px 0;
    color: #475569;
}

/* Botões Específicos */
.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128c7e 100%) !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    border: none;
    transition: transform 0.2s;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.btn-facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0c4a6e 100%) !important;
    color: white;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
    border: none;
    font-weight: 600;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-facebook:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.4);
}