/* =========================================================
   WIRTZ HUB · MENSAJERÍA
   CSS completo limpio
   Premium · Minimalista · Responsive · Dark safe
   Estructura nueva:
   - mensajes-hero
   - mensajes-hero__top
   - mensajes-hero__stats
   - mensajes-layout
   - archivos / carpetas / emojis / lucide
   ========================================================= */

/* =========================================================
   RESET LOCAL
   ========================================================= */

.mensajes-page,
.mensajes-page *,
.mensajes-modal,
.mensajes-modal *,
.mensajes-action,
.mensajes-icon-btn,
.mensajes-filter,
.mensajes-send,
.mensajes-composer__tool {
  box-sizing: border-box;
  font-family:
    "ATF Franklin Gothic",
    "Franklin Gothic Medium",
    "Arial Narrow",
    Arial,
    sans-serif !important;
}

.mensajes-page button,
.mensajes-modal button,
.mensajes-page input,
.mensajes-modal input,
.mensajes-page select,
.mensajes-modal select,
.mensajes-page textarea,
.mensajes-modal textarea {
  font: inherit;
}

.mensajes-page button,
.mensajes-modal button,
.mensajes-page label {
  -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   VARIABLES
   ========================================================= */

.mensajes-page {
  --msg-surface: rgba(255, 255, 255, 0.97);
  --msg-surface-soft: rgba(248, 250, 252, 0.96);
  --msg-surface-strong: #ffffff;
  --msg-surface-hover: rgba(15, 23, 42, 0.045);

  --msg-border: rgba(15, 23, 42, 0.1);
  --msg-border-strong: rgba(15, 23, 42, 0.16);

  --msg-text: #111827;
  --msg-text-strong: #030712;
  --msg-muted: #6b7280;
  --msg-muted-soft: #9ca3af;

  --msg-primary: #111827;
  --msg-primary-hover: #030712;

  --msg-purple: #7c3aed;
  --msg-blue: #2563eb;
  --msg-green: #16a34a;
  --msg-orange: #ea580c;
  --msg-red: #dc2626;
  --msg-cyan: #0891b2;

  --msg-radius-xl: 18px;
  --msg-radius-lg: 15px;
  --msg-radius-md: 12px;
  --msg-radius-sm: 10px;

  --msg-shadow-card:
    0 1px 0 rgba(255, 255, 255, 0.72) inset,
    0 10px 28px rgba(15, 23, 42, 0.045);

  --msg-shadow-soft:
    0 10px 26px rgba(15, 23, 42, 0.055);

  --msg-shadow-modal:
    0 34px 110px rgba(15, 23, 42, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.35) inset;

  --msg-transition: 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);

  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;

  width: 100%;
  min-width: 0;
  height: calc(100vh - var(--topbar-height, 52px) - 54px);
  min-height: 0;

  color: var(--msg-text);
  overflow: hidden;

  animation: mensajesPageIn 0.22s var(--msg-transition) both;
}

html[data-theme="dark"] .mensajes-page {
  --msg-surface: rgba(12, 12, 12, 0.97);
  --msg-surface-soft: rgba(18, 18, 18, 0.96);
  --msg-surface-strong: rgba(8, 8, 8, 0.98);
  --msg-surface-hover: rgba(255, 255, 255, 0.055);

  --msg-border: rgba(255, 255, 255, 0.105);
  --msg-border-strong: rgba(255, 255, 255, 0.16);

  --msg-text: rgba(255, 255, 255, 0.92);
  --msg-text-strong: rgba(255, 255, 255, 0.98);
  --msg-muted: rgba(255, 255, 255, 0.54);
  --msg-muted-soft: rgba(255, 255, 255, 0.36);

  --msg-primary: rgba(255, 255, 255, 0.92);
  --msg-primary-hover: rgba(255, 255, 255, 0.82);

  --msg-purple: #a78bfa;
  --msg-blue: #60a5fa;
  --msg-green: #4ade80;
  --msg-orange: #fb923c;
  --msg-red: #f87171;
  --msg-cyan: #22d3ee;

  --msg-shadow-card:
    0 1px 0 rgba(255, 255, 255, 0.045) inset,
    0 14px 34px rgba(0, 0, 0, 0.32);

  --msg-shadow-soft:
    0 14px 34px rgba(0, 0, 0, 0.34);

  --msg-shadow-modal:
    0 34px 110px rgba(0, 0, 0, 0.62),
    0 1px 0 rgba(255, 255, 255, 0.055) inset;
}

/* =========================================================
   BLOQUES BASE
   ========================================================= */

.mensajes-hero,
.mensajes-layout,
.mensajes-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;

  border: 1px solid var(--msg-border);
  border-radius: var(--msg-radius-xl);
  background: var(--msg-surface);
  box-shadow: var(--msg-shadow-card);

  overflow: hidden;

  transition:
    background var(--msg-transition),
    border-color var(--msg-transition),
    box-shadow var(--msg-transition);
}

.mensajes-hero:hover,
.mensajes-layout:hover {
  border-color: color-mix(in srgb, var(--msg-border-strong) 78%, var(--msg-purple));
}

/* =========================================================
   HERO COMPACTO
   ========================================================= */

.mensajes-hero {
  display: grid;
  grid-template-rows: auto auto;
  gap: 9px;

  min-height: auto;
  padding: 11px 13px;

  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--msg-purple) 6%, transparent), transparent 34%),
    var(--msg-surface);
}

.mensajes-hero__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;

  min-width: 0;
}

.mensajes-hero__main {
  display: flex;
  align-items: center;
  gap: 10px;

  min-width: 0;
}

.mensajes-hero__icon {
  display: grid;
  place-items: center;

  width: 40px;
  height: 40px;
  min-width: 40px;

  border: 1px solid color-mix(in srgb, var(--msg-purple) 34%, var(--msg-border));
  border-radius: 13px;
  background:
    radial-gradient(circle at 25% 20%, color-mix(in srgb, var(--msg-purple) 20%, transparent), transparent 44%),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--msg-purple) 12%, transparent),
      color-mix(in srgb, var(--msg-blue) 6%, transparent)
    );

  color: var(--msg-purple);

  transition:
    transform var(--msg-transition),
    border-color var(--msg-transition),
    filter var(--msg-transition);
}

.mensajes-hero:hover .mensajes-hero__icon {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--msg-purple) 48%, var(--msg-border));
  filter: saturate(1.08);
}

.mensajes-hero__icon .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2.15;
}

.mensajes-hero__copy {
  display: grid;
  gap: 3px;

  min-width: 0;
}

.mensajes-hero__copy span,
.mensajes-card__head span,
.mensajes-thread__identity span,
.mensajes-modal__head span,
.mensajes-field span {
  color: var(--msg-muted);

  font-size: 7.2px;
  font-weight: 950;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.mensajes-hero__copy h1 {
  margin: 0;

  color: var(--msg-text-strong);

  font-size: 21px;
  font-weight: 950;
  line-height: 0.96;
  letter-spacing: -0.06em;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mensajes-hero__copy p {
  margin: 0;

  color: var(--msg-muted);

  font-size: 8.8px;
  font-weight: 760;
  line-height: 1.22;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mensajes-hero__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;

  min-width: 0;
}

/* =========================================================
   HERO STATS
   ========================================================= */

.mensajes-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;

  min-width: 0;
}

.mensajes-hero-stat {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;

  min-width: 0;
  min-height: 38px;
  padding: 6px 8px;

  border: 1px solid var(--msg-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--msg-surface-soft) 88%, transparent);

  transition:
    background var(--msg-transition),
    border-color var(--msg-transition),
    transform var(--msg-transition);
}

.mensajes-hero-stat:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--msg-purple) 5%, var(--msg-surface-soft));
  border-color: color-mix(in srgb, var(--msg-purple) 25%, var(--msg-border));
}

.mensajes-hero-stat__icon {
  display: grid;
  place-items: center;

  width: 28px;
  height: 28px;

  border-radius: 10px;
  background: color-mix(in srgb, currentColor 8%, transparent);

  color: var(--msg-purple);
}

.mensajes-hero-stat__icon .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}

.mensajes-hero-stat__copy {
  display: grid;
  gap: 2px;

  min-width: 0;
}

.mensajes-hero-stat__copy small {
  color: var(--msg-muted);

  font-size: 6.8px;
  font-weight: 950;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mensajes-hero-stat__copy strong {
  color: var(--msg-text-strong);

  font-size: 13px;
  font-weight: 950;
  line-height: 0.96;
  letter-spacing: -0.045em;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mensajes-hero-stat__copy em {
  color: var(--msg-muted-soft);

  font-size: 6.9px;
  font-style: normal;
  font-weight: 780;
  line-height: 1;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mensajes-hero-stat.is-green .mensajes-hero-stat__icon,
.mensajes-hero-stat.is-green .mensajes-hero-stat__copy strong {
  color: var(--msg-green);
}

.mensajes-hero-stat.is-purple .mensajes-hero-stat__icon,
.mensajes-hero-stat.is-purple .mensajes-hero-stat__copy strong {
  color: var(--msg-purple);
}

.mensajes-hero-stat.is-blue .mensajes-hero-stat__icon,
.mensajes-hero-stat.is-blue .mensajes-hero-stat__copy strong {
  color: var(--msg-blue);
}

.mensajes-hero-stat.is-orange .mensajes-hero-stat__icon,
.mensajes-hero-stat.is-orange .mensajes-hero-stat__copy strong {
  color: var(--msg-orange);
}

/* Oculta estructura vieja si quedó en HTML/cache */
.mensajes-kpis,
.mensajes-kpi {
  display: none !important;
}

/* =========================================================
   BOTONES
   ========================================================= */

.mensajes-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  min-height: 30px;
  padding: 0 10px;

  border: 1px solid var(--msg-border-strong);
  border-radius: 10px;
  background: transparent;

  color: var(--msg-text);

  font-size: 9.2px;
  font-weight: 860;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;

  cursor: pointer;
  outline: none;

  transition:
    background var(--msg-transition),
    border-color var(--msg-transition),
    color var(--msg-transition),
    transform var(--msg-transition),
    opacity var(--msg-transition),
    box-shadow var(--msg-transition);
}

.mensajes-action:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--msg-text) 24%, transparent);
  background: var(--msg-surface-hover);
}

.mensajes-action:active,
.mensajes-icon-btn:active,
.mensajes-send:active,
.mensajes-composer__tool:active {
  transform: scale(0.98);
}

.mensajes-action--primary {
  border-color: var(--msg-primary);
  background: var(--msg-primary);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
}

.mensajes-action--primary:hover {
  border-color: var(--msg-primary-hover);
  background: var(--msg-primary-hover);
  color: #ffffff;
}

html[data-theme="dark"] .mensajes-action--primary {
  color: #080808;
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .mensajes-action--primary:hover {
  color: #080808;
}

.mensajes-action .icon,
.mensajes-page .icon,
.mensajes-modal .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.15;
}

.mensajes-icon-btn {
  display: grid;
  place-items: center;

  width: 30px;
  height: 30px;
  min-width: 30px;

  border: 1px solid var(--msg-border-strong);
  border-radius: 10px;
  background: transparent;

  color: var(--msg-text);

  cursor: pointer;
  outline: none;

  transition:
    background var(--msg-transition),
    border-color var(--msg-transition),
    color var(--msg-transition),
    transform var(--msg-transition);
}

.mensajes-icon-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--msg-purple) 36%, var(--msg-border));
  background: color-mix(in srgb, var(--msg-purple) 8%, transparent);
  color: var(--msg-purple);
}

.mensajes-icon-btn.is-active {
  border-color: color-mix(in srgb, var(--msg-purple) 42%, var(--msg-border));
  background: color-mix(in srgb, var(--msg-purple) 12%, transparent);
  color: var(--msg-purple);
}

.mensajes-icon-btn--danger:hover {
  border-color: color-mix(in srgb, var(--msg-red) 42%, var(--msg-border));
  background: color-mix(in srgb, var(--msg-red) 9%, transparent);
  color: var(--msg-red);
}

/* =========================================================
   LAYOUT GENERAL
   ========================================================= */

.mensajes-layout {
  display: grid;
  grid-template-columns: minmax(285px, 350px) minmax(0, 1fr);

  min-width: 0;
  min-height: 0;
  background: var(--msg-surface);
}

.mensajes-sidebar-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);

  min-width: 0;
  min-height: 0;

  border-right: 1px solid var(--msg-border);
}

.mensajes-thread {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;

  min-width: 0;
  min-height: 0;
}

/* =========================================================
   TOOLBAR / INBOX
   ========================================================= */

.mensajes-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;

  padding: 9px;
  border-bottom: 1px solid var(--msg-border);
}

.mensajes-search {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 0;
  height: 31px;
  padding: 0 10px;

  border: 1px solid var(--msg-border);
  border-radius: 10px;
  background: var(--msg-surface-soft);

  color: var(--msg-muted);

  transition:
    border-color var(--msg-transition),
    background var(--msg-transition);
}

.mensajes-search:focus-within {
  border-color: color-mix(in srgb, var(--msg-purple) 38%, var(--msg-border));
  background: color-mix(in srgb, var(--msg-purple) 6%, var(--msg-surface-soft));
}

.mensajes-search input {
  width: 100%;
  min-width: 0;

  border: 0;
  outline: 0;
  background: transparent;

  color: var(--msg-text);

  font-size: 9.4px;
  font-weight: 850;
}

.mensajes-search input::placeholder {
  color: var(--msg-muted-soft);
}

.mensajes-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  height: 31px;
  padding: 0 10px;

  border: 1px solid var(--msg-border);
  border-radius: 10px;
  background: transparent;

  color: var(--msg-text);

  font-size: 8.8px;
  font-weight: 900;

  cursor: pointer;

  transition:
    background var(--msg-transition),
    border-color var(--msg-transition),
    color var(--msg-transition),
    transform var(--msg-transition);
}

.mensajes-filter:hover,
.mensajes-filter.is-active {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--msg-purple) 36%, var(--msg-border));
  background: color-mix(in srgb, var(--msg-purple) 8%, transparent);
  color: var(--msg-purple);
}

.mensajes-alert {
  display: flex;
  align-items: center;
  gap: 8px;

  margin: 8px 9px 0;
  padding: 8px 9px;

  border: 1px solid color-mix(in srgb, var(--msg-red) 32%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--msg-red) 8%, transparent);

  color: var(--msg-red);

  font-size: 9px;
  font-weight: 850;
  line-height: 1.3;
}

.mensajes-inbox {
  min-height: 0;
  padding: 7px;

  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--msg-muted) 24%, transparent) transparent;
}

.mensajes-inbox::-webkit-scrollbar,
.mensajes-thread__body::-webkit-scrollbar,
.mensajes-quick-body::-webkit-scrollbar,
.mensajes-modal__body::-webkit-scrollbar,
.mensajes-users-box::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.mensajes-inbox::-webkit-scrollbar-thumb,
.mensajes-thread__body::-webkit-scrollbar-thumb,
.mensajes-quick-body::-webkit-scrollbar-thumb,
.mensajes-modal__body::-webkit-scrollbar-thumb,
.mensajes-users-box::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--msg-muted) 26%, transparent);
}

.mensajes-inbox__item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;

  width: 100%;
  min-height: 54px;
  padding: 7px;

  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;

  color: inherit;
  text-align: left;

  cursor: pointer;

  transition:
    background var(--msg-transition),
    border-color var(--msg-transition),
    transform var(--msg-transition);
}

.mensajes-inbox__item:hover {
  background: var(--msg-surface-hover);
}

.mensajes-inbox__item.is-active {
  border-color: color-mix(in srgb, var(--msg-purple) 32%, var(--msg-border));
  background: color-mix(in srgb, var(--msg-purple) 8%, transparent);
}

.mensajes-avatar {
  display: inline-grid;
  place-items: center;

  width: 34px;
  height: 34px;
  min-width: 34px;

  border: 1px solid color-mix(in srgb, var(--msg-purple) 24%, var(--msg-border));
  border-radius: 12px;
  background:
    radial-gradient(circle at 25% 20%, color-mix(in srgb, var(--msg-purple) 18%, transparent), transparent 48%),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--msg-purple) 10%, transparent),
      color-mix(in srgb, var(--msg-blue) 5%, transparent)
    );

  color: var(--msg-purple);

  font-size: 8.8px;
  font-weight: 950;
  letter-spacing: -0.035em;

  overflow: hidden;
}

.mensajes-avatar--large {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 12px;
  font-size: 9px;
}

.mensajes-avatar .icon {
  width: 15px;
  height: 15px;
}

.mensajes-inbox__content {
  display: grid;
  align-content: center;
  gap: 6px;

  min-width: 0;
}

.mensajes-inbox__top,
.mensajes-inbox__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  min-width: 0;
}

.mensajes-inbox__top strong {
  min-width: 0;

  color: var(--msg-text-strong);
  font-size: 9.8px;
  font-weight: 950;
  line-height: 1.1;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mensajes-inbox__top small {
  flex: 0 0 auto;

  color: var(--msg-muted);
  font-size: 7.3px;
  font-weight: 800;
  line-height: 1;
}

.mensajes-inbox__bottom > span:first-child {
  min-width: 0;

  color: var(--msg-muted);
  font-size: 8.4px;
  font-weight: 760;
  line-height: 1.15;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mensajes-inbox__flags {
  display: inline-flex;
  align-items: center;
  gap: 4px;

  flex: 0 0 auto;
}

.mensajes-inbox__flags .icon {
  width: 10px;
  height: 10px;
  color: var(--msg-muted);
}

.mensajes-inbox__flags em {
  display: inline-grid;
  place-items: center;

  min-width: 17px;
  height: 17px;
  padding: 0 5px;

  border-radius: 999px;
  background: var(--msg-purple);

  color: #ffffff;

  font-size: 7.6px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.mensajes-list-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;

  min-height: 190px;
  padding: 20px;

  color: var(--msg-muted);

  font-size: 9.4px;
  font-weight: 850;
  text-align: center;
}

.mensajes-list-state .icon {
  width: 22px;
  height: 22px;
}

/* =========================================================
   THREAD HEADER
   ========================================================= */

.mensajes-thread__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  min-height: 58px;
  padding: 9px 12px;

  border-bottom: 1px solid var(--msg-border);
  background: var(--msg-surface);
}

.mensajes-thread__identity {
  display: flex;
  align-items: center;
  gap: 9px;

  min-width: 0;
}

.mensajes-thread__identity > div {
  min-width: 0;
}

.mensajes-thread__identity span {
  font-size: 7px;
  letter-spacing: 0.12em;
}

.mensajes-thread__identity h2 {
  margin: 3px 0 0;

  color: var(--msg-text-strong);

  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.035em;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mensajes-thread__identity p {
  margin: 4px 0 0;

  color: var(--msg-muted);

  font-size: 8.4px;
  font-weight: 760;
  line-height: 1.25;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mensajes-thread__actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;

  flex: 0 0 auto;
}

/* =========================================================
   THREAD BODY
   ========================================================= */

.mensajes-thread__body {
  display: flex;
  flex-direction: column;
  gap: 8px;

  min-height: 0;
  padding: 14px;

  overflow-y: auto;
  overflow-x: hidden;

  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--msg-purple) 5%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.018), transparent 28%);

  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--msg-muted) 24%, transparent) transparent;
}

html[data-theme="dark"] .mensajes-thread__body {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--msg-purple) 10%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 28%);
}

.mensajes-date-separator {
  display: flex;
  justify-content: center;

  margin: 4px 0;
}

.mensajes-date-separator span {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 22px;
  padding: 0 10px;

  border: 1px solid var(--msg-border);
  border-radius: 999px;
  background: var(--msg-surface-soft);

  color: var(--msg-muted);

  font-size: 7.8px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.mensajes-thread__placeholder,
.mensajes-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;

  min-height: 100%;
  padding: 24px;

  text-align: center;
}

.mensajes-thread__placeholder .icon,
.mensajes-empty__icon .icon {
  width: 34px;
  height: 34px;
  color: var(--msg-muted);
}

.mensajes-thread__placeholder h3,
.mensajes-empty h3 {
  margin: 4px 0 0;

  color: var(--msg-text-strong);

  font-size: 15px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.mensajes-thread__placeholder p,
.mensajes-empty p {
  max-width: 360px;
  margin: 0;

  color: var(--msg-muted);

  font-size: 10px;
  font-weight: 760;
  line-height: 1.36;
}

/* =========================================================
   BURBUJAS
   ========================================================= */

.mensajes-bubble {
  width: fit-content;
  max-width: min(640px, 76%);

  padding: 9px 10px;

  border: 1px solid var(--msg-border);
  border-radius: 15px;
  background: var(--msg-surface);

  color: var(--msg-text);

  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);

  animation: mensajesBubbleIn 0.18s var(--msg-transition) both;
}

.mensajes-bubble.is-own {
  align-self: flex-end;

  border-color: #111827;
  background: #111827;

  color: #ffffff;
}

html[data-theme="dark"] .mensajes-bubble {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .mensajes-bubble.is-own {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.9);
  color: #090909;
}

.mensajes-bubble.is-other {
  align-self: flex-start;
}

.mensajes-bubble.is-deleted {
  opacity: 0.58;
}

.mensajes-bubble__meta {
  display: flex;
  align-items: center;
  gap: 6px;

  margin-bottom: 5px;
}

.mensajes-bubble__meta strong {
  font-size: 8.8px;
  font-weight: 950;
  line-height: 1;
}

.mensajes-bubble__meta span,
.mensajes-bubble__meta em {
  opacity: 0.68;

  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.mensajes-bubble p {
  margin: 0;

  font-size: 10.8px;
  font-weight: 760;
  line-height: 1.36;

  white-space: pre-wrap;
  word-break: break-word;
}

.mensajes-bubble__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;

  margin-top: 7px;
}

.mensajes-bubble__actions button {
  padding: 0;

  border: 0;
  background: transparent;

  color: currentColor;

  opacity: 0.66;

  font-size: 8.4px;
  font-weight: 900;

  cursor: pointer;
}

.mensajes-bubble__actions button:hover {
  opacity: 1;
  text-decoration: underline;
}

/* =========================================================
   MENSAJES CON LUCIDE
   ========================================================= */

.mensajes-lucide-message {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mensajes-lucide-message > span {
  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;
  min-width: 34px;

  border: 1px solid color-mix(in srgb, var(--msg-purple) 32%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--msg-purple) 10%, transparent);

  color: var(--msg-purple);
}

.mensajes-bubble.is-own .mensajes-lucide-message > span {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: currentColor;
}

.mensajes-lucide-message .icon {
  width: 17px;
  height: 17px;
}

.mensajes-lucide-message p {
  font-size: 11px;
  font-weight: 900;
}

/* =========================================================
   ADJUNTOS
   ========================================================= */

.mensajes-attachments {
  display: grid;
  gap: 7px;

  margin-top: 8px;
}

.mensajes-attachments__title {
  display: flex;
  align-items: center;
  gap: 6px;

  color: currentColor;

  opacity: 0.84;

  font-size: 8.6px;
  font-weight: 950;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.mensajes-attachments__title .icon {
  width: 12px;
  height: 12px;
}

.mensajes-attachments__title em {
  display: inline-grid;
  place-items: center;

  min-width: 18px;
  height: 18px;
  padding: 0 5px;

  border-radius: 999px;
  background: color-mix(in srgb, currentColor 10%, transparent);

  color: currentColor;

  font-size: 8px;
  font-style: normal;
  font-weight: 950;
}

.mensajes-attachments__list {
  display: grid;
  gap: 6px;
}

.mensajes-attachment {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;

  width: 100%;
  min-width: 220px;
  max-width: 440px;
  padding: 7px;

  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, currentColor 5%, transparent);

  color: currentColor;
  text-align: left;

  cursor: pointer;

  transition:
    background var(--msg-transition),
    border-color var(--msg-transition),
    transform var(--msg-transition);
}

.mensajes-attachment:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, currentColor 22%, transparent);
  background: color-mix(in srgb, currentColor 8%, transparent);
}

.mensajes-attachment__icon {
  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;

  border-radius: 11px;
  background: color-mix(in srgb, currentColor 9%, transparent);
}

.mensajes-attachment__icon .icon {
  width: 16px;
  height: 16px;
}

.mensajes-attachment__copy {
  display: grid;
  gap: 4px;

  min-width: 0;
}

.mensajes-attachment__copy strong {
  min-width: 0;

  font-size: 9.8px;
  font-weight: 950;
  line-height: 1.1;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mensajes-attachment__copy small {
  min-width: 0;

  opacity: 0.68;

  font-size: 8.2px;
  font-weight: 800;
  line-height: 1.1;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mensajes-attachment__download {
  width: 14px;
  height: 14px;
  opacity: 0.74;
}

/* =========================================================
   COMPOSER
   ========================================================= */

.mensajes-composer-wrap {
  display: grid;

  border-top: 1px solid var(--msg-border);
  background: var(--msg-surface);
}

.mensajes-composer {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr) auto;
  gap: 7px;

  padding: 9px 12px;
}

.mensajes-composer input {
  width: 100%;
  min-width: 0;
  height: 33px;
  padding: 0 11px;

  border: 1px solid var(--msg-border);
  border-radius: 11px;
  background: var(--msg-surface-soft);

  color: var(--msg-text);

  font-size: 9.6px;
  font-weight: 820;

  outline: none;

  transition:
    background var(--msg-transition),
    border-color var(--msg-transition);
}

.mensajes-composer input:focus {
  border-color: color-mix(in srgb, var(--msg-purple) 36%, var(--msg-border));
  background: color-mix(in srgb, var(--msg-purple) 7%, var(--msg-surface-soft));
}

.mensajes-composer input::placeholder {
  color: var(--msg-muted-soft);
}

.mensajes-composer__tool,
.mensajes-send {
  display: grid;
  place-items: center;

  width: 33px;
  height: 33px;

  border-radius: 11px;

  cursor: pointer;
  outline: none;

  transition:
    background var(--msg-transition),
    border-color var(--msg-transition),
    color var(--msg-transition),
    transform var(--msg-transition),
    opacity var(--msg-transition);
}

.mensajes-composer__tool {
  border: 1px solid var(--msg-border);
  background: var(--msg-surface-soft);
  color: var(--msg-purple);
}

.mensajes-composer__tool:hover,
.mensajes-composer__tool.is-active {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--msg-purple) 42%, var(--msg-border));
  background: color-mix(in srgb, var(--msg-purple) 10%, transparent);
}

.mensajes-composer__tool .icon,
.mensajes-send .icon {
  width: 12.5px;
  height: 12.5px;
}

.mensajes-send {
  border: 0;
  background: var(--msg-primary);
  color: #ffffff;
}

.mensajes-send:hover {
  transform: translateY(-1px);
  background: var(--msg-primary-hover);
}

.mensajes-send:disabled,
.mensajes-composer input:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

html[data-theme="dark"] .mensajes-send {
  color: #080808;
}

.mensajes-composer--disabled {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 58px;
  padding: 12px 14px;

  border-top: 1px solid var(--msg-border);

  color: var(--msg-muted);

  font-size: 9.6px;
  font-weight: 850;
}

/* =========================================================
   QUICK PANEL · LUCIDE + EMOJIS
   ========================================================= */

.mensajes-quick-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 9px;

  max-height: 292px;
  padding: 10px 14px 0;

  overflow: hidden;

  animation: mensajesQuickIn 0.16s var(--msg-transition) both;
}

.mensajes-quick-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;

  width: min(310px, 100%);

  padding: 4px;

  border: 1px solid var(--msg-border);
  border-radius: 14px;
  background: var(--msg-surface-soft);
}

.mensajes-quick-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  height: 30px;
  padding: 0 10px;

  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;

  color: var(--msg-muted);

  font-size: 9px;
  font-weight: 950;
  line-height: 1;

  cursor: pointer;

  transition:
    background var(--msg-transition),
    border-color var(--msg-transition),
    color var(--msg-transition),
    transform var(--msg-transition);
}

.mensajes-quick-tabs button:hover,
.mensajes-quick-tabs button.is-active {
  border-color: color-mix(in srgb, var(--msg-purple) 32%, var(--msg-border));
  background: color-mix(in srgb, var(--msg-purple) 10%, transparent);
  color: var(--msg-purple);
}

.mensajes-quick-body {
  display: grid;
  align-content: start;
  gap: 10px;

  min-height: 0;
  padding: 0 2px 10px;

  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--msg-muted) 24%, transparent) transparent;
}

.mensajes-quick-group {
  display: grid;
  gap: 7px;

  min-width: 0;
}

.mensajes-quick-group strong {
  color: var(--msg-muted);

  font-size: 8.2px;
  font-weight: 950;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
}

.mensajes-quick-grid,
.mensajes-emoji-grid {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 6px;
}

.mensajes-quick-grid button,
.mensajes-emoji-grid button {
  display: grid;
  place-items: center;

  min-width: 0;
  height: 34px;
  padding: 0;

  border: 1px solid var(--msg-border);
  border-radius: 11px;
  background: var(--msg-surface-soft);

  color: var(--msg-text);

  cursor: pointer;

  transition:
    background var(--msg-transition),
    border-color var(--msg-transition),
    color var(--msg-transition),
    transform var(--msg-transition);
}

.mensajes-quick-grid button:hover,
.mensajes-emoji-grid button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--msg-purple) 36%, var(--msg-border));
  background: color-mix(in srgb, var(--msg-purple) 10%, transparent);
  color: var(--msg-purple);
}

.mensajes-quick-grid button .icon {
  width: 17px;
  height: 17px;
}

.mensajes-emoji-grid button {
  font-size: 17px;
  line-height: 1;
}

/* =========================================================
   MODAL
   ========================================================= */

.mensajes-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: grid;
  place-items: center;

  padding: 18px;

  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(14px) saturate(0.92);
  -webkit-backdrop-filter: blur(14px) saturate(0.92);

  animation: mensajesModalBackdropIn 0.16s var(--msg-transition) both;
}

.mensajes-modal__card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);

  width: min(560px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);

  border: 1px solid var(--msg-border-strong);
  border-radius: 20px;
  background: var(--msg-surface);
  color: var(--msg-text);
  box-shadow: var(--msg-shadow-modal);

  overflow: hidden;

  animation: mensajesModalIn 0.2s var(--msg-transition) both;
}

.mensajes-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;

  min-height: 70px;
  padding: 14px 16px;

  border-bottom: 1px solid var(--msg-border);
  background: var(--msg-surface-soft);
}

.mensajes-modal__head h3 {
  margin: 4px 0 0;

  color: var(--msg-text-strong);

  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.035em;
}

.mensajes-modal__head p {
  margin: 5px 0 0;

  color: var(--msg-muted);

  font-size: 9.4px;
  font-weight: 760;
  line-height: 1.25;
}

.mensajes-modal__close {
  display: grid;
  place-items: center;

  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;

  border: 1px solid var(--msg-border-strong);
  border-radius: 12px;
  background: var(--msg-surface);

  color: var(--msg-text);

  cursor: pointer;

  transition:
    background var(--msg-transition),
    border-color var(--msg-transition),
    transform var(--msg-transition);
}

.mensajes-modal__close:hover {
  transform: translateY(-1px);
  background: var(--msg-surface-hover);
  border-color: color-mix(in srgb, var(--msg-text) 24%, transparent);
}

.mensajes-modal__body {
  display: grid;
  align-content: start;
  gap: 11px;

  min-height: 0;
  padding: 14px;

  overflow-y: auto;
  overflow-x: hidden;
}

.mensajes-field {
  display: grid;
  gap: 7px;
}

.mensajes-field input,
.mensajes-field select,
.mensajes-field textarea {
  width: 100%;
  min-width: 0;

  border: 1px solid var(--msg-border);
  border-radius: 13px;
  background: var(--msg-surface-soft);

  color: var(--msg-text);

  font-size: 10.8px;
  font-weight: 820;

  outline: none;

  transition:
    border-color var(--msg-transition),
    background var(--msg-transition);
}

.mensajes-field input,
.mensajes-field select {
  height: 38px;
  padding: 0 10px;
}

.mensajes-field textarea {
  min-height: 92px;
  padding: 10px;
  resize: vertical;
}

.mensajes-field input:focus,
.mensajes-field select:focus,
.mensajes-field textarea:focus {
  border-color: color-mix(in srgb, var(--msg-purple) 38%, var(--msg-border));
  background: color-mix(in srgb, var(--msg-purple) 7%, var(--msg-surface-soft));
}

.mensajes-users-box {
  display: grid;
  gap: 6px;

  max-height: 190px;
  padding: 8px;

  border: 1px solid var(--msg-border);
  border-radius: 14px;
  background: var(--msg-surface-soft);

  overflow-y: auto;
  overflow-x: hidden;
}

.mensajes-users-box p {
  margin: 0;
  padding: 12px;

  color: var(--msg-muted);

  font-size: 10px;
  font-weight: 820;
  text-align: center;
}

.mensajes-user-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;

  padding: 8px;

  border-radius: 11px;

  cursor: pointer;

  transition: background var(--msg-transition);
}

.mensajes-user-check:hover {
  background: var(--msg-surface-hover);
}

.mensajes-user-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--msg-purple);
}

.mensajes-user-check span {
  display: grid;
  gap: 3px;

  min-width: 0;
}

.mensajes-user-check strong {
  color: var(--msg-text-strong);

  font-size: 10.4px;
  font-weight: 900;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mensajes-user-check small {
  color: var(--msg-muted);

  font-size: 8.8px;
  font-weight: 760;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mensajes-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;

  padding-top: 4px;
}

/* =========================================================
   CARD LOADING
   ========================================================= */

.mensajes-card {
  display: grid;
  gap: 12px;

  padding: 14px;
}

.mensajes-card--loading {
  min-height: 120px;
}

.mensajes-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mensajes-card__head h3 {
  margin: 3px 0 0;

  color: var(--msg-text-strong);

  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.035em;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
  .mensajes-quick-grid,
  .mensajes-emoji-grid {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .mensajes-layout {
    grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  }

  .mensajes-quick-grid,
  .mensajes-emoji-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .mensajes-page {
    height: auto;
    min-height: calc(100vh - var(--topbar-height, 52px) - 54px);
    overflow: visible;
  }

  .mensajes-hero__top {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .mensajes-hero__actions {
    justify-content: flex-start;
  }

  .mensajes-hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mensajes-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .mensajes-sidebar-panel {
    min-height: 320px;
    max-height: 380px;
    border-right: 0;
    border-bottom: 1px solid var(--msg-border);
  }

  .mensajes-thread {
    min-height: 540px;
  }
}

@media (max-width: 620px) {
  .mensajes-page {
    gap: 8px;
  }

  .mensajes-hero,
  .mensajes-layout {
    border-radius: 15px;
  }

  .mensajes-hero {
    padding: 10px;
  }

  .mensajes-hero__main {
    align-items: flex-start;
  }

  .mensajes-hero__copy h1 {
    font-size: 20px;
  }

  .mensajes-hero__copy p {
    font-size: 8.8px;
    white-space: normal;
  }

  .mensajes-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .mensajes-hero__actions .mensajes-action,
  .mensajes-action {
    width: 100%;
    min-height: 33px;
  }

  .mensajes-hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .mensajes-hero-stat {
    min-height: 40px;
  }

  .mensajes-toolbar {
    grid-template-columns: 1fr;
  }

  .mensajes-filter {
    width: 100%;
  }

  .mensajes-sidebar-panel {
    max-height: 330px;
  }

  .mensajes-thread {
    min-height: 520px;
  }

  .mensajes-thread__header {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 11px;
  }

  .mensajes-thread__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .mensajes-thread__body {
    padding: 11px;
  }

  .mensajes-bubble {
    max-width: 94%;
  }

  .mensajes-composer {
    grid-template-columns: auto auto auto minmax(0, 1fr) auto;
    gap: 6px;
    padding: 10px;
  }

  .mensajes-composer__tool,
  .mensajes-send {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .mensajes-composer input {
    height: 34px;
    font-size: 10px;
    padding: 0 10px;
  }

  .mensajes-quick-panel {
    max-height: 340px;
    padding: 9px 10px 0;
  }

  .mensajes-quick-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .mensajes-emoji-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .mensajes-quick-grid button,
  .mensajes-emoji-grid button {
    height: 34px;
  }

  .mensajes-modal {
    padding: 8px;
  }

  .mensajes-modal__card {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 16px;
  }

  .mensajes-modal__head {
    min-height: auto;
    padding: 12px;
  }

  .mensajes-modal__head p {
    display: none;
  }

  .mensajes-modal__body {
    padding: 10px;
  }

  .mensajes-modal__footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mensajes-modal__footer .mensajes-action {
    width: 100%;
  }

  .mensajes-attachment {
    min-width: 0;
    max-width: 100%;
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }

  .mensajes-attachment__icon {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 420px) {
  .mensajes-hero,
  .mensajes-layout {
    border-radius: 13px;
  }

  .mensajes-hero__icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 12px;
  }

  .mensajes-hero__copy h1 {
    font-size: 18px;
  }

  .mensajes-hero__stats {
    grid-template-columns: 1fr;
  }

  .mensajes-sidebar-panel {
    max-height: 300px;
  }

  .mensajes-thread {
    min-height: 500px;
  }

  .mensajes-inbox__item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    min-height: 58px;
    padding: 7px;
  }

  .mensajes-thread__identity h2 {
    font-size: 13px;
  }

  .mensajes-thread__identity p {
    font-size: 8.8px;
  }

  .mensajes-bubble p {
    font-size: 10.2px;
  }

  .mensajes-composer {
    grid-template-columns: auto auto auto minmax(0, 1fr) auto;
    padding: 8px;
  }

  .mensajes-composer__tool,
  .mensajes-send {
    width: 31px;
    height: 31px;
    border-radius: 11px;
  }

  .mensajes-composer__tool .icon,
  .mensajes-send .icon {
    width: 12px;
    height: 12px;
  }

  .mensajes-quick-tabs {
    width: 100%;
  }

  .mensajes-quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mensajes-emoji-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* =========================================================
   HEIGHT SAFETY
   ========================================================= */

@media (max-height: 760px) and (min-width: 921px) {
  .mensajes-page {
    height: calc(100vh - var(--topbar-height, 52px) - 44px);
  }

  .mensajes-hero {
    padding: 9px 11px;
    gap: 7px;
  }

  .mensajes-hero-stat {
    min-height: 34px;
  }

  .mensajes-thread__header {
    min-height: 54px;
  }
}

/* =========================================================
   ANIMACIONES
   ========================================================= */

.mensajes-spin {
  animation: mensajesSpin 0.9s linear infinite;
}

@keyframes mensajesSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes mensajesPageIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mensajesBubbleIn {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mensajesQuickIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mensajesModalBackdropIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes mensajesModalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .mensajes-page,
  .mensajes-page *,
  .mensajes-page *::before,
  .mensajes-page *::after,
  .mensajes-modal,
  .mensajes-modal *,
  .mensajes-modal *::before,
  .mensajes-modal *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}