* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #2E9CCA;
    --secondary-blue: #1E7AA8;
    --primary-gray: #999999;
    --dark-gray: #666666;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --error-red: #e74c3c;
    --success-green: #27ae60;
    --shadow: rgba(46, 156, 202, 0.15);
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* LOGIN PAGE OTIMIZADA */
.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #667eea;
}

.background-pattern {
    display: none;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 35px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.logo-section {
    margin-bottom: 35px;
}

/* Logo Section */
.company-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-svg {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.logo-fallback {
    width: 80px;
    height: 80px;
    background: #667eea;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.logo-fallback i {
    font-size: 32px;
    color: white;
}

/* Dashboard Logo */
.dashboard-logo {
    height: 40px;
    margin-right: 15px;
    position: relative;
}

.header-logo-svg {
    height: 100%;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 4px;
}

.header-logo-fallback {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
}

.header-logo-fallback i {
    font-size: 20px;
    color: var(--white);
}

.logo-section h1 {
    color: #667eea;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.logo-section p {
    color: #4a5568;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 500;
}

.powered-by {
    color: #718096;
    font-size: 12px;
    font-weight: 500;
    margin-top: 5px;
    display: inline-block;
}

.login-form {
    margin-bottom: 30px;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 16px;
    z-index: 2;
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    transition: border-color 0.2s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #a0aec0;
    font-size: 16px;
    z-index: 2;
}

.toggle-password:hover {
    color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.login-btn:hover {
    background: #5a67d8;
}

.login-btn:active {
    background: #4c51bf;
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    border: 1px solid #fecaca;
}

/* Modern Dashboard Styles */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px;
    min-height: 100vh;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px 35px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-content h1 {
    color: #2d3748;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-content p {
    color: #718096;
    font-size: 16px;
    font-weight: 500;
}

.logout-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.4);
}

/* Main Content Area */
.dashboard-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.dashboard-content::-webkit-scrollbar {
    width: 8px;
}

.dashboard-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.dashboard-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.dashboard-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* GRID LAYOUT ÚNICO E SIMPLES */
.instances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 30px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* CARDS ABSOLUTAMENTE UNIFORMES */
.instance-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px;
    border: 2px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    
    /* FORÇAR TAMANHO IDÊNTICO */
    width: 100%;
    height: 500px;
    min-height: 500px;
    max-height: 500px;
    
    /* LAYOUT INTERNO */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.instance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.instance-card:hover::before {
    transform: translateX(0);
}

.instance-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

/* Instance Header */
.instance-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.instance-info h3 {
    color: #1a202c;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.instance-info p {
    color: #2d3748;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.instance-info small {
    color: #4a5568;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

/* Status Badges */
.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.status-disconnected {
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    color: #c53030;
}

.status-connected {
    background: linear-gradient(135deg, #c6f6d5, #9ae6b4);
    color: #2f855a;
}

.status-connecting {
    background: linear-gradient(135deg, #feebc8, #fbd38d);
    color: #c05621;
}

/* Instance Profile */
.instance-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 16px;
    margin-bottom: 20px;
}

/* Instance Statistics */
.instance-stats {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.03);
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-picture {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-info h4 {
    color: #1a202c;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-info p {
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
}

/* Instance Actions */
.instance-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.connect-btn, .action-btn {
    flex: 1;
    min-width: 140px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.connect-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.action-btn.update {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.action-btn.update:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

.disconnect-btn {
    background: linear-gradient(135deg, #e53e3e, #c53030) !important;
    color: white !important;
}

.disconnect-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.3) !important;
}

/* ESTADO CONECTADO - MELHOR CONTRASTE */
.instance-card.connected {
    border-color: #48bb78;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 244, 0.95));
    box-shadow: 0 8px 32px rgba(72, 187, 120, 0.15);
}

.instance-card.connected::before {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

/* Garantir texto legível em cards conectados */
.instance-card.connected .instance-info h3,
.instance-card.connected .instance-info p,
.instance-card.connected .instance-info small {
    color: #1a202c !important;
    font-weight: 600 !important;
}

.instance-card.connected .profile-info h4,
.instance-card.connected .profile-info p {
    color: #2d3748 !important;
    font-weight: 500 !important;
}

.instance-card.connected .stat-label {
    color: #4a5568 !important;
    font-weight: 500 !important;
}

/* Loading and Error States */
.loading-instances, .no-instances, .api-error {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.loading-instances .loading-spinner {
    margin: 0 auto 20px;
}

.no-instances i, .api-error i {
    font-size: 48px;
    color: #a0aec0;
    margin-bottom: 20px;
}

.no-instances small {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: #a0aec0;
    font-style: italic;
}

.api-error h3 {
    color: #e53e3e;
    font-size: 20px;
    margin-bottom: 10px;
}

.api-error .error-details {
    background: rgba(229, 62, 62, 0.1);
    padding: 10px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.instance-info p {
    color: var(--primary-gray);
    font-size: 14px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-connected {
    background: #d4edda;
    color: var(--success-green);
}

.status-disconnected {
    background: #f8d7da;
    color: var(--error-red);
}

.status-connecting {
    background: #fff3cd;
    color: #856404;
}

.connect-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.connect-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow);
}

.connect-btn:disabled {
    background: var(--primary-gray);
    cursor: not-allowed;
    transform: none;
}

.qr-container {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 12px;
}

.qr-code {
    margin: 15px 0;
}

.qr-instructions {
    color: var(--dark-gray);
    font-size: 14px;
    margin-bottom: 10px;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

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

/* Loading and Messages */
.loading-instances {
    text-align: center;
    padding: 40px;
    color: var(--primary-gray);
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.api-error {
    text-align: center;
    padding: 40px;
    color: var(--error-red);
}

.api-error i {
    font-size: 48px;
    color: var(--error-red);
    margin-bottom: 15px;
    display: block;
}

.api-error h3 {
    color: var(--error-red);
    margin: 10px 0 5px 0;
    font-size: 18px;
}

.api-error p {
    margin: 5px 0;
    color: var(--dark-gray);
}

.api-error .error-details {
    font-size: 12px;
    color: var(--primary-gray);
    font-family: monospace;
    background: var(--light-gray);
    padding: 10px;
    border-radius: 4px;
    margin: 15px 0;
}

.api-error .connect-btn {
    margin-top: 20px;
}

.no-instances {
    text-align: center;
    padding: 40px;
    color: var(--primary-gray);
    font-size: 16px;
}

.no-instances i {
    font-size: 48px;
    color: var(--primary-blue);
    margin-bottom: 15px;
    display: block;
}

.no-instances p {
    margin: 10px 0;
    font-size: 16px;
}

.api-warning {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    border: 1px solid #ffeaa7;
}

/* Formulário de Instância removido - não é mais necessário */

/* QR Code Modal */
.qr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.qr-modal-overlay.hidden {
    display: none !important;
}

.qr-modal-content {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.qr-modal-header {
    padding: 25px 25px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 25px;
}

.qr-modal-header h2 {
    color: var(--dark-gray);
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.qr-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--primary-gray);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-modal-close:hover {
    background: var(--light-gray);
    color: var(--dark-gray);
}

.qr-modal-body {
    padding: 0 25px;
    text-align: center;
}

.qr-status {
    margin-bottom: 20px;
}

.qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--primary-gray);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    border-top-color: #000000;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

.qr-code-image {
    margin: 20px 0;
}

.qr-code-image img {
    max-width: 250px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow);
    border: 4px solid var(--white);
}

.qr-countdown {
    margin: 20px 0;
    font-size: 14px;
    color: var(--primary-gray);
    padding: 8px 16px;
    background: var(--light-gray);
    border-radius: 20px;
    display: inline-block;
}

.qr-countdown span {
    font-weight: 600;
    color: #000000;
}

.qr-instructions {
    margin-top: 30px;
    text-align: left;
}

.qr-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qr-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.qr-step:hover {
    background: #e8f4fd;
    transform: translateX(5px);
}

.step-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #333333, #000000);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-icon i {
    color: var(--white);
    font-size: 20px;
}

.step-text h4 {
    margin: 0 0 5px 0;
    color: var(--dark-gray);
    font-weight: 600;
    font-size: 16px;
}

.step-text p {
    margin: 0;
    color: var(--primary-gray);
    font-size: 14px;
}

.qr-modal-footer {
    padding: 20px 25px 25px;
    border-top: 1px solid var(--light-gray);
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--primary-gray);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--dark-gray);
    transform: translateY(-1px);
}

/* Modal de Confirmação */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
    backdrop-filter: blur(3px);
}

.confirm-modal-content {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    animation: confirmModalSlideIn 0.3s ease-out;
}

@keyframes confirmModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.confirm-modal-header {
    padding: 25px 25px 0;
    text-align: center;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 20px;
}

.confirm-modal-header h3 {
    margin: 10px 0 0 0;
    color: var(--dark-gray);
    font-size: 20px;
    font-weight: 600;
}

.confirm-modal-body {
    padding: 0 25px 20px;
    text-align: center;
}

.confirm-modal-body p {
    margin: 10px 0;
    color: var(--dark-gray);
    line-height: 1.5;
}

.text-small {
    font-size: 14px;
    color: var(--primary-gray) !important;
}

.confirm-modal-footer {
    padding: 20px 25px 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-cancel, .btn-confirm {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.btn-cancel {
    background: var(--light-gray);
    color: var(--dark-gray);
}

.btn-cancel:hover {
    background: #d0d0d0;
    transform: translateY(-1px);
}

.btn-confirm {
    background: #dc3545;
    color: var(--white);
}

.btn-confirm:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Botão de Desconectar */
.disconnect-btn {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    color: var(--white) !important;
}

.disconnect-btn:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a) !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Instância Conectada */
.connected-instance {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #f8fff9, #f0f9f0);
}

.status-connected {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: var(--white);
    font-weight: 600;
}

.profile-picture {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .instances-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 25px;
    }
    
    .instance-card {
        height: 480px;
        min-height: 480px;
        max-height: 480px;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 15px;
    }
    
    .dashboard-header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header-left {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-content h1 {
        font-size: 28px;
    }
    
    .instances-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .instance-card {
        height: 450px;
        min-height: 450px;
        max-height: 450px;
    }
    
    .instance-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .connect-btn, .action-btn {
        min-width: 100%;
    }
    
    .instance-stats {
        padding: 15px;
        gap: 10px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .qr-modal-content {
        margin: 20px;
        max-width: calc(100vw - 40px);
    }
    
    .confirm-modal-content {
        margin: 20px;
        max-width: calc(100vw - 40px);
    }
}

@media (max-width: 480px) {
    .dashboard-container {
        padding: 10px;
    }
    
    .dashboard-header {
        padding: 15px;
    }
    
    .header-content h1 {
        font-size: 24px;
    }
    
    .instance-card {
        padding: 20px;
    }
    
    .instance-info h3 {
        font-size: 20px;
    }
    
    .profile-picture {
        width: 50px;
        height: 50px;
    }
    
    .instance-stats {
        padding: 15px;
        gap: 10px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* Login responsive */
    .login-card {
        padding: 40px 30px;
        border-radius: 24px;
        margin: 10px;
    }
    
    .logo-section h1 {
        font-size: 32px;
    }
    
    .logo-section p {
        font-size: 16px;
    }
    
    .company-logo {
        width: 80px;
        height: 80px;
    }
    
    .logo-svg {
        width: 60px;
        height: 60px;
    }
    
    .input-group input {
        padding: 18px 18px 18px 50px;
        font-size: 16px;
    }
    
    .login-btn {
        padding: 18px;
        font-size: 16px;
    }
}

@media (max-width: 320px) {
    .login-card {
        padding: 30px 20px;
        margin: 5px;
    }
    
    .logo-section h1 {
        font-size: 28px;
    }
    
    .logo-section p {
        font-size: 14px;
    }
    
    .input-group input {
        padding: 16px 16px 16px 45px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.connect-btn:focus,
.action-btn:focus,
.logout-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Modal styles removidos - não são necessários */

/* Connected Instance */
.connected-instance {
    border: 2px solid var(--success-green);
    background: linear-gradient(135deg, #f0f9f5, #ffffff);
}

.instance-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 12px;
}

.profile-picture {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info h4 {
    margin: 0 0 5px 0;
    color: var(--dark-gray);
    font-weight: 600;
}

.profile-info p {
    margin: 0;
    color: var(--primary-gray);
    font-size: 14px;
}

.instance-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.action-btn.restart {
    background: #fff3cd;
    color: #856404;
}

.action-btn.restart:hover {
    background: #ffeaa7;
}

.action-btn.disconnect {
    background: #ffeaea;
    color: var(--error-red);
}

.action-btn.disconnect:hover {
    background: #fdc5c5;
}

.action-btn.update {
    background: #e7f3ff;
    color: var(--primary-blue);
}

.action-btn.update:hover {
    background: #d1e7ff;
}

/* Error Toast */
.error-toast {
    animation: slideInRight 0.3s ease-out;
}

.error-toast .toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 15px;
    }
    
    .dashboard-header {
        padding: 20px;
        text-align: center;
    }
    
    .instances-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .logo-section h1 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    
    .instance-card {
        padding: 20px;
    }
    
    .dashboard-header {
        padding: 15px;
    }
} 