/* ACTIMAGEN - estilos (único sistema de estilos, con variables). Sin estilos en línea (CSP). */

:root {
    --act-marca: #0a5a3a;
    --act-marca-2: #0b7a6a;
    --act-fondo: #0b1512;
    --act-superficie: #13221d;
    --act-superficie-2: #1a2e27;
    --act-borde: #2d463d;
    --act-texto: #f1f7f4;
    --act-tenue: #a9c2b8;
    --act-acento: #7be0b9;
    --act-acento-texto: #06261a;
    --act-ok: #4ade80;
    --act-curso: #60a5fa;
    --act-aviso: #fbbf24;
    --act-error: #fb7185;
    --act-boton: #20382f;
    --act-boton-borde: #3c5a4e;
    --act-sombra: 0 6px 24px rgba(0, 0, 0, 0.35);
    --act-radio: 12px;
    --act-fuente: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    --act-alto-nav: 64px;
    color-scheme: dark;
}

@media (prefers-color-scheme: light) {
    :root {
        --act-fondo: #f3f8f6;
        --act-superficie: #ffffff;
        --act-superficie-2: #e8f1ed;
        --act-borde: #b9cec6;
        --act-texto: #0b1f17;
        --act-tenue: #3b584c;
        --act-acento: #0a5a3a;
        --act-acento-texto: #ffffff;
        --act-ok: #116b3c;
        --act-curso: #1d4ed8;
        --act-aviso: #8a5300;
        --act-error: #b42318;
        --act-boton: #e3eee9;
        --act-boton-borde: #9fbbb0;
        --act-sombra: 0 6px 24px rgba(10, 40, 30, 0.15);
        color-scheme: light;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

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

body {
    background: var(--act-fondo);
    color: var(--act-texto);
    font-family: var(--act-fuente);
    font-size: 1rem;
    line-height: 1.5;
    padding-bottom: calc(var(--act-alto-nav) + env(safe-area-inset-bottom, 0px));
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--act-acento);
}

:focus-visible {
    outline: 3px solid var(--act-acento);
    outline-offset: 3px;
}

.act-solo-lector {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.act-oculto {
    display: none;
}

.act-saltar {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: 100;
    background: var(--act-acento);
    color: var(--act-acento-texto);
    padding: 10px 14px;
    border-radius: 8px;
}

.act-saltar:focus {
    top: 8px;
}

.act-icono {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    vertical-align: -0.25em;
}

/* ---------- Cabecera y estado ---------- */

.act-cabecera {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--act-superficie);
    border-bottom: 1px solid var(--act-borde);
    padding: calc(6px + env(safe-area-inset-top, 0px)) 12px 6px;
}

.act-cabecera-marca {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
}

.act-cabecera-simbolo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.act-cabecera-nombre {
    font-weight: 800;
    letter-spacing: 0.06em;
}

.act-viaje-activo {
    margin-left: auto;
    max-width: 55%;
    min-height: 40px;
    padding: 4px 12px;
    border: 1px solid var(--act-boton-borde);
    border-radius: 999px;
    background: var(--act-boton);
    color: var(--act-texto);
    font: inherit;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.act-estados {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    font-size: 0.8125rem;
}

.act-estado {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--act-tenue);
}

.act-estado--gps-fijo,
.act-estado--red-si,
.act-estado--cola-ok,
.act-estado--espacio-ok {
    color: var(--act-ok);
}

.act-estado--gps-aprox,
.act-estado--gps-buscando,
.act-estado--cola-pendiente,
.act-estado--espacio-poco {
    color: var(--act-aviso);
}

.act-estado--gps-sin,
.act-estado--red-no {
    color: var(--act-error);
}

.act-estado--cola-subiendo {
    color: var(--act-curso);
}

.act-barra-subida {
    display: block;
    width: 100%;
    height: 4px;
    margin-top: 4px;
    accent-color: var(--act-curso);
}

.act-banda {
    margin: 0;
    padding: 10px 12px;
    border-radius: 0;
    gap: 8px;
}

.act-banda--info {
    background: var(--act-superficie-2);
    border-bottom: 1px solid var(--act-borde);
}

/* ---------- Vistas ---------- */

.act-principal {
    max-width: 1100px;
    margin: 0 auto;
}

.act-vista {
    padding: 12px 12px 24px;
}

.act-titulo {
    font-size: 1.5rem;
    margin: 4px 0 12px;
    line-height: 1.2;
}

.act-titulo:focus {
    outline: none;
}

.act-subtitulo {
    font-size: 1.125rem;
    margin: 20px 0 8px;
}

.act-tarjeta-panel .act-subtitulo {
    margin-top: 0;
}

.act-tarjeta-panel {
    background: var(--act-superficie);
    border: 1px solid var(--act-borde);
    border-radius: var(--act-radio);
    padding: 14px;
    margin: 12px 0;
}

.act-ayuda {
    color: var(--act-tenue);
    font-size: 0.875rem;
    margin: 4px 0;
}

.act-tenue {
    color: var(--act-tenue);
    font-size: 0.875rem;
}

.act-vacio {
    color: var(--act-tenue);
    padding: 24px 8px;
    text-align: center;
}

.act-alerta {
    background: color-mix(in srgb, var(--act-aviso) 16%, var(--act-superficie));
    border: 1px solid color-mix(in srgb, var(--act-aviso) 55%, transparent);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 8px 0;
}

.act-alerta--error {
    background: color-mix(in srgb, var(--act-error) 16%, var(--act-superficie));
    border-color: color-mix(in srgb, var(--act-error) 60%, transparent);
}

.act-fila {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.act-fila--acciones {
    margin: 10px 0;
}

/* ---------- Botones y formularios ---------- */

.act-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 48px;
    padding: 8px 16px;
    border: 1px solid var(--act-boton-borde);
    border-radius: 10px;
    background: var(--act-boton);
    color: var(--act-texto);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.act-boton:hover {
    border-color: var(--act-acento);
}

.act-boton:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.act-boton--principal {
    background: var(--act-acento);
    border-color: var(--act-acento);
    color: var(--act-acento-texto);
}

.act-boton--peligro {
    border-color: var(--act-error);
    color: var(--act-error);
}

.act-boton--pequeno {
    min-height: 44px;
    padding: 6px 12px;
    font-size: 0.9375rem;
}

.act-boton-redondo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

.act-boton-redondo[aria-pressed="true"] {
    background: #fbbf24;
    color: #1a1200;
}

.act-boton-redondo:disabled {
    opacity: 0.4;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--act-boton-borde);
    border-radius: 10px;
    background: var(--act-fondo);
    color: var(--act-texto);
    font: inherit;
}

textarea {
    resize: vertical;
}

.act-etiqueta {
    display: block;
    font-weight: 600;
    margin: 8px 0 4px;
}

.act-casilla {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0;
}

.act-casilla input {
    width: 24px;
    height: 24px;
    margin-top: 2px;
    flex: none;
    accent-color: var(--act-acento);
}

.act-casilla label {
    display: flex;
    flex-direction: column;
}

.act-filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin: 8px 0;
}

.act-filtro .act-etiqueta {
    margin-top: 0;
    font-size: 0.875rem;
}

.act-etiqueta-estado {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    border: 1px solid currentColor;
}

.act-etiqueta-estado--ok {
    color: var(--act-ok);
}

.act-etiqueta-estado--error {
    color: var(--act-error);
}

.act-etiqueta-estado--info {
    color: var(--act-tenue);
}

/* ---------- Listas ---------- */

.act-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.act-lista-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--act-superficie);
    border: 1px solid var(--act-borde);
    border-radius: var(--act-radio);
    padding: 10px 12px;
}

.act-lista-item--bloque {
    display: block;
}

.act-lista-item--activo {
    border-color: var(--act-acento);
    box-shadow: inset 4px 0 0 var(--act-acento);
}

.act-lista-texto {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 200px;
}

.act-lista-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.act-lista-simple {
    margin: 0;
    padding-left: 20px;
}

.act-lista-simple li {
    margin: 4px 0;
}

/* ---------- Cámara ---------- */

.act-vista--camara {
    padding: 0;
    background: #000;
    color: #fff;
    overflow: hidden;
}

/* La cámara ocupa exactamente el alto libre entre la cabecera y la navegación: el disparador siempre a la vista */
.act-vista--camara {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--act-alto-cabecera, 96px) - var(--act-alto-nav) - env(safe-area-inset-bottom, 0px));
    min-height: 420px;
}

.act-vista--camara[hidden] {
    display: none;
}

/* En la cámara solo se deja el aviso de versión nueva (los demás están en la barra de estado) */
body[data-vista="camara"] .act-banda:not(#act-actualizacion) {
    display: none;
}

.act-camara {
    position: relative;
    flex: 1 1 auto;
    min-height: 160px;
    background: #000;
    overflow: hidden;
}

.act-camara-visor {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.act-destello {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
}

.act-destello--activo {
    animation: act-destello 0.35s ease-out;
}

@keyframes act-destello {
    from { opacity: 0.85; }
    to { opacity: 0; }
}

.act-camara-contexto {
    position: absolute;
    left: 8px;
    top: 8px;
    margin: 0;
    max-width: calc(100% - 16px);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.act-camara-mensaje {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.82);
    text-align: center;
}

.act-camara-grabacion {
    position: absolute;
    right: 8px;
    top: 8px;
    margin: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(180, 0, 0, 0.85);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.act-punto-rec {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 50%;
    background: #fff;
}

.act-camara-controles {
    flex: none;
    padding: 8px 10px 10px;
    background: #000;
}

.act-camara-modos {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.act-modo {
    min-width: 96px;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.act-modo[aria-pressed="true"] {
    background: #fff;
    color: #000;
}

.act-camara-fila {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.act-camara-ultimo {
    grid-column: 1;
    justify-self: start;
}

/* Posiciones fijas: el disparador queda centrado aunque aún no haya «última captura» */
.act-disparo {
    grid-column: 2;
}

.act-camara-lateral {
    grid-column: 3;
}

.act-ultimo-ver {
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 10px;
    border: 2px solid #fff;
    background: #222;
    overflow: hidden;
    cursor: pointer;
}

.act-ultimo-ver img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.act-camara-lateral {
    justify-self: end;
    display: flex;
    gap: 8px;
}

.act-disparo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 6px solid #fff;
    background: #fff;
    box-shadow: inset 0 0 0 4px #000;
    cursor: pointer;
}

.act-disparo:active {
    transform: scale(0.95);
}

.act-disparo:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.act-disparo--video {
    background: #e11d48;
}

.act-disparo--grabando {
    background: #e11d48;
    border-radius: 24px;
}

.act-camara-rapidas {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px;
    margin-top: 8px;
}

.act-camara-grupo {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.act-camara-rapidas .act-boton {
    padding: 6px 10px;
}

.act-vista--camara .act-boton {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

/* ---------- Galería ---------- */

.act-resumen {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 10px 12px;
    background: var(--act-superficie);
    border: 1px solid var(--act-borde);
    border-radius: var(--act-radio);
    font-size: 0.9375rem;
}

.act-resumen-dato strong {
    font-variant-numeric: tabular-nums;
}

.act-resumen-dato--0 {
    color: var(--act-error);
}

.act-rejilla {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.act-tarjeta {
    background: var(--act-superficie);
    border: 1px solid var(--act-borde);
    border-radius: var(--act-radio);
    overflow: hidden;
}

.act-tarjeta--marcada {
    border-color: var(--act-acento);
    box-shadow: 0 0 0 2px var(--act-acento);
}

.act-tarjeta-boton {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    background: var(--act-superficie-2);
    color: var(--act-tenue);
    cursor: pointer;
}

.act-tarjeta-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.act-tarjeta-sin {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.act-tarjeta-sin .act-icono {
    width: 40%;
    height: 40%;
}

.act-tarjeta-tipo {
    position: absolute;
    left: 6px;
    bottom: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.8125rem;
}

.act-tarjeta-marca {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: rgba(0, 0, 0, 0.45);
    display: grid;
    place-items: center;
    color: #fff;
}

.act-tarjeta-marca--si {
    background: var(--act-acento);
    color: var(--act-acento-texto);
}

.act-tarjeta-pie {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    padding: 6px 8px;
}

.act-tarjeta-fecha {
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    flex: 1 1 100%;
}

.act-insignia {
    display: inline-flex;
    color: var(--act-tenue);
}

.act-insignia--gps {
    color: var(--act-ok);
}

.act-insignia--aproximada {
    color: var(--act-aviso);
}

.act-insignia--manual {
    color: var(--act-curso);
}

.act-insignia--sin {
    color: var(--act-error);
}

.act-copias {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.act-copia {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--act-tenue);
    opacity: 0.6;
}

.act-copia--verificada {
    color: var(--act-ok);
    opacity: 1;
}

.act-copia--en_curso {
    color: var(--act-curso);
    opacity: 1;
}

.act-copia--error {
    color: var(--act-error);
    opacity: 1;
}

.act-copia--liberado {
    color: var(--act-aviso);
    opacity: 1;
}

.act-copias--detalle {
    flex-direction: column;
    gap: 6px;
}

.act-copias--detalle .act-copia {
    opacity: 1;
}

.act-copias--detalle .act-copia--pendiente,
.act-copias--detalle .act-copia--no {
    color: var(--act-tenue);
}

.act-copia-texto {
    color: var(--act-texto);
}

/* ---------- Ficha ---------- */

.act-volver {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.act-medio-caja {
    background: #000;
    border-radius: var(--act-radio);
    overflow: hidden;
    display: grid;
    place-items: center;
}

.act-medio {
    max-width: 100%;
    max-height: 70vh;
    display: block;
}

.act-audio {
    width: 100%;
    margin: 6px 0;
}

.act-datos {
    display: grid;
    grid-template-columns: minmax(120px, max-content) 1fr;
    gap: 6px 14px;
    margin: 12px 0;
    padding: 12px;
    background: var(--act-superficie);
    border: 1px solid var(--act-borde);
    border-radius: var(--act-radio);
}

.act-datos dt {
    color: var(--act-tenue);
    font-size: 0.875rem;
}

.act-datos dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.act-huella {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 0.8125rem;
}

.act-bloque-nota {
    margin: 12px 0;
}

.act-nota-estado {
    display: block;
    min-height: 1.5em;
}

.act-voz-lista {
    margin: 12px 0;
    padding: 12px;
    background: var(--act-superficie);
    border: 1px solid var(--act-borde);
    border-radius: var(--act-radio);
}

.act-voz {
    border-top: 1px solid var(--act-borde);
    padding-top: 8px;
    margin-top: 8px;
}

.act-progreso {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--act-superficie-2);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.act-diag--error {
    color: var(--act-error);
}

.act-diag--aviso {
    color: var(--act-aviso);
}

.act-grande {
    font-size: 2rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
    margin: 8px 0;
}

/* ---------- Navegación inferior ---------- */

.act-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    min-height: var(--act-alto-nav);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--act-superficie);
    border-top: 1px solid var(--act-borde);
}

.act-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    color: var(--act-tenue);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
}

.act-nav a .act-icono {
    width: 24px;
    height: 24px;
}

.act-nav a[aria-current="page"] {
    color: var(--act-acento);
}

/* ---------- Avisos y diálogos ---------- */

.act-aviso {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--act-alto-nav) + 12px + env(safe-area-inset-bottom, 0px));
    z-index: 50;
    max-width: 560px;
    margin: 0 auto;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--act-superficie-2);
    border: 1px solid var(--act-borde);
    box-shadow: var(--act-sombra);
    font-weight: 600;
}

.act-aviso--ok {
    border-color: var(--act-ok);
}

.act-aviso--error {
    border-color: var(--act-error);
    background: color-mix(in srgb, var(--act-error) 18%, var(--act-superficie-2));
}

.act-dialogo {
    width: min(520px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    padding: 0;
    border: 1px solid var(--act-borde);
    border-radius: 16px;
    background: var(--act-superficie);
    color: var(--act-texto);
    box-shadow: var(--act-sombra);
}

.act-dialogo::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

.act-dialogo-form {
    padding: 18px;
}

.act-dialogo-titulo {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.act-dialogo-botones {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* Página simple (vuelta de Google Drive) */
.act-pagina-simple {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 16px;
}

.act-caja {
    max-width: 480px;
    background: var(--act-superficie);
    border: 1px solid var(--act-borde);
    border-radius: 16px;
    padding: 20px;
}

/* ---------- Pantallas grandes (panel del PC) ---------- */

@media (min-width: 900px) {
    .act-rejilla {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    }

    .act-camara {
        height: min(68vh, calc(100dvh - 300px));
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- 0.2.0 · Mapa del viaje (B.1) ---------- */

.act-mapa {
    width: 100%;
    height: min(62vh, 640px);
    min-height: 280px;
    border-radius: var(--act-radio);
    border: 1px solid var(--act-borde);
    overflow: hidden;
    background: var(--act-superficie-2);
}

.act-mapa--dialogo {
    height: min(55vh, 460px);
    min-width: min(80vw, 640px);
    margin: 8px 0;
}

.act-mapa .leaflet-control-attribution {
    font-size: 0.75rem;
}

.act-mapa .leaflet-control-zoom a {
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 1.25rem;
}

.act-mapa .leaflet-popup-content {
    margin: 10px 12px;
}

.act-mapa-ventana {
    display: grid;
    gap: 4px;
    min-width: 160px;
    color: #0b1f17;
    font-family: var(--act-fuente);
    font-size: 0.875rem;
}

.act-mapa-ventana .act-boton {
    justify-self: start;
    color: var(--act-texto);
}

.act-mapa-mini {
    width: 160px;
    height: auto;
    max-height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.act-mapa-controles {
    margin-bottom: 8px;
}

.act-mapa-leyenda {
    list-style: none;
    margin: 8px 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 0.875rem;
    color: var(--act-tenue);
}

.act-mapa-leyenda li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.act-mapa-muestra {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #0b1512;
}

.act-mapa-muestra--gps {
    background: #16a34a;
}

.act-mapa-muestra--aproximada {
    background: #d97706;
    outline: 2px dashed #d97706;
    outline-offset: 2px;
}

.act-mapa-muestra--manual {
    background: #2563eb;
    border-color: #ffffff;
    box-shadow: 0 0 0 1px #0b1512;
}

.act-mapa-muestra--lugar {
    background: #ffffff;
    border: 3px solid #1e3a8a;
}

.act-mapa-muestra--ruta {
    width: 22px;
    height: 0;
    border-radius: 0;
    border: 0;
    border-top: 3px dashed #0a5a3a;
}

.act-mapa-lista li {
    margin: 2px 0;
}

.act-enlace {
    background: none;
    border: 0;
    padding: 8px 0;
    min-height: 44px;
    color: var(--act-acento);
    font: inherit;
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
}

.act-detalles {
    margin: 12px 0;
}

.act-detalles summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
}

/* ---------- 0.2.0 · Espacio en la nube (E.5) ---------- */

.act-cuota {
    display: grid;
    gap: 4px;
    margin: 10px 0 4px;
}

.act-cuota progress {
    width: 100%;
    height: 12px;
    accent-color: var(--act-ok);
}

.act-cuota--aviso progress {
    accent-color: var(--act-aviso);
}

.act-cuota--critico progress {
    accent-color: var(--act-error);
}

.act-cuota--critico span {
    color: var(--act-error);
    font-weight: 700;
}

