* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body { height:100%; overflow:hidden; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; background:#1e3d7a; }

/* ── Layout raíz ──────────────────────────────────────────────────────── */
.desktop-wrapper {
  display: flex;
  height: 100vh;
  height: 100dvh;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Chat app ─────────────────────────────────────────────────────────── */
.app {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  background: #f5f7fa;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* ── Dark mode ────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  body { background: #111827; }
  .app { background: #1e1e2e; }
  .msg-bubble-in { background: #2a2a3e !important; color: #e0e0f0 !important; }
  .input-area { background: #2a2a3e !important; border-top-color: #3a3a4e !important; }
  .input-area textarea { background: #1e1e2e !important; border-color: #3a3a4e !important; color: #e0e0f0 !important; }
  .quick-replies { background: #2a2a3e !important; border-top-color: #3a3a4e !important; }
  .qr-btn { background: #2a2a3e !important; }
  .typing-bubble { background: #2a2a3e !important; }
  .file-preview { background: #1e2a3e !important; border-top-color: #2a4a6e !important; color: #60a5fa !important; }

}

/* ── Login & Selector de óptica ───────────────────────────────────────── */
.login-screen, .select-screen {
  position: fixed; inset: 0; z-index: 200;
  background: linear-gradient(135deg, #365FA6 0%, #1e3d7a 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-screen.hidden, .select-screen.hidden { display: none; }

.login-card {
  background: white; border-radius: 20px;
  padding: 32px 28px; width: 100%; max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-height: calc(100dvh - 48px); overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.login-logo { margin-bottom: 4px; }
.login-logo img { width: 80px; height: 80px; object-fit: contain; border-radius: 16px; background: #ffffff; padding: 8px; box-sizing: border-box; }
.login-card h2 { font-size: 1.4em; font-weight: 700; color: #1a1a2e; }
.login-card > p { font-size: 0.82em; color: #999; margin-bottom: 10px; text-align: center; }

.login-fields { width: 100%; display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-group label { font-size: 0.8em; font-weight: 600; color: #555; }
.field-group input {
  border: 2px solid #e0e0e0; border-radius: 12px;
  padding: 11px 14px; font-size: 0.95em; outline: none;
  transition: border-color 0.2s; font-family: inherit; width: 100%;
}
.field-group input:focus { border-color: #365FA6; }
.pw-input-wrap {
  display: flex; align-items: center;
  border: 2px solid #e0e0e0; border-radius: 12px;
  transition: border-color 0.2s; overflow: hidden;
}
.pw-input-wrap:focus-within { border-color: #365FA6; }
.pw-input-wrap input {
  flex: 1; min-width: 0;
  border: none !important; outline: none;
  padding: 11px 14px !important; width: auto !important;
  background: transparent;
}
.pw-toggle {
  flex-shrink: 0; align-self: stretch;
  display: flex; align-items: center; padding: 0 12px;
  background: none; border: none; cursor: pointer;
  font-size: 1.05em; color: #aaa;
}
.login-error {
  background: #fee2e2; color: #b91c1c;
  border-radius: 10px; padding: 9px 12px;
  font-size: 0.83em; text-align: center;
}
.login-error.hidden { display: none; }
.login-btn {
  background: linear-gradient(135deg, #365FA6, #1e3d7a);
  color: white; border: none; border-radius: 22px;
  padding: 13px; font-size: 0.95em; font-weight: 700;
  cursor: pointer; width: 100%; touch-action: manipulation;
  transition: opacity 0.2s, transform 0.1s; margin-top: 4px;
}
.login-btn:hover { opacity: 0.92; }
.login-btn:active { transform: scale(0.97); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.select-list { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 14px; max-height: 55vh; overflow-y: auto; }
.select-item {
  background: white; border: 2px solid #e0e0e0;
  border-radius: 14px; padding: 13px 16px; width: 100%;
  text-align: left; cursor: pointer; font-size: 0.9em;
  font-family: inherit; transition: border-color 0.15s, background 0.15s;
  touch-action: manipulation;
}
.select-item:hover  { border-color: #365FA6; background: #f0f7ff; }
.select-item:active { border-color: #365FA6; background: #eff6ff; }
.select-back {
  background: none; border: none; color: #365FA6;
  cursor: pointer; font-size: 0.85em; font-weight: 600;
  padding: 4px; touch-action: manipulation; margin-top: 10px;
}

/* ── Install banner ───────────────────────────────────────────────────── */
.install-banner {
  background: linear-gradient(135deg, #365FA6, #1e3d7a);
  color: white; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px; font-size: 0.84em;
  position: fixed; top: 0; left: 0; right: 0; z-index: 201;
}
.install-banner.hidden { display: none; }
.install-banner span { flex: 1; }
.install-btn { background: white; color: #365FA6; border: none; padding: 6px 14px; border-radius: 12px; font-weight: 700; cursor: pointer; font-size: 0.84em; touch-action: manipulation; }
.install-close { background: none; border: none; color: white; font-size: 1.3em; cursor: pointer; line-height: 1; }

.conn-bar { background: #f59e0b; color: white; text-align: center; padding: 5px; font-size: 0.78em; display: none; }
.conn-bar.show { display: block; }

/* ── Header ───────────────────────────────────────────────────────────── */
.header {
  background: linear-gradient(135deg, #365FA6 0%, #1e3d7a 100%);
  color: white; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  min-height: 62px; box-shadow: 0 2px 8px rgba(0,0,0,0.25); flex-shrink: 0;
}
.header-avatar { width:42px; height:42px; background:#ffffff; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:1.3em; flex-shrink:0; overflow:hidden; }
.header-avatar img { width:80%; height:80%; object-fit:contain; border-radius:0; }
.header-info { flex: 1; }
.header-info h1 { font-size: 1.05em; font-weight: 700; }
.header-info p  { font-size: 0.78em; opacity: 0.85; margin-top: 1px; }
.status-dot { width:10px; height:10px; background:#4ade80; border-radius:50%; border:2px solid rgba(255,255,255,0.4); transition:background 0.3s; }
.status-dot.offline { background: #f59e0b; }

/* Botón logout (visible solo en desktop) */
.logout-btn {
  display: none;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white; border-radius: 10px;
  padding: 6px 12px; font-size: 0.78em; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}
.logout-btn:hover { background: rgba(255,255,255,0.25); }

/* ── Modal de confirmación ────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: #fff; border-radius: 20px;
  padding: 28px 24px 20px; width: 300px; max-width: 90vw;
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
  text-align: center; animation: modal-in 0.18s ease;
}
@keyframes modal-in {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.modal-icon { font-size: 2.2em; margin-bottom: 10px; }
.modal-title { font-size: 1.05em; font-weight: 700; color: #1a1a2e; margin-bottom: 6px; }
.modal-msg { font-size: 0.88em; color: #555; margin-bottom: 22px; line-height: 1.4; }
.modal-actions { display: flex; gap: 10px; }
.modal-btn {
  flex: 1; padding: 10px; border-radius: 12px; border: none;
  font-size: 0.9em; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.modal-btn:hover { opacity: 0.85; }
.modal-btn.cancel { background: #f0f0f0; color: #444; }
.modal-btn.confirm { background: #365FA6; color: #fff; }

/* ── Mensajes ─────────────────────────────────────────────────────────── */
.messages { flex:1; overflow-y:auto; padding:14px 12px 8px; display:flex; flex-direction:column; gap:10px; }
.messages::-webkit-scrollbar { width: 4px; }
.messages::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.messages::-webkit-scrollbar-thumb:hover { background: #bbb; }

.message { display:flex; gap:8px; animation:pop 0.18s ease; }
@keyframes pop { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
.message.outgoing { flex-direction: row-reverse; }

.msg-avatar { width:30px; height:30px; border-radius:50%; background:linear-gradient(135deg,#365FA6,#1e3d7a); display:flex; align-items:center; justify-content:center; font-size:0.78em; color:white; flex-shrink:0; align-self:flex-end; }
.msg-wrap { max-width: 80%; }
.msg-bubble { padding:10px 14px; border-radius:18px; font-size:0.91em; line-height:1.5; word-wrap:break-word; white-space:pre-wrap; }
.msg-bubble strong { font-weight:700; }
.msg-bubble em { font-style:italic; }
.msg-bubble code { background:rgba(0,0,0,0.08); padding:1px 5px; border-radius:3px; font-size:0.87em; font-family:monospace; }
.message.outgoing .msg-bubble code { background:rgba(255,255,255,0.2); }
.message.incoming .msg-bubble { background:white; color:#1a1a2e; border-bottom-left-radius:4px; box-shadow:0 1px 4px rgba(0,0,0,0.08); }
.message.outgoing  .msg-bubble { background:linear-gradient(135deg,#365FA6 0%,#1e3d7a 100%); color:white; border-bottom-right-radius:4px; }
.msg-bubble hr { border:none; border-top:1px solid rgba(0,0,0,0.15); margin:5px 0; display:block; }
.message.outgoing .msg-bubble hr { border-top-color:rgba(255,255,255,0.3); }
.msg-img { max-width:100%; max-height:220px; border-radius:10px; display:block; cursor:pointer; margin-top:4px; object-fit:cover; }
.msg-audio { width:100%; margin-top:6px; border-radius:8px; }
.msg-file { display:block; margin-top:4px; text-decoration:underline; color:inherit; }
.load-more-btn { display:block; width:100%; padding:8px; margin-bottom:10px; background:rgba(54,95,166,0.1); border:1px solid rgba(54,95,166,0.3); border-radius:20px; color:#365FA6; font-size:0.8em; cursor:pointer; text-align:center; }
.load-more-btn:hover { background:rgba(54,95,166,0.2); }
.load-more-btn:disabled { opacity:0.5; cursor:default; }
@media (prefers-color-scheme: dark) {
  .load-more-btn { background:rgba(255,255,255,0.12); border-color:rgba(255,255,255,0.3); color:#fff; }
  .load-more-btn:hover { background:rgba(255,255,255,0.22); }
}
.msg-time { font-size:0.68em; color:#bbb; margin-top:3px; padding:0 4px; }
.message.outgoing .msg-time { text-align: right; }

/* ── Typing indicator ─────────────────────────────────────────────────── */
.typing-row { display:none; gap:8px; align-items:flex-end; padding:0 12px 6px; flex-shrink:0; }
.typing-row.show { display: flex; }
.typing-bubble { background:white; padding:11px 16px; border-radius:18px; border-bottom-left-radius:4px; box-shadow:0 1px 4px rgba(0,0,0,0.08); display:flex; gap:5px; align-items:center; }
.dot { width:7px; height:7px; background:#bbb; border-radius:50%; animation:bounce 1.2s infinite; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100% { transform:translateY(0); opacity:0.4; } 30% { transform:translateY(-7px); opacity:1; } }

/* ── Quick replies ────────────────────────────────────────────────────── */
.quick-replies { padding:8px 12px; display:flex; flex-wrap:wrap; gap:8px; background:white; border-top:1px solid #eee; flex-shrink:0; max-height:35vh; overflow-y:auto; }
.quick-replies.hidden { display: none; }
.qr-btn { flex:1; min-width:130px; padding:11px 14px; background:#365FA6; border:1.5px solid white; border-radius:22px; color:white; font-size:0.87em; font-weight:600; cursor:pointer; text-align:center; touch-action:manipulation; transition:background 0.15s,transform 0.1s; line-height:1.3; }
.qr-btn:hover  { background:#2a4f8f; }
.qr-btn:active { background:#1e3d7a; transform:scale(0.96); }

/* ── Input area ───────────────────────────────────────────────────────── */
.input-area { display:flex; gap:8px; padding:10px 12px; background:white; border-top:1px solid #eee; align-items:flex-end; flex-shrink:0; }
.input-area textarea { flex:1; border:2px solid #e0e0e0; border-radius:22px; padding:10px 16px; font-size:0.95em; font-family:inherit; outline:none; resize:none; max-height:100px; min-height:44px; line-height:1.4; transition:border-color 0.2s; }
.input-area textarea:focus { border-color: #365FA6; }
.send-btn { width:44px; height:44px; flex-shrink:0; background:linear-gradient(135deg,#365FA6,#1e3d7a); border:none; border-radius:50%; color:white; font-size:1.05em; cursor:pointer; display:flex; align-items:center; justify-content:center; touch-action:manipulation; transition:transform 0.1s,opacity 0.2s; }
.send-btn:active  { transform: scale(0.9); }
.send-btn:disabled { opacity: 0.45; }

.attach-btn, .mic-btn { width:38px; height:38px; flex-shrink:0; background:none; border:none; font-size:1.2em; cursor:pointer; display:flex; align-items:center; justify-content:center; border-radius:50%; transition:background 0.15s; touch-action:manipulation; }
.attach-btn:hover, .mic-btn:hover { background: #f5f5f5; }
.attach-btn:active, .mic-btn:active { background: #f0f0f0; }
.mic-btn.recording { background:#fee2e2; animation:pulse-rec 1s infinite; }
@keyframes pulse-rec { 0%,100% { background:#fee2e2; } 50% { background:#fca5a5; } }

.file-preview { padding:8px 14px; background:#eff6ff; border-top:1px solid #bfdbfe; display:flex; align-items:center; gap:10px; font-size:0.83em; color:#1d4ed8; flex-shrink:0; }
.file-preview.hidden { display: none; }
.file-preview-icon { font-size: 1.2em; }
.file-preview-name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-preview-cancel { background:none; border:none; cursor:pointer; font-size:1.1em; color:#6b7280; line-height:1; }
.file-preview-img { width:48px; height:48px; object-fit:cover; border-radius:6px; border:1px solid #bfdbfe; flex-shrink:0; }
.file-preview-img.hidden { display:none; }

/* ── Loading screen ───────────────────────────────────────────────────── */
.loading-screen { position:fixed; inset:0; z-index:999; background:linear-gradient(135deg,#365FA6,#1e3d7a); display:flex; flex-direction:column; align-items:center; justify-content:center; color:white; gap:16px; transition:opacity 0.4s; }
.loading-screen.hidden { opacity:0; pointer-events:none; }
.loading-logo { font-size: 3.5em; }
.loading-screen h2 { font-size: 1.5em; font-weight: 700; }
.loading-screen p  { opacity: 0.85; font-size: 0.95em; }
.spinner { width:36px; height:36px; border:3px solid rgba(255,255,255,0.3); border-top-color:white; border-radius:50%; animation:spin 0.75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ────────────────────────────────────────────────────────────── */
.toast { position:fixed; bottom:90px; left:50%; transform:translateX(-50%); background:rgba(30,30,30,0.92); color:white; padding:10px 22px; border-radius:20px; font-size:0.84em; z-index:500; opacity:0; pointer-events:none; transition:opacity 0.3s; white-space:nowrap; }
.toast.show { opacity: 1; }

/* ── iOS Install FAB ─────────────────────────────────────────────────── */
.ios-fab {
  position: fixed; top: 16px; right: 16px; z-index: 450;
  background: linear-gradient(135deg, #365FA6, #1e3d7a);
  color: white; border: none; border-radius: 28px;
  padding: 10px 16px; font-size: 0.83em; font-weight: 700;
  cursor: pointer; touch-action: manipulation;
  box-shadow: 0 4px 22px rgba(54,95,166,0.5);
  display: flex; align-items: center; gap: 7px;
  animation: fabIn 0.5s ease 0.8s both;
}
@keyframes fabIn { from { opacity:0; transform:translateY(-16px); } to { opacity:1; transform:translateY(0); } }
.ios-fab.hidden { display: none; }

/* ── iOS Install Modal ───────────────────────────────────────────────── */
.ios-modal {
  position: fixed; inset: 0; z-index: 600;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.ios-modal.hidden { display: none; }
.ios-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.48); }
.ios-sheet {
  position: relative; background: white; margin: 0 auto;
  border-radius: 24px 24px 0 0; padding: 8px 24px 48px;
  width: 100%; max-width: 600px;
  animation: sheetUp 0.32s cubic-bezier(0.32,0.72,0,1);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.ios-handle { width:40px; height:4px; background:#ddd; border-radius:2px; margin:14px auto 22px; }
.ios-sheet h3 { text-align:center; font-size:1.08em; font-weight:700; color:#1a1a2e; margin-bottom:4px; }
.ios-sheet > p { text-align:center; font-size:0.8em; color:#999; margin-bottom:20px; }
.ios-step { display:flex; gap:14px; align-items:center; padding:14px 0; border-bottom:1px solid #f3f3f3; }
.ios-step:last-of-type { border-bottom:none; }
.ios-step-num {
  width:30px; height:30px; flex-shrink:0;
  background: linear-gradient(135deg,#365FA6,#1e3d7a);
  color:white; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:0.85em;
}
.ios-step-icon { font-size:1.6em; flex-shrink:0; width:32px; text-align:center; }
.ios-step-text strong { display:block; font-size:0.9em; color:#1a1a2e; margin-bottom:2px; }
.ios-step-text span { font-size:0.78em; color:#777; }
.ios-ok-btn {
  background: linear-gradient(135deg,#365FA6,#1e3d7a);
  color:white; border:none; border-radius:24px;
  padding:14px; font-size:0.95em; font-weight:700;
  cursor:pointer; width:100%; margin-top:22px;
  touch-action:manipulation;
}

/* ── Loading icon ────────────────────────────────────────────────────── */
.loading-icon-wrap {
  margin-bottom: 14px;
}
.loading-app-icon { width: 80px; height: 80px; display: block; border-radius: 16px; background: #ffffff; padding: 8px; box-sizing: border-box; }


/* ═══════════════════════════════════════════════════════════════════════
   TABLET — ≥ 768px
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {

  body { background: #1e3d7a; }

  .app {
    max-width: 700px;
    box-shadow: 0 0 60px rgba(0,0,0,0.4);
  }

  .login-card {
    max-width: 440px;
    padding: 40px 40px;
    border-radius: 24px;
    gap: 8px;
  }
  .login-logo { font-size: 3.6em; }
  .login-card h2 { font-size: 1.6em; }
  .login-card > p { font-size: 0.88em; margin-bottom: 14px; }
  .field-group input { padding: 13px 16px; font-size: 1em; }
  .pw-input-wrap input { padding: 13px 16px !important; }
  .login-btn { padding: 15px; font-size: 1em; border-radius: 28px; }
  .select-list { max-height: 60vh; gap: 12px; }
  .select-item { padding: 15px 20px; font-size: 0.95em; border-radius: 16px; }

  .msg-wrap { max-width: 75%; }
  .msg-bubble { font-size: 0.94em; padding: 11px 16px; }
  .messages { padding: 20px 18px 10px; gap: 12px; }

  .quick-replies { padding: 10px 16px; gap: 10px; max-height: 28vh; }
  .qr-btn { font-size: 0.9em; padding: 12px 16px; }

  .input-area { padding: 12px 16px; gap: 10px; }
  .input-area textarea { font-size: 1em; padding: 11px 18px; min-height: 46px; }
  .send-btn { width: 48px; height: 48px; font-size: 1.1em; }

  .header { padding: 14px 20px; min-height: 68px; }
  .header-avatar { width: 46px; height: 46px; font-size: 1.4em; }
  .header-info h1 { font-size: 1.1em; }
  .header-info p  { font-size: 0.82em; }

  .toast { font-size: 0.88em; padding: 11px 26px; }
}


/* ═══════════════════════════════════════════════════════════════════════
   DESKTOP — ≥ 1024px
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {

  body { background: #1a2f5e; }

  .desktop-wrapper {
    box-shadow: 0 0 80px rgba(0,0,0,0.5);
    border-radius: 16px;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    margin: 0 auto;
  }

  /* ── Chat área ─────────────────────────────────────── */
  .app {
    flex: 1;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
  }

  /* Login y selector: centrados sobre el desktop-wrapper */
  .login-screen, .select-screen {
    position: fixed;
    background: rgba(10, 20, 50, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .login-card {
    max-width: clamp(420px, 28vw, 640px);
    padding: 44px 44px;
    border-radius: 28px;
    gap: 10px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  }
  .login-logo { font-size: 4em; }
  .login-card h2 { font-size: 1.7em; }
  .login-fields { gap: 16px; margin-top: 8px; }

  /* Selector de óptica — escala fluida en cualquier resolución */
  .select-screen .login-card {
    max-width: clamp(480px, 34vw, 800px);
  }

  /* Logout visible en desktop */
  .logout-btn { display: flex; align-items: center; gap: 5px; }

  /* Mensajes más anchos y legibles */
  .msg-wrap { max-width: 68%; }
  .msg-bubble { font-size: 0.95em; padding: 12px 18px; line-height: 1.55; }
  .messages { padding: 24px 20px 12px; gap: 14px; }
  .messages::-webkit-scrollbar { width: 5px; }

  /* Quick replies en desktop: una fila horizontal sin wrap si hay pocas */
  .quick-replies {
    padding: 12px 18px;
    gap: 10px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    border-top: 1px solid #e5e7eb;
  }
  .quick-replies.multi-row {
    flex-wrap: wrap;
    max-height: 22vh;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .qr-btn {
    flex: 0 1 auto;
    min-width: 120px;
    white-space: nowrap;
    font-size: 0.9em;
  }

  /* Input área más cómoda */
  .input-area { padding: 14px 18px; gap: 12px; }
  .input-area textarea {
    font-size: 0.97em;
    padding: 12px 20px;
    min-height: 48px;
    max-height: 140px;
  }
  .send-btn { width: 48px; height: 48px; }

  /* Hint de Enter debajo del input */
  .enter-hint {
    display: block;
    font-size: 0.72em;
    color: #bbb;
    padding: 2px 20px 0;
    text-align: right;
    flex-shrink: 0;
    line-height: 1;
  }

  /* Header desktop */
  .header { padding: 14px 20px; min-height: 70px; }
  .header-avatar { width: 48px; height: 48px; font-size: 1.5em; }
  .header-info h1 { font-size: 1.12em; }
  .header-info p  { font-size: 0.82em; }

  /* Toast en esquina inferior derecha */
  .toast {
    bottom: 24px;
    right: 24px;
    left: auto;
    transform: none;
  }
}


/* ═══════════════════════════════════════════════════════════════════════
   DESKTOP ANCHO — ≥ 1280px
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width: 1280px) {
  .msg-wrap { max-width: 62%; }
}

/* ═══════════════════════════════════════════════════════════════════════
   PANTALLA MUY GRANDE — ≥ 1600px
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width: 1600px) {
  .desktop-wrapper { max-width: 1500px; }
  .msg-bubble { font-size: 1em; }
}