:root {
    --bg: #07090d;
    --bg2: #101217;
    --panel: rgba(18, 20, 27, 0.84);
    --panel-strong: rgba(24, 27, 35, 0.94);
    --white: #f5f7fb;
    --white-soft: rgba(245, 247, 251, 0.76);
    --white-dim: rgba(245, 247, 251, 0.34);
    --red: #ff2e4d;
    --red-soft: #ff6b7f;
    --red-dark: #8b0f22;
    --muted: #a9afbd;
    --line: rgba(255, 46, 77, 0.26);
    --shadow: 0 26px 90px rgba(0, 0, 0, 0.62);
}

* {
    box-sizing: border-box;
}

body.login-body {
    min-height: 100vh;
    margin: 0;
    /* Vertical SÍ, horizontal no. El `overflow: hidden` de antes existía para
       ocultar la sangría lateral de los degradados decorativos, pero también
       impedía desplazarse hacia abajo: con el alta de MFA la tarjeta pasó a ser
       más alta que la pantalla y la clave manual —«¿No puedes escanearlo?»—
       quedaba fuera, sin forma de llegar a ella ni con la rueda del ratón.
       Quien no puede escanear el QR se queda sin poder darse de alta, que es
       justo el bloqueo que este flujo venía a evitar.
       Los decorados no se ven afectados: van en `position: fixed`. */
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--white);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.11), transparent 26%),
        radial-gradient(circle at 80% 74%, rgba(255, 46, 77, 0.16), transparent 30%),
        linear-gradient(135deg, #07090d 0%, #151820 52%, #050609 100%);
}

.login-bg-gradient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 0 48%, rgba(255, 255, 255, 0.045) 49%, transparent 51% 100%),
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 46, 77, 0.045) 1px, transparent 1px);
    background-size: 220px 220px, 58px 58px, 58px 58px;
    animation: gridSlide 22s linear infinite;
}

.command-bg {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.command-bg::before {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        conic-gradient(from 90deg at 50% 50%, transparent 0deg, rgba(255, 46, 77, 0.11) 42deg, transparent 86deg, transparent 360deg);
    animation: slowRotate 26s linear infinite;
    opacity: 0.66;
}

.command-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.024) 0px,
        rgba(255, 255, 255, 0.024) 1px,
        transparent 2px,
        transparent 7px
    );
    opacity: 0.34;
    animation: scanLines 7s linear infinite;
}

.hex-field {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(72vw, 920px);
    aspect-ratio: 1.35;
    transform: translate(-50%, -50%);
    opacity: 0.62;
    filter: drop-shadow(0 0 28px rgba(255, 46, 77, 0.20));
}

.hex-svg {
    width: 100%;
    height: 100%;
}

.hex-main {
    transform-origin: 50% 50%;
    animation: hexBreath 4.6s ease-in-out infinite;
}

.hex-ring {
    transform-origin: 50% 50%;
    animation: hexPulse 3.8s ease-out infinite;
}

.hex-ring.delay {
    animation-delay: 1.9s;
}

.route-path {
    stroke-dasharray: 12 18;
    animation: dashMove 2.4s linear infinite;
}

.alert-dot {
    animation: dotPulse 2s ease-in-out infinite;
}

.alert-dot:nth-of-type(2n) {
    animation-delay: .55s;
}

.alert-dot:nth-of-type(3n) {
    animation-delay: 1.1s;
}

.alert-beam {
    position: absolute;
    height: 2px;
    width: 38vw;
    background: linear-gradient(90deg, transparent, rgba(255, 46, 77, .88), rgba(255, 255, 255, .76), transparent);
    box-shadow: 0 0 18px rgba(255, 46, 77, .36);
    opacity: 0;
    animation: beamCross 6.5s ease-in-out infinite;
}

.alert-beam.b1 {
    left: 3vw;
    top: 21vh;
    transform: rotate(-8deg);
}

.alert-beam.b2 {
    right: 4vw;
    bottom: 22vh;
    transform: rotate(9deg);
    animation-delay: 2.4s;
}

.alert-beam.b3 {
    left: 31vw;
    top: 72vh;
    transform: rotate(2deg);
    animation-delay: 4.1s;
}

.side-module {
    position: absolute;
    width: 250px;
    padding: 14px 15px;
    border: 1px solid rgba(255, 255, 255, .17);
    border-left: 3px solid rgba(255, 46, 77, .82);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025)),
        rgba(11, 13, 18, .66);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .30), inset 0 1px 0 rgba(255, 255, 255, .06);
    backdrop-filter: blur(14px);
    font-family: "JetBrains Mono", monospace;
    opacity: 0;
    transform: translateY(10px);
    animation: moduleReveal 10s ease-in-out infinite;
}

.side-module::before,
.side-module::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: rgba(255, 46, 77, .72);
    border-style: solid;
}

.side-module::before {
    left: -1px;
    top: -1px;
    border-width: 1px 0 0 1px;
}

.side-module::after {
    right: -1px;
    bottom: -1px;
    border-width: 0 1px 1px 0;
}

.side-module.s1 {
    left: 5vw;
    top: 11vh;
    animation-delay: .3s;
}

.side-module.s2 {
    left: 6vw;
    bottom: 10vh;
    animation-delay: 3.2s;
}

.side-module.s3 {
    right: 5vw;
    top: 13vh;
    animation-delay: 1.8s;
}

.side-module.s4 {
    right: 6vw;
    bottom: 12vh;
    animation-delay: 5.2s;
}

.module-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--white);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.module-title span:last-child {
    color: var(--red-soft);
}

.module-value {
    color: var(--white);
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.module-copy {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.red-bars {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    align-items: end;
    height: 32px;
    margin-top: 12px;
}

.red-bars span {
    height: var(--h);
    background: linear-gradient(to top, rgba(255, 46, 77, .2), rgba(255, 46, 77, .95), rgba(255, 255, 255, .72));
    animation: redBar 1.35s ease-in-out infinite alternate;
}

.red-bars span:nth-child(2n) {
    animation-delay: .18s;
}

.red-bars span:nth-child(3n) {
    animation-delay: .36s;
}

.ticker {
    position: fixed;
    z-index: 4;
    left: 0;
    right: 0;
    top: 0;
    height: 32px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: rgba(5, 6, 9, .42);
    backdrop-filter: blur(10px);
}

.ticker-track {
    display: inline-flex;
    align-items: center;
    height: 32px;
    gap: 36px;
    padding-left: 100%;
    color: rgba(245, 247, 251, .68);
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: .13em;
    white-space: nowrap;
    animation: tickerMove 28s linear infinite;
}

.ticker-track b {
    color: var(--red-soft);
    font-weight: 700;
}

.login-container {
    position: relative;
    z-index: 5;
    min-height: 100vh;
    display: grid;
    /* `safe` centra mientras quepa y deja de centrar cuando no cabe. Sin él, una
       tarjeta más alta que la pantalla —el alta de MFA lo es— se desborda por
       arriba y por abajo a partes iguales, y la mitad superior queda por encima
       del origen del scroll: inalcanzable aunque la página sí pueda desplazarse. */
    place-items: safe center;
    padding: 42px 24px 24px;
}

.login-card {
    position: relative;
    width: min(100%, 450px);
    padding: 36px 34px 34px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, .18);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .105), rgba(255, 255, 255, .035)),
        rgba(11, 13, 18, .82);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(24px);
    border-radius: 6px 34px 6px 34px;
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 46, 77, .72), transparent 34%) top left / 100% 2px no-repeat,
        linear-gradient(180deg, rgba(255, 46, 77, .72), transparent 38%) top left / 2px 100% no-repeat,
        linear-gradient(270deg, rgba(255, 255, 255, .34), transparent 36%) bottom right / 100% 1px no-repeat,
        linear-gradient(0deg, rgba(255, 255, 255, .34), transparent 36%) bottom right / 1px 100% no-repeat;
}

.login-card::after {
    content: "ACCESO SEGURO · PLATAFORMA CORPORATIVA";
    position: absolute;
    top: 14px;
    right: 16px;
    color: rgba(255, 46, 77, .72);
    font: 700 9px/1 "JetBrains Mono", monospace;
    letter-spacing: .15em;
}

.login-logo {
    text-align: center;
    margin-bottom: 26px;
}

.login-logo-badge {
    width: 78px;
    height: 78px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    color: var(--white);
    font-size: 34px;
    border: 1px solid rgba(255, 255, 255, .22);
    background:
        radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .28), transparent 36%),
        linear-gradient(135deg, rgba(255, 46, 77, .72), rgba(80, 8, 20, .78));
    box-shadow: 0 0 44px rgba(255, 46, 77, .22);
    clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}

.login-logo h1 {
    margin: 0;
    color: var(--white);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.login-logo p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.form-label {
    color: rgba(245, 247, 251, .82);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.form-control {
    height: 48px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, .17);
    background: rgba(5, 6, 9, .66);
    border-radius: 4px 16px 4px 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.form-control:focus {
    color: var(--white);
    background: rgba(8, 9, 13, .86);
    border-color: rgba(255, 46, 77, .86);
    box-shadow: 0 0 0 4px rgba(255, 46, 77, .13), 0 0 30px rgba(255, 46, 77, .16);
}

.btn-login {
    width: 100%;
    height: 50px;
    margin-top: 18px;
    border: 0;
    color: #fff;
    background:
        linear-gradient(135deg, #ff2e4d, #b20d27 56%, #fff 170%);
    border-radius: 4px 18px 4px 18px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
    box-shadow: 0 18px 42px rgba(255, 46, 77, .24);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 52px rgba(255, 46, 77, .34);
    filter: brightness(1.08);
}

.btn-login:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.btn-outline-info {
    color: var(--white);
    border-color: rgba(255, 46, 77, .55);
    background: rgba(255, 46, 77, .06);
    border-radius: 4px 16px 4px 16px;
}

.btn-outline-info:hover {
    color: #fff;
    background: var(--red);
    border-color: var(--red);
}

.login-error {
    display: none;
    margin-top: 14px;
    padding: 10px 12px;
    color: #fff;
    background: rgba(255, 46, 77, .13);
    border: 1px solid rgba(255, 46, 77, .38);
    border-radius: 4px 14px 4px 14px;
    font-size: 13px;
}

.login-error-visible {
    display: block;
}

.magic-link-session-notice {
    display: block;
    text-align: left;
    margin: 0 0 18px;
    border-left-width: 4px;
    position: relative;
    z-index: 1;
}

.change-account-notice {
    background: rgba(255, 193, 7, .10);
    border-color: rgba(255, 193, 7, .48);
}

.magic-link-session-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.magic-link-session-actions .btn {
    flex: 1 1 170px;
    min-height: 40px;
}

.text-muted {
    color: rgba(169, 175, 189, .82) !important;
}

.classification {
    position: fixed;
    z-index: 4;
    left: 22px;
    bottom: 18px;
    color: rgba(245, 247, 251, .52);
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: .18em;
}

.classification b {
    color: var(--red-soft);
}

@keyframes gridSlide {
    from {
        background-position: 0 0, 0 0, 0 0;
    }

    to {
        background-position: 220px 220px, 58px 58px, 58px 58px;
    }
}

@keyframes slowRotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes scanLines {
    to {
        transform: translateY(56px);
    }
}

@keyframes hexBreath {
    0%,
    100% {
        transform: scale(.985);
        opacity: .82;
    }

    50% {
        transform: scale(1.025);
        opacity: 1;
    }
}

@keyframes hexPulse {
    0% {
        transform: scale(.8);
        opacity: 0;
    }

    24% {
        opacity: .78;
    }

    100% {
        transform: scale(1.22);
        opacity: 0;
    }
}

@keyframes dashMove {
    to {
        stroke-dashoffset: -60;
    }
}

@keyframes dotPulse {
    0%,
    100% {
        opacity: .34;
        r: 4;
    }

    45% {
        opacity: 1;
        r: 7;
    }
}

@keyframes beamCross {
    0%,
    18% {
        opacity: 0;
        transform: translateX(-18px) rotate(var(--r, 0deg));
    }

    35%,
    58% {
        opacity: .84;
    }

    80%,
    100% {
        opacity: 0;
        transform: translateX(18px) rotate(var(--r, 0deg));
    }
}

@keyframes moduleReveal {
    0%,
    10% {
        opacity: 0;
        transform: translateY(12px);
    }

    22%,
    68% {
        opacity: .92;
        transform: translateY(0);
    }

    82%,
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes redBar {
    to {
        transform: scaleY(.42);
        opacity: .55;
    }
}

@keyframes tickerMove {
    to {
        transform: translateX(-100%);
    }
}

@media (max-width: 980px) {
    .hex-field {
        width: 112vw;
        opacity: .34;
    }

    .side-module {
        display: none;
    }

    .login-card {
        padding: 34px 24px 30px;
    }

    .login-card::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}


html[data-brand="risk"] {
    --bg: #4A0400;
    --bg2: #300300;
    --panel: rgba(74, 4, 0, 0.88);
    --panel-strong: rgba(56, 3, 0, 0.96);
    --red: var(--sev-critical);
    --red-soft: var(--sev-low);
    --red-dark: #4A0400;
    --muted: #D8A9A2;
    --line: rgba(199, 154, 75, 0.32);
    --shadow: 0 26px 80px rgba(35, 2, 0, 0.46);
}

html[data-brand="risk"] body.login-body {
    background: #4A0400;
    font-family: var(--font-ui);
}

html[data-brand="risk"] .login-bg-gradient {
    background:
        linear-gradient(rgba(240, 212, 138, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(240, 212, 138, 0.035) 1px, transparent 1px);
    background-size: 58px 58px;
}

html[data-brand="risk"] .command-bg::before {
    background: conic-gradient(from 90deg at 50% 50%, transparent 0deg, rgba(255, 158, 0, 0.10) 42deg, transparent 86deg, transparent 360deg);
}

html[data-brand="risk"] .hex-field {
    filter: drop-shadow(0 0 28px rgba(255, 158, 0, 0.14));
}

html[data-brand="risk"] #redLine stop:first-child {
    stop-color: #FFFFFF;
}

html[data-brand="risk"] #redLine stop:nth-child(2) {
    stop-color: var(--sev-low);
}

html[data-brand="risk"] #redLine stop:last-child {
    stop-color: var(--sev-critical);
}

html[data-brand="risk"] .hex-ring,
html[data-brand="risk"] .route-path {
    stroke: var(--opn-gold);
}

html[data-brand="risk"] .alert-dot {
    fill: var(--sev-low);
}

html[data-brand="risk"] .side-module {
    border-left-color: var(--opn-gold);
    background: rgba(56, 3, 0, 0.76);
    box-shadow: none;
}

html[data-brand="risk"] .side-module::before,
html[data-brand="risk"] .side-module::after {
    border-color: var(--opn-gold);
}

html[data-brand="risk"] .module-title span:last-child,
html[data-brand="risk"] .ticker-track b,
html[data-brand="risk"] .classification b {
    color: var(--opn-gold-light);
}

html[data-brand="risk"] .login-card {
    background: rgba(56, 3, 0, 0.94);
    border-color: rgba(199, 154, 75, 0.44);
    border-radius: 6px;
    box-shadow: var(--shadow);
}

html[data-brand="risk"] .login-card::before {
    background:
        linear-gradient(90deg, var(--opn-gold), transparent 34%) top left / 100% 2px no-repeat,
        linear-gradient(180deg, var(--opn-gold), transparent 38%) top left / 2px 100% no-repeat;
}

html[data-brand="risk"] .login-card::after {
    content: "CONTROL Y PROTECCIÓN";
    color: var(--opn-gold);
    letter-spacing: 0;
}

html[data-brand="risk"] .login-logo-badge {
    background: transparent;
    border: 0;
    box-shadow: none;
    clip-path: none;
}

html[data-brand="risk"] .login-logo-badge img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

html[data-brand="risk"] .login-logo h1 {
    color: #FFFFFF;
    letter-spacing: 0;
}

html[data-brand="risk"] .login-logo p {
    color: var(--brand-sidebar-text, #D8A9A2);
}

html[data-brand="risk"] .form-control {
    background: rgba(35, 2, 0, 0.72);
    border-color: rgba(216, 169, 162, 0.34);
    border-radius: 6px;
}

html[data-brand="risk"] .form-control:focus {
    background: rgba(35, 2, 0, 0.90);
    border-color: var(--opn-gold);
    box-shadow: 0 0 0 3px rgba(199, 154, 75, 0.16);
}

html[data-brand="risk"] .btn-login {
    background: var(--sev-critical);
    border: 1px solid var(--sev-critical);
    border-bottom: 2px solid var(--opn-gold);
    border-radius: 6px;
    box-shadow: none;
    letter-spacing: 0;
}

html[data-brand="risk"] .btn-login:hover {
    background: #6F0601;
    box-shadow: none;
    filter: none;
}

/* ==========================================================================
   Marca Iberdrola — variante de la pantalla de acceso.
   Mismos selectores estructurales que [data-brand="risk"]: solo cambia la
   paleta. Verdes medidos de iberdrola.com (#007f33, #00402a, #088b3e,
   #002015), nunca el rojo del tema base. El contraste de --red-soft y
   --muted contra los fondos reales (login-card, side-module, ticker,
   compuestos con su opacidad real sobre --bg, no contra blanco) se verificó
   aparte: ambos quedan por encima de 9:1 en el peor caso, con margen sobre
   el mínimo AA de 4.5:1. Ver informe de la tarea para el detalle numérico.
   ========================================================================== */

html[data-brand="iberdrola"] {
    --bg: #002015;
    --bg2: #00402a;
    --panel: rgba(0, 32, 21, 0.88);
    --panel-strong: rgba(0, 20, 13, 0.96);
    --red: #088b3e;
    --red-soft: #57d492;
    --red-dark: #00402a;
    --muted: #a9c9b9;
    --line: rgba(8, 139, 62, 0.28);
    --shadow: 0 26px 90px rgba(0, 10, 6, 0.62);
}

html[data-brand="iberdrola"] body.login-body {
    /* Este gradiente es el fondo "digno" del que habla el encargo: si el
       canvas de partículas no llega a crearse (sin contexto 2D) o no llega a
       animarse (prefers-reduced-motion), esto es lo único que se ve detrás
       del login, y ya tiene profundidad propia sin depender de JS. */
    background:
        radial-gradient(circle at 18% 16%, rgba(8, 139, 62, 0.11), transparent 30%),
        radial-gradient(circle at 80% 74%, rgba(0, 127, 51, 0.16), transparent 32%),
        linear-gradient(135deg, #002015 0%, #00402a 55%, #001410 100%);
}

html[data-brand="iberdrola"] .login-bg-gradient {
    background:
        linear-gradient(115deg, transparent 0 48%, rgba(255, 255, 255, 0.03) 49%, transparent 51% 100%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 139, 62, 0.05) 1px, transparent 1px);
}

html[data-brand="iberdrola"] .command-bg::before {
    background: conic-gradient(from 90deg at 50% 50%, transparent 0deg, rgba(8, 139, 62, 0.12) 42deg, transparent 86deg, transparent 360deg);
}

html[data-brand="iberdrola"] .alert-beam {
    background: linear-gradient(90deg, transparent, rgba(8, 139, 62, .82), rgba(255, 255, 255, .7), transparent);
    box-shadow: 0 0 18px rgba(8, 139, 62, .32);
}

/* El canvas ocupa el mismo plano que el hex-field al que sustituye (ambos
   son hijos directos de .command-bg, mutuamente excluyentes por marca en el
   Jinja de login.html): position:fixed + overflow:hidden + pointer-events:
   none ya vienen del contenedor. */
.iberdrola-particulas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

html[data-brand="iberdrola"] .side-module {
    border-left-color: rgba(8, 139, 62, .82);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)),
        rgba(0, 20, 13, .72);
}

html[data-brand="iberdrola"] .side-module::before,
html[data-brand="iberdrola"] .side-module::after {
    border-color: rgba(8, 139, 62, .72);
}

html[data-brand="iberdrola"] .module-title span:last-child,
html[data-brand="iberdrola"] .ticker-track b,
html[data-brand="iberdrola"] .classification b {
    color: var(--red-soft);
}

/* Numeral de paso (01-04) en los módulos del pipeline Sentinel: solo existe
   en la variante Iberdrola, así que no necesita quedar bajo [data-brand=...],
   pero se define aparte de .module-title span:last-child porque ese
   selector también alcanza al ticker y a classification. */
.module-step {
    font-variant-numeric: tabular-nums;
}

html[data-brand="iberdrola"] .login-card {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)),
        rgba(0, 20, 13, .92);
    border-color: rgba(8, 139, 62, .30);
}

html[data-brand="iberdrola"] .login-card::before {
    background:
        linear-gradient(90deg, rgba(8, 139, 62, .78), transparent 34%) top left / 100% 2px no-repeat,
        linear-gradient(180deg, rgba(8, 139, 62, .78), transparent 38%) top left / 2px 100% no-repeat,
        linear-gradient(270deg, rgba(255, 255, 255, .28), transparent 36%) bottom right / 100% 1px no-repeat,
        linear-gradient(0deg, rgba(255, 255, 255, .28), transparent 36%) bottom right / 1px 100% no-repeat;
}

html[data-brand="iberdrola"] .login-card::after {
    color: rgba(8, 139, 62, .82);
}

html[data-brand="iberdrola"] .login-logo-badge {
    background:
        radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .22), transparent 36%),
        linear-gradient(135deg, rgba(8, 139, 62, .74), rgba(0, 64, 42, .82));
    box-shadow: 0 0 44px rgba(8, 139, 62, .22);
}

html[data-brand="iberdrola"] .form-control {
    background: rgba(0, 16, 10, .75);
    border-color: rgba(8, 139, 62, .24);
}

html[data-brand="iberdrola"] .form-control:focus {
    background: rgba(0, 20, 13, .92);
    border-color: rgba(8, 139, 62, .86);
    box-shadow: 0 0 0 4px rgba(8, 139, 62, .16), 0 0 30px rgba(8, 139, 62, .16);
}

html[data-brand="iberdrola"] .btn-login {
    /* Contraste blanco/#007f33 verificado en 4.79:1 (AA >= 4.5) en el punto
       más claro del degradado; el resto del recorrido hacia #00402a solo
       mejora el contraste. Ver informe de la tarea. */
    background: linear-gradient(135deg, #007f33, #00402a 56%, #fff 170%);
    box-shadow: 0 18px 42px rgba(0, 127, 51, .26);
}

html[data-brand="iberdrola"] .btn-login:hover {
    box-shadow: 0 22px 52px rgba(0, 127, 51, .36);
}

html[data-brand="iberdrola"] .btn-outline-info {
    border-color: rgba(8, 139, 62, .55);
    background: rgba(8, 139, 62, .08);
}

html[data-brand="iberdrola"] .btn-outline-info:hover {
    background: var(--red);
    border-color: var(--red);
}

html[data-brand="iberdrola"] .login-error {
    background: rgba(8, 139, 62, .13);
    border-color: rgba(8, 139, 62, .38);
}
