body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

.container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 800px;
    width: 100%;
}

h1 {
    color: #1c1e21;
    margin-top: 0;
    margin-bottom: 15px;
}

#status-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f7f7f7;
    border-radius: 6px;
}

#status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

#status-indicator.connected {
    background-color: #4caf50;
    box-shadow: 0 0 8px #4caf50;
}

#status-indicator.disconnected {
    background-color: #f44336;
    box-shadow: 0 0 8px #f44336;
}

#status-indicator.connecting {
    background-color: #ff9800;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 8px #ff9800;
}

#status-text {
    font-size: 1.2em;
    font-weight: 500;
    margin: 0;
}

#qr-container {
    display: none;
    margin-top: 20px;
}

#qr-container p {
    margin-bottom: 15px;
    font-size: 1em;
    color: #606770;
}

#qr-canvas {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.test-message-container, .log-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: left;
}

.test-message-container h2, .log-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #1c1e21;
}

.test-message-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-send-test {
    padding: 12px;
    background-color: #42b72a;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-send-test:hover {
    background-color: #36a420;
}

#test-message-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-weight: 500;
    display: none; /* Hidden by default */
}

#test-message-status.status-info {
    display: block;
    background-color: #e7f3ff;
    color: #1877f2;
}

#test-message-status.status-success {
    display: block;
    background-color: #e9f6ec;
    color: #42b72a;
}

#test-message-status.status-error {
    display: block;
    background-color: #fbe3e3;
    color: #c00;
}

#log-box {
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 220px;
    overflow-y: scroll;
    padding: 10px;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9em;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.log-entry {
    padding: 2px 0;
    border-bottom: 1px solid #eee;
}
.log-entry:last-child {
    border-bottom: none;
}

.log-timestamp { color: #999; margin-right: 10px; }
.log-level { font-weight: bold; margin-right: 10px; }
.log-level.log-info { color: #1877f2; }
.log-level.log-warn { color: #ff9800; }
.log-level.log-error { color: #f44336; }
.log-level.log-debug { color: #606770; }

.actions-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.btn-logout {
    display: inline-block;
    /* margin-top: 20px; */
    padding: 10px 20px;
    background-color: #f44336;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.btn-logout:hover {
    background-color: #d32f2f;
}

.btn-logout-whatsapp {
    background-color: #ff9800;
}

.btn-logout-whatsapp:hover {
    background-color: #f57c00;
}

/* Login Page Styles */
.login-container {
    max-width: 380px;
}

.login-container form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #606770;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.btn-login {
    padding: 12px;
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-login:hover {
    background-color: #166fe5;
}

.error-message {
    background-color: #fbe3e3;
    color: #c00;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}
