/* Estilos para Modal de Sincronização */

.sync-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.sync-modal.active {
    display: flex;
}

.sync-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.sync-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sync-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.sync-close {
    cursor: pointer;
    font-size: 28px;
    font-weight: 300;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.sync-close:hover {
    opacity: 1;
}

.sync-modal-body {
    padding: 30px;
}

.sync-progress-container {
    margin-bottom: 25px;
}

.sync-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.sync-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease-out;
    border-radius: 10px;
}

.sync-status {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    text-align: center;
}

.sync-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    background: #f9fafb;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
}

/* Estados */
.sync-modal.success .sync-modal-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.sync-modal.success .sync-progress-fill {
    background: linear-gradient(90deg, #10b981, #059669);
}

.sync-modal.error .sync-modal-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.sync-modal.error .sync-progress-fill {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Botão com loading */
.btn.loading {
    opacity: 0.7;
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    top: 50%;
    left: 50%;
    margin-left: -7px;
    margin-top: -7px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsivo */
@media (max-width: 640px) {
    .sync-modal-content {
        width: 95%;
    }
    
    .sync-modal-body {
        padding: 20px;
    }
    
    .sync-stats {
        grid-template-columns: 1fr;
    }
}
