/* ==========================================================================
   Peña & Peña - Sistema de administración interna
   ========================================================================== */

:root {
  --navy: #1B2B3F;
  --navy-2: #24384f;
  --navy-3: #2f4661;
  --orange: #F26522;
  --orange-d: #d9531a;
  --cream: #F2EFE8;
  --bg: #EFEFEF;
  --card: #ffffff;
  --line: #dfe3e8;
  --text: #1f2b38;
  --muted: #6b7885;
  --ok: #2E7D5B;
  --ok-bg: #e5f3ec;
  --warn: #B26A00;
  --warn-bg: #fbf0dd;
  --alerta: #B3261E;
  --alerta-bg: #fbe6e5;
  --info: #1B4E7A;
  --info-bg: #e4eef6;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20,35,55,.09), 0 6px 20px rgba(20,35,55,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange-d); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 700; color: var(--navy); }
.boot, .vacio {
  padding: 48px 20px; text-align: center; color: var(--muted);
}
.vacio--sm { padding: 20px; font-size: .92em; }
.muted { color: var(--muted); }
.neg { color: var(--alerta); }
.pos { color: var(--ok); }
.der { text-align: right; }
.nowrap { white-space: nowrap; }

/* ---- Login --------------------------------------------------------------- */

body.modo-login {
  background: linear-gradient(135deg, var(--navy) 0%, #0f1c2b 100%);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
}
body.modo-login #app { width: 100%; display: flex; justify-content: center; }
.login {
  background: var(--cream);
  border-radius: 16px;
  padding: 40px 36px 32px;
  width: min(400px, 92vw);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  text-align: center;
}
.login__logo { max-width: 220px; width: 70%; margin: 0 auto 6px; display: block; }
.login__sub { color: var(--muted); margin: 0 0 26px; font-size: .95em; }
.login__form { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.login__form label { font-size: .82em; font-weight: 600; color: var(--navy); margin-top: 10px; }
.login__form select, .login__form input {
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px;
  font: inherit; background: #fff; width: 100%;
}
.login__form .btn { margin-top: 18px; }
.login__error {
  margin-top: 12px; background: var(--alerta-bg); color: var(--alerta);
  padding: 9px 12px; border-radius: 8px; font-size: .88em;
}

/* ---- Config warning ---------------------------------------------------- */
.config-warn {
  max-width: 560px; margin: 8vh auto; background: #fff; padding: 40px;
  border-radius: var(--radius); box-shadow: var(--shadow); text-align: center;
}
.config-warn h1 { color: var(--orange-d); margin: 18px 0 10px; }
.config-warn code { background: var(--bg); padding: 2px 6px; border-radius: 5px; }

/* ---- Layout ----------------------------------------------------------- */

.layout { display: flex; min-height: 100vh; }
.layout__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.sidebar {
  width: 244px; flex-shrink: 0; background: var(--navy); color: #cdd7e1;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 11px; padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar__brand img { width: 38px; height: 38px; border-radius: 7px; }
.sidebar__brand strong { display: block; color: #fff; font-size: 1.02em; }
.sidebar__brand span { font-size: .78em; color: #8fa3b6; letter-spacing: .04em; text-transform: uppercase; }

.sidebar__nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.navlink {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: 9px; color: #cdd7e1; font-weight: 500; font-size: .94em;
  margin-bottom: 2px;
}
.navlink:hover { background: var(--navy-2); text-decoration: none; color: #fff; }
.navlink--activo { background: var(--orange); color: #fff; }
.navlink--activo:hover { background: var(--orange); }
.navlink__ico { font-size: 1.05em; width: 20px; text-align: center; }
.navlink__badge {
  margin-left: auto; background: #e03b3b; color: #fff; font-size: .74em;
  font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}

.sidebar__user {
  padding: 14px; border-top: 1px solid rgba(255,255,255,.08);
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
}
.sidebar__avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--orange);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .82em;
  text-transform: uppercase; border: 0; cursor: pointer; padding: 0; flex-shrink: 0;
  background-size: cover; background-position: center;
}
.sidebar__avatar--foto { color: transparent; }
.sidebar__uinfo { min-width: 0; }
.sidebar__uinfo strong { display: block; color: #fff; font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Avatares chicos (chat, listas) */
.avatarito {
  width: 30px; height: 30px; border-radius: 50%; background: var(--navy-3, #2f4661);
  color: #fff; display: inline-grid; place-items: center; font-size: .72em; font-weight: 700;
  text-transform: uppercase; flex-shrink: 0; background-size: cover; background-position: center;
  overflow: hidden;
}
.avatarito--sm { width: 26px; height: 26px; font-size: .66em; }
.avatarito--grupo { background: var(--orange); font-size: .9em; }

/* Foto en el modal de perfil */
.perfil-foto-row { display: flex; gap: 14px; align-items: center; }
.perfil-foto {
  width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--cream); display: grid; place-items: center;
}
.perfil-foto img { width: 100%; height: 100%; object-fit: cover; }
.perfil-foto__ini { font-weight: 700; font-size: 1.4em; color: var(--navy); text-transform: uppercase; }
.linkbtn {
  background: none; border: 0; padding: 0; color: var(--orange-d); cursor: pointer;
  font: inherit; font-size: .9em;
}
.linkbtn:hover { text-decoration: underline; }
.sidebar__uinfo .linkbtn { color: #8fa3b6; font-size: .78em; }

.topbar {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 14px 26px; display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 1.15em; }
.topbar__menu { display: none; background: none; border: 0; font-size: 1.3em; cursor: pointer; }

.contenido { padding: 24px 26px 60px; max-width: 1240px; }

/* ---- Botones ---------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 9px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:disabled { opacity: .6; cursor: default; }
.btn--sm { padding: 7px 12px; font-size: .88em; }
.btn--bloque { width: 100%; }
.btn--primario { background: var(--orange); color: #fff; }
.btn--primario:hover:not(:disabled) { background: var(--orange-d); }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--navy); }
.btn--ghost:hover:not(:disabled) { border-color: var(--navy-3); }
.btn--peligro { background: var(--alerta-bg); color: var(--alerta); }
.btn--peligro:hover:not(:disabled) { background: #f6d3d1; }

/* ---- Barra de filtros ------------------------------------------------- */

.barra {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.barra__sp { flex: 1; }
.barra__lbl { font-weight: 600; color: var(--muted); font-size: .9em; }
.barra input[type=search], .barra input[type=month], .barra input[type=date],
.barra input[type=time], .barra select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: #fff;
}
.barra__buscar { min-width: 230px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: .9em; color: var(--muted); }

/* ---- Tarjetas resumen ----------------------------------------------- */

.tarjetas { display: grid; gap: 14px; margin-bottom: 22px; }
.tarjetas--3 { grid-template-columns: repeat(3, 1fr); }
.tarjetas--4 { grid-template-columns: repeat(4, 1fr); }
.tarjeta {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; box-shadow: var(--shadow); display: block;
}
.tarjeta span { font-size: .82em; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.tarjeta strong { display: block; font-size: 1.5em; color: var(--navy); margin-top: 3px; }
.tarjeta small { display: block; margin-top: 4px; }
.tarjeta--ok { border-left: 4px solid var(--ok); }
.tarjeta--alerta { border-left: 4px solid var(--alerta); }
.tarjeta--fuerte { border-left: 4px solid var(--orange); }
.tarjeta--link:hover { text-decoration: none; border-color: var(--navy-3); }
a.tarjeta--link strong { color: var(--navy); }

.progreso { height: 6px; background: var(--bg); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.progreso i { display: block; height: 100%; background: var(--orange); border-radius: 4px; }

.resumen-mini {
  display: flex; gap: 22px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px;
  background: var(--cream); border-radius: 9px; font-size: .92em;
}

/* ---- Tablas --------------------------------------------------------- */

.tabla {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); font-size: .93em;
}
.tabla thead th {
  background: var(--navy); color: #dfe7ee; text-align: left; font-weight: 600;
  padding: 10px 12px; font-size: .82em; text-transform: uppercase; letter-spacing: .03em;
  white-space: nowrap;
}
.tabla tbody td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.tabla tbody tr:hover { background: #f7f9fb; }
.tabla--densa tbody td { padding: 7px 10px; }
.tabla small { font-size: .88em; }
.fila--pend { background: #fffaf4; }
.fila--pend:hover { background: #fff3e6; }

.celda-edit { cursor: pointer; }
.celda-edit:hover { background: var(--cream); outline: 1px dashed var(--orange); }
.celda-obs { max-width: 240px; white-space: normal; }

.tabla--click tbody tr { cursor: pointer; }
.tabla--click tbody tr:hover { background: var(--cream); }

.cobro-vivo {
  margin: 4px 0 0; padding: 10px 12px; background: var(--cream);
  border-radius: 8px; font-size: .95em;
}

/* ---- Badges -------------------------------------------------------- */

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .78em;
  font-weight: 700; white-space: nowrap;
}
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--alerta { background: var(--alerta-bg); color: var(--alerta); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--gris { background: #e9edf1; color: var(--muted); }

/* ---- Paneles ------------------------------------------------------ */

.saludo { font-size: 1.05em; margin: 0 0 18px; }
.panel-doble { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-top: 8px; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.panel h3 { font-size: 1em; margin-bottom: 10px; }
.lista-row {
  display: flex; gap: 12px; padding: 9px 4px; border-top: 1px solid var(--line);
  color: var(--text); align-items: baseline;
}
.lista-row:first-of-type { border-top: 0; }
.lista-row:hover { text-decoration: none; background: #f7f9fb; }
.lista-row__fecha { font-size: .82em; color: var(--muted); white-space: nowrap; min-width: 118px; }
.alerta-row { padding: 8px 4px; border-top: 1px solid var(--line); font-size: .92em; }
.alerta-row:first-child { border-top: 0; }

/* ---- Calendario ------------------------------------------------- */

.cal-layout { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.cal-box, .cal-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
}
.cal-panel { padding: 0; display: flex; flex-direction: column; max-height: 78vh; }
.cal-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px; border-bottom: 1px solid var(--line);
}
.cal-panel__head h3 { font-size: 1em; }
.cal-panel__filtro { padding: 6px 12px 0; }
.cal-filtro { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .88em; background: #fff; }
.cal-panel__lista { overflow-y: auto; padding: 6px; }
.tarea {
  display: flex; gap: 9px; padding: 9px 8px; border-radius: 8px; cursor: pointer;
  align-items: flex-start;
}
.tarea:hover { background: var(--cream); }
.tarea input { margin-top: 3px; }
.tarea__txt { display: flex; flex-direction: column; }
.tarea__txt small { font-size: .8em; }
.tarea--venc .tarea__txt strong { color: var(--alerta); }

.fc { font-size: .88em; }
.fc .fc-button-primary {
  background: var(--navy); border-color: var(--navy); text-transform: none; font-weight: 600;
}
.fc .fc-button-primary:hover { background: var(--navy-3); border-color: var(--navy-3); }
.fc .fc-button-primary:not(:disabled).fc-button-active { background: var(--orange); border-color: var(--orange); }
.fc .fc-toolbar-title { font-size: 1.15em; color: var(--navy); }
.fc-daygrid-day.fc-day-today { background: var(--cream) !important; }
.fc-event { cursor: pointer; border: none; padding: 1px 4px; font-weight: 600; }

/* ---- Toasts ----------------------------------------------------- */

.toast-box {
  position: fixed; right: 18px; bottom: 18px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 9px;
  box-shadow: 0 8px 26px rgba(0,0,0,.28); font-size: .9em; max-width: 340px;
  opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s;
}
.toast--in { opacity: 1; transform: translateY(0); }
.toast--ok { background: var(--ok); }
.toast--error { background: var(--alerta); }

/* ---- Modal ---------------------------------------------------- */

.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,25,38,.55); z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px;
  opacity: 0; transition: opacity .18s; overflow-y: auto;
}
.modal-overlay--in { opacity: 1; }
.modal {
  background: #fff; border-radius: 14px; width: 100%; box-shadow: 0 24px 70px rgba(0,0,0,.4);
  transform: translateY(-12px); transition: transform .18s;
}
.modal-overlay--in .modal { transform: translateY(0); }
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.modal__head h3 { font-size: 1.08em; }
.modal__x { background: none; border: 0; font-size: 1.6em; line-height: 1; color: var(--muted); cursor: pointer; }
.modal__body { padding: 20px; }
.modal__pie { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---- Formularios ------------------------------------------------ */

.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form__campo { display: flex; flex-direction: column; gap: 5px; }
.form__campo--full { grid-column: 1 / -1; }
.form__campo--check { flex-direction: row; align-items: center; gap: 8px; grid-column: 1 / -1; }
.form__campo label { font-size: .82em; font-weight: 600; color: var(--navy); }
.form__campo input, .form__campo select, .form__campo textarea {
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit;
  background: #fff; width: 100%;
}
.form__campo textarea { resize: vertical; }
.form__campo--check label { font-size: .9em; font-weight: 500; }
.form__acciones {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px;
}

/* ---- Módulo económico (caja, gastos, panel, config) --------- */

.btn--ok { background: var(--ok); color: #fff; }
.btn--ok:hover:not(:disabled) { background: #256b4c; }

.tabs {
  display: flex; gap: 4px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 9px 14px; font: inherit; font-weight: 600; color: var(--muted);
  cursor: pointer; margin-bottom: -1px;
}
.tab:hover { color: var(--navy); }
.tab--activo { color: var(--navy); border-bottom-color: var(--orange); }

.cfg-grid { display: grid; gap: 18px; max-width: 720px; }
.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px; gap: 12px;
}

.cat-list {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff;
  margin-bottom: 8px;
}
.cat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-top: 1px solid var(--line); font-size: .93em;
}
.cat-row:first-child { border-top: 0; }

.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  background: var(--cream); border: 1px solid var(--line); border-radius: 20px;
  padding: 5px 12px; font-size: .86em;
}
.cat-chip strong { color: var(--navy); margin-left: 4px; }

.barcat {
  display: grid; grid-template-columns: 9rem 1fr auto; gap: 10px; align-items: center;
  padding: 6px 0; font-size: .9em;
}
.barcat__lab { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barcat__bar { background: var(--bg); border-radius: 4px; height: 10px; overflow: hidden; }
.barcat__bar i { display: block; height: 100%; background: var(--orange); border-radius: 4px; }
.barcat__val { font-variant-numeric: tabular-nums; color: var(--navy); font-weight: 600; }

/* ---- Ficha de cliente -------------------------------------- */

.ficha-head { margin-bottom: 18px; }
.ficha-head h2 { margin: 8px 0 4px; }
.ficha-sec {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.ficha-sec h3 { font-size: 1em; margin-bottom: 10px; }
.ficha-sec .tabla { box-shadow: none; }

/* ---- Chat -------------------------------------------------- */

.chat-layout {
  display: grid; grid-template-columns: 220px 1fr; gap: 16px;
  height: calc(100vh - 140px); min-height: 420px;
}
.chat-side {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px; overflow-y: auto; box-shadow: var(--shadow);
}
.chat-side__sep {
  font-size: .72em; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); padding: 12px 10px 6px; font-weight: 600;
}
.chat-item {
  display: flex; align-items: center; gap: 6px; width: 100%; text-align: left;
  background: none; border: 0; padding: 9px 10px; border-radius: 8px;
  font: inherit; font-size: .92em; color: var(--text); cursor: pointer;
}
.chat-item__txt { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item:hover { background: var(--cream); }
.chat-item--activo { background: var(--navy); color: #fff; }
.chat-badge {
  flex-shrink: 0; background: #e03b3b; color: #fff; font-size: .74em; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}

.chat-main {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow);
}
.chat-head {
  padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600;
  color: var(--navy); display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.chat-head .linkbtn { font-weight: 400; font-size: .82em; }
.chat-msgs {
  flex: 1; overflow-y: auto; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px; background: var(--bg);
}
.chat-dia {
  align-self: center; font-size: .74em; color: var(--muted);
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 2px 12px; margin: 10px 0 6px; text-transform: capitalize;
}
.chat-fila { display: flex; align-items: flex-end; gap: 7px; align-self: flex-start; max-width: 82%; }
.chat-fila--mia { align-self: flex-end; flex-direction: row-reverse; }
.chat-burbuja {
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 7px 11px; font-size: .93em;
  display: flex; flex-direction: column; min-width: 0;
}
.chat-burbuja--mia {
  background: var(--navy); color: #fff; border-color: var(--navy);
}
.chat-autor { font-size: .78em; font-weight: 700; color: var(--orange-d); margin-bottom: 2px; }
.chat-texto { white-space: pre-wrap; word-break: break-word; }
.chat-texto a { color: inherit; text-decoration: underline; }
.chat-head__acc { display: flex; gap: 12px; align-items: center; }
.chat-hora { font-size: .68em; opacity: .6; margin-top: 3px; align-self: flex-end; }
.chat-form {
  display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line);
}
.chat-form input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 20px;
  font: inherit; background: #fff;
}

/* ---- Responsive ---------------------------------------------- */

@media (max-width: 1080px) {
  .tarjetas--4 { grid-template-columns: repeat(2, 1fr); }
  .panel-doble { grid-template-columns: 1fr; }
  .cal-layout { grid-template-columns: 1fr; }
  .cal-panel { max-height: none; }
}
@media (max-width: 760px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 100; transform: translateX(-100%);
    transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.4);
  }
  body.sidebar-abierta .sidebar { transform: translateX(0); }
  .topbar__menu { display: block; }
  .contenido { padding: 16px 14px 50px; }
  .tarjetas--3, .tarjetas--4 { grid-template-columns: 1fr; }
  .form__grid { grid-template-columns: 1fr; }
  .tabla { display: block; overflow-x: auto; white-space: nowrap; }
  .barra__buscar { min-width: 0; flex: 1; }
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-side { display: flex; flex-wrap: wrap; gap: 4px; }
  .chat-side__sep { width: 100%; padding: 6px 10px 2px; }
  .chat-item { width: auto; }
  .chat-msgs { min-height: 300px; }
}
