body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.main-layout {
    display: flex;
    gap: 30px;
    max-width: 850px;
    width: 90%;
    align-items: flex-start;
}

/* Contenedor del Formulario */
.login-container {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 280px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9em;
}

.form-group input {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    margin-top: 10px;
}

button:hover {
    background-color: #0056b3;
}

/* Panel del Simulador */
.simulator-panel {
    background: #1e1e24;
    color: #f0f0f5;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    flex: 1;
    min-width: 320px;
    display: flex;
    flex-direction: column;
}

.simulator-panel h3 {
    margin-top: 0;
    color: #61afef;
    border-bottom: 1px solid #3e4451;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

/* Selector de Simulación */
.simulation-switch {
    background: #2c313c;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #3e4451;
}

.simulation-switch label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95em;
    color: #98c379;
}

.simulation-switch input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.switch-desc {
    display: block;
    font-size: 0.75em;
    color: #abb2bf;
    margin-top: 5px;
}

.simulator-logs {
    background: #282c34;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em;
    padding: 10px;
    border-radius: 4px;
    height: 200px;
    overflow-y: auto;
    border: 1px solid #3e4451;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-entry {
    word-break: break-all;
    line-height: 1.4;
}

.log-entry.sent {
    color: #e5c07b; /* Amarillo para peticiones */
}

.log-entry.received {
    color: #98c379; /* Verde para respuestas */
}

.log-entry.system {
    color: #5c6370; /* Gris para info interna */
}

.log-entry.alert {
    color: #e06c75; /* Rojo para alertas o errores */
}

.sim-actions {
    margin-top: 15px;
}

#reset-sim-btn {
    background-color: #4b5263;
    margin-top: 0;
}

#reset-sim-btn:hover {
    background-color: #5c6370;
}

/* Mensajes de feedback del login */
.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.info-text {
    font-size: 0.85em;
    color: #666;
}

.hidden {
    display: none !important;
}

@media (max-width: 650px) {
    .main-layout {
        flex-direction: column;
    }
}
