:root {
    --azul-1: #0b3d84;
    --azul-2: #0a4f9d;
    --azul-texto: #17395e;
    --azul-titulo: #143e7a;
    --gris-borde: #c7d2df;
    --gris-linea: #d8e0ea;
    --blanco-card: rgba(242, 246, 250, 0.93);
    --naranja-1: #f59b15;
    --naranja-2: #f27c00;
    --sombra: 0 10px 28px rgba(0, 0, 0, 0.18);
    --radio: 12px;
    --radio-sm: 8px;
    --alto-touch: 48px;
    --transicion: 0.18s ease;
}

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

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--azul-texto);
    background: #CED3E5;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

/* HEADER */
.topbar {
    width: 100%;
    background: linear-gradient(180deg, var(--azul-1) 0%, var(--azul-2) 100%);
    border-bottom: 6px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.topbar__inner {
    width: min(100%, 1360px);
    min-height: 88px;
    margin: 0 auto;
    padding: 10px 18px;
    display: grid;
    grid-template-columns: 190px 1fr 130px;
    align-items: center;
    gap: 14px;
}

.topbar__logo {
    display: flex;
    align-items: center;
}

.topbar__logo--left {
    justify-content: flex-start;
}

.topbar__logo--right {
    justify-content: flex-end;
}

.topbar__logo img {
    display: block;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.topbar__logo--left img {
    max-height: 54px;
}

.topbar__logo--right img {
    max-height: 64px;
}

.topbar__title {
    text-align: center;
}

.topbar__title h1 {
    color: #ffffff;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
}

/* CONTENIDO */
.page {
    width: 100%;
    min-height: calc(100vh - 94px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px 36px;
}

.risk-card {
    width: 100%;
    max-width: 1000px;
    background: var(--blanco-card);
    border: 1px solid rgba(193, 205, 219, 0.95);
    border-radius: 14px;
    box-shadow: var(--sombra);
    padding: 42px 52px 34px;
    backdrop-filter: blur(2px);
}

.risk-card__header {
    text-align: center;
    padding-bottom: 22px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--gris-linea);
}

.risk-card__subtitle {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--azul-titulo);
    margin-bottom: 8px;
}

.risk-card__name {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--azul-titulo);
}

.risk-form {
    width: 100%;
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    margin-bottom: 14px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--azul-titulo);
}

.form-group textarea {
    width: 100%;
    min-height: 220px;
    resize: vertical;
    border: 2px solid #b8c4d3;
    border-radius: 16px;
    background: #ffffff;
    padding: 24px 26px;
    font-size: 1rem;
    line-height: 1.6;
    color: #29486b;
    outline: none;
    transition: border-color var(--transicion), box-shadow var(--transicion);
}

.form-group textarea::placeholder {
    color: #6a7d97;
    font-size: 0.98rem;
}

.form-group textarea:focus {
    border-color: #d98f17;
    box-shadow: 0 0 0 5px rgba(217, 143, 23, 0.12);
}

.form-actions {
    display: flex;
    justify-content: center;
    padding-top: 4px;
}

#btnFactores {
    width: 100%;
    max-width: 520px;
    height: 58px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--naranja-1) 0%, var(--naranja-2) 100%);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: filter var(--transicion), transform var(--transicion);
}

#btnFactores:hover {
    filter: brightness(1.03);
}

#btnFactores:active {
    transform: translateY(1px);
}

/* TABLET */
@media (max-width: 1024px) {
    .topbar__inner {
        grid-template-columns: 150px 1fr 96px;
    }

    .topbar__title h1 {
        font-size: 1.6rem;
    }

    .page {
        padding: 22px 14px 28px;
    }

    .risk-card {
        max-width: 860px;
        padding: 30px 28px 26px;
    }

    .risk-card__name {
        font-size: 1.8rem;
    }

    .form-group textarea {
        min-height: 190px;
        padding: 18px 18px;
    }

    #btnFactores {
        max-width: 420px;
        height: 54px;
        font-size: 1.1rem;
    }
}

/* TABLET PEQUEÑA / MÓVIL */
@media (max-width: 680px) {
    .topbar__inner {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 8px;
        padding: 12px;
    }

    .topbar__logo--left,
    .topbar__logo--right {
        justify-content: center;
    }

    .topbar__logo--left img {
        max-height: 42px;
    }

    .topbar__logo--right img {
        max-height: 48px;
    }

    .topbar__title h1 {
        font-size: 1.2rem;
    }

    .page {
        min-height: auto;
        align-items: flex-start;
        padding: 18px 12px 24px;
    }

    .risk-card {
        padding: 22px 16px 20px;
        border-radius: 12px;
    }

    .risk-card__subtitle {
        font-size: 1rem;
    }

    .risk-card__name {
        font-size: 1.45rem;
    }

    .risk-card__header {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }

    .form-group textarea {
        min-height: 160px;
        padding: 16px 14px;
        border-radius: 12px;
        font-size: 0.98rem;
    }

    #btnFactores {
        height: 50px;
        font-size: 1.05rem;
    }
}
/* =========================
   ACCIONES DE PAGINA
========================= */
.page-actions {
    width: min(96%, 980px);
    margin: 18px auto 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.btn-inicio {
    min-width: 112px;
    min-height: 44px;
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(180deg, #0b3d84 0%, #0a4f9d 100%);
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.18s ease, transform 0.18s ease;
}

.btn-inicio:hover {
    filter: brightness(1.05);
}

.btn-inicio:active {
    transform: translateY(1px);
}