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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.container {
    width: 100%;
    max-width: 400px;
    position: relative;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.page.active {
    display: block;
}

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

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
}

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

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

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

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(116, 185, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: #718096;
    border: 2px solid #e2e8f0;
}

.btn-outline:hover:not(:disabled) {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.btn-info:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    background: #6c757d;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

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

.server-info {
    background: rgba(247, 250, 252, 0.8);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.label {
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
}

.status-online {
    color: #38a169;
    font-weight: 600;
    font-size: 14px;
}

.status-offline {
    color: #e53e3e;
    font-weight: 600;
    font-size: 14px;
}

.actions {
    margin-bottom: 24px;
}

.result-message {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.result-message.success {
    background: rgba(56, 161, 105, 0.1);
    color: #38a169;
    border: 1px solid rgba(56, 161, 105, 0.2);
}

.result-message.error {
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
    border: 1px solid rgba(229, 62, 62, 0.2);
}

.error-message {
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
    border: 1px solid rgba(229, 62, 62, 0.2);
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
}

.log-area {
    background: rgba(248, 249, 250, 0.9);
    border: 1px solid rgba(206, 212, 218, 0.8);
    border-radius: 12px;
    margin-bottom: 24px;
    max-height: 300px;
    overflow: hidden;
}

.log-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(206, 212, 218, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
}

.log-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.log-content {
    padding: 12px 16px;
    max-height: 240px;
    overflow-y: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #495057;
    background: rgba(248, 249, 250, 0.5);
}

.log-entry {
    margin-bottom: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-entry.info {
    background: rgba(23, 162, 184, 0.1);
    border-left: 3px solid #17a2b8;
}

.log-entry.success {
    background: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
}

.log-entry.warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
}

.log-entry.error {
    background: rgba(220, 53, 69, 0.1);
    border-left: 3px solid #dc3545;
}

.log-timestamp {
    color: #6c757d;
    font-weight: 500;
}

.additional-actions {
    margin-bottom: 24px;
}

.logout-section {
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    padding-top: 20px;
}

/* Responsividade para telas maiores */
@media (min-width: 768px) {
    .container {
        max-width: 450px;
    }
    
    .card {
        padding: 40px;
    }
    
    .header h1 {
        font-size: 32px;
    }
}

/* Melhorias para dispositivos móveis */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    .card {
        padding: 24px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .btn {
        padding: 14px;
        font-size: 15px;
    }
    
    .input-group input {
        padding: 14px;
        font-size: 16px; /* Evita zoom no iOS */
    }
}

/* Animações de touch para móvel */
@media (hover: none) and (pointer: coarse) {
    .btn:active {
        transform: scale(0.98);
    }
    
    .input-group input:focus {
        transform: none;
    }
} 