/* El tablero de un bot (panel de la derecha) y un correo de la bandeja (centro). */

/* MARK: Piezas que comparten */
.tb-titulo { display: inline-flex; align-items: center; gap: 8px; }
.tb-rotulo { font-size: var(--f10); font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: rgba(var(--p), .4); }
.tb-cuenta { font-size: var(--f11); color: var(--texto3); font-variant-numeric: tabular-nums; }
.tb-hace { flex: none; font-size: var(--f11); color: var(--texto3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-plata { font-variant-numeric: tabular-nums; color: var(--texto2); }
.tb-error { font-size: var(--f11); color: var(--rojo); line-height: 1.35; }
.tb-nada { font-size: var(--f125); color: var(--texto3); }
.tb-margen { padding: 0 8px 2px; }
.tb-linea { border: 0; height: 1px; background: var(--borde); margin: 10px 8px 0; }
.tb-enviando { opacity: .6; pointer-events: none; }
.tb-marca { flex: none; width: calc(24 * var(--u)); display: inline-flex; align-items: center; justify-content: center; }
.tb-flecha { flex: none; transition: transform .12s ease-out; }
.tb-flecha.abierta { transform: rotate(90deg); }
.tb-plegar { display: flex; align-items: center; gap: 5px; width: 100%; text-align: left; }

.tb-campo {
  flex: 1; min-width: 0; display: block; resize: none; border: 0; outline: 0; border-radius: 7px; background: rgba(var(--p), .05); color: var(--texto);
  font: inherit; font-size: var(--f125); line-height: 1.4; padding: calc(5 * var(--u)) 8px; max-height: calc(100 * var(--u)); overflow-y: auto;
}
.tb-campo:focus { background: rgba(var(--p), .08); }
.tb-campo::placeholder { color: var(--texto3); }
.tb-boton-responder { flex: none; font-size: var(--f12); padding: 0 9px; }
.tb-boton-responder .ico, .tb-solo-movil { display: none; }
.tb-opciones { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tb-opcion {
  flex: none; text-align: left; font-size: var(--f12); font-weight: 500; line-height: 1.35; padding: calc(4 * var(--u)) 9px; border-radius: 6px;
  background: rgba(var(--p), .08); color: var(--texto); cursor: pointer;
}
.tb-opcion:hover:not(:disabled) { background: rgba(var(--p), .14); }

/* MARK: El tablero entero */
.tb-lista { padding: 8px 6px calc(16px + env(safe-area-inset-bottom)); }
.tb-cabecera { display: flex; align-items: center; padding: 6px 8px 4px; }

.tb-parte { display: inline-flex; align-items: center; gap: 4px; height: calc(24 * var(--u)); padding: 0 6px; border-radius: 6px; color: var(--texto2); font-size: var(--f11); font-weight: 400; font-variant-numeric: tabular-nums; }
.tb-parte:hover { background: rgba(var(--p), .08); }
.tb-ajuste-parte { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.tb-ajuste-parte p { margin: 0; font-size: var(--f115); line-height: 1.4; color: var(--texto2); }
.tb-ajuste-fila { display: flex; align-items: center; gap: 10px; font-size: var(--f125); }
.tb-ajuste-fila b { font-weight: 500; }
.tb-hora { width: auto; flex: none; font-variant-numeric: tabular-nums; }

.tb-pendiente { display: flex; align-items: flex-start; gap: 6px; padding: calc(7 * var(--u)) 8px calc(7 * var(--u)) 0; }
.tb-pendiente > .tb-marca { height: calc(18 * var(--u)); }
.tb-pendiente-cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(7 * var(--u)); }
.tb-pendiente-texto .markdown { font-size: var(--f13); line-height: 1.45; }
.tb-pendiente-texto .markdown > * + * { margin-top: calc(7 * var(--u)); }
.tb-de-tarea { display: block; max-width: 100%; margin-top: calc(-5 * var(--u)); text-align: left; font-size: var(--f115); color: var(--texto2); }
.tb-de-tarea .mono, .tb-correo-tarea .mono { font-size: var(--f11); margin-right: 8px; }
button.tb-de-tarea { cursor: pointer; }
button.tb-de-tarea:hover { color: var(--texto); }
.tb-responder { display: flex; align-items: flex-end; gap: 6px; }
.tb-pendiente-pie { display: flex; align-items: center; gap: 8px; min-height: calc(16 * var(--u)); }
.tb-descartar { font-size: var(--f11); color: var(--texto3); }
.tb-descartar:hover { color: var(--texto2); }

.tb-plegar-descartados { padding: calc(6 * var(--u)) 8px; font-size: var(--f12); color: var(--texto2); border-radius: 7px; }
.tb-plegar-descartados:hover { background: rgba(var(--p), .05); }
.tb-descartado { display: flex; align-items: flex-start; gap: 8px; padding: calc(5 * var(--u)) 8px; }
.tb-descartado-texto { font-size: var(--f125); line-height: 1.4; color: var(--texto2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tb-descartado .tb-opcion { font-size: var(--f115); padding: calc(3 * var(--u)) 8px; }

.tb-proyecto { display: flex; flex-direction: column; gap: 2px; }
.tb-proyecto-cabeza { display: flex; align-items: center; gap: 8px; padding: 14px 8px 4px; font-size: var(--f13); }
.tb-proyecto-cabeza b { font-weight: 600; }
.tb-gasto { flex: none; font-size: var(--f115); color: var(--texto2); font-variant-numeric: tabular-nums; cursor: pointer; }
.tb-gasto:hover { color: var(--texto); }
.tb-gasto.pasado { color: var(--rojo); }
.tb-sin-tareas { font-size: var(--f12); padding-top: 3px; padding-bottom: 3px; }
.tb-grupo { display: flex; align-items: center; gap: 5px; padding: 6px 8px 2px; font-size: var(--f11); font-weight: 500; color: var(--texto3); }
.tb-grupo .tb-cuenta { font-weight: 400; opacity: .8; }
button.tb-grupo:hover { color: var(--texto2); }

.tb-tarea { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; padding: calc(5 * var(--u)) 8px calc(5 * var(--u)) 0; border-radius: 7px; cursor: pointer; }
.tb-tarea:hover:not(:disabled) { background: rgba(var(--p), .05); }
.tb-tarea-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tb-tarea-titulo { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.tb-tarea-titulo .mono { flex: none; font-size: var(--f11); color: var(--texto3); }
.tb-tarea-titulo b { font-size: var(--f13); font-weight: 500; color: rgba(var(--p), .8); }
.tb-curso .tb-tarea-titulo b { color: rgba(var(--p), .95); }
.tb-hecho .tb-tarea-titulo b { color: rgba(var(--p), .65); }
.tb-tarea-segunda { font-size: var(--f115); color: var(--texto2); }
.tb-tarea-segunda.bloqueada { color: var(--ambar); }
.tb-tarea-hace { font-size: var(--f12); margin-left: 4px; }
.tb-sello { flex: none; display: inline-flex; }
.tb-sin-verificar { flex: none; font-size: var(--f105); color: var(--texto3); }
.tb-ir { flex: none; color: var(--texto3); opacity: 0; }
.tb-tarea:hover:not(:disabled) .tb-ir { opacity: .9; }

.tb-aviso { display: flex; align-items: flex-start; gap: calc(8 * var(--u)); padding: 4px 8px; }
.tb-aviso-icono { flex: none; width: calc(16 * var(--u)); display: inline-flex; justify-content: center; padding-top: 2px; }
.tb-aviso-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tb-aviso-texto b { font-size: var(--f125); font-weight: 500; }
.tb-aviso-texto p { margin: 0; font-size: var(--f12); line-height: 1.4; color: var(--texto2); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tb-aviso-texto small { font-size: var(--f105); color: var(--texto3); }
.tb-general { display: flex; align-items: center; padding: 8px 8px 0; font-size: var(--f12); color: var(--texto2); }
.tb-pie { padding: 6px 8px 0; font-size: var(--f11); line-height: 1.4; color: var(--texto3); }
.tb-ajuste { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 8px; font-size: var(--f125); }

/* MARK: Una tarea por dentro */
.tb-detalle-cabeza { display: flex; align-items: center; gap: 6px; min-width: 0; margin-left: -8px; }
.tb-detalle-titulo { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.25; }
.tb-detalle-titulo small { font-size: var(--f11); font-variant-numeric: tabular-nums; }
.tb-marca-cabeza { flex: none; display: inline-flex; padding: 0 2px; }
.tb-detalle { padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: calc(18 * var(--u)); }
.tb-detalle > section { display: flex; flex-direction: column; gap: calc(7 * var(--u)); min-width: 0; }
.tb-parrafo { font-size: var(--f125); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-plan .markdown { font-size: var(--f13); line-height: 1.55; }
.tb-verifica { display: flex; align-items: center; gap: 6px; font-size: var(--f125); }
.tb-verifica b { font-weight: 500; }
.tb-comando { font-size: var(--f115); line-height: 1.45; color: var(--texto2); overflow-wrap: anywhere; white-space: pre-wrap; }
.tb-ver-salida { width: auto; align-self: flex-start; font-size: var(--f115); color: var(--texto2); }
.tb-ver-salida:hover { color: var(--texto); }
.tb-salida { margin: 0; padding: 9px; max-height: calc(280 * var(--u)); overflow: auto; border-radius: 8px; background: var(--tarjeta); font-size: var(--f11); line-height: 1.45; color: var(--texto2); white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-sin-prueba { display: flex; align-items: flex-start; gap: 6px; font-size: var(--f125); line-height: 1.45; color: var(--texto2); }
.tb-sin-prueba .ico { flex: none; margin-top: 2px; }
.tb-avances { display: flex; flex-direction: column; gap: calc(7 * var(--u)); }
.tb-avance { display: flex; align-items: baseline; gap: 7px; }
.tb-avance-icono { flex: none; width: calc(14 * var(--u)); display: inline-flex; justify-content: center; align-self: flex-start; padding-top: calc(3.5 * var(--u)); color: rgba(var(--p), .2); }
.tb-avance-icono i { width: 6px; height: 6px; margin-top: calc(3 * var(--u)); border-radius: 50%; background: currentColor; }
.tb-avance-texto { flex: 1; min-width: 0; font-size: var(--f125); line-height: 1.45; color: rgba(var(--p), .85); white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-hilos { display: flex; flex-direction: column; gap: 1px; margin: 0 -8px; }
.tb-hilo { padding-top: calc(6 * var(--u)); padding-bottom: calc(6 * var(--u)); }
.tb-hilo.borrado { cursor: default; }
.tb-hilo.borrado .tb-tarea-titulo b { color: var(--texto3); }
.tb-hilo .tb-hace { font-size: var(--f12); }
.tb-detalle-arriba { display: flex; flex-direction: column; gap: 6px; }
.tb-detalle-arriba h2 { margin: 0; font-size: calc(16 * var(--u)); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.tb-detalle-estado { display: flex; align-items: center; gap: 6px; font-size: var(--f12); color: var(--texto2); }
.tb-detalle-estado small { font-size: inherit; color: var(--texto3); }

/* MARK: Un correo de la bandeja */
.tb-correo-rueda { flex: 1; min-height: 0; overflow-y: auto; }
.tb-correo-vacio { display: flex; justify-content: center; padding-top: 80px; font-size: var(--f13); color: var(--texto2); }
.tb-correo { max-width: 720px; margin: 0 auto; padding: 26px 28px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: stretch; gap: calc(18 * var(--u)); }
.tb-correo h1 { margin: 0; font-size: calc(21 * var(--u)); font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.tb-correo-de { display: flex; align-items: center; gap: 10px; }
.tb-correo-quien { display: flex; flex-direction: column; gap: 1px; }
.tb-correo-quien b { font-size: var(--f13); font-weight: 600; }
.tb-correo-quien small, .tb-correo-de time { font-size: var(--f115); color: var(--texto2); }
.tb-correo-de time { flex: none; font-variant-numeric: tabular-nums; }
.tb-correo-tarea { align-self: flex-start; max-width: 100%; text-align: left; font-size: var(--f115); color: var(--texto2); padding: calc(4 * var(--u)) 8px; border-radius: 6px; background: rgba(var(--p), .06); }
button.tb-correo-tarea { cursor: pointer; }
button.tb-correo-tarea:hover { background: rgba(var(--p), .1); }
.tb-correo hr { border: 0; height: 1px; background: var(--borde); margin: 0; }
.tb-correo-respuesta { display: flex; flex-direction: column; gap: calc(10 * var(--u)); padding-top: 4px; }
.tb-correo-respuesta .tb-opciones { gap: 5px; }
.tb-correo-respuesta .tb-opcion { font-size: var(--f13); padding: calc(6 * var(--u)) 12px; border-radius: 7px; }
.tb-correo-caja { display: flex; align-items: flex-end; gap: 8px; }
.tb-campo-correo { font-size: var(--f135); line-height: 1.45; padding: calc(10 * var(--u)) 12px; border-radius: 10px; max-height: calc(250 * var(--u)); }
.tb-correo-botones { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-correo-botones .boton { flex: none; height: calc(28 * var(--u)); }
.tb-correo-botones .boton.primario { padding: 0 14px; }
.tb-archivar { color: var(--texto2); background: rgba(var(--p), .06); gap: 6px; display: inline-flex; align-items: center; }
.tb-correo-error { font-size: var(--f115); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tb-ir-chat { flex: none; font-size: var(--f12); color: var(--texto2); cursor: pointer; }
.tb-ir-chat:hover { color: var(--texto); }
.tb-correo-resuelto { display: flex; flex-direction: column; gap: calc(6 * var(--u)); padding: 12px; border-radius: 9px; background: rgba(var(--p), .05); font-size: var(--f13); line-height: 1.45; }
.tb-correo-resuelto small { font-size: var(--f115); font-weight: 500; color: var(--texto2); }
.tb-correo-resuelto > .seleccionable { white-space: pre-wrap; overflow-wrap: anywhere; }

/* MARK: Celular */
@media (max-width: 760px) {
  .tb-lista { padding-left: 10px; padding-right: 10px; }
  .tb-solo-ancho { display: none; }
  .tb-solo-movil { display: inline-flex; }
  /* Lo que en la Mac aparece al pasar el mouse va siempre a la vista. */
  .tb-ir { opacity: .7; }
  .tb-tarea-hace { display: none; }
  .tb-tarea { min-height: 44px; }
  .tb-campo { font-size: 16px; padding: 9px 12px; border-radius: 10px; background: var(--tarjeta); box-shadow: inset 0 0 0 .5px var(--borde); }
  .boton.tb-boton-responder { width: 36px; height: 36px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--violeta); color: #14102b; }
  .tb-boton-responder span { display: none; }
  .tb-boton-responder .ico { display: block; }
  .tb-opciones { align-items: stretch; gap: 6px; }
  .tb-opcion, .tb-correo-respuesta .tb-opcion { min-height: 40px; padding: 8px 12px; border-radius: 9px; font-size: var(--f13); font-weight: 400; color: var(--violeta); background: color-mix(in srgb, var(--violeta) 14%, transparent); }
  .tb-descartado { align-items: center; }
  .tb-descartado .tb-opcion { font-size: var(--f125); font-weight: 600; }
  .tb-descartar { min-height: 40px; padding: 0 4px; font-size: var(--f12); color: var(--texto2); }
  .tb-plegar-descartados, button.tb-grupo { min-height: 40px; }
  .tb-gasto { min-height: 40px; padding-left: 12px; }
  .tb-proyecto-cabeza { padding-top: 10px; padding-bottom: 0; }
  .tb-detalle-cabeza { margin-left: -10px; }
  .tb-detalle { padding-left: 18px; padding-right: 18px; }
  .tb-ver-salida { min-height: 40px; }
  .tb-correo { padding: 14px 18px calc(24px + env(safe-area-inset-bottom)); gap: 12px; }
  .tb-correo h1 { font-size: calc(18 * var(--u)); }
  .tb-correo-botones { flex-wrap: wrap; row-gap: 4px; }
  .tb-correo-botones .boton, .tb-ir-chat { min-height: 40px; }
  .tb-archivar { background: none; padding: 0; font-size: var(--f12); }
  .tb-archivar .ico { display: none; }
}
