/* ════════════════════════════════════════════════════════════════════════
   Faro · hoja de estilo única. Claro, tranquilo y con poco ruido visual.
   ════════════════════════════════════════════════════════════════════════ */

:root {
  --bg:            #f3f5fa;
  --surface:       #ffffff;
  --surface-2:     #fafbfe;
  --surface-3:     #f2f4fa;
  --ink:           #141822;
  --ink-2:         #3f4757;
  --muted:         #79808f;
  --muted-2:       #9aa1b0;
  --line:          #e6e9f2;
  --line-2:        #eef1f7;
  --accent:        #4f6bed;
  --accent-ink:    #3550cf;
  --accent-soft:   #eef1ff;
  --accent-soft-2: #e3e9ff;
  --danger:        #d6455d;
  --danger-soft:   #fdeef1;
  --ok:            #12a17c;
  --warn:          #e0851f;
  --warn-soft:     #fdf4e6;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --r-xl: 22px;

  --sh-s: 0 1px 2px rgba(20, 24, 34, .05);
  --sh-m: 0 4px 14px rgba(20, 24, 34, .07);
  --sh-l: 0 18px 50px rgba(20, 24, 34, .16);

  --side-w: 264px;
  --list-w: 384px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent-ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d9dee9; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #c6ccdb; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ── esqueleto ──────────────────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: var(--side-w) var(--list-w) minmax(0, 1fr);
  height: 100dvh;
}

/* ── lateral ────────────────────────────────────────────────────────────── */
.side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px 12px 10px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.side__top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 14px; }

.brand { display: flex; align-items: center; gap: 9px; }
.brand__mark {
  width: 22px; height: 22px; border-radius: 7px;
  background:
    radial-gradient(circle at 30% 28%, #fff 0 2.4px, transparent 2.6px),
    linear-gradient(150deg, #6d86f5, #3c55d6 62%, #2d3fae);
  box-shadow: 0 2px 8px rgba(79, 107, 237, .35);
}
.brand__name { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--r-m);
  background: transparent; color: var(--ink-2);
  font-size: 13.5px; font-weight: 550; cursor: pointer;
  transition: background .13s, color .13s, border-color .13s, box-shadow .13s, transform .06s;
  white-space: nowrap;
}
.btn:active { transform: translateY(.5px); }
.btn--primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 10px rgba(79, 107, 237, .28);
}
.btn--primary:hover { background: var(--accent-ink); }
.btn--ghost { border-color: var(--line); background: var(--surface); color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-3); border-color: #dde2ee; }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); border-color: #f6d3da; }
.btn--compose { width: 100%; height: 40px; margin-bottom: 16px; font-size: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn__icon svg, .icon-btn svg { display: block; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex: none;
  border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  cursor: pointer; transition: background .13s, color .13s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink-2); }
.icon-btn--add { color: var(--accent); background: var(--accent-soft); width: 26px; height: 26px; border-radius: 8px; }
.icon-btn--add:hover { background: var(--accent-soft-2); color: var(--accent-ink); }
.icon-btn.is-on { color: var(--accent); background: var(--accent-soft); }

.side__nav { flex: 1; min-height: 0; overflow: auto; margin: 0 -4px; padding: 0 4px; }
.side__label {
  margin: 0; padding: 0 8px 6px;
  font-size: 11px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2);
}
.side__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 6px 0; }
.side__head .side__label { padding-bottom: 0; }

.folders, .accounts { list-style: none; margin: 0 0 4px; padding: 0; }

.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 9px; margin-bottom: 1px;
  border: 0; border-radius: 10px; background: transparent;
  color: var(--ink-2); font-size: 13.5px; text-align: left; cursor: pointer;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--surface-3); }
.nav-item.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav-item.is-active .nav-item__icon { color: var(--accent); }
.nav-item__icon { display: flex; color: var(--muted); flex: none; }
.nav-item__text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item__count {
  flex: none; min-width: 20px; padding: 1px 6px;
  border-radius: 999px; background: var(--surface-3); color: var(--muted);
  font-size: 11.5px; font-weight: 650; text-align: center;
}
.nav-item.is-active .nav-item__count { background: #fff; color: var(--accent-ink); }
.nav-item__count.is-alert { background: var(--accent); color: #fff; }

.account { margin-bottom: 2px; }
.account__row { display: flex; align-items: center; gap: 6px; }
.account__row .nav-item { flex: 1; min-width: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(255,255,255,.9); }
.account__toggle { width: 22px; height: 22px; color: var(--muted-2); }
.account__toggle svg { transition: transform .16s; }
.account.is-open .account__toggle svg { transform: rotate(90deg); }
.account__sub { list-style: none; margin: 1px 0 6px; padding: 0 0 0 18px; }
.account__sub .nav-item { padding: 5px 9px; font-size: 13px; }
.account__error {
  margin: 2px 0 6px 28px; padding: 5px 8px;
  border-radius: 8px; background: var(--danger-soft); color: #a8384c; font-size: 11.5px;
}

.side__foot {
  display: flex; align-items: center; gap: 4px;
  padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--line-2);
}
.user {
  display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0;
  padding: 5px 6px; border: 0; border-radius: 10px; background: transparent;
  cursor: pointer; text-align: left;
}
.user:hover { background: var(--surface-3); }
.user__avatar { border-radius: 50%; background: var(--surface-3); flex: none; }
.user__data { display: flex; flex-direction: column; min-width: 0; }
.user__name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user__mail { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── listado ────────────────────────────────────────────────────────────── */
.list {
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
  background: var(--surface); border-right: 1px solid var(--line);
}
.list__top { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; }
.list__title { flex: 1; min-width: 0; }
.list__title h1 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.list__sub { margin: 1px 0 0; font-size: 12px; color: var(--muted); }
.list__acciones { display: flex; gap: 2px; }
.is-syncing svg { animation: giro 1s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }

.search { display: flex; align-items: center; gap: 6px; padding: 0 16px 10px; position: relative; }
.search__icon { position: absolute; left: 27px; display: flex; color: var(--muted-2); pointer-events: none; }
.search input {
  flex: 1; min-width: 0; height: 34px; padding: 0 10px 0 32px;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-2);
  outline: none; transition: border-color .13s, background .13s, box-shadow .13s;
}
.search input:focus { border-color: #c3cdf5; background: #fff; box-shadow: 0 0 0 3px rgba(79,107,237,.1); }
.search input::-webkit-search-cancel-button { cursor: pointer; }

.chip {
  height: 28px; padding: 0 10px; flex: none;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--muted); font-size: 12px; font-weight: 550; cursor: pointer;
  transition: all .13s;
}
.chip:hover { background: var(--surface-3); color: var(--ink-2); }
.chip.is-on { background: var(--accent-soft); border-color: #cfd8fb; color: var(--accent-ink); }

.bulk {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  margin: 0 12px 8px; padding: 7px 8px 7px 12px;
  border-radius: var(--r-m); background: var(--accent-soft); color: var(--accent-ink);
  font-size: 12.5px; font-weight: 600;
}
.bulk__acciones { display: flex; gap: 4px; }
.bulk .btn { height: 28px; padding: 0 9px; font-size: 12.5px; background: #fff; }

.list__scroll { flex: 1; min-height: 0; overflow: auto; padding: 0 8px 20px; }
.mails { list-style: none; margin: 0; padding: 0; }

.mail {
  display: grid; grid-template-columns: auto 1fr; gap: 10px;
  padding: 10px; margin-bottom: 2px;
  border-radius: var(--r-m); cursor: pointer;
  transition: background .12s;
  position: relative;
}
.mail:hover { background: var(--surface-3); }
.mail.is-active { background: var(--accent-soft); }
.mail.is-active:hover { background: var(--accent-soft-2); }
.mail__avatar {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-3); color: #fff;
  font-size: 13px; font-weight: 650; letter-spacing: .01em;
  position: relative; flex: none;
}
.mail__avatar::after {
  content: ''; position: absolute; right: -1px; bottom: -1px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--dot, transparent); box-shadow: 0 0 0 2px var(--surface);
}
.mail.is-active .mail__avatar::after { box-shadow: 0 0 0 2px var(--accent-soft); }
.mail__cuerpo { min-width: 0; }
.mail__linea { display: flex; align-items: baseline; gap: 8px; }
.mail__de { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail__hora { flex: none; font-size: 11.5px; color: var(--muted-2); }
.mail__asunto {
  margin: 1px 0 0; font-size: 13.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mail__extracto {
  margin: 1px 0 0; font-size: 12.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mail.no-leido .mail__de,
.mail.no-leido .mail__asunto { font-weight: 680; color: var(--ink); }
.mail.no-leido::before {
  content: ''; position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.mail__meta { display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.mail__tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 6px; border-radius: 6px;
  font-size: 10.5px; font-weight: 620; letter-spacing: .01em;
}
.mail__tag--cuenta { background: var(--surface-3); color: var(--muted); }
.mail__tag--spam { background: var(--danger-soft); color: #b53f52; }
.mail__tag--adj { color: var(--muted-2); }
.mail__estrella { position: absolute; right: 8px; bottom: 8px; color: #d6dae4; }
.mail__estrella.is-on { color: #efb23f; }
.mail__check {
  position: absolute; left: 12px; top: 12px; width: 18px; height: 18px;
  border-radius: 6px; border: 1.5px solid var(--line); background: #fff;
  display: none; place-items: center; cursor: pointer;
}
.mail:hover .mail__check, .mail.is-checked .mail__check { display: grid; }
.mail.is-checked .mail__check { background: var(--accent); border-color: var(--accent); color: #fff; }
.mail:hover .mail__avatar, .mail.is-checked .mail__avatar { opacity: 0; }
.mail__check-zona { position: relative; }

.list__mas { display: flex; justify-content: center; padding: 12px 0 4px; }

.vacio {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 56px 24px; text-align: center; color: var(--muted);
}
.vacio h3 { margin: 0; font-size: 15px; color: var(--ink-2); font-weight: 620; }
.vacio p { margin: 0; font-size: 13px; max-width: 30ch; }

.skeleton { padding: 10px; }
.skeleton__linea {
  height: 11px; margin-bottom: 8px; border-radius: 6px;
  background: linear-gradient(90deg, #eef0f6 25%, #f7f8fc 50%, #eef0f6 75%);
  background-size: 200% 100%; animation: brillo 1.3s infinite;
}
@keyframes brillo { to { background-position: -200% 0; } }

/* ── lectura ────────────────────────────────────────────────────────────── */
.reader { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.reader__vacio {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--muted-2); font-size: 13.5px;
}
.reader__vacio-marca {
  width: 54px; height: 54px; border-radius: 18px;
  background:
    radial-gradient(circle at 30% 28%, #fff 0 5px, transparent 5.4px),
    linear-gradient(150deg, #dfe5fb, #c8d3f7);
}
.reader__msg { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 14px 16px 16px; }

.msg-card {
  display: flex; flex-direction: column; min-height: 0; flex: 1;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
  box-shadow: var(--sh-s); overflow: hidden;
}
.msg-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--line-2); }
.msg-head__top { display: flex; align-items: flex-start; gap: 12px; }
.msg-asunto { margin: 0; font-size: 18px; font-weight: 660; letter-spacing: -.015em; flex: 1; min-width: 0; }
.msg-de { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.msg-de__avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 650; flex: none; }
.msg-de__txt { min-width: 0; flex: 1; }
.msg-de__nombre { font-size: 13.5px; font-weight: 620; }
.msg-de__dir { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-de__fecha { font-size: 12px; color: var(--muted); white-space: nowrap; }
.msg-para { margin-top: 6px; font-size: 12px; color: var(--muted); }
.msg-acciones { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.msg-acciones .btn { height: 31px; padding: 0 10px; gap: 6px; font-size: 13px; }
.msg-acciones .icon-btn { background: var(--surface); border: 1px solid var(--line); width: 31px; height: 31px; border-radius: var(--r-m); }
.msg-acciones .icon-btn:hover { background: var(--surface-3); }

.aviso {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 12px 16px 0; padding: 9px 12px;
  border-radius: var(--r-m); font-size: 12.5px;
}
.aviso--imgs { background: var(--surface-3); color: var(--ink-2); }
.aviso--spam { background: var(--danger-soft); color: #a8384c; }
.aviso .btn { height: 26px; padding: 0 10px; font-size: 12px; background: #fff; }
.aviso__motivos { width: 100%; margin: 2px 0 0; padding-left: 16px; font-size: 11.5px; opacity: .9; }

.msg-cuerpo { flex: 1; min-height: 0; overflow: auto; }
.msg-cuerpo iframe { display: block; width: 100%; border: 0; }

.adjuntos { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line-2); }
.adjunto {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 11px 7px 9px; max-width: 260px;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-2);
  color: var(--ink-2); font-size: 12.5px; text-decoration: none;
  transition: background .13s, border-color .13s;
}
.adjunto:hover { background: var(--surface-3); border-color: #dde2ee; }
.adjunto__icono { color: var(--muted); display: flex; }
.adjunto__txt { min-width: 0; }
.adjunto__nombre { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adjunto__peso { color: var(--muted-2); font-size: 11px; }

/* ── modales ────────────────────────────────────────────────────────────── */
.modal-root:empty { display: none; }
.overlay {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(24, 28, 40, .34);
  backdrop-filter: blur(3px);
  animation: aparece .16s ease;
}
@keyframes aparece { from { opacity: 0; } }
.modal {
  display: flex; flex-direction: column; width: 100%; max-height: 100%;
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-l);
  overflow: hidden; animation: sube .2s cubic-bezier(.2,.8,.3,1);
}
@keyframes sube { from { transform: translateY(10px) scale(.99); opacity: .6; } }
.modal--s { max-width: 460px; }
.modal--m { max-width: 620px; }
.modal--l { max-width: 860px; }
.modal__head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line-2);
}
.modal__head h2 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.01em; flex: 1; }
.modal__body { flex: 1; min-height: 0; overflow: auto; padding: 18px; }
.modal__foot {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2);
}
.modal__foot .izq { margin-right: auto; }

.tabs { display: flex; gap: 2px; padding: 0 18px; border-bottom: 1px solid var(--line-2); }
.tab {
  padding: 10px 12px; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); font-size: 13.5px; font-weight: 550;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink-2); }
.tab.is-on { color: var(--accent-ink); border-bottom-color: var(--accent); }

/* ── formularios ────────────────────────────────────────────────────────── */
.campo { margin-bottom: 14px; }
.campo > label, .campo__label {
  display: block; margin-bottom: 5px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.campo__ayuda { margin: 5px 0 0; font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-2);
  outline: none; transition: border-color .13s, box-shadow .13s, background .13s;
}
.textarea { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: #c3cdf5; background: #fff; box-shadow: 0 0 0 3px rgba(79,107,237,.1);
}
.rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rejilla--3 { grid-template-columns: 2fr 1fr 1fr; }
.fila-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.fila-check input { width: 16px; height: 16px; accent-color: var(--accent); }

.seccion { margin-bottom: 22px; }
.seccion__titulo {
  margin: 0 0 4px; font-size: 11px; font-weight: 650;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2);
}
.seccion__nota { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }

.aviso-caja {
  padding: 10px 12px; border-radius: var(--r-m);
  font-size: 12.5px; margin-bottom: 14px;
}
.aviso-caja--ok { background: #e9f8f3; color: #0e7a5f; }
.aviso-caja--mal { background: var(--danger-soft); color: #a8384c; }
.aviso-caja--info { background: var(--accent-soft); color: var(--accent-ink); }

/* cuentas en ajustes */
.cuenta-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-2);
}
.cuenta-card__txt { flex: 1; min-width: 0; }
.cuenta-card__nombre { font-size: 13.5px; font-weight: 620; }
.cuenta-card__mail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cuenta-card__serv { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }

/* reglas antispam */
.reglas { list-style: none; margin: 0; padding: 0; }
.regla {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-2);
  font-size: 13px;
}
.regla__tipo {
  flex: none; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 620;
  background: var(--surface-3); color: var(--muted);
}
.regla__tipo.es-bloqueo { background: var(--danger-soft); color: #b53f52; }
.regla__tipo.es-permiso { background: #e9f8f3; color: #0e7a5f; }
.regla__patron { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.regla__puntos { color: var(--muted); font-size: 12px; }

.rango { display: flex; align-items: center; gap: 12px; }
.rango input[type="range"] { flex: 1; accent-color: var(--accent); }
.rango__valor {
  min-width: 42px; padding: 3px 8px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 12.5px; font-weight: 650; text-align: center;
}

/* ── redactor ───────────────────────────────────────────────────────────── */
.compose { max-width: 760px; }
.compose__campos { padding: 4px 18px 0; }
.compose__fila {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line-2);
}
.compose__fila label { width: 62px; flex: none; font-size: 12.5px; color: var(--muted); }
.compose__fila input, .compose__fila select {
  flex: 1; min-width: 0; height: 38px; border: 0; background: transparent; outline: none;
}
.compose__fila .enlace-cc {
  border: 0; background: transparent; color: var(--accent-ink);
  font-size: 12px; cursor: pointer; padding: 0 4px;
}
.editor-barra {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  padding: 8px 14px; border-bottom: 1px solid var(--line-2); background: var(--surface-2);
}
.editor-barra .icon-btn { width: 30px; height: 30px; }
.editor-barra .sep { width: 1px; height: 18px; background: var(--line); margin: 0 5px; }
.editor {
  flex: 1; min-height: 220px; max-height: 46vh; overflow: auto;
  padding: 16px 18px; outline: none; font-size: 14px; line-height: 1.6;
}
.editor:empty::before { content: attr(data-placeholder); color: var(--muted-2); }
.editor blockquote { margin: 0 0 0 .2rem; padding-left: .9rem; border-left: 3px solid var(--line); color: var(--ink-2); }
.editor img { max-width: 100%; }
.compose__adjuntos { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; }
.compose__adjuntos:empty { display: none; }
.adj-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 6px 5px 10px; border-radius: 999px;
  background: var(--surface-3); font-size: 12px; color: var(--ink-2);
}
.adj-chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; display: flex; padding: 0; }
.adj-chip button:hover { color: var(--danger); }

/* ── avisos flotantes ───────────────────────────────────────────────────── */
.toasts {
  position: fixed; z-index: 60; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 15px; border-radius: 999px;
  background: #1b2030; color: #f2f4fa; font-size: 13px; font-weight: 500;
  box-shadow: var(--sh-l); animation: sube .18s ease;
  max-width: 90vw;
}
.toast--ok { background: #10614c; }
.toast--mal { background: #8d2e40; }

/* ── responsive ─────────────────────────────────────────────────────────── */
.only-mobile { display: none; }
.side__close { display: none; }

@media (max-width: 1180px) {
  .app { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .reader {
    position: fixed; inset: 0; z-index: 30;
    background: var(--bg);
    transform: translateX(100%); transition: transform .22s cubic-bezier(.2,.8,.3,1);
  }
  .reader.is-open { transform: none; }
  .reader__msg { padding: 10px; }
}

@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .only-mobile { display: inline-flex; }
  .side {
    position: fixed; inset: 0 auto 0 0; z-index: 35; width: 282px;
    transform: translateX(-100%); transition: transform .22s cubic-bezier(.2,.8,.3,1);
    box-shadow: var(--sh-l);
  }
  .side.is-open { transform: none; }
  .side__close { display: inline-flex; }
  .backdrop { position: fixed; inset: 0; z-index: 34; background: rgba(24,28,40,.3); }
  .overlay { padding: 0; align-items: flex-end; }
  .modal { max-height: 94dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .search { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
