* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    animation: slideIn 0.8s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.3em;
    opacity: 0.95;
}

.header .domain-info {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

.main-content {
    padding: 30px;
}

.integration-status {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.integration-status.disconnected {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1em;
    opacity: 0.9;
}

.tabs {
    display: flex;
    margin-bottom: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 8px;
    flex-wrap: wrap;
}

.tab {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    text-align: center;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tab:hover {
    background: rgba(37, 211, 102, 0.1);
}

.tab.active {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.6s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.card h3 {
    color: #25D366;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.webhook-config {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border-left: 5px solid #25D366;
}

.code-block {
    background: #2d3748;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid #4a5568;
}

.copy-btn {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 153, 225, 0.4);
}

.btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 5px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.btn-test {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.alert {
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 5px solid;
}

.alert-info {
    background: linear-gradient(135deg, rgba(204, 229, 255, 0.9) 0%, rgba(179, 217, 255, 0.9) 100%);
    color: #004085;
    border-left-color: #007bff;
}

.alert-success {
    background: linear-gradient(135deg, rgba(212, 237, 218, 0.9) 0%, rgba(195, 230, 203, 0.9) 100%);
    color: #155724;
    border-left-color: #28a745;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 243, 205, 0.9) 0%, rgba(254, 230, 138, 0.9) 100%);
    color: #856404;
    border-left-color: #ffc107;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.cart-item:hover {
    border-color: #25D366;
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.1);
}

.cart-info {
    flex: 1;
}

.cart-customer {
    font-weight: 700;
    color: #333;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.cart-details {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 5px;
}

.cart-products {
    color: #666;
    font-size: 0.9em;
    font-style: italic;
}

.whatsapp-link {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
    transition: all 0.3s ease;
}

.whatsapp-link:hover {
    background: linear-gradient(135deg, #128C7E 0%, #0d7268 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(37, 211, 102, 0.3);
    border-radius: 50%;
    border-top-color: #25D366;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container {
    text-align: center;
    padding: 50px;
    color: #666;
}

.log-entry {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    border-radius: 8px;
    margin-bottom: 8px;
}

.log-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.log-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.log-info {
    background: linear-gradient(135deg, #cce5ff 0%, #b3d9ff 100%);
    color: #004085;
    border-left: 4px solid #007bff;
}

.template-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.template-item h4 {
    color: #25D366;
    margin-bottom: 10px;
}

.template-message {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    border-left: 3px solid #25D366;
}

/* Responsividade */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 2em;
    }
}