* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #eef3f7;
    color: #18212b;
}

a {
    color: #075e54;
    text-decoration: none;
}

.pagina-centro {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.tarjeta {
    background: white;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
}

.portada {
    width: min(650px,100%);
    text-align: center;
}

.formulario {
    width: min(440px,100%);
}

.logo {
    color: #075e54;
    font-size: 44px;
    font-weight: bold;
    margin-bottom: 10px;
}

h1 {
    margin-top: 0;
}

form {
    display: grid;
    gap: 12px;
}

input {
    width: 100%;
    padding: 13px;
    border: 1px solid #ccd5dc;
    border-radius: 10px;
    font-size: 16px;
}

button,
.boton {
    border: 0;
    border-radius: 10px;
    background: #075e54;
    color: white;
    padding: 13px 18px;
    cursor: pointer;
    font-weight: bold;
    display: inline-block;
}

.boton-secundario {
    background: #455a64;
}

.botones {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.resultado-ok,
.resultado-error {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
}

.resultado-ok {
    background: #e6f8ed;
    color: #08752c;
}

.resultado-error {
    background: #fff0f0;
    color: #990000;
}

.barra {
    height: 60px;
    background: #075e54;
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
}

.barra span {
    margin-left: auto;
}

.barra a {
    color: white;
}

.mensajero {
    height: calc(100vh - 60px);
    display: grid;
    grid-template-columns: 320px 1fr;
}

.usuarios {
    background: white;
    border-right: 1px solid #d5dde2;
    padding: 15px;
    overflow-y: auto;
}

.usuario {
    display: block;
    width: 100%;
    margin-top: 8px;
    text-align: left;
    background: #f4f7f9;
    color: #18212b;
}

.chat {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cabecera-chat {
    background: white;
    padding: 18px;
    border-bottom: 1px solid #d5dde2;
    font-weight: bold;
}

.mensajes {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.mensaje {
    width: fit-content;
    max-width: 70%;
    background: white;
    padding: 10px 14px;
    border-radius: 12px;
    margin: 8px 0;
    box-shadow: 0 1px 5px rgba(0,0,0,.08);
}

.mensaje-mio {
    margin-left: auto;
    background: #d9fdd3;
}

.form-mensaje {
    display: flex;
    grid-template-columns: none;
    background: white;
    padding: 12px;
}

.form-mensaje input {
    flex: 1;
}

@media(max-width:700px) {

    .mensajero {
        grid-template-columns: 1fr;
        height: auto;
    }

    .usuarios {
        height: 40vh;
    }

    .chat {
        height: 60vh;
    }

    .mensaje {
        max-width: 85%;
    }

    .barra span {
        display: none;
    }
}