/*
    ══════════════════════════════════════════════════════════════════════════
    ACTIVIDADES — el programa de trabajo (.act-)
    ══════════════════════════════════════════════════════════════════════════

    Cinco pantallas comparten esta hoja:

        /mis-actividades          la lista de conversaciones del teléfono
        /actividad/hilo/{id}      el hilo: reportar como en WhatsApp
        /seguimiento-actividades  jefatura: bandeja de dos paneles y tablero
        /cronograma-actividades   la línea de tiempo (Gantt)
        /analitica-actividades    los indicadores (IndicadoresActividades.razor)

    ── Para quién es ─────────────────────────────────────────────────────────
    Las dos primeras las abre quien ejecuta el trabajo: en el teléfono, a pleno
    sol, con las manos ocupadas y sin soltura con la pantalla. Hoy reporta por
    WhatsApp, así que el hilo se parece a WhatsApp a propósito: lo que ya sabe
    usar no hay que enseñárselo. Valen las cuatro reglas de «Registrar uso»
    (consumo.css): una pregunta por pantalla, nada más pequeño que un dedo, el
    estado se lee sin leer, y lo que sale mal se dice en español y en la pantalla.

    Las otras tres son de escritorio y llevan el chrome pan-* de los listados.

    ── De dónde sale el aspecto ──────────────────────────────────────────────
    Paleta, tipografía, radios y sombras son las variables --pan-* de
    pantalla.css: se tiene que leer como la misma plataforma. El fondo es claro
    por la misma razón que en «Registrar uso»: un fondo oscuro con serifas finas
    no se lee al sol en un teléfono de gama baja. Del «quiet luxury» se toma lo
    que sí aguanta el sol: aire, jerarquía, sombras largas y suaves, vidrio
    esmerilado en lo que flota y una luz ambiental muy tenue detrás del hilo.

    ── Regla de oro ──────────────────────────────────────────────────────────
    El color de una etapa se declara UNA vez (.act-e-*) como dos variables, y
    todo lo demás —pastillas, puntos, barras, columnas, cintas— las lee. Cambiar
    el verde de «terminada» es tocar una línea.
*/

/* ═══════════════════ Etapas y tonos ═══════════════════ */

.act-e-sin-asignar { --act-tono: #b8541b; --act-tono-fondo: #fdf1e7; }
.act-e-asignada    { --act-tono: #185FA5; --act-tono-fondo: #e8f1fa; }
.act-e-ejecucion   { --act-tono: #0e7c86; --act-tono-fondo: #e3f4f5; }
.act-e-problema    { --act-tono: #d32f14; --act-tono-fondo: #fdecea; }
.act-e-terminada   { --act-tono: #1c8a5a; --act-tono-fondo: #e6f6ee; }
.act-e-verificada  { --act-tono: #0C2740; --act-tono-fondo: #e6ebf0; }

/* Los tres cambios de etapa que se reportan desde el hilo. */
.act-tono-ejecucion { --act-tono: #0e7c86; --act-tono-fondo: #e3f4f5; }
.act-tono-terminada { --act-tono: #1c8a5a; --act-tono-fondo: #e6f6ee; }
.act-tono-problema  { --act-tono: #d32f14; --act-tono-fondo: #fdecea; }

.act-atrasada { color: var(--pan-rojo) !important; font-weight: 700; }

/* ── Pastilla ── */
.act-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--act-tono-fondo, #eef2f6);
    color: var(--act-tono, var(--pan-apagado));
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.5;
}

.act-chip .material-symbols-outlined { font-size: 14px; }
.act-chip-neutro { background: #eef2f6; color: var(--pan-apagado); }

/* La prioridad lleva su color del catálogo: un punto delante, no un bloque. */
.act-chip-prioridad { background: #fff; color: var(--pan-tinta); border: 1px solid var(--pan-linea); }
.act-chip-prioridad::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--act-acento, var(--pan-tenue));
}

/* ── Barra de avance ── */
.act-barra {
    display: inline-block;
    width: 46px;
    height: 5px;
    border-radius: 999px;
    background: rgba(12, 39, 64, .10);
    overflow: hidden;
    vertical-align: middle;
}

.act-barra > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0e7c86, #1c8a5a);
    transition: width .5s ease;
}

.act-barra-grande { width: 100%; height: 8px; flex: 1 1 auto; }

/* ── Avatar ── */
/* Redondo, con un aro del color que lo identifica: la prioridad en una
   actividad, el color propio en una persona. */
.act-avatar {
    position: relative;
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--act-acento, var(--pan-azul)) 14%, #fff);
    color: var(--act-acento, var(--pan-azul));
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px color-mix(in srgb, var(--act-acento, var(--pan-azul)) 55%, #fff);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: .02em;
    user-select: none;
}

.act-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.act-avatar .material-symbols-outlined { font-size: 26px; }

.act-avatar-chico { width: 30px; height: 30px; font-size: 11.5px; box-shadow: none; background: var(--act-acento, var(--pan-azul)); color: #fff; align-self: flex-end; }
.act-avatar-mini { width: 22px; height: 22px; font-size: 9.5px; box-shadow: none; background: var(--act-acento, var(--pan-azul)); color: #fff; }

/* El punto de la esquina dice la etapa sin leer. */
.act-avatar-punto {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    background: var(--act-tono, var(--pan-tenue));
}

/* ── Enlace con aspecto de texto ── */
.act-enlace {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    padding: 0 6px;
    border: 0;
    background: none;
    color: var(--pan-azul);
    font-family: var(--pan-sans);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.act-enlace:hover { text-decoration: underline; }
.act-enlace:disabled { opacity: .5; cursor: default; text-decoration: none; }
.act-enlace .material-symbols-outlined { font-size: 18px; }
.act-enlace-tenue { color: var(--pan-apagado); }

/* Palomitas: una, enviado; dos azules, visto. */
.act-palomitas { font-size: 16px !important; color: #8fa1b1; vertical-align: -3px; }
.act-conv-ultimo .act-palomitas { margin-right: 3px; }
.act-palomitas.act-vistas { color: #2f8fe0; }

@keyframes act-aparece {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

@keyframes act-late {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

@keyframes act-brillo {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}


/* ═══════════════════ La lista de conversaciones ═══════════════════ */

.act-lista-contenido { max-width: 860px; }

.act-lista-filtros {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.act-lista-filtros .uso-tipos { flex: 1 1 auto; }
.act-lista-busqueda { flex: 1 1 220px; min-height: 44px; font-size: 16px; border-radius: 999px; padding-left: 18px; }

/* Rótulo de sección: versalitas tenues, con su icono. */
.act-seccion {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 2px -6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--pan-apagado);
}

.act-seccion .material-symbols-outlined { font-size: 17px; }
.act-seccion-roja { color: var(--pan-rojo); }
.act-seccion-tenue { color: var(--pan-tenue); }

/* Una sola tarjeta con filas separadas por un filete: es una lista, no un
   mosaico. Las filas no llevan borde propio. */
.act-conversaciones {
    display: flex;
    flex-direction: column;
    background: var(--pan-papel);
    border: 1px solid var(--pan-linea);
    border-radius: 18px;
    box-shadow: var(--pan-sombra-tarjeta);
    overflow: hidden;
}

.act-conv {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid #eef2f6;
    background: none;
    text-align: left;
    font-family: var(--pan-sans);
    color: var(--pan-tinta);
    cursor: pointer;
    transition: background .15s;
    animation: act-aparece .35s ease both;
    -webkit-tap-highlight-color: transparent;
}

.act-conv:last-child { border-bottom: 0; }
.act-conv:hover { background: #f6f9fc; }
.act-conv:active { background: #eef3f8; }
.act-conv:focus-visible { outline: 3px solid rgba(24, 95, 165, .4); outline-offset: -3px; }

.act-conv-elegida,
.act-conv-elegida:hover { background: #e8f1fa; box-shadow: inset 4px 0 0 var(--pan-azul); }

.act-conv-problema { background: linear-gradient(90deg, rgba(211, 47, 20, .07), transparent 55%); }

.act-conv-cuerpo { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }

.act-conv-linea { display: flex; align-items: baseline; gap: 10px; min-width: 0; }

.act-conv-nombre {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.act-conv-nueva .act-conv-nombre { font-weight: 700; }

.act-conv-hora { flex: none; font-size: 12px; color: var(--pan-tenue); }
.act-conv-hora-nueva { color: var(--pan-verde); font-weight: 700; }

.act-conv-ultimo {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    color: var(--pan-apagado);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.act-conv-nueva .act-conv-ultimo { color: var(--pan-tinta); font-weight: 600; }
.act-conv-autor { font-weight: 600; color: var(--pan-tinta); margin-right: 3px; }
.act-conv-icono { font-size: 16px !important; vertical-align: -3px; margin-right: 2px; }
.act-conv-sin-mensajes { font-style: italic; color: var(--pan-tenue); }

.act-globo {
    flex: none;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--pan-verde);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    align-self: center;
}

.act-conv-datos { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; }

.act-conv-dato {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12.5px;
    color: var(--pan-apagado);
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.act-conv-dato .material-symbols-outlined { font-size: 15px; color: var(--pan-tenue); }
.act-conv-dato.act-atrasada .material-symbols-outlined { color: var(--pan-rojo); }
.act-conv-avance { gap: 6px; font-weight: 700; color: #0e7c86; }
/* Los insumos en la fila y en la tarjeta: cuántos van; en rojo si hay sin resolver */
.act-conv-insumos { font-weight: 700; color: #7a4b00; }
.act-conv-insumos .material-symbols-outlined { color: #b8541b; }
.act-conv-insumos-faltan { color: #b3261e; }
.act-conv-insumos-faltan .material-symbols-outlined { color: #b3261e; }

.act-conv-esqueleto {
    height: 92px;
    border-bottom: 1px solid #eef2f6;
    background: linear-gradient(90deg, #f3f6f9 25%, #e9eef3 37%, #f3f6f9 63%);
    background-size: 400% 100%;
    animation: act-brillo 1.4s linear infinite;
}

.act-vacio { padding: 44px 20px; }
.act-aviso-push { align-items: center; flex-wrap: wrap; }
.act-aviso-push > div { flex: 1 1 220px; }


/* ═══════════════════ El hilo ═══════════════════ */

/*
    Una columna: cabecera, tarea anclada, mensajes (lo único que se desplaza),
    etapas, frases y caja de escribir. El alto lo pone quien la contiene: la
    página a pantalla completa o el panel del seguimiento.
*/
.act-hilo {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    font-family: var(--pan-sans);
    color: var(--pan-tinta);
    background: #eef2f6;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* ── La página que lo contiene ── */
/* En el teléfono cubre la pantalla entera, por encima del menú: como abrir una
   conversación. El alto es el que deja libre el teclado (Actividades.js). */
.act-hilo-pantalla {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--act-arriba-visible, 0px);
    height: var(--act-alto-visible, 100dvh);
    z-index: 1035;
    background: #eef2f6;
}

body.act-cuerpo-hilo { overflow: hidden; overscroll-behavior: none; }

@media (min-width: 1024px) {
    /* En escritorio es una columna centrada dentro de la página. Los márgenes
       negativos cancelan el relleno del «article», como en pan-pantalla. */
    .act-hilo-pantalla {
        position: static;
        height: calc(100vh - 10px);
        margin: -2px -1.5rem 0;
        padding: 10px;
        display: flex;
        justify-content: center;
        background: none;
    }

    .act-hilo-pantalla > .act-hilo {
        width: 100%;
        max-width: 920px;
        border: 1px solid var(--pan-linea);
        border-radius: 18px;
        box-shadow: var(--pan-sombra);
    }

    body.act-cuerpo-hilo { overflow: auto; }
}

/* ── Cabecera ── */
.act-hilo-cab {
    flex: none;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 62px;
    padding: calc(6px + env(safe-area-inset-top, 0px)) 6px 6px;
    background: linear-gradient(135deg, #0C2740 0%, #123b5e 100%);
    color: #fff;
    box-shadow: 0 6px 18px -10px rgba(12, 39, 64, .55);
    z-index: 3;
}

.act-cab-boton {
    flex: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, transform .1s;
}

.act-cab-boton:hover { background: rgba(255, 255, 255, .12); }
.act-cab-boton:active { transform: scale(.92); }
.act-cab-boton .material-symbols-outlined { font-size: 25px; }

.act-cab-identidad {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 6px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: inherit;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

.act-cab-identidad:hover { background: rgba(255, 255, 255, .08); }
.act-cab-identidad .act-avatar { width: 42px; height: 42px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--act-acento, #9fd0f2) 70%, #fff); background: rgba(255, 255, 255, .14); color: #fff; }
.act-cab-identidad .act-avatar .material-symbols-outlined { font-size: 22px; }

.act-cab-textos { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.act-cab-titulo { font-size: 16.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-cab-sub { font-size: 12.5px; color: rgba(255, 255, 255, .72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Dentro del seguimiento la cabecera es clara: ya hay un riel oscuro a la
   izquierda y dos bandas navy en la misma pantalla pesan demasiado. */
.act-hilo-incrustado .act-hilo-cab {
    background: rgba(255, 255, 255, .92);
    color: var(--pan-tinta);
    border-bottom: 1px solid var(--pan-linea);
    box-shadow: none;
    padding-top: 6px;
}

.act-hilo-incrustado .act-cab-sub { color: var(--pan-apagado); }
.act-hilo-incrustado .act-cab-boton:hover,
.act-hilo-incrustado .act-cab-identidad:hover { background: #f1f5f9; }
.act-hilo-incrustado .act-cab-identidad .act-avatar { background: color-mix(in srgb, var(--act-acento, var(--pan-azul)) 14%, #fff); color: var(--act-acento, var(--pan-azul)); }

/* ── La tarea, anclada bajo la cabecera ── */
.act-anclada {
    flex: none;
    display: flex;
    align-items: center;
    gap: 6px 14px;
    flex-wrap: wrap;
    width: 100%;
    padding: 8px 14px;
    border: 0;
    border-bottom: 1px solid rgba(12, 39, 64, .08);
    background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    z-index: 2;
}

.act-anclada-estado {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px 3px 8px;
    border-radius: 999px;
    background: var(--act-tono-fondo);
    color: var(--act-tono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.act-anclada-estado .material-symbols-outlined { font-size: 16px; }
.act-e-ejecucion .act-anclada-estado .material-symbols-outlined { animation: act-late 1.8s ease-in-out infinite; }

.act-anclada-dato { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--pan-apagado); }
.act-anclada-dato .material-symbols-outlined { font-size: 16px; color: var(--pan-tenue); }
.act-anclada-dato.act-anclada-pausa { padding: 0 8px 0 5px; border-radius: 999px; background: #fff1c2; color: #6b5a14; font-weight: 600; }
.act-anclada-dato.act-anclada-pausa .material-symbols-outlined { color: #a07c10; }
.act-anclada-avance { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12.5px; font-weight: 700; color: #0e7c86; }

/* ── Los mensajes ── */
/* La luz ambiental: dos resplandores muy tenues, uno por esquina. */
.act-hilo-cuerpo {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background:
        radial-gradient(900px 420px at 100% 0%, rgba(24, 95, 165, .10), transparent 62%),
        radial-gradient(800px 460px at 0% 100%, rgba(28, 138, 90, .09), transparent 60%),
        #eef2f6;
}

@media (min-width: 760px) {
    .act-hilo-cuerpo { padding: 18px 8% 12px; }
}

.act-aviso-hilo { margin: 8px 0; }

.act-hilo-vacio {
    margin: 18px auto;
    max-width: 320px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .7);
    color: var(--pan-apagado);
    font-size: 14.5px;
    text-align: center;
    line-height: 1.4;
}

/* La tarea abre el hilo: una tarjeta ancha, como el mensaje fijado de un grupo. */
.act-tarea {
    align-self: center;
    width: 100%;
    max-width: 560px;
    margin: 2px 0 8px;
    padding: 14px 16px 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--pan-linea);
    box-shadow: var(--pan-sombra-tarjeta);
    cursor: pointer;
}

.act-tarea-rotulo {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--pan-azul);
}

.act-tarea-rotulo .material-symbols-outlined { font-size: 16px; }

.act-tarea-texto {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.act-tarea-fotos { display: flex; gap: 6px; margin-top: 10px; }
.act-tarea-fotos img { width: 25%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; }

.act-tarea-pie {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    margin: 10px 0 0;
    font-size: 12.5px;
    color: var(--pan-tenue);
}

.act-tarea-mas { margin-left: auto; color: var(--pan-azul); font-weight: 600; }

/* Separador de día */
/* No es pegajoso: uno que se queda flotando tapa la primera burbuja cuando el
   hilo abre ya desplazado al final, que es siempre. */
.act-dia { display: flex; justify-content: center; margin: 10px 0 4px; }

.act-dia span {
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 1px 2px rgba(12, 39, 64, .10);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--pan-apagado);
}

/* Líneas centradas: lo que anota la plataforma y los cambios de etapa */
.act-linea { display: flex; justify-content: center; margin: 3px 0; animation: act-aparece .3s ease both; }

.act-linea-texto {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px 7px;
    max-width: 92%;
    padding: 5px 13px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
    color: var(--pan-apagado);
    font-size: 12.5px;
    line-height: 1.35;
    text-align: center;
}

.act-linea-texto .material-symbols-outlined { font-size: 16px; }
.act-linea-texto small { font-size: 11px; color: var(--pan-tenue); white-space: nowrap; }
.act-linea-texto a { color: inherit; display: inline-flex; }

.act-linea-etapa {
    background: var(--act-tono-fondo);
    color: var(--act-tono);
    font-size: 13.5px;
    font-weight: 500;
    padding: 7px 15px;
    box-shadow: 0 1px 2px rgba(12, 39, 64, .08);
}

.act-linea-etapa b { font-weight: 700; }
.act-linea-etapa small { color: var(--act-tono); opacity: .75; }

/* Burbujas */
.act-fila { display: flex; align-items: flex-end; gap: 7px; animation: act-aparece .3s ease both; }
.act-fila-mia { flex-direction: column; align-items: flex-end; gap: 2px; }

.act-burbuja {
    position: relative;
    max-width: min(80%, 480px);
    padding: 7px 11px 5px;
    border-radius: 4px 16px 16px 16px;
    background: #fff;
    box-shadow: 0 1px 1.5px rgba(12, 39, 64, .13);
    overflow: hidden;
}

.act-burbuja-mia { border-radius: 16px 4px 16px 16px; background: #dff3e8; }

/* Lo que escribe jefatura lleva un filo navy: en un hilo con varios de la
   cuadrilla, la instrucción no se pierde entre los reportes. */
.act-burbuja-jefatura { box-shadow: inset 3px 0 0 var(--pan-tinta), 0 1px 1.5px rgba(12, 39, 64, .13); }

.act-burbuja-pendiente { opacity: .78; }
.act-burbuja-fallo { background: #fdecea; opacity: 1; }
.act-burbuja-foto { padding: 4px 4px 5px; }
.act-burbuja-foto .act-texto, .act-burbuja-foto .act-autor { padding: 0 7px; }
.act-burbuja-foto .act-pie-burbuja { padding: 0 7px; }

.act-autor { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: 12.5px; font-weight: 700; }

.act-sello-jefatura {
    padding: 0 6px;
    border-radius: 4px;
    background: var(--pan-tinta);
    color: #fff;
    font-size: 9.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1.6;
}

.act-texto { margin: 0; font-size: 15.5px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }

.act-foto {
    display: block;
    width: 100%;
    max-width: 320px;
    max-height: 340px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 4px;
    cursor: zoom-in;
    background: #e9eef3;
}

/* Una cinta sobre la burbuja cuando el mensaje —una foto, casi siempre— movió
   la actividad de etapa. */
.act-cinta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: -7px -11px 6px;
    padding: 5px 11px;
    background: var(--act-cinta, #0e7c86);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .08em;
}

.act-burbuja-foto .act-cinta { margin: -4px -4px 4px; }
.act-cinta .material-symbols-outlined { font-size: 16px; }
.act-cinta-ejecucion { --act-cinta: #0e7c86; }
.act-cinta-terminada { --act-cinta: #1c8a5a; }
.act-cinta-problema { --act-cinta: #d32f14; }
/* Una marca de paso o de insumo de la hoja de trabajo que espera en el teléfono (octubre de 2026). */
.act-cinta-marca { --act-cinta: #4a6a8a; }

/* Nota de voz: el reproductor del navegador, ceñido a la burbuja. */
.act-audio { display: flex; align-items: center; gap: 8px; min-width: 230px; margin-bottom: 2px; }

.act-audio-icono {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--pan-verde);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.act-audio-icono .material-symbols-outlined { font-size: 21px; }
.act-audio audio { flex: 1 1 auto; min-width: 0; height: 38px; max-width: 250px; }
.act-audio-duracion { flex: none; font-size: 12px; font-weight: 600; color: var(--pan-apagado); }
.act-audio-pendiente { display: flex; align-items: center; gap: 6px; margin: 2px 0; font-size: 14.5px; }

.act-avance-mensaje { display: flex; align-items: center; gap: 8px; margin: 5px 0 1px; font-size: 13px; color: #0e7c86; }
.act-avance-mensaje .act-barra { width: 120px; height: 6px; }

.act-pie-burbuja {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin: 1px 0 0;
    font-size: 11px;
    color: var(--pan-tenue);
    line-height: 1.4;
}

.act-pin { display: inline-flex; align-items: center; gap: 1px; margin-right: auto; color: var(--pan-azul); text-decoration: none; font-weight: 600; }
.act-pin .material-symbols-outlined { font-size: 14px; }
.act-reloj { font-size: 14px !important; }
.act-no-enviado { display: inline-flex; align-items: center; gap: 3px; color: var(--pan-rojo); font-weight: 700; }
.act-no-enviado .material-symbols-outlined { font-size: 15px; }

.act-reintento { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0 6px; max-width: 86%; font-size: 12.5px; color: #8a1f0d; text-align: right; }

/* Esqueleto del hilo mientras llega */
.act-esqueleto-hilo { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; }

.act-esq {
    height: 54px;
    width: 62%;
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .85) 25%, rgba(255, 255, 255, .45) 37%, rgba(255, 255, 255, .85) 63%);
    background-size: 400% 100%;
    animation: act-brillo 1.4s linear infinite;
}

.act-esq-der { align-self: flex-end; width: 48%; }
.act-esq-corta { width: 38%; height: 40px; }

/* «Mensajes nuevos»: flota sobre la caja de escribir */
.act-nuevos {
    position: absolute;
    left: 50%;
    bottom: 150px;
    transform: translateX(-50%);
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--pan-tinta);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 24px -10px rgba(12, 39, 64, .7);
    cursor: pointer;
    animation: act-aparece .25s ease both;
}

.act-nuevos .material-symbols-outlined { font-size: 17px; }

.act-sin-red {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 12px;
    background: #fff3e6;
    color: #7a3a0f;
    font-size: 12.5px;
    font-weight: 600;
    text-align: center;
}

.act-sin-red .material-symbols-outlined { font-size: 16px; }


/* ═══════════════════ Etapas, frases y caja de escribir ═══════════════════ */

/* Lo que flota al pie es de vidrio esmerilado: deja adivinar el hilo detrás. */
.act-etapas,
.act-frases,
.act-redactor,
.act-etapas-abrir {
    flex: none;
    background: rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.act-etapas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px 4px;
    border-top: 1px solid rgba(12, 39, 64, .08);
}

.act-etapas > .uso-boton { flex: 1 1 140px; min-height: 54px; }
.act-etapas > .uso-boton.act-boton-problema { flex: 0 1 150px; }
.act-etapas-cierre { padding-bottom: 8px; }
.act-etapas-cierre > .uso-boton { flex: 1 1 160px; }

/* «Problema» es rojo, pero hueco: tiene que verse sin competir con el verde,
   que es el que se toca nueve veces de cada diez. */
.act-boton-problema { background: #fff; color: var(--pan-rojo); border: 1.5px solid rgba(211, 47, 20, .45); box-shadow: none; }
.act-boton-problema:hover { background: #fdecea; filter: none; }

.act-cierre { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 2px; font-size: 14px; color: var(--pan-apagado); }
.act-cierre .material-symbols-outlined { font-size: 22px; color: var(--pan-verde); }
.act-cierre-ok { color: var(--pan-tinta); font-weight: 600; }
.act-cierre-ok .material-symbols-outlined { color: var(--pan-tinta); }

.act-etapas-abrir {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px 2px;
    border: 0;
    border-top: 1px solid rgba(12, 39, 64, .08);
    color: var(--pan-apagado);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.act-etapas-abrir:hover { color: var(--pan-azul); }
.act-etapas-abrir .material-symbols-outlined { font-size: 18px; }

/* Lo de jefatura sobre una actividad abierta: recordar y marcar por la cuadrilla, en un renglón. */
.act-jefatura-fila { flex: none; display: flex; flex-wrap: wrap; gap: 0 4px; padding: 0 6px; background: rgba(255, 255, 255, .9); }
.act-jefatura-fila .act-etapas-abrir { flex: 1 1 200px; width: auto; min-height: 42px; padding: 6px 10px 4px; }
.act-jefatura-fila .act-recordar { color: #b8541b; }
.act-jefatura-fila .act-recordar:hover { color: #8c3d10; }
.act-jefatura-fila .act-recordar .material-symbols-outlined { animation: act-campana 2.4s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes act-campana { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(12deg); } 82% { transform: rotate(-10deg); } 88% { transform: rotate(6deg); } 94% { transform: rotate(-3deg); } }
.act-jefatura-fila .act-pausar { color: #6b5a14; }
.act-jefatura-fila .act-pausar:hover { color: #4a3e0c; }
.act-jefatura-fila .act-reanudar { color: #146b45; }
.act-jefatura-fila .act-reanudar:hover { color: #0e5034; }

/* En el teléfono no caben dos o tres rótulos en un renglón, y uno por renglón
   se come el alto del hilo: van como mosaicos, el icono arriba del rótulo. */
@media (max-width: 560px) {
    .act-jefatura-fila { flex-wrap: nowrap; gap: 0; padding: 0 2px; }
    .act-jefatura-fila .act-etapas-abrir {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        gap: 2px;
        min-height: 54px;
        padding: 7px 4px 5px;
        font-size: 11.5px;
        line-height: 1.15;
        text-align: center;
    }
    .act-jefatura-fila .act-etapas-abrir + .act-etapas-abrir { border-left: 1px solid rgba(12, 39, 64, .08); }
    .act-jefatura-fila .act-etapas-abrir .material-symbols-outlined { font-size: 20px; }
}

/* La repetición en pausa: una franja ámbar que se lee de un vistazo (y, en una
   terminada, el botón para reanudarla y que nazca la siguiente). */
.act-pausa-franja {
    flex: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0;
    padding: 8px 14px;
    background: #fff6db;
    color: #5e4b0a;
    font-size: 13.5px;
    line-height: 1.4;
    border-top: 1px solid #f0dfa6;
}
.act-pausa-franja > .material-symbols-outlined { font-size: 20px; color: #a07c10; }
.act-pausa-franja > span:nth-child(2) { flex: 1 1 220px; }
.act-pausa-boton {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 12px; border: 1.5px solid #1c8a5a; border-radius: 999px; background: #fff;
    color: #146b45; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.act-pausa-boton:hover:not(:disabled) { background: #e6f6ee; }
.act-pausa-boton:disabled { opacity: .6; cursor: progress; }
.act-pausa-boton .material-symbols-outlined { font-size: 18px; }

/* Sello de «repetición en pausa» junto a la frecuencia (ficha, cronograma, listado). */
.act-chip-pausa { background: #fff1c2; color: #6b5a14; }
.act-ficha-pausa {
    display: flex; gap: 8px; align-items: flex-start;
    margin: 8px 0 0; padding: 8px 12px; border-radius: 10px;
    background: #fff6db; color: #5e4b0a; font-size: 13px; line-height: 1.4;
}
.act-ficha-pausa .material-symbols-outlined { font-size: 18px; color: #a07c10; }
.act-ficha-siguiente { background: #eef5fb; color: #23405c; }
.act-ficha-siguiente .material-symbols-outlined { color: var(--pan-azul); }

/* Confirmación breve bajo los botones («Recordatorio enviado a…»): se va sola. */
.act-confirmacion {
    flex: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 14px 8px;
    background: #e6f6ee;
    color: #146b45;
    font-size: 13.5px;
    line-height: 1.35;
    animation: act-aparece .3s ease both;
}

.act-confirmacion .material-symbols-outlined { font-size: 18px; }

/* Vista previa de lo que llegará al teléfono, en la hoja de recordatorio. */
.act-hoja-vista {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: -2px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f4f7fa;
    color: var(--pan-apagado);
    font-size: 13.5px;
    line-height: 1.4;
}

.act-hoja-vista .material-symbols-outlined { flex: none; font-size: 22px; color: var(--pan-azul); margin-top: 1px; }
.act-hoja-vista b { color: var(--pan-tinta); }

/* ¿Cuánto lleva? */
.act-avances { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; padding: 2px 2px 0; }
.act-avances-rotulo { font-size: 12.5px; font-weight: 600; color: var(--pan-apagado); margin-right: 2px; }

.act-avance {
    flex: 1 1 0;
    min-height: 40px;
    border: 1.5px solid #c9d4df;
    border-radius: 11px;
    background: #fff;
    color: var(--pan-tinta);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
}

.act-avance:hover { border-color: #0e7c86; }
.act-avance:active { transform: scale(.96); }
.act-avance.activo { background: #0e7c86; border-color: #0e7c86; color: #fff; opacity: 1; cursor: default; }

/* ═══════════════════ Los pasos de la tarea ═══════════════════ */
/* La lista que se marca tocando. Cada renglón mide al menos 44 px, que es lo
   que un dedo con guante acierta; la caja de la palomita es grande y de color
   cuando está marcada, gris cuando no. Los marcados se atenúan y se tachan
   suave, para que lo pendiente sea lo que salta a la vista. */
.act-pasos { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 2px; }

.act-paso {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 8px 10px 8px 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #f6f8fb;
    color: var(--pan-tinta);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
}

.act-pasos-marcable .act-paso:not(:disabled):hover { border-color: #b9d7dc; background: #eef7f8; }
.act-pasos-marcable .act-paso:not(:disabled):active { transform: scale(.985); }
.act-paso:disabled { cursor: progress; }
.act-paso-solo { cursor: default; }

.act-paso-caja { flex: none; font-size: 26px; line-height: 1; color: #91a2b4; margin-top: -1px; }
.act-paso-hecho .act-paso-caja { color: #1c8a5a; }
.act-paso-hecho { background: #f0f7f3; }
.act-paso-hecho .act-paso-texto { color: var(--pan-apagado); text-decoration: line-through; text-decoration-color: rgba(28, 138, 90, .45); text-decoration-thickness: 1px; }

.act-paso-cuerpo { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.act-paso-texto { overflow-wrap: anywhere; white-space: pre-wrap; }
.act-paso-cuerpo small { font-size: 11.5px; color: #1c8a5a; font-weight: 600; }

.act-paso-girando { animation: act-gira 1s linear infinite; color: #0e7c86; }
/* La marca guardada en el teléfono que todavía no sale (hoja de trabajo, octubre de 2026):
   se pinta como quedará, con el reloj en vez de la casilla y un pie que lo dice. */
.act-paso-pendiente { border-style: dashed; border-color: #b9c8d6; }
.act-paso-pendiente .act-paso-caja { color: #4a6a8a; }
.act-paso-pendiente .act-paso-pie-pendiente { color: #4a6a8a; font-weight: 600; }
@keyframes act-gira { to { transform: rotate(360deg); } }

.act-pasos-compacta { gap: 3px; }
.act-pasos-compacta .act-paso { min-height: 40px; padding: 6px 8px 6px 6px; font-size: 14.5px; border-radius: 10px; }
.act-pasos-compacta .act-paso-caja { font-size: 24px; }

/* Rótulos menores dentro de la tarjeta de la tarea (pasos, insumos, resultado) */
.act-tarea-subrotulo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 8px;
    margin: 12px 0 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--pan-apagado);
}

.act-tarea-subrotulo .material-symbols-outlined { font-size: 16px; color: var(--pan-azul); }
.act-tarea-subrotulo small { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--pan-tenue); }
.act-tarea-texto-menor { font-size: 14.5px; -webkit-line-clamp: 4; color: var(--pan-apagado); }

/* La cinta anclada y el resumen de la zona de etapas: cuántos van */
.act-anclada-pasos .material-symbols-outlined { font-size: 16px; }
.act-anclada-pasos .act-barra { width: 54px; }
.act-pasos-listos { color: #1c8a5a; }
.act-pasos-listos .act-barra > span { background: #1c8a5a; }

.act-pasos-resumen {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 6px 12px;
    border: 1.5px solid #c9d4df;
    border-radius: 12px;
    background: #fff;
    color: #0e7c86;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.act-pasos-resumen:hover { border-color: #0e7c86; background: #f3fafb; }
.act-pasos-resumen .material-symbols-outlined { font-size: 20px; }
.act-pasos-resumen .act-barra { flex: 1 1 auto; width: auto; min-width: 40px; }
.act-pasos-resumen small { font-weight: 500; color: var(--pan-apagado); white-space: nowrap; }
.act-pasos-resumen.act-pasos-listos { border-color: #1c8a5a; }

.act-pasos-marcha { display: flex; align-items: center; gap: 10px; margin: -2px 0 0; font-size: 14px; color: #0e7c86; }
.act-pasos-marcha .act-barra { flex: 1 1 auto; min-width: 0; }
.act-pasos-marcha b { flex: none; white-space: nowrap; }

/* ═══════════════════ Los insumos de la tarea ═══════════════════ */
/* La misma lista que los pasos, con dos cosas más: la cantidad delante del
   nombre y el icono del tipo (bodega, herramienta, otro) al final. Un insumo
   que falta en bodega o cuyo activo no está operativo se pinta en rojo suave;
   uno ya pedido, en ámbar; uno listo, como un paso hecho. */
.act-insumo { align-items: center; }
.act-insumo .act-paso-texto { text-decoration: none; }
.act-paso-hecho.act-insumo .act-paso-texto { color: var(--pan-apagado); }
.act-insumo-cantidad { font-weight: 700; color: var(--pan-tinta); margin-right: 2px; }
.act-paso-hecho .act-insumo-cantidad { color: var(--pan-apagado); }
.act-insumo-tipo { flex: none; font-size: 20px; color: #91a2b4; }
.act-insumo-falta { background: #fdf3f2; }
.act-insumo-pedido { background: #fff8ea; }
.act-insumo-linea { color: var(--pan-apagado) !important; font-weight: 500 !important; }
.act-insumo-linea-falta { color: #b3261e !important; }
.act-insumo-linea-pedido { color: #7a4b00 !important; }
.act-paso-cuerpo small.act-insumo-linea, .act-paso-cuerpo small.act-insumo-linea-falta, .act-paso-cuerpo small.act-insumo-linea-pedido { font-size: 11.5px; }

/* El resumen de los insumos en la tarjeta y en la hoja: cuántos van, y de qué color */
.act-insumos-marcha { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 4px; font-size: 13px; color: var(--pan-apagado); }
.act-insumos-marcha b { color: var(--pan-tinta); }
.act-insumos-marcha .act-insumos-faltan { color: #b3261e; font-weight: 700; }
.act-insumos-marcha .act-insumos-pedidos { color: #7a4b00; font-weight: 700; }
.act-insumos-marcha .act-insumos-todo { color: #1c8a5a; font-weight: 700; }

/* Las acciones de jefatura sobre los insumos: pedir lo que falta, sacar de bodega lo que hay */
.act-insumos-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px; }
.act-insumos-acciones .act-etapas-abrir { width: auto; flex: 1 1 200px; min-height: 42px; padding: 6px 10px; border: 1.5px solid #c9d4df; border-radius: 12px; background: #fff; justify-content: center; }
.act-insumos-acciones .act-etapas-abrir:hover { border-color: #0e7c86; background: #f3fafb; }
.act-insumos-acciones .act-pedir { color: #b3261e; border-color: #f2c4bf; }
.act-insumos-acciones .act-pedir:hover { border-color: #b3261e; background: #fdf3f2; }

/* Los documentos ligados (salidas de bodega, requerimientos) en la ficha */
.act-ficha-docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.act-ficha-doc { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #f6f8fb; font-size: 13.5px; color: var(--pan-tinta); }
.act-ficha-doc .material-symbols-outlined { font-size: 20px; color: var(--pan-azul); flex: none; }
.act-ficha-doc a { color: var(--pan-azul); font-weight: 700; text-decoration: none; }
.act-ficha-doc a:hover { text-decoration: underline; }
.act-ficha-doc span { min-width: 0; }
.act-ficha-doc small { display: block; color: var(--pan-apagado); font-size: 12px; }
.act-ficha-costo { font-weight: 700; color: var(--pan-tinta); white-space: nowrap; margin-left: auto; }

/* ═══════════════════ La cuadrilla ═══════════════════ */
/* La hoja donde el responsable ve quiénes trabajan con él y suma a los que
   faltan. Un renglón por persona, con su avatar, su nombre y si tiene cuenta. */
.act-cuadrilla { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.act-cuadrilla-persona {
    display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 8px 6px 8px;
    border-radius: 12px; background: #f6f8fb; font-size: 14.5px; color: var(--pan-tinta);
}
.act-cuadrilla-persona .act-avatar-chico { align-self: center; width: 34px; height: 34px; font-size: 12.5px; }
.act-cuadrilla-textos { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.act-cuadrilla-textos b { font-weight: 700; overflow-wrap: anywhere; }
.act-cuadrilla-textos small { font-size: 11.5px; color: #1c8a5a; font-weight: 600; }
.act-cuadrilla-textos small.act-cuadrilla-sin-cuenta { color: var(--pan-apagado); font-weight: 500; }
.act-cuadrilla-quitar, .act-cuadrilla-sumar {
    flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    min-height: 40px; padding: 0 10px; border: 1.5px solid #c9d4df; border-radius: 10px; background: #fff;
    color: var(--pan-apagado); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.act-cuadrilla-quitar { width: 40px; padding: 0; }
.act-cuadrilla-quitar:hover { border-color: #b3261e; color: #b3261e; }
.act-cuadrilla-sumar { color: #0e7c86; }
.act-cuadrilla-sumar:hover { border-color: #0e7c86; background: #f3fafb; }
.act-cuadrilla-quitar:disabled, .act-cuadrilla-sumar:disabled { opacity: .55; cursor: default; }
.act-cuadrilla-quitar .material-symbols-outlined, .act-cuadrilla-sumar .material-symbols-outlined { font-size: 20px; }
.act-cuadrilla-vacia { padding: 10px 12px; border: 1px dashed #c9d4df; border-radius: 10px; color: var(--pan-apagado); font-size: 13px; line-height: 1.4; }
.act-cuadrilla-buscar {
    display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px;
    border: 1.5px solid #c9d4df; border-radius: 12px; background: #fff; margin: 0 0 6px;
}
.act-cuadrilla-buscar:focus-within { border-color: var(--pan-azul); box-shadow: 0 0 0 3px rgba(24, 95, 165, .14); }
.act-cuadrilla-buscar .material-symbols-outlined { flex: none; font-size: 22px; color: #91a2b4; }
.act-cuadrilla-buscar input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--pan-tinta); outline: none; }
.act-cuadrilla-candidatos { max-height: 40vh; overflow: auto; }

/* La invitación en la tarjeta de la tarea, cuando el responsable no ha sumado a nadie */
.act-tarea-cuadrilla {
    display: flex; align-items: center; gap: 8px; width: 100%; margin: 10px 0 0; padding: 8px 10px;
    border: 1px dashed #9cc3cc; border-radius: 10px; background: #f3fafb; color: var(--pan-tinta);
    font: inherit; font-size: 13.5px; line-height: 1.35; text-align: left; cursor: pointer;
}
.act-tarea-cuadrilla:hover { border-style: solid; }
.act-tarea-cuadrilla .material-symbols-outlined { flex: none; font-size: 22px; color: #0e7c86; }
.act-tarea-cuadrilla b { color: #0e7c86; }

/* El botón «Sumar compañeros» entre las personas de la ficha */
.act-persona-sumar { border: 1.5px dashed #9cc3cc; background: #f3fafb; color: #0e7c86; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 3px 10px 3px 8px; }
.act-persona-sumar:hover { border-style: solid; }
.act-persona-sumar .material-symbols-outlined { font-size: 18px; }

/* La marca de un insumo en el hilo: verde cuando ya lo tiene, rojo suave cuando le falta. */
.act-linea-insumo { background: #e6f6ee; color: #1c8a5a; font-size: 13px; padding: 6px 14px; }
.act-linea-insumo b { font-weight: 700; }
.act-linea-insumo small { color: #1c8a5a; opacity: .75; }
.act-linea-insumo-falta { background: #fdecea; color: #b3261e; }
.act-linea-insumo-falta small { color: #b3261e; }

/* La marca de un paso en el hilo: pastilla verde; devolverlo a pendiente, gris. */
.act-linea-paso { background: #e6f6ee; color: #1c8a5a; font-size: 13px; padding: 6px 14px; }
.act-linea-paso b { font-weight: 700; }
.act-linea-paso small { color: #1c8a5a; opacity: .75; }
.act-linea-paso-quitado { background: #eef2f6; color: var(--pan-apagado); }
.act-linea-paso-quitado small { color: var(--pan-apagado); }

/* Aviso dentro de la hoja «¿Ya terminó?» cuando quedan pasos sin marcar */
.act-hoja-nota-pasos {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin: -4px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff7e6;
    color: #7a4b00;
    font-size: 13.5px;
    line-height: 1.4;
}

.act-hoja-nota-pasos .material-symbols-outlined { flex: none; font-size: 20px; margin-top: 1px; }

.act-tarjeta-pasos { font-size: 15px; }

/* Frases de un toque */
.act-frases { display: flex; gap: 7px; overflow-x: auto; padding: 8px 12px 2px; scrollbar-width: none; }
.act-frases::-webkit-scrollbar { display: none; }

.act-frase {
    flex: none;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #d5dfe9;
    border-radius: 999px;
    background: #fff;
    color: var(--pan-tinta);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
}

.act-frase:hover { border-color: var(--pan-azul); background: #f3f8fd; }
.act-frase:active { transform: scale(.96); }

/* Con el teclado abierto queda media pantalla (la clase la pone Actividades.js
   midiendo la ventana visual): se guardan las frases y el «¿cuánto lleva?», y
   los botones de etapa se achican, para que se sigan viendo los mensajes. */
body.act-poco-alto .act-frases,
body.act-poco-alto .act-avances,
body.act-poco-alto .act-etapas-abrir,
body.act-poco-alto .act-anclada { display: none; }
body.act-poco-alto .act-etapas { padding: 6px 10px 2px; }
body.act-poco-alto .act-etapas > .uso-boton { min-height: 42px; font-size: 13px; }

/* La caja de escribir */
.act-redactor {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
}

.act-redactor-boton {
    flex: none;
    width: 48px;
    height: 48px;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--pan-apagado);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, transform .1s, color .15s;
}

.act-redactor-boton:hover { background: #eef2f6; color: var(--pan-tinta); }
.act-redactor-boton:active { transform: scale(.92); }
.act-redactor-boton .material-symbols-outlined { font-size: 26px; }
.act-redactor-boton.act-rojo { color: var(--pan-rojo); }

.act-redactor-boton.act-enviar {
    background: var(--pan-verde);
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(28, 138, 90, .9);
}

.act-redactor-boton.act-enviar:hover { background: #197c51; color: #fff; }

/* La galería sólo donde cabe: en un teléfono angosto la cámara basta y sobra. */
.act-solo-ancho { display: none; }
@media (min-width: 400px) { .act-solo-ancho { display: inline-flex; } }

/* 16 px y no menos: por debajo, Safari en iPhone hace zoom al enfocar. */
.act-caja {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
    max-height: 150px;
    padding: 12px 16px;
    border: 1px solid #d5dfe9;
    border-radius: 24px;
    background: #fff;
    color: var(--pan-tinta);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.35;
    resize: none;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.act-caja:focus { border-color: var(--pan-azul); box-shadow: 0 0 0 3px rgba(24, 95, 165, .14); }
.act-caja::placeholder { color: var(--pan-tenue); }

.act-grabando {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-radius: 24px;
    background: #fdecea;
    color: #8a1f0d;
    font-size: 14px;
}

.act-grabando b { font-family: var(--pan-mono); font-size: 16px; }
.act-grabando span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-punto-rojo { flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--pan-rojo); animation: act-late 1s ease-in-out infinite; }

.act-aviso-redactor { flex: none; margin: 0; padding: 6px 14px 8px; background: #fff6f4; color: #8a1f0d; font-size: 13.5px; line-height: 1.35; }

/* Los selectores de archivo no se ven: los abren sus etiquetas. */
.act-archivo { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }


/* ═══════════════════ Hojas ═══════════════════ */

/* En el teléfono suben desde abajo, como las de WhatsApp; en escritorio se
   centran. El velo las separa del hilo sin taparlo del todo. */
.act-velo {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(12, 39, 64, .42);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: act-velo-entra .2s ease both;
}

@keyframes act-velo-entra { from { opacity: 0; } to { opacity: 1; } }
@keyframes act-hoja-sube { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.act-hoja {
    width: 100%;
    max-width: 560px;
    max-height: 92%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 18px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 24px 24px 0 0;
    background: #fff;
    box-shadow: 0 -20px 50px -20px rgba(12, 39, 64, .55);
    animation: act-hoja-sube .28s cubic-bezier(.2, .8, .2, 1) both;
}

.act-hoja-asa { align-self: center; width: 42px; height: 4px; border-radius: 999px; background: #d5dfe9; margin-bottom: 2px; }

@media (min-width: 760px) {
    .act-velo { align-items: center; }
    .act-hoja { border-radius: 22px; padding-top: 18px; max-height: 88%; }
    .act-hoja-asa { display: none; }
}

.act-hoja-titulo {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--act-tono, var(--pan-tinta));
}

.act-hoja-titulo .material-symbols-outlined { font-size: 28px; }
.act-hoja-sub { margin: -6px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--pan-apagado); }

.act-hoja-nota {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d5dfe9;
    border-radius: 14px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.35;
    color: var(--pan-tinta);
    resize: vertical;
    outline: none;
}

.act-hoja-nota:focus { border-color: var(--pan-azul); box-shadow: 0 0 0 3px rgba(24, 95, 165, .14); }

/* Los motivos del problema: fichas grandes con icono, dos por renglón. */
.act-motivos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.act-motivo {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 56px;
    padding: 8px 12px;
    border: 1.5px solid #d5dfe9;
    border-radius: 14px;
    background: #fff;
    color: var(--pan-tinta);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
}

.act-motivo .material-symbols-outlined { flex: none; font-size: 25px; color: var(--pan-apagado); }
.act-motivo:active { transform: scale(.97); }
.act-motivo.activo { border-color: var(--pan-rojo); background: #fdecea; color: #8a1f0d; }
.act-motivo.activo .material-symbols-outlined { color: var(--pan-rojo); }

.act-hoja-foto { position: relative; align-self: center; max-width: 240px; }
.act-hoja-foto img { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; }
.act-hoja-foto-grande { max-width: 100%; }
.act-hoja-foto-grande img { max-height: 46vh; object-fit: contain; background: #0C2740; }

.act-hoja-foto-quitar {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(12, 39, 64, .72);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.act-hoja-foto-quitar .material-symbols-outlined { font-size: 20px; }
.act-hoja label.uso-boton { margin: 0; }

/* Fotografía a pantalla completa */
.act-visor {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 18, 30, .94);
    cursor: zoom-out;
    animation: act-velo-entra .2s ease both;
}

.act-visor img { max-width: 100%; max-height: 100%; object-fit: contain; }

.act-visor-cerrar,
.act-visor-abrir {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--pan-sans);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

.act-visor-cerrar { right: 12px; width: 44px; height: 44px; justify-content: center; }
.act-visor-abrir { left: 12px; height: 44px; padding: 0 16px; }
.act-visor-abrir:hover { color: #fff; background: rgba(255, 255, 255, .24); }


/* ═══════════════════ La ficha de la tarea ═══════════════════ */

.act-ficha { display: flex; flex-direction: column; gap: 8px; font-family: var(--pan-sans); color: var(--pan-tinta); }
.act-ficha-sobre { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.act-ficha-titulo { margin: 2px 0 0; font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.act-ficha-motivo { margin: 0; font-size: 14.5px; color: var(--pan-apagado); }

.act-ficha-rotulo {
    margin: 10px 0 0;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pan-tenue);
}

.act-ficha-texto { margin: 0; padding: 12px 14px; border-radius: 12px; background: #f6f8fb; font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

.act-ficha-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
@media (max-width: 480px) { .act-ficha-datos { grid-template-columns: 1fr; } }

.act-ficha-dato { display: flex; gap: 10px; min-width: 0; }
.act-ficha-dato > .material-symbols-outlined { flex: none; font-size: 22px; color: var(--pan-azul); margin-top: 2px; }
.act-ficha-dato > div { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.act-ficha-dato small { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--pan-tenue); }
.act-ficha-dato b { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.act-ficha-dato span { font-size: 12.5px; color: var(--pan-apagado); }

.act-ficha-personas { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.act-persona { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: #f1f5f9; font-size: 13px; }

.act-ficha-marcha { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #0e7c86; }
.act-ficha-marcha .act-barra { flex: 1 1 auto; min-width: 0; }
.act-ficha-marcha b { flex: none; white-space: nowrap; }

.act-ficha-hitos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--pan-apagado); }
.act-ficha-hitos li { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.act-ficha-hitos .material-symbols-outlined { font-size: 17px; color: var(--pan-tenue); }

.act-ficha-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.act-ficha-fotos img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; }

.act-ficha-acciones { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--pan-linea); }

/* ═══════════════════ Seguimiento (jefatura) ═══════════════════ */

/* Los indicadores SON los filtros: mismas tarjetas pan-tira de todos los
   listados, pero en un <button>. Aquí sólo se les quita lo que un botón trae de
   fábrica y se dibuja el estado «activo». */
.pan-tira.act-seg-tira { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.act-tira-filtro {
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.act-tira-filtro:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--pan-acento, var(--pan-azul)) 45%, var(--pan-linea)); }
.act-tira-filtro:focus-visible { outline: 3px solid rgba(24, 95, 165, .35); outline-offset: 2px; }

.act-tira-filtro.activo {
    border-color: var(--pan-acento, var(--pan-azul));
    background: color-mix(in srgb, var(--pan-acento, var(--pan-azul)) 7%, #fff);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--pan-acento, var(--pan-azul)) 28%, transparent), var(--pan-sombra-tarjeta);
}

.act-tira-filtro .pan-tira-icono .material-symbols-outlined { font-size: 19px; }
.act-tira-cero .pan-tira-monto { color: var(--pan-tenue); }

.pan-filtros.act-seg-filtros { grid-template-columns: max-content minmax(180px, 250px) minmax(200px, 1fr) auto; }

/* ── Dos paneles, como WhatsApp Web ── */
.act-seg-paneles {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
    gap: 10px;
    animation: act-aparece .35s ease both;
}

.act-seg-lista,
.act-seg-hilo {
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--pan-linea);
    border-radius: var(--pan-radio, 14px);
    background: var(--pan-papel);
    box-shadow: var(--pan-sombra-tarjeta);
    overflow: hidden;
}

.act-seg-lista-cab {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 11px 16px 10px;
    border-bottom: 1px solid #eef2f6;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--pan-tenue);
}

.act-seg-lista-cuenta { font-family: var(--pan-mono); font-size: 12px; letter-spacing: 0; color: var(--pan-apagado); }

/* Dentro del panel la lista no es una tarjeta más: el marco ya lo pone el panel. */
.act-seg-conversaciones {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overscroll-behavior: contain;
}

.act-seg-conversaciones .act-conv { padding: 12px 14px; gap: 12px; }
.act-seg-conversaciones .act-conv-nombre { font-size: 14.5px; }
.act-seg-conversaciones .act-conv-ultimo { font-size: 13px; }
.act-seg-conversaciones .act-conv:last-child { border-bottom: 1px solid #eef2f6; }

.act-seg-lista .act-vacio { flex: 1 1 auto; border: 0; box-shadow: none; }

.act-seg-archivo {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-top: 1px solid #eef2f6;
    background: #fafbfd;
    color: var(--pan-apagado);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: color .15s, background .15s;
}

.act-seg-archivo:hover { color: var(--pan-azul); background: #f3f8fd; }
.act-seg-archivo .material-symbols-outlined { font-size: 17px; }

.act-seg-hilo > .act-hilo { flex: 1 1 auto; height: auto; min-height: 0; }

/* Nada elegido todavía: un reposo amable, no un hueco. */
.act-seg-reposo {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 28px;
    text-align: center;
    background:
        radial-gradient(600px 300px at 80% 0%, rgba(24, 95, 165, .07), transparent 70%),
        radial-gradient(500px 280px at 10% 100%, rgba(28, 138, 90, .06), transparent 70%),
        #f6f8fb;
}

.act-seg-reposo-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #fff;
    color: var(--pan-azul);
    box-shadow: 0 24px 50px -24px rgba(12, 39, 64, .45);
}

.act-seg-reposo-icono .material-symbols-outlined { font-size: 38px; }
.act-seg-reposo h3 { margin: 8px 0 0; font-size: 20px; font-weight: 700; color: var(--pan-tinta); letter-spacing: -.01em; }
.act-seg-reposo p { margin: 0; max-width: 460px; font-size: 14px; line-height: 1.55; color: var(--pan-apagado); }

.act-seg-reposo ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin: 10px 0 0;
    padding: 0;
    font-size: 12.5px;
    color: var(--pan-tenue);
}

.act-seg-reposo li { display: inline-flex; align-items: center; gap: 5px; }
.act-seg-reposo .act-globo { min-width: 19px; height: 19px; line-height: 19px; font-size: 11px; }

/* ── Tablero por etapa ── */
.act-tablero {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(176px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    animation: act-aparece .35s ease both;
}

.act-columna {
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: var(--pan-radio, 14px);
    background: color-mix(in srgb, var(--act-tono-fondo, #eef2f6) 55%, #f6f8fb);
    border: 1px solid color-mix(in srgb, var(--act-tono, #8fa1b1) 16%, transparent);
    overflow: hidden;
}

.act-columna-cab {
    flex: none;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 12px 9px;
    color: var(--act-tono, var(--pan-tinta));
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.act-columna-cab .material-symbols-outlined { font-size: 18px; }
.act-columna-nombre { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.act-columna-cuenta {
    flex: none;
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #fff;
    font-family: var(--pan-mono);
    font-size: 11.5px;
    letter-spacing: 0;
    text-align: center;
}

.act-columna-cuerpo {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 2px 8px 10px;
    overscroll-behavior: contain;
}

.act-columna-vacia { margin: 14px 6px; font-size: 12.5px; font-style: italic; text-align: center; color: var(--pan-tenue); }

.act-tarjeta {
    position: relative;
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 11px 12px 10px 15px;
    border: 1px solid rgba(12, 39, 64, .07);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 24px -18px rgba(12, 39, 64, .5);
    text-align: left;
    font-family: var(--pan-sans);
    color: var(--pan-tinta);
    cursor: pointer;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    animation: act-aparece .35s ease both;
}

/* El filete del canto es la prioridad, con su color del catálogo. */
.act-tarjeta::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--act-acento, var(--pan-tenue));
}

.act-tarjeta:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -18px rgba(12, 39, 64, .55); border-color: rgba(24, 95, 165, .3); }
.act-tarjeta:focus-visible { outline: 3px solid rgba(24, 95, 165, .4); outline-offset: 1px; }
.act-tarjeta-elegida { border-color: var(--pan-azul); box-shadow: 0 0 0 2px rgba(24, 95, 165, .22); }
.act-tarjeta-atrasada { background: linear-gradient(180deg, rgba(211, 47, 20, .045), #fff 60%); }

.act-tarjeta-sobre { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 19px; }
.act-tarjeta-prioridad { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pan-tenue); }
.act-tarjeta-sobre .act-globo { min-width: 19px; height: 19px; line-height: 19px; font-size: 11px; }

.act-tarjeta-nombre {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.act-tarjeta-nueva .act-tarjeta-nombre { font-weight: 700; }
.act-tarjeta-datos { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.act-tarjeta-datos .act-conv-dato { font-size: 12px; }
.act-tarjeta-avance { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #0e7c86; }
.act-tarjeta-avance .act-barra { flex: 1 1 auto; width: auto; }

.act-tarjeta-ultimo {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 5px 8px;
    border-radius: 8px;
    background: #f4f7fa;
    font-size: 12px;
    color: var(--pan-apagado);
}

.act-tarjeta-ultimo > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-tarjeta-ultimo .material-symbols-outlined { flex: none; font-size: 15px; color: var(--pan-tenue); }

.act-tarjeta-pie { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 1px; }
.act-tarjeta-quien { flex: 1 1 auto; min-width: 0; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-tarjeta-hora { flex: none; font-size: 11px; color: var(--pan-tenue); }

/* ── El cajón lateral del hilo (tablero y cronograma) ── */
.act-cajon-velo {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    justify-content: flex-end;
    background: rgba(12, 39, 64, .30);
    -webkit-backdrop-filter: blur(1.5px);
    backdrop-filter: blur(1.5px);
    animation: act-velo-entra .2s ease both;
}

.act-cajon {
    width: min(560px, 100%);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #eef2f6;
    box-shadow: -30px 0 70px -30px rgba(12, 39, 64, .6);
    animation: act-cajon-entra .3s cubic-bezier(.2, .8, .2, 1) both;
}

.act-cajon > .act-hilo { flex: 1 1 auto; height: auto; min-height: 0; }

@keyframes act-cajon-entra { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 1320px) {
    .pan-tira.act-seg-tira { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* En la bandeja el lugar ya se lee en la tira del hilo: sin él, cada fila cabe
   en tres renglones y entran el doble de conversaciones a la vista. */
@media (min-width: 1000px) and (max-width: 1800px) {
    .act-seg-conversaciones .act-conv-lugar { display: none; }
    .act-seg-conversaciones .act-avatar { width: 46px; height: 46px; }
}

@media (max-width: 1100px) {
    /* pan-pantalla suelta aquí el alto de ventana: los paneles se dan el suyo. */
    .act-seg-paneles { height: calc(100vh - 120px); min-height: 520px; }
    .act-tablero { height: calc(100vh - 120px); min-height: 520px; }
    .pan-filtros.act-seg-filtros { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}

@media (max-width: 999px) {
    /* Sin sitio para dos paneles: la lista ocupa todo y cada fila abre el hilo a
       página completa (SeguimientoActividades.Elegir pregunta este mismo ancho). */
    .act-seg-paneles { display: block; height: auto; min-height: 0; }
    .act-seg-hilo { display: none; }
    .act-seg-conversaciones { overflow: visible; }
    .act-seg-conversaciones .act-conv { padding: 14px 14px; }
    .act-seg-conversaciones .act-conv-nombre { font-size: 16px; }
    .act-seg-conversaciones .act-conv-ultimo { font-size: 14px; }
}

@media (max-width: 760px) {
    /* En el teléfono los indicadores son una cinta que se desliza: seis tarjetas
       apiladas empujarían la lista fuera de la primera pantalla. */
    .pan-tira.act-seg-tira {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding: 2px 2px 6px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .pan-tira.act-seg-tira::-webkit-scrollbar { display: none; }
    .pan-tira.act-seg-tira > .act-tira-filtro { flex: 0 0 172px; scroll-snap-align: start; }

    .pan-filtros.act-seg-filtros { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
    .act-seg-filtros > .pan-filtro-estado,
    .act-seg-filtros > .pan-filtro-acciones { grid-column: 1 / -1; }
    .act-seg-filtros > .pan-filtro-estado .rz-selectbutton { display: flex; width: 100%; }
    .act-seg-filtros > .pan-filtro-estado .rz-selectbutton .rz-button { flex: 1 1 0; justify-content: center; }
    .act-seg-filtros > .pan-filtro-acciones .rz-button { flex: 1 1 auto; }

    .act-tablero { grid-template-columns: repeat(6, minmax(78vw, 1fr)); scroll-snap-type: x mandatory; height: calc(100vh - 150px); }
    .act-columna { scroll-snap-align: center; }
    .act-cajon { width: 100%; }
}

/* ═══════════════════ Cronograma ═══════════════════ */

.pan-filtros.act-crono-filtros { grid-template-columns: max-content max-content max-content max-content minmax(140px, 1fr) auto; }
.act-crono-navega > label { font-family: var(--pan-mono); letter-spacing: .04em !important; color: var(--pan-tinta) !important; }
.act-crono-flechas { display: inline-flex; gap: 4px; }
.act-crono-flechas .rz-button { min-width: 36px; }
.act-crono-mias { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--pan-apagado); white-space: nowrap; cursor: pointer; }
.act-leyenda-cola { margin-left: auto; display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px 16px; }

/* La leyenda también filtra: cada etapa es un botón que guarda o devuelve sus barras. */
.act-leyenda { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 6px; padding: 0 2px; }

.act-leyenda-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 8px;
    border: 1px solid var(--pan-linea);
    border-radius: 999px;
    background: #fff;
    color: var(--pan-tinta);
    font-family: var(--pan-sans);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, border-color .15s;
}

button.act-leyenda-item:hover { border-color: var(--act-tono, var(--pan-azul)); }
.act-leyenda-item.apagado { opacity: .45; text-decoration: line-through; }
.act-leyenda-fija { cursor: default; border-color: transparent; background: none; color: var(--pan-apagado); padding-left: 4px; }
.act-leyenda-cuenta { font-family: var(--pan-mono); font-size: 11px; color: var(--pan-tenue); }

.act-leyenda-muestra {
    flex: none;
    width: 18px;
    height: 10px;
    border-radius: 3px;
    background: var(--act-tono-fondo, #eef2f6);
    border: 1.5px solid var(--act-tono, var(--pan-tenue));
}

.act-leyenda-atraso { border: 1px dashed rgba(211, 47, 20, .6); background: repeating-linear-gradient(135deg, rgba(211, 47, 20, .3) 0 3px, rgba(211, 47, 20, .06) 3px 6px); }
.act-leyenda-real { height: 4px; border: 0; border-radius: 999px; background: #0e7c86; }

.act-leyenda-ayuda { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--pan-tenue); }
@media (max-width: 1640px) { .act-leyenda-ayuda { display: none; } }
.act-leyenda-ayuda .material-symbols-outlined { font-size: 16px; }

/* ── La línea de tiempo ── */
.act-gantt-marco {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--pan-linea);
    border-radius: var(--pan-radio, 14px);
    background: var(--pan-papel);
    box-shadow: var(--pan-sombra-tarjeta);
    overscroll-behavior: contain;
    animation: act-aparece .35s ease both;
}

.act-gantt {
    --act-rotulo: 300px;
    --act-dia-min: 30px;
    position: relative;
    min-width: calc(var(--act-rotulo) + var(--act-dias) * var(--act-dia-min));
    font-family: var(--pan-sans);
    color: var(--pan-tinta);
}

/* El mes entero tiene que caber sin desplazarse en una pantalla de escritorio. */
.act-gantt-mes { --act-dia-min: 26px; --act-rotulo: 280px; }

.act-gantt-cab,
.act-gantt-grupo,
.act-gantt-fila { display: grid; grid-template-columns: var(--act-rotulo) minmax(0, 1fr); }

.act-gantt-cab { position: sticky; top: 0; z-index: 6; background: #fff; border-bottom: 1px solid var(--pan-linea); box-shadow: 0 6px 14px -12px rgba(12, 39, 64, .5); }

.act-gantt-esquina {
    position: sticky;
    left: 0;
    z-index: 7;
    display: flex;
    align-items: flex-end;
    padding: 0 12px 7px;
    border-right: 1px solid var(--pan-linea);
    background: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--pan-tenue);
}

.act-gantt-meses,
.act-gantt-dias,
.act-gantt-carga,
.act-gantt-fondo,
.act-gantt-pista { display: grid; grid-template-columns: repeat(var(--act-dias), minmax(0, 1fr)); }

.act-gantt-meses span {
    padding: 6px 8px 2px;
    border-left: 1px solid var(--pan-linea);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--pan-apagado);
    white-space: nowrap;
    overflow: hidden;
}

.act-gantt-meses span:first-child { border-left: 0; }

.act-gantt-dia { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 2px 0 5px; border-left: 1px solid transparent; min-width: 0; }
.act-gantt-dia small { font-size: 9.5px; font-weight: 600; color: var(--pan-tenue); line-height: 1; }
.act-gantt-dia b { min-width: 21px; padding: 1px 3px; border-radius: 999px; font-family: var(--pan-mono); font-size: 11.5px; font-weight: 600; line-height: 1.35; text-align: center; }
.act-gantt-dia-lunes { border-left-color: var(--pan-linea); }
.act-gantt-dia-descanso b,
.act-gantt-dia-descanso small { color: #b3bfcb; }
.act-gantt-dia-hoy b { background: var(--pan-rojo); color: #fff; }
.act-gantt-dia-hoy small { color: var(--pan-rojo); }

.act-gantt-cuerpo { position: relative; }

/* Fines de semana y «hoy», una sola vez para todas las filas. */
.act-gantt-fondo { position: absolute; top: 0; bottom: 0; left: var(--act-rotulo); right: 0; z-index: 0; pointer-events: none; }
.act-gantt-fondo span { border-left: 1px solid rgba(12, 39, 64, .04); }
.act-gantt-fondo .lunes { border-left-color: rgba(12, 39, 64, .13); }
.act-gantt-fondo .sabado { background: rgba(12, 39, 64, .02); }
.act-gantt-fondo .descanso { background: repeating-linear-gradient(135deg, rgba(12, 39, 64, .05) 0 4px, rgba(12, 39, 64, .015) 4px 8px); }
.act-gantt-fondo .hoy { position: relative; background: rgba(211, 47, 20, .045); }
.act-gantt-fondo .hoy::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: rgba(211, 47, 20, .5); }

.act-gantt-grupo { position: relative; z-index: 1; border-top: 1px solid var(--pan-linea); }
.act-gantt-grupo:first-of-type { border-top: 0; }

.act-gantt-grupo-rotulo {
    position: sticky;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 7px 12px;
    border-right: 1px solid var(--pan-linea);
    background: #f4f7fa;
}

.act-gantt-grupo-rotulo .act-avatar-mini .material-symbols-outlined { font-size: 14px; }
.act-gantt-grupo-nombre { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-gantt-grupo-sub { flex: none; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.act-gantt-grupo-cuenta { min-width: 20px; padding: 0 6px; border-radius: 999px; background: #fff; border: 1px solid var(--pan-linea); font-family: var(--pan-mono); font-size: 10.5px; font-weight: 600; line-height: 17px; text-align: center; color: var(--pan-apagado); }
.act-gantt-grupo-atraso { padding: 0 7px; border-radius: 999px; background: #fdecea; font-size: 10px; font-weight: 700; line-height: 17px; color: var(--pan-rojo); }
.act-gantt-grupo-alerta .act-gantt-grupo-rotulo { background: #fdf3ea; }
.act-gantt-grupo-alerta .act-gantt-grupo-nombre { color: var(--pan-ambar); }

/* La carga por día: a quién se le está juntando el trabajo. */
.act-gantt-carga { align-items: center; background: rgba(244, 247, 250, .82); }
.act-gantt-carga span { margin: 0 2px; border-radius: 5px; font-family: var(--pan-mono); font-size: 10.5px; font-weight: 600; line-height: 18px; text-align: center; color: var(--pan-apagado); }
.act-gantt-carga .c1 { background: rgba(24, 95, 165, .10); }
.act-gantt-carga .c2 { background: rgba(24, 95, 165, .24); color: #0f4377; }
.act-gantt-carga .c3 { background: rgba(184, 84, 27, .30); color: #7a3a0f; }

.act-gantt-fila { position: relative; z-index: 1; min-height: 42px; border-top: 1px solid #f0f3f7; }
.act-gantt-fila:hover { background: rgba(24, 95, 165, .035); }

.act-gantt-rotulo {
    position: sticky;
    left: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 9px;
    align-items: center;
    align-content: center;
    min-width: 0;
    padding: 5px 12px 5px 20px;
    border: 0;
    border-right: 1px solid var(--pan-linea);
    background: #fff;
    text-align: left;
    font-family: inherit;
    color: inherit;
    cursor: pointer;
    transition: background .15s;
}

.act-gantt-fila:hover .act-gantt-rotulo { background: #f6f9fc; }
.act-gantt-rotulo:focus-visible { outline: 3px solid rgba(24, 95, 165, .4); outline-offset: -3px; }
.act-gantt-punto { grid-row: 1 / 3; width: 9px; height: 9px; border-radius: 50%; background: var(--act-tono, var(--pan-tenue)); }
.act-gantt-nombre { font-size: 12.5px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-gantt-sub { grid-column: 2; font-size: 10.5px; color: var(--pan-tenue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-gantt-fila-atrasada .act-gantt-sub { color: var(--pan-rojo); }

.act-gantt-pista { grid-template-rows: 24px 4px; row-gap: 3px; align-content: center; padding: 5px 0; min-width: 0; }

/* La barra ancha: lo programado, teñido de la etapa. */
.act-gantt-barra {
    grid-row: 1;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    height: 24px;
    margin: 0 2px;
    border: 1.5px solid color-mix(in srgb, var(--act-tono, #8fa1b1) 55%, transparent);
    border-left: 4px solid var(--act-acento, var(--act-tono, #8fa1b1));
    border-radius: 7px;
    background: var(--act-tono-fondo, #eef2f6);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow .18s ease, transform .12s ease;
}

.act-gantt-barra[draggable="true"] { cursor: grab; }
.act-gantt-barra[draggable="true"]:active { cursor: grabbing; }
.act-gantt-barra:hover { box-shadow: 0 10px 20px -12px rgba(12, 39, 64, .6); }
.act-gantt-vencida { border-color: var(--pan-rojo); border-left-color: var(--pan-rojo); }
.act-gantt-corta-izq { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 2px dashed var(--act-tono, #8fa1b1); }
.act-gantt-corta-der { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 2px dashed var(--act-tono, #8fa1b1); }

.act-gantt-avance { position: absolute; top: 0; bottom: 0; left: 0; background: color-mix(in srgb, var(--act-tono, #0e7c86) 26%, transparent); transition: width .5s ease; }

.act-gantt-texto {
    position: relative;
    min-width: 0;
    padding: 0 7px;
    font-size: 11.5px;
    font-weight: 600;
    color: color-mix(in srgb, var(--act-tono, var(--pan-tinta)) 70%, #0C2740);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.act-gantt-texto i { margin-left: 6px; font-style: normal; font-family: var(--pan-mono); font-size: 10.5px; opacity: .8; }
.act-gantt-nuevo { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--pan-verde); vertical-align: 1px; }

/* La cola rayada: lo que lleva de atraso, hasta hoy. */
.act-gantt-atraso {
    grid-row: 1;
    height: 24px;
    margin: 0 2px 0 -3px;
    border: 1px dashed rgba(211, 47, 20, .55);
    border-left: 0;
    border-radius: 0 7px 7px 0;
    background: repeating-linear-gradient(135deg, rgba(211, 47, 20, .24) 0 5px, rgba(211, 47, 20, .05) 5px 10px);
}

/* La raya fina: lo que realmente duró. */
.act-gantt-real { grid-row: 2; height: 4px; margin: 0 4px; border-radius: 999px; background: #0e7c86; }
.act-gantt-real-fin { background: var(--pan-verde); }

.act-gantt-fuera {
    grid-row: 1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 2px;
    padding: 0;
    border: 1.5px solid var(--act-tono, var(--pan-tenue));
    border-radius: 50%;
    background: var(--act-tono-fondo, #fff);
    color: var(--act-tono, var(--pan-apagado));
    cursor: pointer;
}

.act-gantt-fuera .material-symbols-outlined { font-size: 14px; }

/* Mientras se arrastra (Actividades.js): la barra salta de día en día y dice cuánto. */
.act-gantt-arrastrando { z-index: 5; overflow: visible; opacity: .9; box-shadow: 0 16px 30px -12px rgba(12, 39, 64, .65); }
.act-gantt-arrastrando .act-gantt-avance { display: none; }

.act-gantt-arrastrando[data-delta]:not([data-delta=""])::after {
    content: attr(data-delta);
    position: absolute;
    top: -21px;
    left: 0;
    padding: 1px 8px;
    border-radius: 6px;
    background: var(--pan-tinta);
    color: #fff;
    font-family: var(--pan-mono);
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Agenda: día por día ── */
.act-agenda {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    align-content: start;
    gap: 10px;
    padding: 2px;
    animation: act-aparece .35s ease both;
}

.act-agenda-dia { border: 1px solid var(--pan-linea); border-radius: 16px; background: var(--pan-papel); box-shadow: var(--pan-sombra-tarjeta); overflow: hidden; }
.act-agenda-hoy { border-color: var(--pan-azul); box-shadow: 0 0 0 2px rgba(24, 95, 165, .16), var(--pan-sombra-tarjeta); }
.act-agenda-pasado { opacity: .72; }

.act-agenda-cab { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #eef2f6; }
.act-agenda-dia:not(:has(.act-agenda-lista)) .act-agenda-cab { border-bottom: 0; }

.act-agenda-numero {
    flex: none;
    min-width: 42px;
    padding: 3px 6px;
    border-radius: 11px;
    background: #f1f5f9;
    font-family: var(--pan-mono);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    color: var(--pan-tinta);
}

.act-agenda-hoy .act-agenda-numero { background: var(--pan-azul); color: #fff; }
.act-agenda-descanso .act-agenda-numero { color: var(--pan-tenue); }
.act-agenda-nombre { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.act-agenda-nombre b { font-size: 14.5px; font-weight: 700; color: var(--pan-tinta); }
.act-agenda-nombre small { font-size: 11.5px; color: var(--pan-tenue); }

.act-agenda-lista { display: flex; flex-direction: column; }

.act-agenda-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    padding: 12px 14px 12px 20px;
    border: 0;
    border-bottom: 1px solid #f0f3f7;
    background: none;
    text-align: left;
    font-family: var(--pan-sans);
    color: var(--pan-tinta);
    cursor: pointer;
    transition: background .15s;
}

.act-agenda-item:last-child { border-bottom: 0; }
.act-agenda-item:hover { background: #f6f9fc; }
.act-agenda-item::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--act-tono, var(--pan-tenue)); }
.act-agenda-item-nombre { font-size: 15px; font-weight: 600; line-height: 1.3; }
.act-agenda-tramo { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--pan-tenue); }

/* ── Diálogos del módulo (reprogramar, tarjeta de la barra) ── */
.pan-modal-caja.act-dialogo { width: min(560px, 100%); }
.pan-modal-caja.act-tarjeta-modal { width: min(660px, 100%); }

.act-dialogo-cuerpo { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 18px; font-family: var(--pan-sans); color: var(--pan-tinta); }

.act-dialogo-antes,
.act-dialogo-pie { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 13px; line-height: 1.45; color: var(--pan-apagado); }
.act-dialogo-antes { padding: 10px 12px; border-radius: 11px; background: #f4f7fa; }
.act-dialogo-antes .material-symbols-outlined,
.act-dialogo-pie .material-symbols-outlined { flex: none; font-size: 18px; color: var(--pan-azul); margin-top: 1px; }
.act-dialogo-antes b { color: var(--pan-tinta); }

.act-dialogo-fechas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.act-dialogo-campo { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; }
.act-dialogo-campo small { font-size: 11.5px; color: var(--pan-tenue); }
.act-dialogo-campo input[type="date"] { min-height: 42px; font-size: 15px; border-radius: 9px; }
.act-dialogo-nota { min-height: 58px; resize: vertical; font-size: 14px; border-radius: 9px; }
.act-dialogo-atajos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.act-dialogo-atajos .act-frase { min-height: 32px; font-size: 12.5px; }
.act-dialogo-casilla { display: flex; align-items: center; gap: 9px; font-size: 13.5px; line-height: 1.35; }
.act-dialogo-botones { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 2px; }
.act-dialogo-botones-ancho { justify-content: flex-start; padding-top: 10px; border-top: 1px solid var(--pan-linea); }
.act-tarjeta-ultimo-grande { margin: 0; padding: 9px 12px; font-size: 13px; }
.act-tarjeta-ultimo-grande > span:last-child { white-space: normal; }

@media (max-width: 1100px) {
    .act-gantt-marco,
    .act-agenda { height: calc(100vh - 140px); min-height: 480px; }
    .pan-filtros.act-crono-filtros { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
}

@media (max-width: 760px) {
    .act-gantt,
    .act-gantt-mes { --act-rotulo: 148px; --act-dia-min: 40px; }
    .act-gantt-grupo-sub { display: none; }
    .act-gantt-rotulo { padding-left: 10px; }
    .act-agenda { display: flex; flex-direction: column; height: auto; min-height: 0; overflow: visible; }
    .act-dialogo-fechas { grid-template-columns: 1fr; }
    .act-dialogo-botones .rz-button { flex: 1 1 auto; }
    .act-leyenda { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .act-leyenda::-webkit-scrollbar { display: none; }
    .act-leyenda-item { flex: none; }
    .pan-filtros.act-crono-filtros { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
    .act-crono-filtros > .pan-filtro-acciones .rz-button { flex: 1 1 auto; }
    .act-crono-filtros .rz-selectbutton { display: flex; width: 100%; }
    .act-crono-filtros .rz-selectbutton .rz-button { flex: 1 1 0; justify-content: center; padding-left: 6px; padding-right: 6px; }
    /* En el teléfono manda la agenda; agrupar es cosa del Gantt de escritorio. */
    .act-crono-filtros > .act-crono-agrupar { display: none; }
    .act-crono-flechas { display: flex; }
    .act-crono-flechas .rz-button { flex: 1 1 0; }
    .act-leyenda-cola { margin-left: 0; flex: none; }
}

/* ── En papel ── */
@page act-apaisada { size: A4 landscape; margin: 10mm; }

@media print {
    .act-crono { page: act-apaisada; }
    .act-crono,
    .act-crono * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    .act-gantt-marco,
    .act-agenda { height: auto !important; min-height: 0 !important; overflow: visible !important; border: 0; box-shadow: none; animation: none; }
    .act-gantt { --act-rotulo: 210px; --act-dia-min: 0px; min-width: 0; }
    .act-gantt-cab,
    .act-gantt-esquina,
    .act-gantt-rotulo,
    .act-gantt-grupo-rotulo { position: static; box-shadow: none; }
    .act-gantt-fila,
    .act-gantt-grupo,
    .act-agenda-dia { break-inside: avoid; }
    .act-agenda { display: block; }
    .act-agenda-dia { margin-bottom: 8px; box-shadow: none; opacity: 1; }
    .act-leyenda-item { border: 0; padding: 0 10px 0 0; }
    .act-leyenda-item.apagado { display: none; }
}

/* ═══════════════════ Indicadores ═══════════════════ */

.pan-tira.act-ana-tira { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pan-filtros.act-ana-filtros { grid-template-columns: max-content minmax(150px, 190px) minmax(150px, 190px) minmax(0, 1fr); }
.act-ana-nota { font-size: 11.5px; color: var(--pan-tenue); text-align: right; line-height: 1.35; }

.act-ana-dos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; align-items: stretch; }

/* Los bloques crecen con su contenido: el tablero se desplaza entero. Van sobre
   un <section> pelado, así que el fondo se declara aquí (.pan-tarjeta trae marco
   y sombra, no color). */
.act-bloque {
    display: block;
    flex: 0 0 auto;
    padding: 16px 20px 18px !important;
    background: var(--pan-papel);
    font-family: var(--pan-sans);
    color: var(--pan-tinta);
    animation: act-aparece .4s ease both;
}

.act-bloque-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.act-bloque-cab h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.005em; color: var(--pan-tinta); }
.act-bloque-cab p { margin: 3px 0 0; max-width: 78ch; font-size: 11.5px; line-height: 1.45; color: var(--pan-tenue); }

.act-bloque-cifra { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.act-bloque-cifra small { font-size: 9.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--pan-tenue); }
.act-bloque-cifra b { font-family: var(--pan-mono); font-size: 18px; font-weight: 600; }

.act-bloque-leyenda { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; font-size: 11px; color: var(--pan-apagado); }
.act-bloque-leyenda span { display: inline-flex; align-items: center; gap: 5px; }
.act-muestra { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.act-muestra-plan { background: #cfdcea; }
.act-muestra-hecho { background: var(--pan-verde); }
.act-muestra-problema { border-radius: 50%; background: var(--pan-rojo); }
.act-bloque-vacio { margin: 8px 0 4px; font-size: 13px; font-style: italic; color: var(--pan-tenue); }

/* ── El flujo: nodos y tramos ── */
.act-flujo { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto; align-items: center; gap: 0; }

.act-flujo-nodo { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 84px; text-align: center; }

.act-flujo-nodo .material-symbols-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--act-tono-fondo, #eef2f6);
    color: var(--act-tono, var(--pan-tinta));
    font-size: 23px;
    box-shadow: 0 12px 24px -16px var(--act-tono, rgba(12, 39, 64, .5));
}

.act-flujo-nodo b { font-size: 11.5px; font-weight: 600; color: var(--pan-apagado); }

.act-flujo-tramo { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 8px 22px; text-align: center; }
.act-flujo-tramo::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 2px; background: repeating-linear-gradient(90deg, #c9d4df 0 6px, transparent 6px 11px); }
.act-flujo-tramo b { position: relative; padding: 2px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--pan-linea); font-family: var(--pan-mono); font-size: 14px; font-weight: 600; margin-top: 10px; }
.act-flujo-tramo small { font-size: 11px; line-height: 1.3; color: var(--pan-tenue); max-width: 22ch; }
.act-flujo-lento b { border-color: rgba(184, 84, 27, .5); background: #fdf1e7; color: var(--pan-ambar); }

.act-flujo-pie { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #eef2f6; font-size: 12.5px; color: var(--pan-apagado); }
.act-flujo-pie .material-symbols-outlined { font-size: 18px; color: var(--pan-rojo); }
.act-flujo-pie b { font-family: var(--pan-mono); color: var(--pan-tinta); }

/* ── Semana a semana ── */
.act-semanas { display: grid; grid-template-columns: repeat(var(--act-semanas, 5), minmax(0, 1fr)); gap: 10px; height: 190px; align-items: end; }
.act-semana { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.act-semana-barras { flex: 1 1 auto; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 5px; min-height: 0; border-bottom: 1px solid var(--pan-linea); padding-top: 18px; }

.act-semana-plan,
.act-semana-hecho { position: relative; flex: 0 1 26px; min-width: 10px; border-radius: 6px 6px 0 0; transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.act-semana-plan { background: linear-gradient(180deg, #cfdcea, #e3ebf3); }
.act-semana-hecho { background: linear-gradient(180deg, #1c8a5a, #35a877); }
.act-semana-barras em { position: absolute; left: 50%; top: -16px; transform: translateX(-50%); font-family: var(--pan-mono); font-size: 10.5px; font-style: normal; font-weight: 600; color: var(--pan-apagado); }

.act-semana-problema { position: absolute; top: 0; right: 8%; min-width: 17px; padding: 0 5px; border-radius: 999px; background: var(--pan-rojo); color: #fff; font-family: var(--pan-mono); font-size: 10px; font-weight: 600; line-height: 17px; text-align: center; }
.act-semana-pie { flex: none; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--pan-tenue); white-space: nowrap; }

/* ── Barras horizontales (motivos) ── */
.act-barras { display: flex; flex-direction: column; gap: 9px; }
.act-barra-fila { display: grid; grid-template-columns: minmax(150px, 38%) minmax(0, 1fr) 34px; align-items: center; gap: 10px; font-size: 12.5px; }
.act-barra-rotulo { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-barra-rotulo .material-symbols-outlined { flex: none; font-size: 17px; color: var(--pan-rojo); }
.act-barra-pista { height: 10px; border-radius: 999px; background: #f1f4f8; overflow: hidden; }
.act-barra-roja { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #d32f14, #e8694f); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.act-barra-fila > b { font-family: var(--pan-mono); font-size: 12.5px; text-align: right; }

/* ── Desgloses ── */
.act-desglose { display: flex; flex-direction: column; }

.act-desglose-cab,
.act-desglose-fila { display: grid; grid-template-columns: minmax(170px, 26%) minmax(0, 1fr) 62px 56px 56px 72px 72px; align-items: center; gap: 12px; }

.act-desglose-cab { padding: 0 0 7px; border-bottom: 1px solid var(--pan-linea); font-size: 9.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--pan-tenue); }
.act-desglose-cab span:nth-child(n+3) { text-align: right; }
.act-desglose-fila { padding: 8px 0; border-bottom: 1px solid #f0f3f7; font-size: 12.5px; transition: background .15s; }
.act-desglose-fila:last-child { border-bottom: 0; }
.act-desglose-fila:hover { background: #f8fafc; }

.act-desglose-nombre { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.act-desglose-nombre > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-desglose-barra { display: flex; align-items: center; gap: 8px; min-width: 0; }
.act-desglose-barra em { flex: none; font-family: var(--pan-mono); font-size: 11.5px; font-style: normal; font-weight: 600; color: var(--pan-apagado); }
.act-desglose-num { font-family: var(--pan-mono); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.act-desglose-cero { color: #c2ccd6; }

.act-apilada { display: flex; min-width: 6px; height: 12px; border-radius: 999px; overflow: hidden; background: #eef2f6; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.act-apilada i { display: block; flex: 0 0 0; min-width: 0; }
.act-apilada .a-tiempo { background: var(--pan-verde); }
.act-apilada .tarde { background: #e0a23a; }
.act-apilada .vencidas { background: var(--pan-rojo); }
.act-apilada .abiertas { background: #c9d4df; }

/* ── Cómo se reporta ── */
.act-uso { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.act-uso > div { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 12px; border-radius: 12px; background: #f6f8fb; }
.act-uso .material-symbols-outlined { font-size: 19px; color: var(--pan-azul); }
.act-uso b { font-family: var(--pan-mono); font-size: 17px; font-weight: 600; line-height: 1.2; }
.act-uso small { font-size: 10.5px; color: var(--pan-tenue); }

.act-horas-rotulo { margin: 16px 0 6px; font-size: 9.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--pan-tenue); }
.act-horas { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; height: 74px; align-items: end; padding-bottom: 14px; }
.act-hora { position: relative; display: flex; align-items: flex-end; height: 100%; border-bottom: 1px solid var(--pan-linea); }
.act-hora i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #185FA5, #5b97cf); transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.act-hora small { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); font-family: var(--pan-mono); font-size: 9.5px; color: var(--pan-tenue); }

/* ── Las más atrasadas ── */
.act-atrasadas { display: flex; flex-direction: column; }

.act-atrasada-fila {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 4px;
    border: 0;
    border-bottom: 1px solid #f0f3f7;
    background: none;
    text-align: left;
    font-family: inherit;
    color: inherit;
    cursor: pointer;
    transition: background .15s;
}

.act-atrasada-fila:last-child { border-bottom: 0; }
.act-atrasada-fila:hover { background: #f8fafc; }
.act-atrasada-dias { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 46px; padding: 3px 6px; border-radius: 10px; background: #fdecea; color: var(--pan-rojo); line-height: 1.1; }
.act-atrasada-dias b { font-family: var(--pan-mono); font-size: 16px; font-weight: 600; }
.act-atrasada-dias small { font-size: 9px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.act-atrasada-texto { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.act-atrasada-texto b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-atrasada-texto small { font-size: 11.5px; color: var(--pan-tenue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1320px) {
    .pan-tira.act-ana-tira { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .act-ana-dos { grid-template-columns: 1fr; }
    .pan-filtros.act-ana-filtros { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
    .act-ana-nota { text-align: left; }
}

@media (max-width: 760px) {
    .pan-tira.act-ana-tira { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .act-bloque { padding: 14px 14px 16px !important; }
    .act-bloque-cab { flex-direction: column; gap: 8px; }
    .act-bloque-cifra { align-items: flex-start; }
    .act-flujo { grid-template-columns: 1fr; gap: 4px; }
    .act-flujo-nodo { flex-direction: row; justify-content: flex-start; text-align: left; }
    .act-flujo-tramo { align-items: flex-start; text-align: left; padding: 2px 0 2px 58px; }
    .act-flujo-tramo::before { left: 22px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: repeating-linear-gradient(180deg, #c9d4df 0 6px, transparent 6px 11px); }
    .act-flujo-tramo b { margin-top: 0; }
    .act-flujo-tramo small { max-width: none; }
    .act-desglose { overflow-x: auto; }
    .act-desglose-cab,
    .act-desglose-fila { min-width: 640px; }
    .act-uso { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .act-ana-filtros .rz-selectbutton { display: flex; width: 100%; }
    .act-ana-filtros .rz-selectbutton .rz-button { flex: 1 1 0; justify-content: center; padding-left: 4px; padding-right: 4px; }
    .pan-filtros.act-ana-filtros { grid-template-columns: 1fr 1fr; }
    .act-ana-filtros > .pan-filtro-estado,
    .act-ana-filtros > .pan-filtro-acciones { grid-column: 1 / -1; }
}

@media print {
    .act-ana,
    .act-ana * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .act-bloque { box-shadow: none !important; break-inside: avoid; animation: none; margin-bottom: 8px; }
    .act-ana-dos { gap: 8px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   LA ORDEN DE TRABAJO (.od-) — HojaActividad.razor
   ══════════════════════════════════════════════════════════════════════════

   La hoja carta de una actividad. La pintan el diálogo de vista previa del
   formulario, la página actividad/imprimir/{id} y Chrome headless para el
   PDF; al imprimir la vista previa se copia a un marco con estas mismas hojas
   (actividades.imprimirHoja), así que TODO su aspecto vive aquí y no en la
   página. Nada de @page en esta hoja: es global, y una regla de página aquí
   mandaría también en los demás documentos de la plataforma. Cada vista pone
   la suya.

   Acabado del resto de los documentos (requerimiento, liquidación): cabecera
   con degradado claro y filo inferior tinta, rótulos en versalitas espaciadas,
   cifras en monoespaciada y tablas sin rejilla, sólo con filetes. */

.od-hoja {
    --od-tinta: #0C2740;
    --od-apagado: #5b7186;
    --od-tenue: #8fa1b1;
    --od-linea: #e3e9f0;
    --od-azul: #185FA5;
    position: relative;
    width: 8.5in;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto 16px;
    padding: .42in .5in .38in;
    background: #fff;
    color: var(--od-tinta);
    font-family: var(--pan-sans);
    font-size: 10.5px;
    line-height: 1.4;
    border-radius: 3px;
    box-shadow: 0 2px 12px rgba(12, 39, 64, .10), 0 34px 70px -44px rgba(12, 39, 64, .45);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.od-hoja * { box-sizing: border-box; }
.od-mono { font-family: var(--pan-mono); font-variant-numeric: tabular-nums; }
.od-etq,
.od-rotulo { font-size: 8px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--od-apagado); }
.od-apunte { font-size: 9px; font-weight: 400; color: var(--od-apagado); }
.od-falta { color: #b8541b; font-weight: 600; }

/* ── Vista previa: franja arriba y marca de agua ── */
.od-borrador {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 12px;
    padding: 8px 12px;
    border: 1px dashed #d9b36a;
    border-radius: 10px;
    background: #fff8e6;
    color: #6b5a14;
    font-size: 10.5px;
    line-height: 1.45;
}
.od-borrador .material-symbols-outlined { font-size: 18px; color: #a07c10; flex: none; }
.od-borrador-falta { display: block; margin-top: 2px; }
.od-marca {
    position: absolute;
    top: 40%;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 78px;
    font-weight: 700;
    letter-spacing: .14em;
    color: rgba(224, 161, 40, .10);
    transform: rotate(-24deg);
    pointer-events: none;
    user-select: none;
    z-index: 0;
}
.od-hoja > *:not(.od-marca) { position: relative; z-index: 1; }

/* ── Cabecera ── */
.od-cabeza {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    border: 1px solid var(--od-linea);
    border-bottom: 3px solid var(--od-tinta);
    border-radius: 12px;
    background: linear-gradient(180deg, #e9f0f7 0%, #f7fafc 100%);
}
.od-marca-empresa { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; }
.od-marca-empresa img { height: 46px; width: auto; }
.od-empresa { font-size: 8.5px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.od-cabeza-centro { flex: 1 1 auto; min-width: 0; text-align: center; }
.od-numero { font-size: 16px; font-weight: 600; line-height: 1.1; color: var(--od-azul); }
.od-numero-rotulo { display: block; margin-bottom: 1px; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--od-tinta); }
.od-titulo { margin: 4px 0 1px; font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--od-tinta); }
.od-sub { font-size: 9.5px; color: var(--od-apagado); }
.od-cabeza-derecha { flex: none; text-align: right; }
.od-fecha { margin: 1px 0 4px; font-size: 11px; font-weight: 600; white-space: nowrap; }

/* ── Distintivos ── */
.od-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .03em;
    white-space: nowrap;
    background: #eef2f6;
    color: var(--od-apagado);
}
.od-punto { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.od-e-sin-asignar { background: #fdf1e7; color: #b8541b; }
.od-e-asignada    { background: #e8f1fa; color: #185FA5; }
.od-e-ejecucion   { background: #e3f4f5; color: #0e7c86; }
.od-e-problema    { background: #fdecea; color: #d32f14; }
.od-e-terminada   { background: #e6f6ee; color: #1c8a5a; }
.od-e-verificada  { background: #e6ebf0; color: #0C2740; }
.od-chip-prio { background: #fff; border: 1px solid var(--od-color, #8fa1b1); color: var(--od-color, #8fa1b1); }
.od-chip-pausa { margin-left: 5px; background: #fff1c2; color: #6b5a14; }
.od-s-0 { background: #fdf1e7; color: #b8541b; }
.od-s-1 { background: #e8f1fa; color: #185FA5; }
.od-s-2 { background: #e6f6ee; color: #1c8a5a; }

/* ── Qué, dónde, cuándo y quién ── */
.od-tarjeta { border: 1px solid var(--od-linea); border-radius: 12px; background: #fff; }
.od-campos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px 16px;
    margin: 12px 0 0;
    padding: 10px 14px 11px;
}
.od-campo { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.od-campo-doble { grid-column: span 2; }
.od-campo-ancho { grid-column: 1 / -1; }
.od-val { font-size: 11px; font-weight: 600; color: var(--od-tinta); overflow-wrap: anywhere; }
.od-pausa { padding-top: 7px; border-top: 1px dashed var(--od-linea); }
.od-pausa .od-etq { color: #a07c10; }
.od-pausa .od-val { font-weight: 500; color: #6b5a14; }

/* ── Secciones ── */
.od-seccion { margin: 13px 0 0; }
.od-h {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 5px;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--od-linea);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--od-apagado);
    break-after: avoid;
}
.od-h .material-symbols-outlined { font-size: 13px; align-self: center; }
.od-cuenta { margin-left: auto; font-size: 9px; font-weight: 600; letter-spacing: .02em; text-transform: none; color: var(--od-tenue); }
.od-texto { margin: 0; font-size: 11px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.od-nota { margin: 6px 0 0; font-size: 9.5px; line-height: 1.45; color: var(--od-apagado); }
.od-nota b { color: var(--od-tinta); }
.od-nota-docs { display: flex; flex-wrap: wrap; gap: 3px 14px; }
.od-unidad-junto { display: none; }

/* ── Tablas: filetes, sin rejilla ── */
.od-tabla-marco { width: 100%; }
.od-tabla { width: 100%; border-collapse: collapse; }
.od-tabla th {
    padding: 4px 6px;
    border-bottom: 1.5px solid var(--od-tinta);
    text-align: left;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--od-apagado);
}
.od-tabla td { padding: 4px 6px; border-bottom: 1px solid var(--od-linea); font-size: 10.5px; vertical-align: top; }
.od-tabla thead { display: table-header-group; }
.od-tabla tr { break-inside: avoid; }
.od-col-no { width: 28px; }
.od-col-num { width: 46px; text-align: right !important; }
.od-col-unidad { width: 66px; }
.od-col-origen { width: 122px; }
td.od-col-origen { font-size: 9.5px; color: var(--od-apagado); }
.od-col-situacion { width: 112px; }
.od-col-hecho { width: 180px; white-space: nowrap; }
.od-hecho td { color: var(--od-apagado); }
.od-casilla {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border: 1.3px solid var(--od-tinta);
    border-radius: 3px;
    vertical-align: -2px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}
.od-casilla-marcada { background: var(--od-tinta); color: #fff; }

/* ── Resultado esperado: contra esto se verifica ── */
.od-resultado { padding: 8px 12px 10px; background: linear-gradient(180deg, #f7fafc 0%, #fff 100%); }
.od-resultado .od-h { border-bottom: 0; padding-bottom: 0; }

/* ── Ejecución ── */
.od-resumen { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-bottom: 5px; font-size: 10.5px; }
.od-resumen > span { display: inline-flex; align-items: baseline; gap: 6px; }
.od-hitos { list-style: none; margin: 0; padding: 0; }
.od-hito {
    display: grid;
    grid-template-columns: 104px 150px minmax(0, 1fr);
    gap: 8px;
    padding: 3px 0;
    border-bottom: 1px dashed var(--od-linea);
    font-size: 10px;
    break-inside: avoid;
}
.od-hito-etapa { font-weight: 700; }
.od-h-ejecucion .od-hito-etapa { color: #0e7c86; }
.od-h-problema .od-hito-etapa { color: #d32f14; }
.od-h-terminada .od-hito-etapa { color: #1c8a5a; }
.od-h-verificada .od-hito-etapa { color: #0C2740; }
.od-h-devuelta .od-hito-etapa { color: #b8541b; }
.od-llenar { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.od-llenar-fila { display: flex; align-items: flex-end; gap: 8px; }
.od-llenar-fila .od-etq { flex: none; }
.od-linea { flex: 1 1 auto; height: 14px; border-bottom: 1px solid #9fb0c1; }

/* ── Fotografías ── */
.od-galeria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.od-foto { margin: 0; break-inside: avoid; }
.od-foto img {
    display: block;
    width: 100%;
    height: 1.5in;
    object-fit: cover;
    border: 1px solid var(--od-linea);
    border-radius: 8px;
    background: #f3f6f9;
}
.od-foto figcaption { margin-top: 2px; font-size: 8.5px; line-height: 1.3; color: var(--od-apagado); }
.od-foto-texto { display: block; color: var(--od-tinta); }

/* ── Firmas ── */
.od-firmas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 30px; break-inside: avoid; }
.od-firma { display: flex; flex-direction: column; text-align: center; }
.od-firma .od-etq { text-align: left; }
.od-firma-linea { height: 34px; border-bottom: 1.5px solid var(--od-tinta); }
.od-firma b { margin-top: 3px; font-size: 10px; }

/* ── Pantallas angostas: la hoja se vuelve fluida (en papel sigue siendo carta) ── */
@media screen and (max-width: 860px) {
    .od-hoja { width: auto; padding: 14px 14px 12px; border-radius: 12px; box-shadow: 0 1px 6px rgba(12, 39, 64, .10); font-size: 11.5px; }
    .od-cabeza { flex-wrap: wrap; justify-content: center; gap: 8px 14px; }
    .od-cabeza-centro { flex-basis: 100%; order: 2; }
    .od-cabeza-derecha { order: 3; width: 100%; text-align: center; }
    .od-campos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .od-campo-doble { grid-column: 1 / -1; }
    .od-val,
    .od-texto,
    .od-tabla td { font-size: 12.5px; }
    .od-tabla-marco { overflow-x: auto; }
    .od-col-origen,
    .od-col-unidad { display: none; }
    .od-unidad-junto { display: inline; font-family: var(--pan-sans); font-size: 11px; color: var(--od-apagado); }
    .od-col-num { width: auto; white-space: nowrap; }
    .od-col-hecho { width: auto; white-space: normal; }
    .od-hito { grid-template-columns: 1fr; gap: 0; }
    .od-galeria { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .od-foto img { height: 120px; }
    .od-firmas { grid-template-columns: 1fr; gap: 18px; }
    .od-marca { font-size: 42px; }
}

/* ── Papel ── */
@media print {
    .od-hoja { width: auto; max-width: none; margin: 0; padding: 0; border-radius: 0; box-shadow: none; }
    .od-borrador { background: #fff; }
    .od-marca { position: fixed; top: 44%; }
    .od-seccion, .od-campos { break-inside: auto; }
}

/* El marco con que se imprime la vista previa (actividades.imprimirHoja). */
body.od-impresion { margin: 0; padding: 0; background: #fff; }
