* {
    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: 500px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dc3545;
    animation: pulse 2s infinite;
}

.status.connected .status-dot {
    background: #28a745;
}

.status.connecting .status-dot {
    background: #ffc107;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card h2, .card h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

.form-group.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-group.checkbox label {
    margin-bottom: 0;
    cursor: pointer;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

.hidden {
    display: none !important;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.user-info h3 {
    margin: 0;
    font-size: 18px;
}

.display {
    margin-bottom: 20px;
}

.display input {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    text-align: right;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
}

.dialpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.dial-btn {
    aspect-ratio: 1;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    background: white;
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #333;
}

.dial-btn span {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

.dial-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.05);
}

.dial-btn:hover span {
    color: white;
}

.dial-btn:active {
    transform: scale(0.95);
}

.call-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.call-controls .btn {
    width: 100%;
}

.call-controls .btn:only-child {
    grid-column: 1 / -1;
}

.call-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.call-info p {
    margin-bottom: 8px;
    color: #555;
}

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

.in-call-controls {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.in-call-controls .btn {
    flex: 1;
}

.log {
    max-height: 200px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.log-entry {
    margin-bottom: 8px;
    color: #555;
    padding: 4px 0;
    border-bottom: 1px solid #e0e0e0;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.error {
    color: #dc3545;
    font-weight: 600;
}

.log-entry.success {
    color: #28a745;
    font-weight: 600;
}

.log-entry.warning {
    color: #ffc107;
    font-weight: 600;
}

/* Scrollbar customizado */
.log::-webkit-scrollbar {
    width: 8px;
}

.log::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.log::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.log::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsividade */
@media (max-width: 600px) {
    .container {
        padding: 0;
    }

    .card {
        border-radius: 0;
    }

    header {
        border-radius: 0;
    }
}
