/**
 * @file traductor-inclusivo.css
 * @brief Estilos generales de EquIAtext.
 * @details Contiene la apariencia global, las pestañas Texto e Imágenes, acceso, mantenimiento, pie de página y componentes compartidos.
 * @ingroup estilos
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #f5f5f7;
    color: #222;
}

h1,
h2,
.subtitulo,
button,
.boton-copiar,
.boton-icono {
    font-family: 'Poppins', sans-serif;
}

.pagina {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

h1,
h2,
.subtitulo,
button,
.boton-copiar,
.boton-icono {
    font-family: 'Poppins', sans-serif;
}

h1 {
    margin-bottom: 8px;
    font-weight: bold;
    color: #4A3678;
}

.subtitulo {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
    color: #564376;
    font-weight: bold;
}

.descripcion {
    margin-top: 0;
    color: #555;
}

.descripcion-movil {
    display: none;
}

.descripcion-escritorio {
    display: block;
}

.contenedor-traductor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 24px;
}

.columna {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
}

.cabecera-caja {
    padding: 12px 16px;
    border-bottom: 1px solid #ddd;
    background: #fafafa;
}

.cabecera-caja h2 {
    margin: 0;
    font-size: 18px;
    }

.caja-texto {
    min-height: 300px;
    padding: 18px;
    font-size: 17px;
    line-height: 1.6;
    outline: none;
    white-space: pre-wrap;
}

.caja-original {
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.caja-original.caja-bloqueada {
    background-color: #EEEAF5;
    color: #666;
    cursor: not-allowed;
}

.caja-original:empty::before {
    content: attr(data-placeholder);
    color: #999;
}

.caja-resultado .placeholder {
    color: #999;
}

.acciones {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

button {
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 15px;
    cursor: pointer;
    background: #564376;
    color: #fff;
    font-weight: bold;
}

button:hover {
    opacity: 0.92;
}

.boton-secundario {
    background: #666;
}

.estado {
    margin-top: 14px;
    color: #555;
}

.panel-explicaciones {
    margin-top: 24px;
}

.panel-explicaciones h2 {
    margin-bottom: 14px;
}

/* Cabecera del apartado de explicaciones */
.cabecera-explicaciones {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.cabecera-explicaciones h2 {
    margin: 0;
}

.boton-informe-cambios {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 36px;
    padding: 7px 11px;

    border: 1px solid #d8c9ea;
    border-radius: 8px;

    background: #fff;
    color: #564376;

    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    cursor: pointer;
}

.boton-informe-cambios:hover {
    background: #EEEAF5;
    color: #4A3678;
    border-color: #4A3678;
    opacity: 1;
}

.boton-informe-cambios svg {
    display: block;
    flex: 0 0 auto;

    fill: none;
    stroke: currentColor;

    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tarjeta-explicacion {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 6px solid #564376;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.tarjeta-explicacion p {
    margin: 6px 0;
}

.fragmento-original {
    color: #c1121f;
    font-weight: bold;
}

.fragmento-sustituido {
    color: #218838;
    font-weight: bold;
}

.autores {
    color: #4A3678;
    font-weight: bold;
    background-color: #f1e6ff;
    padding: 2px 5px;
    border-radius: 4px;
}

.pie-pagina {
    margin-top: 40px;
    padding-top: 20px;
    padding-bottom: 12px;
    border-top: 1px solid #ddd;
    font-size: 14px;
    color: #666;
    text-align: center;
}

.pie-pagina p {
    margin: 4px 0;
}

/* Información de registro de marca */

.registro-marca {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    max-width: 720px;

    margin: 10px auto;
    padding: 9px 14px;

    border: 1px solid #d8c9ea;
    border-radius: 8px;

    background: #FAF7FF;
    color: #564376;

    font-size: 13px;
    line-height: 1.45;
}

.simbolo-marca-registrada {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    border-radius: 50%;

    background: #4A3678;
    color: #fff;

    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
}

.aviso-propiedad {
    max-width: 900px;
    margin: 8px auto 0 !important;
}

.label-selector-alternativa {
    display: block;
    margin-top: 10px;
    margin-bottom: 6px;
}

.selector-alternativa-traductor {
    display: block;
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #cfc6df;
    border-radius: 6px;
    background-color: #fff;
    color: #222;
    font-size: 15px;
}

.selector-alternativa-traductor:focus {
    outline: 2px solid #4A3678;
    border-color: #4A3678;
}

.opcion-recomendada {
    font-weight: bold;
    color: #4A3678;
}

.nota-recomendada {
    font-size: 13px;
    color: #4A3678;
    margin-top: 4px;
    margin-bottom: 10px;
}

.detalle-alternativa {
    margin-top: 10px;
    padding: 10px;
    background-color: #faf7ff;
    border-radius: 6px;
}

/* Ajustes generales responsive */
html {
    font-size: 16px;
}

body {
    overflow-x: hidden;
}

.pagina {
    width: 100%;
}

.contenedor-traductor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.columna {
    min-width: 0;
}

.caja-texto {
    overflow-wrap: break-word;
    word-break: normal;
    overflow-y: auto;
}

.selector-alternativa-traductor {
    max-width: 100%;
}

.cabecera-caja-resultado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.boton-copiar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d8c9ea;
    border-radius: 8px;
    padding: 7px 10px;
    background: #fff;
    color: #564376;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.boton-copiar:hover {
    background: #f4ecff;
    opacity: 1;
}

.boton-copiar svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.boton-copiar.oculto {
    display: none;
}

.boton-copiar.copiado {
    background: #e6f4ea;
    color: #218838;
    border-color: #b8dfc2;
}

.oculto {
    display: none !important;
}

.cabecera-caja-original,
.cabecera-caja-resultado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.boton-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #d8c9ea;
    border-radius: 8px;
    background: #fff;
    color: #564376;
    cursor: pointer;
}

.boton-icono:hover {
    background: #f4ecff;
    opacity: 1;
}

.boton-icono svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

button:disabled,
.boton-icono:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

button:disabled:hover,
.boton-icono:disabled:hover {
    opacity: 0.55;
}

.estado-cargando {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #564376;
    font-weight: bold;
}

.spinner-analisis {
    width: 18px;
    height: 18px;
    border: 3px solid #d8c9ea;
    border-top-color: #564376;
    border-radius: 50%;
    animation: girar-spinner 0.8s linear infinite;
}

@keyframes girar-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Cabecera principal de la aplicación */
.cabecera-aplicacion {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 18px;

    overflow: visible;
}

/* Botón de cierre de sesión */

.boton-logout {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    border: 1px solid #d8c9ea;
    border-radius: 8px;

    background: #fff;
    color: #564376;

    text-decoration: none;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.boton-logout:hover {
    background: #F8EAF0;
    color: #C94F7C;
    border-color: #C94F7C;

    box-shadow:
        0 4px 12px
        rgba(201, 79, 124, 0.14);
}

.boton-logout svg {
    display: block;

    fill: none;
    stroke: currentColor;

    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logo-principal {
    display: block;
    width: auto;
    height: 65px;
    max-width: 100%;
    max-width: none;
    object-fit: contain;
    margin-left: -7px;
}

/* Selector principal de modos */
.selector-modos {
    margin-top: 18px;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.tabs-modos {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    min-width: max-content;
}

/* Sobrescribe el estilo general de los botones */
.tab-modo {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-width: max-content;

    padding: 11px 16px 12px;

    border: none;
    border-radius: 8px 8px 0 0;

    background: transparent;
    color: #666;

    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.tab-modo.activo {
    transform: translateY(-1px);
}

.tab-modo:hover {
    background: #fff;
    color: #564376;
    opacity: 1;
}

.tab-modo.activo {
    background: #fff;
    color: #564376;

    border: 1px solid #cfc0e6;
    border-bottom-color: transparent;

    box-shadow: 0 3px 10px rgba(86, 67, 118, 0.14);

    font-weight: 700;
}

.tab-modo.activo::after {
    content: "";
    position: absolute;

    left: 10px;
    right: 10px;
    bottom: -1px;

    height: 4px;

    border-radius: 4px 4px 0 0;
    background: #C94F7C;
}

.tab-modo:focus-visible {
    outline: 3px solid #d8c9ea;
    outline-offset: 2px;
}

/* Contenido asociado a cada pestaña */
.panel-modo {
    padding-top: 18px;
}

.panel-modo[hidden] {
    display: none !important;
}

/* Panel temporal para funcionalidades futuras */
.panel-proximamente {
    padding: 28px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
}

.panel-proximamente h2 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #564376;
}

.panel-proximamente p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

/* =========================================================
   Revisión de imágenes
   ========================================================= */

.zona-subida-imagen {
    min-height: 300px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;

    background: #fff;

    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.zona-subida-imagen.arrastrando {
    background: #EEEAF5;

    box-shadow:
        inset 0 0 0 2px #564376;
}

.zona-subida-imagen.zona-bloqueada {
    opacity: 0.65;
    pointer-events: none;
}


/* Input oculto */

.input-imagen-oculto {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}


/* Zona inicial */

.contenido-zona-imagen {
    width: 100%;
    min-height: 264px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 24px;

    border: 2px dashed #cfc6df;
    border-radius: 10px;

    background: #FAF7FF;

    text-align: center;
}

.icono-subida-imagen {
    margin-bottom: 14px;

    fill: none;
    stroke: #564376;

    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.titulo-subida-imagen {
    margin: 0 0 5px;

    color: #4A3678;

    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
}

.texto-subida-imagen {
    margin: 0 0 16px;

    color: #666;

    font-size: 14px;
}

.ayuda-subida-imagen {
    margin: 12px 0 0;

    color: #888;

    font-size: 12px;
}


/* Botones de selección */

.boton-seleccionar-imagen,
.boton-cambiar-imagen {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 16px;

    border-radius: 8px;

    background: #564376;
    color: #fff;

    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.boton-seleccionar-imagen:hover,
.boton-cambiar-imagen:hover {
    background: #4A3678;

    box-shadow:
        0 5px 14px
        rgba(74, 54, 120, 0.18);
}


/* Vista previa */

.vista-previa-imagen {
    width: 100%;
}

.previsualizacion-imagen {
    display: block;

    width: 100%;
    height: auto;

    max-height: 520px;

    object-fit: contain;

    border-radius: 8px;

    background: #fafafa;
}

.boton-cambiar-imagen {
    margin-top: 12px;

    background: #fff;
    color: #564376;

    border: 1px solid #d8c9ea;
}

.boton-cambiar-imagen:hover {
    background: #EEEAF5;
    color: #4A3678;
}

/* =========================================================
   Pantalla de acceso administrativo
   ========================================================= */

.pagina-login {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background:
        radial-gradient(
            circle at top left,
            rgba(201, 79, 124, 0.08),
            transparent 34%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(74, 54, 120, 0.10),
            transparent 38%
        ),
        #f5f5f7;
}

.contenedor-login {
    width: 100%;
    max-width: 460px;
}

.tarjeta-login {
    position: relative;

    width: 100%;

    padding: 42px 38px 34px;

    border: 1px solid #ddd;
    border-radius: 16px;

    background: #fff;

    box-shadow:
        0 18px 45px
        rgba(74, 54, 120, 0.12);
}

.logo-login {
    display: block;

    width: min(100%, 300px);

    margin:
        0 auto
        28px;
}

.cabecera-login {
    margin-bottom: 26px;

    text-align: center;
}

.cabecera-login h1 {
    margin:
        0
        0
        8px;

    color: #4A3678;

    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    line-height: 1.25;
}

.cabecera-login p {
    margin: 0;

    color: #666;

    font-size: 15px;
    line-height: 1.55;
}


/* Botón volver */

.volver-login {
    position: absolute;

    top: 16px;
    left: 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    border: 1px solid #d8c9ea;
    border-radius: 8px;

    background: #fff;
    color: #564376;

    text-decoration: none;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.volver-login:hover {
    background: #EEEAF5;
    color: #4A3678;
    border-color: #4A3678;
}

.volver-login svg {
    fill: none;
    stroke: currentColor;

    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* Formulario */

.formulario-login {
    display: flex;
    flex-direction: column;

    gap: 18px;
}

.grupo-campo-login {
    display: flex;
    flex-direction: column;

    gap: 7px;
}

.grupo-campo-login label {
    color: #333;

    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.campo-login-con-icono {
    position: relative;
}

.campo-login-con-icono svg {
    position: absolute;

    top: 50%;
    left: 14px;

    transform: translateY(-50%);

    fill: none;
    stroke: #777;

    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    pointer-events: none;
}

.campo-login-con-icono input {
    width: 100%;

    padding:
        13px
        14px
        13px
        44px;

    border: 1px solid #d7d3dc;
    border-radius: 8px;

    background: #fff;
    color: #222;

    font-family: 'Inter', sans-serif;
    font-size: 16px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.campo-login-con-icono input:hover {
    border-color: #b9aec9;
}

.campo-login-con-icono input:focus {
    border-color: #4A3678;

    box-shadow:
        0 0 0 3px
        rgba(74, 54, 120, 0.12);

    background: #FAF7FF;
}

.campo-login-con-icono:focus-within svg {
    stroke: #4A3678;
}


/* Botón acceder */

.boton-acceso-login {
    width: 100%;

    margin-top: 4px;

    padding: 13px 18px;

    border: none;
    border-radius: 8px;

    background: #564376;
    color: #fff;

    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.boton-acceso-login:hover {
    background: #4A3678;

    box-shadow:
        0 7px 18px
        rgba(74, 54, 120, 0.20);

    opacity: 1;
}

.boton-acceso-login:active {
    transform: translateY(1px);
}


/* Error */

.mensaje-error-login {
    display: flex;
    align-items: flex-start;

    gap: 9px;

    margin-bottom: 20px;
    padding: 11px 13px;

    border: 1px solid #e7b5c7;
    border-radius: 8px;

    background: #F8EAF0;
    color: #8e3155;

    font-size: 14px;
    line-height: 1.45;
}

.mensaje-error-login svg {
    flex: 0 0 auto;

    margin-top: 1px;

    fill: none;
    stroke: currentColor;

    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* Pie */

.pie-login {
    margin:
        24px
        0
        0;

    color: #888;

    text-align: center;

    font-size: 12px;
}

/* Tablets y pantallas medianas */
@media (max-width: 900px) {
    .pagina {
        padding: 24px 16px;
    }

    .cabecera-aplicacion {
        margin-bottom: 16px;
    }

    .logo-principal {
        height: 58px;
        margin-left: -6px;
    }

    .contenedor-traductor {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .caja-texto {
        min-height: 240px;
        font-size: 17px;
    }

    .descripcion-escritorio {
        display: none;
    }

    .descripcion-movil {
        display: block;
    }

    .zona-subida-imagen {
        min-height: 240px;
    }

    .contenido-zona-imagen {
        min-height: 204px;
    }
}

/* Móviles */
@media (max-width: 600px) {
    .pagina {
        padding: 20px 12px;
    }

    .cabecera-aplicacion {
        margin-bottom: 12px;
    }

    .logo-principal {
        height: 44px;
        margin-left: -5px;
    }

    h1 {
        font-size: 32px;
        line-height: 1.1;
        margin-bottom: 10px;
    }

    .subtitulo {
        font-size: 17px;
        line-height: 1.35;
    }

    .descripcion {
        font-size: 15px;
        line-height: 1.45;
    }

    .contenedor-traductor {
        margin-top: 18px;
        gap: 14px;
    }

    .cabecera-caja {
        padding: 10px 12px;
    }

    .cabecera-caja h2 {
        font-size: 17px;
    }

    .caja-texto {
        min-height: 220px;
        padding: 14px;
        font-size: 16px;
        line-height: 1.55;
    }

    .acciones {
        flex-direction: column;
        gap: 10px;
    }

    button {
        width: 100%;
        padding: 14px 18px;
        font-size: 16px;
    }

    .estado {
        font-size: 15px;
    }

    .panel-explicaciones {
        margin-top: 20px;
    }

    .panel-explicaciones h2 {
        font-size: 20px;
    }

    .tarjeta-explicacion {
        padding: 12px;
        border-left-width: 4px;
    }

    .tarjeta-explicacion p {
        font-size: 15px;
        line-height: 1.45;
    }

    .selector-alternativa-traductor {
        font-size: 16px;
        padding: 10px;
    }

    .detalle-alternativa {
        padding: 10px;
    }

    .pie-pagina {
        margin-top: 28px;
        padding: 18px 12px 24px;
        font-size: 13px;
        line-height: 1.45;
    }

    .registro-marca {
        align-items: flex-start;

        margin-left: 12px;
        margin-right: 12px;

        padding: 9px 11px;

        font-size: 12px;
        text-align: left;
    }

    .simbolo-marca-registrada {
        width: 26px;
        height: 26px;

        font-size: 15px;
    }

    .autores {
        display: inline-block;
        margin-top: 4px;
    }

    .cabecera-caja-resultado {
        align-items: flex-start;
    }

    .boton-copiar {
        padding: 7px 9px;
        font-size: 13px;
    }

    .texto-copiar {
        display: none;
    }

    .boton-icono,
    .boton-copiar {
        width: 36px;
        min-width: 36px;
        height: 36px;
        padding: 0;
    }

    .cabecera-caja-original,
    .cabecera-caja-resultado {
        align-items: center;
    }
	
	.caja-original:empty,
    .caja-resultado:has(.placeholder) {
        min-height: 130px;
    }

    .selector-modos {
        margin-top: 14px;
    }

    .tabs-modos {
        gap: 2px;
    }

    .tabs-modos .tab-modo {
        width: auto;
        min-width: max-content;
        flex: 0 0 auto;

        padding: 10px 13px 11px;

        font-size: 14px;
    }

    .tab-modo.activo::after {
        left: 10px;
        right: 10px;
    }

    .panel-modo {
        padding-top: 14px;
    }

    .panel-proximamente {
        padding: 20px 16px;
    }

    .cabecera-explicaciones {
        align-items: center;
        gap: 10px;
    }

    .cabecera-explicaciones h2 {
        flex: 1;
    }

    .cabecera-explicaciones .boton-informe-cambios {
        width: auto;
        min-width: auto;

        padding: 9px 11px;

        font-size: 13px;
    }

    .cabecera-explicaciones .boton-informe-cambios span {
        display: inline;
    }

    .pagina-login {
        padding: 16px;
    }

    .tarjeta-login {
        padding:
            38px
            22px
            28px;
    }

    .logo-login {
        width: min(100%, 250px);

        margin-bottom: 24px;
    }

    .cabecera-login h1 {
        font-size: 21px;
    }

    .cabecera-login p {
        font-size: 14px;
    }

    .volver-login {
        top: 12px;
        left: 12px;
    }

    .boton-logout {
        width: 36px;
        height: 36px;
    }

    .boton-logout svg {
        width: 19px;
        height: 19px;
    }

    .zona-subida-imagen {
        min-height: 220px;
        padding: 14px;
    }

    .contenido-zona-imagen {
        min-height: 192px;
        padding: 20px 14px;
    }

    .boton-seleccionar-imagen,
    .boton-cambiar-imagen {
        width: 100%;
    }

    .previsualizacion-imagen {
        max-height: 420px;
    }
}

/* Móviles muy estrechos */
@media (max-width: 380px) {
    h1 {
        font-size: 28px;
    }

    .subtitulo {
        font-size: 16px;
    }

    .logo-principal {
        width: min(100%, 285px);
    }

    .caja-texto {
        min-height: 200px;
        font-size: 16px;
    }

    .tarjeta-explicacion p {
        font-size: 14px;
    }
	
	.caja-original:empty,
    .caja-resultado:has(.placeholder) {
        min-height: 115px;
    }
}

/* =========================================================
   Revisión de documentos
   ========================================================= */

.contenedor-documentos {
    margin-top: 24px;
}

.columna-documento-carga {
    overflow: hidden;

    border: 1px solid #ddd;
    border-radius: 12px;

    background: #fff;
}

.zona-subida-documento {
    min-height: 290px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;

    background: #fff;

    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.zona-subida-documento.documento-seleccionado {
    min-height: 0;
    padding: 6px;
}

.zona-subida-documento.arrastrando {
    background: #EEEAF5;

    box-shadow:
        inset 0 0 0 2px #564376;
}

.zona-subida-documento.zona-bloqueada {
    opacity: 0.65;
    pointer-events: none;
}

.input-documento-oculto {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}

.contenido-zona-documento {
    width: 100%;
    min-height: 250px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 28px;

    border: 2px dashed #cfc6df;
    border-radius: 10px;

    background: #FAF7FF;

    text-align: center;
}

.icono-subida-documento,
.icono-archivo-documento svg {
    fill: none;
    stroke: #564376;

    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icono-subida-documento {
    margin-bottom: 14px;
}

.titulo-subida-documento {
    margin: 0 0 5px;

    color: #4A3678;

    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 700;
}

.texto-subida-documento {
    margin: 0 0 16px;

    color: #666;

    font-size: 14px;
}

.ayuda-subida-documento {
    margin: 12px 0 0;

    color: #888;

    font-size: 12px;
}

.boton-seleccionar-documento,
.boton-cambiar-documento {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 16px;

    border-radius: 8px;

    background: #564376;
    color: #fff;

    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}

.boton-seleccionar-documento:hover {
    background: #4A3678;
}

.tarjeta-documento-seleccionado {
    width: 100%;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;

    gap: 16px;

    padding: 22px;

    border: 1px solid #d8c9ea;
    border-radius: 12px;

    background: #FAF7FF;
}

.icono-archivo-documento {
    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #EEEAF5;
}

.datos-archivo-documento {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 4px;
}

.datos-archivo-documento strong {
    overflow: hidden;

    color: #2F2A5A;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.datos-archivo-documento span {
    color: #777;

    font-size: 13px;
}

.boton-cambiar-documento {
    border: 1px solid #d8c9ea;

    background: #fff;
    color: #564376;
}

.boton-cambiar-documento:hover {
    background: #EEEAF5;
}


/* Progreso */

.progreso-documento {
    margin-top: 18px;

    padding: 14px 16px;

    border: 1px solid #d8c9ea;
    border-radius: 10px;

    background: #fff;
}

.cabecera-progreso-documento {
    margin-bottom: 9px;

    color: #564376;

    font-size: 14px;
    font-weight: 700;
}

.pista-progreso-documento {
    width: 100%;
    height: 9px;

    overflow: hidden;

    border-radius: 999px;

    background: #EEEAF5;
}

.barra-progreso-documento {
    width: 0%;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #564376,
            #C94F7C
        );

    transition:
        width 0.25s ease;
}


/* Resultados */

.resultados-documento {
    margin-top: 28px;
}

.cabecera-resultados-documento {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 18px;

    margin-bottom: 18px;
}

.cabecera-resultados-documento h2 {
    margin: 0 0 4px;

    color: #2F2A5A;
}

.resumen-documento-breve {
    margin: 0;

    color: #666;
}

.acciones-resultados-documento {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;

    gap: 8px;
}

.boton-accion-documento {
    width: auto;

    padding: 9px 12px;

    border: 1px solid #d8c9ea;

    background: #fff;
    color: #564376;

    font-size: 13px;
}

.boton-accion-documento:hover {
    background: #EEEAF5;
    opacity: 1;
}

.resumen-documento {
    display: grid;
    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 12px;

    margin-bottom: 20px;
}

.dato-resumen-documento {
    padding: 16px;

    border: 1px solid #e1d9ed;
    border-radius: 10px;

    background: #fff;
}

.dato-resumen-documento strong {
    display: block;

    margin-bottom: 3px;

    color: #4A3678;

    font-family: 'Poppins', sans-serif;
    font-size: 24px;
}

.dato-resumen-documento span {
    color: #666;

    font-size: 13px;
}


/* Selector de vistas */

.selector-vistas-documento {
    display: flex;
    flex-wrap: wrap;

    gap: 6px;

    margin-bottom: 16px;

    padding-bottom: 10px;

    border-bottom: 1px solid #ddd;
}

.tab-vista-documento {
    width: auto;

    padding: 9px 13px;

    border: 1px solid transparent;

    background: transparent;
    color: #666;

    font-size: 14px;
}

.tab-vista-documento:hover {
    background: #FAF7FF;
    color: #564376;

    opacity: 1;
}

.tab-vista-documento.activo {
    border-color: #d8c9ea;

    background: #EEEAF5;
    color: #4A3678;
}


/* Filtros */

.filtros-documento {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 16px;
}

.filtro-documento {
    width: auto;

    padding: 8px 12px;

    border: 1px solid #ddd;

    background: #fff;
    color: #666;

    font-size: 13px;
}

.filtro-documento:hover {
    border-color: #cfc0e6;

    background: #FAF7FF;
    color: #564376;

    opacity: 1;
}

.filtro-documento.activo {
    border-color: #564376;

    background: #564376;
    color: #fff;
}


/* Incidencias */

.lista-incidencias-documento {
    display: grid;

    gap: 14px;
}

.incidencia-documento {
    overflow: hidden;

    border: 1px solid #ddd;
    border-left: 6px solid #C94F7C;
    border-radius: 10px;

    background: #fff;
}

.incidencia-documento.estado-aplicada {
    border-left-color: #218838;
}

.incidencia-documento.estado-ignorada {
    border-left-color: #999;

    opacity: 0.82;
}

.cabecera-incidencia-documento {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 13px 16px;

    border-bottom: 1px solid #eee;

    background: #fafafa;
}

.cabecera-incidencia-documento > div {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;

    gap: 8px;
}

.ubicacion-incidencia-documento {
    color: #777;

    font-size: 12px;
}

.etiqueta-estado-documento {
    padding: 4px 8px;

    border-radius: 999px;

    background: #EEEAF5;
    color: #564376;

    font-size: 12px;
    font-weight: 700;
}

.contexto-incidencia-documento {
    padding: 14px 16px;

    color: #444;

    font-size: 14px;
    line-height: 1.6;
}

.contexto-incidencia-documento mark {
    padding: 1px 3px;

    border-radius: 3px;

    background: #ffe2eb;
    color: #8d244b;
}

.cambio-incidencia-documento {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);

    align-items: center;

    gap: 14px;

    padding: 14px 16px;

    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;

    background: #FCFBFE;
}

.cambio-incidencia-documento > div {
    min-width: 0;
}

.etiqueta-cambio {
    display: block;

    margin-bottom: 5px;

    color: #777;

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
}

.flecha-cambio-documento {
    color: #9F66CB;

    font-size: 22px;
    font-weight: 700;
}

.selector-alternativa-documento {
    width: 100%;

    padding: 9px 10px;

    border: 1px solid #cfc6df;
    border-radius: 7px;

    background: #fff;
    color: #222;

    font-size: 14px;
}

.selector-alternativa-documento:focus {
    outline: 2px solid #4A3678;
    border-color: #4A3678;
}

.explicacion-incidencia-documento {
    padding: 13px 16px;
}

.explicacion-incidencia-documento p {
    margin: 0 0 7px;

    line-height: 1.5;
}

.explicacion-incidencia-documento p:last-child {
    margin-bottom: 0;
}

.metadatos-incidencia-documento {
    color: #777;

    font-size: 12px;
}

.acciones-incidencia-documento {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    padding: 0 16px 16px;
}

.boton-aplicar-incidencia,
.boton-ignorar-incidencia {
    width: auto;

    padding: 8px 12px;

    font-size: 13px;
}

.boton-aplicar-incidencia {
    background: #564376;
}

.boton-ignorar-incidencia {
    border: 1px solid #ddd;

    background: #fff;
    color: #666;
}

.boton-ignorar-incidencia:hover {
    background: #f5f5f7;

    opacity: 1;
}

.sin-incidencias-documento {
    padding: 22px;

    border: 1px solid #ddd;
    border-radius: 10px;

    background: #fff;
}


/* Documento continuo bajo demanda */

.texto-revisado-documento {
    border: 1px solid #ddd;
    border-radius: 10px;

    background: #fff;
}

.aviso-vista-documento {
    margin: 0;

    padding: 12px 16px;

    border-bottom: 1px solid #e6deef;

    background: #FAF7FF;
    color: #564376;

    font-size: 13px;
}

.contenido-documento-revisado {
    max-height: 680px;

    overflow: auto;

    padding: 20px;

    white-space: pre-wrap;

    font-size: 15px;
    line-height: 1.65;
}

.cambio-aplicado-documento {
    padding: 1px 3px;

    border-radius: 3px;

    background: #e6f4ea;
    color: #176b2a;

    font-weight: 700;
}


/* Resumen por categorías */

.detalle-resumen-documento {
    padding: 18px;

    border: 1px solid #ddd;
    border-radius: 10px;

    background: #fff;
}

.tabla-resumen-documento {
    display: grid;

    gap: 8px;
}

.fila-resumen-documento {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    padding: 9px 0;

    border-bottom: 1px solid #eee;
}

.fila-resumen-documento:last-child {
    border-bottom: none;
}

.fila-resumen-documento strong {
    color: #4A3678;
}


/* Responsive documentos */

@media (max-width: 900px) {

    .resumen-documento {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .cabecera-resultados-documento {
        flex-direction: column;
    }

    .acciones-resultados-documento {
        justify-content: flex-start;
    }
}


@media (max-width: 600px) {

    .zona-subida-documento {
        min-height: 250px;

        padding: 12px;
    }

    .contenido-zona-documento {
        min-height: 220px;

        padding: 20px 14px;
    }

    .tarjeta-documento-seleccionado {
        grid-template-columns:
            auto
            minmax(0, 1fr);

        padding: 16px;
    }

    .boton-cambiar-documento {
        grid-column:
            1 / -1;

        width: 100%;
    }

    .resumen-documento {
        grid-template-columns: 1fr;
    }

    .acciones-resultados-documento {
        width: 100%;
    }

    .boton-accion-documento {
        width: 100%;
    }

    .cambio-incidencia-documento {
        grid-template-columns: 1fr;
    }

    .flecha-cambio-documento {
        transform: rotate(90deg);

        text-align: center;
    }

    .acciones-incidencia-documento {
        flex-direction: column;
    }

    .boton-aplicar-incidencia,
    .boton-ignorar-incidencia {
        width: 100%;
    }
}


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

/* ==========================================================================
   Resultados homogéneos de Documentos y Sitios web
   ========================================================================== */

.acciones-explicaciones-homogeneas {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.boton-descargar-texto-revisado {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid #d8c9ea;
    border-radius: 8px;
    background: #fff;
    color: #564376;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.boton-descargar-texto-revisado:hover {
    background: #EEEAF5;
    color: #4A3678;
    border-color: #4A3678;
    opacity: 1;
}

.boton-descargar-texto-revisado svg {
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


.resultados-documento.panel-explicaciones {
    margin-top: 24px;
}

@media (max-width: 640px) {
    .cabecera-explicaciones {
        align-items: flex-start;
        flex-direction: column;
    }

    .acciones-explicaciones-homogeneas {
        width: 100%;
        justify-content: flex-start;
    }

    .boton-descargar-texto-revisado,
    .boton-informe-cambios {
        flex: 1 1 auto;
    }
}


/*
|--------------------------------------------------------------------------
| Enlaces legales compartidos
|--------------------------------------------------------------------------
*/

.enlaces-legales {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
    margin: 18px auto 0;
    padding-top: 15px;
    border-top: 1px solid #e2dbea;
    max-width: 760px;
}

.enlaces-legales a,
.contacto-pie-pagina a {
    color: #564376;
    font-weight: 700;
    text-decoration: none;
}

.enlaces-legales a:hover,
.enlaces-legales a:focus-visible,
.contacto-pie-pagina a:hover,
.contacto-pie-pagina a:focus-visible {
    color: #2f2a5a;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contacto-pie-pagina {
    margin-top: 10px !important;
}

.enlaces-legales-login {
    margin-top: 18px;
    padding-top: 15px;
    gap: 7px 12px;
    font-size: 12px;
}

@media (max-width: 620px) {
    .enlaces-legales {
        gap: 7px 12px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .enlaces-legales a {
        font-size: 12px;
    }
}
