*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}
body{
    background-color: #d1d7db;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}
.chat_container {
    width: 100%;
    max-width: 450px;
    height: 90vh;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-header {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #075e54;
    color: #ffffff;
    padding: 10px 15px !important;
    text-align: center;
    font-size: 1.1rem;
    min-height: 60px !important;
}
.user-info{
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
}
#user-status {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 0.75rem !important;
  margin-top: 4px !important;
}
.user-info h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.2;
}

.chat-box {
    flex: 1;
    padding: 16px;
    background-color: #efeae2;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.message {
    display: flex; 
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 4px 10px;
    width: fit-content;

    max-width: 75%;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.3;
    word-wrap: break-word;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
.message.received {
    background-color: #ffffff;
    align-self: flex-start;
    border-top-left-radius: 0;
}
.message.sent {
    background-color: #d9fdd3;
    align-self: flex-end;
    border-top-right-radius: 0;
}
.chat-input-area {
    display: flex;
    padding: 12px;
    background-color: #f0f2f5;
    gap: 8px;
    align-items: center;
}
.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #cccccc;
    border-radius: 20px;
    outline: none;
    font-size: 0.95rem;
}
.chat-input-area input:focus {
    border-color: #00a884;
}
.chat-input-area button {
    background-color: #00a884;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}
.chat-input-area button:hover {
    background-color: #075e54;
}

/* Espaciado para que la hora no choque con el texto */
.message .text{
    flex: 1 1 auto;
    font-size: 0.95rem;
    color: #111b21;
}

/* Contenedor de hora y palomitas */
.msg-meta {
    flex: 0 0 auto;
    font-size: 0.68rem;
    color: #667781;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    margin-left: auto;
}

/* Color azul oficial de WhatsApp para el "visto" */
.ticks {
    font-weight: bold;
    font-size: 0.75rem;
    margin-left: 4px;
}
/* Palomitas grises (Enviado / Entregado sin leer) */
.ticks.grey {
    color: #8696a0;
}

/* Palomitas azules (Leído / Visto) */
.ticks.blue {
    color: #53bdeb;
    transition: color 0.3s ease-in;
}

.user-status {
    font-size: 0.75rem;
    color: #ffffff; /* Verde claro de WhatsApp */
    margin-top: 2px;
}
/* Pantalla de Login */
.login-container {
  max-width: 350px;
  margin: 100px auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  text-align: center;
}

.login-container input {
  width: 90%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.login-container button {
  width: 95%;
  padding: 10px;
  background: #00a884;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

.error-msg {
  color: red;
  font-size: 0.85rem;
  margin-top: 10px;
}