/* Variáveis CSS */
:root {
    --primary: #206bc4;
    --primary-dark: #1c5da8;
    --secondary: #6c757d;
    --success: #2fb344;
    --danger: #d63931;
    --warning: #f59f00;
    --info: #3b7dd8;
    --light: #f8f9fa;
    --dark: #212529;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* Estilos Gerais */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f9fa;
    color: var(--dark);
}

/* Indicadores de Status */
.status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
}

.status-indicator::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    animation: pulse 2s infinite;
}

.status-connected {
    background-color: rgba(47, 179, 68, 0.1);
    color: var(--success);
    border: 1px solid rgba(47, 179, 68, 0.2);
}

.status-connected::before {
    background-color: var(--success);
}

.status-disconnected {
    background-color: rgba(214, 57, 49, 0.1);
    color: var(--danger);
    border: 1px solid rgba(214, 57, 49, 0.2);
}

.status-disconnected::before {
    background-color: var(--danger);
}

.status-loading {
    background-color: rgba(245, 159, 0, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 159, 0, 0.2);
}

.status-loading::before {
    background-color: var(--warning);
}

/* QR Code */
#qrcode-container {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: inline-block;
}

#qrcode-container img {
    max-width: 100%;
    height: auto;
}

/* Código de Pareamento */
.pairing-code-text {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: 0.2rem;
    background-color: var(--light);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(32, 107, 196, 0.2);
}

/* Animações */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes connectingPulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.status-loading {
    animation: connectingPulse 2s infinite;
}

/* Responsividade */
@media (max-width: 768px) {
    .status-indicator {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .pairing-code-text {
        font-size: 1.2rem;
    }
    
    .btn-list {
        flex-direction: column;
    }
    
    .btn-list .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .container-xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Navbar active link */
.navbar-nav .nav-link.active {
    color: #d63939;
}
.nav-link:focus, .nav-link:hover {
    color: var(--info);
    text-decoration: none;
}

.badge {
    color: var(--light);
}