/* ══════════════════════════════════════════════════════════════════════════
   Río Notificaciones — Styles
   ══════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-w: 220px;
  --sidebar-collapsed: 64px;
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22263a;
  --border: #2e3248;
  --accent: #5b7cfa;
  --accent2: #7c5bfa;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #f59e0b;
  --teal: #14b8a6;
  --purple: #a855f7;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --text3: #64748b;
  --radius: 10px;
  --transition: 0.22s cubic-bezier(.4,0,.2,1);
}

body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); display: flex; min-height: 100vh; font-size: 14px; }

/* ── SIDEBAR ──────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: width var(--transition);
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 100;
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .nav-label,
.sidebar.collapsed .logo-sub,
.sidebar.collapsed .logo,
.sidebar.collapsed .sidebar-footer { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; }
.sidebar.collapsed .sidebar-toggle { transform: rotate(180deg); }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 18px 8px 14px; }

.sidebar-header {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.logo { font-size: 22px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.logo-sub { font-size: 11px; color: var(--text2); white-space: nowrap; flex: 1; }
.sidebar-toggle {
  background: none; border: 1px solid var(--border); color: var(--text2);
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: var(--transition); flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--surface2); color: var(--text); }

.sidebar-nav { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius);
  color: var(--text2); text-decoration: none;
  transition: var(--transition); cursor: pointer; white-space: nowrap;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: linear-gradient(135deg, #1e2d6b, #2a1e6b); color: var(--accent); font-weight: 600; }
.nav-icon { font-size: 18px; flex-shrink: 0; }
.nav-label { font-size: 13px; }

.sidebar-footer { padding: 12px 8px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.stat-chip { font-size: 11px; color: var(--text2); background: var(--surface2); border-radius: 20px; padding: 4px 10px; text-align: center; }

/* ── MAIN ─────────────────────────────────────────────────────────────────── */
.main { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; transition: margin-left var(--transition); }
.main.collapsed { margin-left: var(--sidebar-collapsed); }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: var(--surface); position: sticky; top: 0; z-index: 50;
}
.page-title { font-size: 20px; font-weight: 700; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── SECTIONS ─────────────────────────────────────────────────────────────── */
.section { display: none; padding: 24px; }
.section.active { display: block; }

/* ── CARDS ────────────────────────────────────────────────────────────────── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; display: flex;
  align-items: center; gap: 14px; transition: var(--transition);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.card-icon { font-size: 28px; }
.card-value { font-size: 26px; font-weight: 800; }
.card-label { font-size: 11px; color: var(--text2); margin-top: 2px; }
.card-blue { border-color: #1d4ed8; background: linear-gradient(135deg, #1e2d6b22, var(--surface)); }
.card-blue .card-value { color: #60a5fa; }
.card-green { border-color: #166534; background: linear-gradient(135deg, #16653422, var(--surface)); }
.card-green .card-value { color: var(--green); }
.card-red { border-color: #991b1b; background: linear-gradient(135deg, #991b1b22, var(--surface)); }
.card-red .card-value { color: #f87171; }
.card-purple { border-color: #7e22ce; background: linear-gradient(135deg, #7e22ce22, var(--surface)); }
.card-purple .card-value { color: #c084fc; }
.card-teal { border-color: #0f766e; background: linear-gradient(135deg, #0f766e22, var(--surface)); }
.card-teal .card-value { color: #2dd4bf; }
.card-gray { border-color: var(--border); }
.card-gray .card-value { color: var(--text2); }

/* ── PANEL ────────────────────────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }
.panel-header {
  padding: 14px 20px; font-weight: 700; font-size: 14px;
  border-bottom: 1px solid var(--border); background: var(--surface2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.panel-body { padding: 20px; }

/* ── BADGES ───────────────────────────────────────────────────────────────── */
.badge { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-green { background: #16653440; color: var(--green); border: 1px solid #166534; }
.badge-blue  { background: #1d4ed840; color: #60a5fa;    border: 1px solid #1d4ed8; }
.badge-red   { background: #991b1b40; color: #f87171;    border: 1px solid #991b1b; }
.badge-yellow{ background: #92400e40; color: #fbbf24;    border: 1px solid #92400e; }
.badge-gray  { background: var(--surface2); color: var(--text2); border: 1px solid var(--border); }
.badge-purple{ background: #7e22ce40; color: #c084fc;    border: 1px solid #7e22ce; }

/* ── FORMS ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.input {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 9px 12px;
  font-size: 13px; transition: var(--transition); outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #5b7cfa22; }
.textarea { min-height: 120px; resize: vertical; font-family: monospace; }
.select { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 7px 10px; font-size: 13px; outline: none; }

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.btn { padding: 9px 18px; border-radius: 8px; border: none; cursor: pointer; font-size: 13px; font-weight: 600; transition: var(--transition); display: inline-flex; align-items: center; gap: 6px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #4a69e0; }
.btn-success { background: #166534; color: var(--green); border: 1px solid var(--green); }
.btn-success:hover { background: #14532d; }
.btn-outline { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--surface2); color: var(--text); }
.btn-ghost { background: var(--surface2); color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); }
.btn-danger-outline { background: transparent; color: #f87171; border: 1px solid #991b1b; }
.btn-danger-outline:hover { background: #991b1b22; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 5px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── UPLOAD ZONE ──────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 30px; text-align: center; transition: var(--transition);
  cursor: pointer; color: var(--text2);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--accent); background: #5b7cfa11; color: var(--text); }
.upload-hint { font-size: 11px; color: var(--text3); margin-top: 6px; }

/* ── RESULT BOX ───────────────────────────────────────────────────────────── */
.result-box { margin-top: 14px; padding: 12px 16px; border-radius: 8px; font-size: 13px; }
.result-box.ok    { background: #16653420; border: 1px solid var(--green);  color: var(--green); }
.result-box.error { background: #991b1b20; border: 1px solid var(--red);    color: #f87171; }
.result-box.info  { background: #1d4ed820; border: 1px solid #3b82f6;       color: #60a5fa; }
.hidden { display: none !important; }

/* ── MESSAGES TABLE ───────────────────────────────────────────────────────── */
.msg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.msg-table th { padding: 10px 14px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text3); border-bottom: 1px solid var(--border); background: var(--surface2); }
.msg-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.msg-table tr:last-child td { border-bottom: none; }
.msg-table tr:hover td { background: var(--surface2); }
.phone-cell { font-family: monospace; font-size: 13px; }
.reply-chip { background: #0f766e30; border: 1px solid var(--teal); color: #2dd4bf; font-size: 11px; padding: 2px 8px; border-radius: 12px; margin-top: 4px; display: inline-block; }

/* ── DAY GRID ─────────────────────────────────────────────────────────────── */
.day-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.day-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px; min-width: 150px;
}
.day-card-date { font-size: 12px; color: var(--text2); margin-bottom: 8px; font-weight: 600; }
.day-card-stats { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── COUNTRY GROUPS ───────────────────────────────────────────────────────── */
.country-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 14px; overflow: hidden;
}
.country-header {
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  cursor: pointer; transition: var(--transition);
}
.country-header:hover { background: var(--surface); }
.country-flag { font-size: 24px; }
.country-name { font-weight: 700; flex: 1; }
.country-count { font-size: 12px; color: var(--text2); }
.country-numbers { padding: 0 16px 14px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ── ESTADO sub-grupos USA ────────────────────────────────────────────────── */
.state-group { border-top: 1px solid var(--border); }
.state-group:first-child { border-top: none; }
.state-header {
  padding: 9px 12px; display: flex; align-items: center; gap: 8px;
  cursor: pointer; transition: var(--transition);
}
.state-header:hover { background: var(--surface); }
.state-name { font-size: 13px; font-weight: 600; flex: 1; }

/* ── CONTACT CARDS (whitelist) ───────────────────────────────────────────── */
.number-list { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.number-tag {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 12px 10px;
  display: flex; flex-direction: column; gap: 8px;
  transition: var(--transition); position: relative;
}
.number-tag:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent)22; }
.number-tag.highlighted { border-color: var(--accent); background: #1e2540; }
.nt-top { display: flex; align-items: center; gap: 10px; }
.nt-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 0;
  position: relative;
}
.nt-initials { font-size: 16px; font-weight: 800; color: #fff; line-height: 1; }
.nt-flag-badge {
  position: absolute; bottom: -3px; right: -4px;
  font-size: 14px; line-height: 1; filter: drop-shadow(0 1px 2px #0008);
}
.nt-country { font-size: 10px; color: var(--text3); margin-top: 1px; }
.nt-info { flex: 1; min-width: 0; }
.nt-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-phone { font-size: 11px; color: var(--text2); font-family: monospace; }
.nt-actions { display: flex; gap: 6px; }
.nt-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 5px 8px; border-radius: 8px; font-size: 11px; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer; transition: var(--transition);
}
.nt-btn-wa { background: #1a3a2a; color: #25d366; }
.nt-btn-wa:hover { background: #25d36622; }
.nt-btn-del { background: var(--surface); color: var(--text3); }
.nt-btn-del:hover { background: #3a1a1a; color: var(--red); }
/* Pill simple para blacklist */
.number-tag.pill {
  flex-direction: row; align-items: center; padding: 4px 12px;
  border-radius: 20px; gap: 6px; background: var(--surface);
}
.number-tag.pill .nt-top { flex: 1; }
.number-tag .del-btn { color: var(--text3); cursor: pointer; font-size: 13px; }
.number-tag .del-btn:hover { color: var(--red); }

/* ── BUSCADOR ─────────────────────────────────────────────────────────────── */
.search-contacts-box { position: relative; margin-bottom: 14px; }
.search-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; box-shadow: 0 8px 24px #00000060;
}
.search-item {
  padding: 10px 14px; display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; transition: var(--transition);
}
.search-item:hover { background: var(--surface); }
.search-item.no-result { color: var(--text3); cursor: default; font-size: 13px; }
.si-name { font-size: 13px; font-weight: 600; color: var(--text); }
.si-phone { font-size: 12px; color: var(--text2); font-family: monospace; }

/* ── NUMBER LIST (blacklist pill layout) ─────────────────────────────────── */
#blacklist-numbers { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; max-height: 320px; overflow-y: auto; }
.filter-row { display: flex; gap: 8px; align-items: center; }

/* ── SCROLLBAR ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { width: var(--sidebar-collapsed); }
  .sidebar .nav-label, .sidebar .logo-sub, .sidebar .sidebar-footer { display: none; }
  .sidebar .nav-item { justify-content: center; }
  .main { margin-left: var(--sidebar-collapsed); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── SEND SECTION ─────────────────────────────────────────────────────────── */
.template-selector-row { display: flex; gap: 10px; align-items: center; }

.send-step { margin-bottom: 20px; }
.send-step-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--accent); margin-bottom: 10px;
}
.send-step-label small { font-weight: 400; text-transform: none; color: var(--text3); }

/* Template preview */
.template-preview {
  background: #0d1b2a; border: 1px solid #1e3a5f;
  border-radius: 12px; padding: 16px 18px; margin-bottom: 20px;
  position: relative;
}
.template-preview::before {
  content: 'WhatsApp'; position: absolute; top: -9px; left: 14px;
  background: #128C7E; color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 8px; border-radius: 10px; letter-spacing: .5px;
}
.preview-label { font-size: 10px; color: var(--text3); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .5px; }
.preview-body {
  font-size: 13px; line-height: 1.65; color: #e2e8f0;
  background: #1a2d3a; border-radius: 8px; padding: 12px 14px;
  white-space: pre-wrap; word-break: break-word;
}
.preview-body strong { color: #fff; }
.param-chip {
  background: #5b7cfa33; color: var(--accent);
  border: 1px solid #5b7cfa66; border-radius: 4px;
  padding: 0 4px; font-size: 12px; font-family: monospace;
}
.preview-buttons {
  display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap;
}
.preview-btn {
  background: #128C7E33; border: 1px solid #128C7E66; color: #25D366;
  border-radius: 6px; padding: 5px 12px; font-size: 12px; font-weight: 600;
}

/* Dynamic param fields */
.params-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.param-field { display: flex; flex-direction: column; gap: 5px; }
.param-field-full { grid-column: 1 / -1; }
.param-label {
  font-size: 11px; font-weight: 700; color: var(--text2);
  text-transform: uppercase; letter-spacing: .4px;
  font-family: monospace;
}
.no-params-msg {
  color: var(--green); background: #16653420; border: 1px solid #166534;
  border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
}
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ── RECIPIENT TABS ───────────────────────────────────────────────────────── */
.recipients-tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.rtab {
  background: none; border: none; color: var(--text3); cursor: pointer;
  font-size: 13px; font-weight: 600; padding: 8px 16px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: var(--transition); border-radius: 6px 6px 0 0;
}
.rtab:hover { color: var(--text2); background: var(--surface2); }
.rtab.active { color: var(--accent); border-bottom-color: var(--accent); background: none; }

.rtab-panel { padding-top: 4px; }
.recipients-info { font-size: 13px; color: var(--text2); padding: 10px 0; }

/* ── COUNTRY CHECKBOXES ───────────────────────────────────────────────────── */
.country-check-grid { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.country-check-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 14px; cursor: pointer;
  transition: var(--transition);
}
.country-check-item:hover { border-color: var(--accent); background: #5b7cfa11; }
.country-check-item input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.country-check-item:has(input:checked) { border-color: var(--accent); background: #5b7cfa18; }
.country-check-flag { font-size: 20px; }
.country-check-name { font-size: 13px; font-weight: 600; flex: 1; }

/* ── MANUAL ADD BOX ───────────────────────────────────────────────────────── */
.manual-add-box {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; margin-top: 14px;
}
.manual-add-label { font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 10px; }

/* ── BANDEJA DE ENTRADA ───────────────────────────────────────────────────── */
#section-inbox { padding: 0; height: calc(100vh - 57px); }

.inbox-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: 100%;
}

/* Panel izquierdo — lista de conversaciones */
.inbox-list-panel {
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.inbox-list-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 14px; flex-shrink: 0;
  background: var(--surface);
}
#inbox-items { overflow-y: auto; flex: 1; }

.inbox-card {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: var(--transition);
}
.inbox-card:hover { background: var(--surface2); }
.inbox-card.active { background: #5b7cfa18; border-left: 3px solid var(--accent); }
.inbox-card-avatar { font-size: 26px; flex-shrink: 0; }
.inbox-card-body { flex: 1; min-width: 0; }
.inbox-card-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.inbox-card-phone { font-family: monospace; font-size: 13px; font-weight: 600; }
.inbox-card-time { font-size: 10px; color: var(--text3); flex-shrink: 0; margin-left: 6px; }
.inbox-card-preview { font-size: 12px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }

.inbox-unread-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; flex-shrink: 0; display: inline-block; }
.inbox-no-conv { padding: 24px 16px; color: var(--text3); font-size: 13px; text-align: center; }

/* Badge en nav */
.inbox-badge {
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 10px; padding: 1px 6px;
  min-width: 18px; text-align: center;
  margin-left: auto;
}
.inbox-badge.hidden { display: none; }

/* Panel derecho — hilo de conversación */
.inbox-thread-panel {
  display: flex; flex-direction: column;
  overflow: hidden; height: 100%;
}

.inbox-empty-state {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--text3); font-size: 14px;
}

.inbox-thread-header {
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  background: var(--surface); flex-shrink: 0;
}
.inbox-thread-header.hidden { display: none; }
.inbox-thread-phone { font-family: monospace; font-size: 16px; font-weight: 700; }
.inbox-thread-country { font-size: 12px; color: var(--text3); margin-top: 2px; }

.inbox-bubbles {
  flex: 1; overflow-y: auto;
  padding: 20px 24px; display: flex; flex-direction: column; gap: 10px;
  background: var(--bg);
}

.bubble-row { display: flex; }
.bubble-row-in { justify-content: flex-start; }
.bubble-row-out { justify-content: flex-end; }

.chat-bubble {
  max-width: 70%; padding: 10px 14px;
  border-radius: 14px; font-size: 13px; line-height: 1.5;
}
.bubble-in {
  background: var(--surface2); border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.bubble-out {
  background: #1e3a5f; border: 1px solid #2563eb55;
  border-bottom-right-radius: 4px; color: #bfdbfe;
}
.bubble-text { word-break: break-word; }
.bubble-time { font-size: 10px; color: var(--text3); margin-top: 4px; text-align: right; }

/* Caja de respuesta */
.inbox-reply-box {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 14px 20px; border-top: 1px solid var(--border);
  background: var(--surface); flex-shrink: 0;
}
.inbox-reply-box.hidden { display: none; }
.inbox-reply-input {
  flex: 1; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 10px 14px;
  font-size: 13px; font-family: inherit; resize: none;
  transition: var(--transition);
}
.inbox-reply-input:focus { outline: none; border-color: var(--accent); }

@media (max-width: 900px) {
  .inbox-layout { grid-template-columns: 1fr; }
  .inbox-list-panel { display: none; }
  .inbox-list-panel.show { display: flex; }
}

