/* Mensajes tipo correo. Reutiliza chat.css (barra, botones, listas) y las variables de marca. */
.correo { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px 380px 1fr; }
.correo-bandejas { background: var(--fongtek-light); border-right: 1px solid #e3e8ef; padding: 16px 0; }
.correo-bandejas #redactar { margin: 0 16px 14px; width: calc(100% - 32px); }
.correo-lista { min-height: 0; overflow-y: auto; border-right: 1px solid #e3e8ef; }
.titulo-bandeja { font-size: 22px; margin: 0; padding: 16px 18px 10px; border-bottom: 3px solid var(--fongtek-teal); }
.lista-correos { list-style: none; margin: 0; padding: 0; }
.lista-correos button {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left;
  padding: 10px 18px; border: 0; border-bottom: 1px solid #eef1f4; border-left: 4px solid transparent;
  background: var(--fongtek-white); font: inherit; cursor: pointer; color: #000;
}
.lista-correos button:hover { background: #f7f9fa; }
.lista-correos button[aria-current="true"] { background: #eef9fb; border-left-color: var(--fongtek-teal); }
.lista-correos .quien { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-correos .cuando { font-family: var(--font-mono); font-size: 12px; color: var(--fongtek-gray); }
.lista-correos .asunto { grid-column: 1 / -1; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-correos .fragmento { grid-column: 1 / -1; font-size: 13px; color: #5b6675; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-correos .no-leido .quien, .lista-correos .no-leido .asunto { font-weight: 700; }
.lista-correos .no-leido { border-left-color: var(--fongtek-navy); }
.lista-vacia-correo { padding: 18px; color: var(--fongtek-gray); }

.correo-lectura { min-width: 0; min-height: 0; overflow-y: auto; padding: 18px 28px 40px; }
.lectura-vacia { color: var(--fongtek-gray); margin-top: 40px; text-align: center; }
.lectura-encabezado { border-bottom: 3px solid var(--fongtek-teal); padding-bottom: 12px; margin-bottom: 16px; }
.lectura-encabezado h2 { font-size: 24px; margin: 0 0 10px; overflow-wrap: anywhere; }
.hilo { list-style: none; margin: 0; padding: 0; }
.hilo > li { background: var(--fongtek-white); border: 1px solid #e3e8ef; border-left: 4px solid var(--fongtek-navy); padding: 14px 18px; margin: 0 0 14px; }
.hilo .meta { font-size: 14px; color: #4a5866; margin: 0 0 10px; }
.hilo .meta strong { color: var(--fongtek-navy); font-size: 16px; }
.hilo .cuerpo { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.adjuntos-msj { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.adjuntos-msj a {
  display: inline-block; padding: 6px 10px; border: 1px solid var(--fongtek-navy); border-radius: 6px;
  font-size: 14px; color: var(--fongtek-navy); text-decoration: none;
}
.adjuntos-msj a:hover { background: var(--fongtek-navy); color: var(--fongtek-white); }

.redaccion { display: flex; flex-direction: column; max-width: 760px; }
.redaccion h2 { margin: 0 0 14px; }
.redaccion label { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.redaccion input:not([type=file]), .redaccion textarea {
  font: inherit; font-size: 16px; padding: 9px 12px; margin: 0 0 14px;
  border: 1px solid var(--fongtek-gray); border-radius: 6px;
}
.redaccion textarea { resize: vertical; line-height: 1.5; }
.redaccion input:focus, .redaccion textarea:focus { outline: 3px solid rgba(0, 193, 213, 0.35); border-color: var(--fongtek-teal); }
.redaccion input[type=file] { margin: 0 0 10px; font-size: 14px; }
.campo-personas { position: relative; display: flex; flex-direction: column; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.chip-persona {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 14px;
  background: #e6f8fa; color: var(--fongtek-navy); font-size: 14px;
}
.chip-persona button { border: 0; background: none; cursor: pointer; font-size: 16px; line-height: 1; color: var(--fongtek-navy); padding: 0 4px; }
.sugerencias {
  position: absolute; z-index: 5; top: 100%; left: 0; right: 0; margin: -12px 0 0; padding: 0; list-style: none;
  background: var(--fongtek-white); border: 1px solid #d5dde5; border-radius: 6px; box-shadow: 0 6px 18px rgba(4, 30, 66, 0.12);
  max-height: 240px; overflow-y: auto;
}
.sugerencias button { width: 100%; text-align: left; padding: 8px 12px; border: 0; background: none; font: inherit; cursor: pointer; }
.sugerencias button:hover, .sugerencias button:focus { background: #eef9fb; }
.boton-enlace.izq { margin: -6px 0 12px; align-self: flex-start; padding: 0; }
.lista-adjuntos { list-style: none; margin: 0 0 12px; padding: 0; font-size: 14px; }
.lista-adjuntos li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid #eef1f4; }
.lista-adjuntos button { border: 0; background: none; color: var(--fongtek-red); cursor: pointer; font: inherit; font-size: 13px; }
.nota-chica { font-weight: 400; font-size: 13px; color: #4a5866; }
.botones-fila { display: flex; gap: 10px; flex-wrap: wrap; }
.correo-lectura .boton-volver { display: none; margin: 0 0 10px; font-size: 16px; }

@media (max-width: 1100px) {
  .correo { grid-template-columns: 200px 1fr; }
  .correo-lectura { display: none; }
  .vista-lectura .correo-lista { display: none; }
  .vista-lectura .correo-lectura { display: block; }
  .correo-lectura .boton-volver { display: block; }
}
@media (max-width: 760px) {
  .correo { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .vista-lectura .correo { grid-template-rows: 1fr; }
  .correo-bandejas { border-right: 0; border-bottom: 1px solid #e3e8ef; padding: 10px 0; }
  .correo-bandejas .lista { display: flex; overflow-x: auto; }
  .correo-bandejas .lista li { flex: 1; }
  .correo-bandejas .lista button { justify-content: center; border-left: 0; border-bottom: 3px solid transparent; }
  .correo-bandejas .lista button[aria-current="true"] { border-bottom-color: var(--fongtek-teal); }
  .vista-lectura .correo-bandejas { display: none; }
  .correo-lectura { padding: 14px 16px 30px; }
}
