    :root {
      --bg: var(--ap-color-page-bg, #f2ede6);
      --ink: #0b0b0b;
      --gold: var(--ap-gold);
      --gold-dark: var(--ap-gold);
      --muted: #686b6b;
      --border: rgba(104,107,107,.28);
    }

    * { box-sizing: border-box; }

    html, body {
      width: 100%;
      height: 100%;
      margin: 0;
      overflow: hidden;
    }

    body {
      color: var(--ink);
      background:
        radial-gradient(circle at 50% 15%, rgba(250,250,250,.88), transparent 38%),
        var(--bg);
      font-family: "Segoe UI", Montserrat, Arial, sans-serif;
      -webkit-font-smoothing: antialiased;
    }

    button, input { font: inherit; }

    .login-language-toggle {
      --login-language-gold: var(--ap-brand-gold);
      position: fixed;
      z-index: 20;
      top: max(12px, calc(env(safe-area-inset-top) + 8px));
      right: max(12px, calc(env(safe-area-inset-right) + 8px));
      display: grid;
      grid-template-columns: repeat(2, 38px);
      gap: 5px;
    }

    .login-language-toggle button {
      width: 38px;
      height: 30px;
      padding: 0;
      border: 1px solid;
      border-radius: 7px;
      font-size: 14px;
      font-weight: 800;
      letter-spacing: .045em;
      line-height: 1;
      cursor: pointer;
      transition: background-color var(--ap-duration-fade,250ms) ease-in-out, border-color var(--ap-duration-fade,250ms) ease-in-out,
        color var(--ap-duration-fade,250ms) ease-in-out, box-shadow var(--ap-duration-fade,250ms) ease-in-out, transform var(--ap-duration-fade,250ms) ease-in-out;
    }

    .login-language-toggle button:focus-visible {
      outline: 2px solid var(--login-language-gold);
      outline-offset: 2px;
    }

    .login-language-toggle[aria-busy="true"] { pointer-events: none; }

    @media (hover:hover) and (pointer:fine) {
      .login-language-toggle button:not(.is-selected):hover {
        transform: translateY(-1px);
      }
    }

    html.ap-login-language-transition .screen { view-transition-name: ap-login-language-panel; }
    html.ap-login-language-transition::view-transition-old(root),
    html.ap-login-language-transition::view-transition-new(root) { animation: none; }
    html.ap-login-language-transition::view-transition-old(ap-login-language-panel) {
      animation: ap-login-language-out var(--ap-duration-fade,200ms) ease-in-out both;
    }
    html.ap-login-language-transition::view-transition-new(ap-login-language-panel) {
      animation: ap-login-language-in var(--ap-duration-fade,200ms) ease-in-out both;
    }
    @keyframes ap-login-language-out {
      from { opacity: 1; transform: translateY(0); }
      to { opacity: 0; transform: translateY(-4px); }
    }
    @keyframes ap-login-language-in {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .screen {
      width: min(100%, 690px);
      height: 100vh;
      height: 100dvh;
      margin: auto;
      padding: clamp(25.4016px, 5.08032vh, 50.8032px) 20px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .logo-frame {
      width: 100%;
      height: min(116px, 17vw);
      position: relative;
      flex: 0 0 auto;
      overflow: hidden;
    }

    .logo-mobile,
    .logo-mobile-dark,
    .logo-mobile-dark-with-tagline,
    .desktop-brand-panel { display: none; }

    .logo-frame img {
      width: 113.7778%;
      height: auto;
      position: absolute;
      left: -5.8667%;
      top: 0;
      transform: translateY(-34.21875%);
    }

    .welcome {
      flex: 0 0 auto;
      margin: 3px 0 clamp(8px, 1.5vh, 15px);
      text-align: center;
    }

    .welcome-heading { position: relative; }

    .welcome h1 {
      margin: 0;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      font-size: clamp(40.5px, 7.05vh, 55.5px);
      line-height: 1;
      letter-spacing: -.04em;
    }

    .welcome::after {
      content: "";
      display: block;
      width: 55px;
      height: 3px;
      margin: clamp(7px, 1.4vh, 13px) auto 0;
      border-radius: 10px;
      background: var(--gold);
    }

    .group { margin-top: clamp(7px, 1.2vh, 12px); }

    .group + .group {
      margin-top: clamp(21px, 3.6vh, 36px);
    }

    .group > label {
      display: block;
      margin-bottom: 5px;
      font-size: clamp(18px, 3vh, 22.5px);
      font-weight: 700;
      transform: translateY(-6.25px);
    }

    .field {
      height: clamp(64.5px, 11.25vh, 81px);
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 0 18px;
      border: 1px solid var(--border);
      border-radius: 9px;
      background: rgba(250,250,250,.78);
      box-shadow: 0 4px 10px rgba(11,11,11,.055);
    }

    /* En claro el field completo, incluidos iconos y autofill, es blanco parejo. */
    html:is([data-ap-resolved-theme="light"],[data-ap-theme="light"]) #login-form .field,
    html:is([data-ap-resolved-theme="light"],[data-ap-theme="light"]) #login-form .field input {
      background:#fff!important;
    }
    html:is([data-ap-resolved-theme="light"],[data-ap-theme="light"]) #login-form .field input:-webkit-autofill,
    html:is([data-ap-resolved-theme="light"],[data-ap-theme="light"]) #login-form .field input:-webkit-autofill:focus {
      -webkit-box-shadow:0 0 0 1000px #fff inset!important;
      box-shadow:0 0 0 1000px #fff inset!important;
      -webkit-text-fill-color:#1a1a1a!important;
    }@media(hover:hover) and (pointer:fine){
    html:is([data-ap-resolved-theme="light"],[data-ap-theme="light"]) #login-form .field input:-webkit-autofill:hover{
      -webkit-box-shadow:0 0 0 1000px #fff inset!important;
      box-shadow:0 0 0 1000px #fff inset!important;
      -webkit-text-fill-color:#1a1a1a!important;
    }}

    .field:focus-within {
      border-color: var(--gold);
      box-shadow: 0 0 0 3px color-mix(in srgb,var(--gold) 18%,transparent);
    }

    .field input {
      min-width: 0;
      flex: 1;
      height: 100%;
      padding: 0;
      line-height: normal;
      border: 0;
      outline: 0;
      color: #1a1a1a;
      background: transparent;
      font-size: clamp(19.5px, 3.15vh, 24px);
    }

    .field input::placeholder { color: #686b6b; opacity: 1; }

    .mail {
      width: 25px;
      height: 19px;
      position: relative;
      flex: 0 0 auto;
      border: 2px solid #686b6b;
      border-radius: 3px;
    }

    .mail::before, .mail::after {
      content: "";
      width: 14px;
      height: 2px;
      position: absolute;
      top: 4px;
      background: #686b6b;
    }

    .mail::before { left: 1px; transform: rotate(34deg); }
    .mail::after { right: 1px; transform: rotate(-34deg); }

    .lock {
      width: 21px;
      height: 23px;
      position: relative;
      flex: 0 0 auto;
      border: 2px solid #686b6b;
      border-radius: 3px;
    }

    .lock::before {
      content: "";
      width: 11px;
      height: 11px;
      position: absolute;
      left: 3px;
      top: -11px;
      border: 2px solid #686b6b;
      border-bottom: 0;
      border-radius: 7px 7px 0 0;
    }

    .lock::after {
      content: "";
      width: 3px;
      height: 7px;
      position: absolute;
      left: 7px;
      top: 8px;
      border-radius: 4px;
      background: #686b6b;
    }

    .eye {
      width: 28px;
      height: 18px;
      position: relative;
      flex: 0 0 auto;
      border: 3px solid #686b6b;
      border-radius: 70% 20%;
      background: transparent;
      transform: rotate(45deg);
      cursor: pointer;
    }

    .eye::after {
      content: "";
      position: absolute;
      inset: 4px;
      border-radius: 50%;
      background: #686b6b;
    }

    .options {
      margin-top: clamp(21px, 3.6vh, 36px);
      margin-bottom: clamp(21px, 3.6vh, 36px);
      min-height: clamp(32px, 5.5vh, 40px);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      font-size: clamp(16.5px, 2.7vh, 19.5px);
      font-family: inherit;
      font-weight: 400;
    }

    .remember {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      white-space: nowrap;
    }

    .remember-control {
      position: relative;
      width: clamp(18px, 3vh, 21px);
      height: clamp(18px, 3vh, 21px);
      flex: 0 0 auto;
      display: grid;
      place-items: center;
    }

    .remember input {
      appearance: none;
      width: 100%;
      height: 100%;
      margin: 0;
      border: 2px solid #686b6b;
      border-radius: 4px;
      background: transparent;
    }

    .remember input:checked {
      border-color: #686b6b;
      background: transparent;
      box-shadow: none;
    }

    .remember-mark {
      position: absolute;
      width: 8px;
      height: 8px;
      border-radius: 1px;
      display: block;
      background: var(--gold);
      opacity: 0;
      pointer-events: none;
    }

    .remember input:checked + .remember-mark { opacity: 1; }

    .options a {
      color: var(--gold-dark);
      text-decoration: none;
      white-space: nowrap;
    }

    .primary {
      width: 100%;
            display: flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      height: clamp(64.5px, 11.25vh, 81px);
      position: relative;
      border: 0;
      border-radius: 9px;
      color: #0b0b0b;
      background: var(--ap-gold);
      box-shadow: 0 8px 16px rgba(11,11,11,.12);
      font-size: clamp(23.76px, 3.96vh, 29.7px);
      font-weight: 700;
      text-align: center;
      cursor: pointer;
      transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
    }


    .primary:focus-visible {
      background: #0b0b0b;
      color: #fafafa;
      box-shadow: 0 10px 24px rgba(11,11,11,.28);
      transform: translateY(-1px);
      outline: none;
    }@media(hover:hover) and (pointer:fine){.primary:hover{
      background: #0b0b0b;
      color: #fafafa;
      box-shadow: 0 10px 24px rgba(11,11,11,.28);
      transform: translateY(-1px);
      outline: none;
    }}

    .primary:active {
      transform: translateY(0);
      box-shadow: 0 5px 12px rgba(11,11,11,.16);
    }

    .arrow {
      position: absolute;
      right: 23px;
      top: 50%;
      width: 28px;
      height: 28px;
      transform: translateY(-50%);
      display: grid;
      place-items: center;
      pointer-events: none;
    }

    .arrow svg {
      width: 100%;
      height: 100%;
      fill: none;
      stroke: currentColor;
      stroke-width: 2.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .assessment {
      flex: 0 0 auto;
      margin-top: clamp(7px, 1.3vh, 12px);
      overflow: hidden;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: rgba(250,250,250,.68);
      box-shadow: 0 5px 13px rgba(11,11,11,.07);
    }

    .assessment-head {
      height: clamp(40px, 7vh, 49px);
      display: flex;
      align-items: center;
      gap: 13px;
      padding: 0 20px;
      color: #fafafa;
      background: #1a1a1a;
    }

    .assessment-head h2 {
      margin: 0;
      font-size: clamp(14px, 2.3vh, 17px);
      font-weight: 600;
    }

    .assessment-head::after {
      content: "";
      width: 39px;
      height: 2px;
      margin-left: auto;
      background: var(--gold);
    }

    .wa {
      width: clamp(28px, 5vh, 34px);
      height: clamp(28px, 5vh, 34px);
      position: relative;
      flex: 0 0 auto;
      border: 2px solid var(--gold);
      border-radius: 50%;
    }

    .wa::before {
      content: "●";
      position: absolute;
      left: 8px;
      top: 2px;
      color: var(--gold);
      font-size: 15px;
      transform: rotate(-35deg);
    }

    .assessment-body {
      padding: clamp(6px, 1.3vh, 10px) 20px clamp(6px, 1.1vh, 9px);
      text-align: center;
    }

    .assessment-body p {
      margin: 0 auto clamp(5px, 1vh, 8px);
      font-size: clamp(14px, 1.8vh, 14px);
      line-height: 1.35;
    }

    .secondary {
      width: min(100%, 470px);
      height: clamp(35px, 6vh, 41px);
      position: relative;
      border: 1px solid var(--gold);
      border-radius: 7px;
      color: var(--gold-dark);
      background: transparent;
      font-size: clamp(14px, 1.9vh, 14px);
      font-weight: 700;
      cursor: pointer;
    }

    .secondary .arrow {
      position: absolute;
      right: 17px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 20px;
      font-weight: 300;
    }

    .note {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      margin-top: clamp(3px, .8vh, 7px);
      color: var(--muted);
      font-size: clamp(14px, 1.3vh, 14px);
    }

    .wa-mini {
      width: 16px;
      height: 16px;
      display: grid;
      place-items: center;
      border: 1.5px solid var(--muted);
      border-radius: 50%;
      font-size:14px;
    }

    .version {
      flex: 0 0 auto;
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 18px;
      margin-top: clamp(5px, 1vh, 10px);
      margin-bottom: clamp(12.7008px, 2.54016vh, 25.4016px);
      color: var(--ink);
      font-size: clamp(14px, 2.16vh, 15.6px);
      font-family: inherit;
      font-weight: 400;
    }

    .version::before, .version::after {
      content: "";
      height: 1px;
      background: var(--gold);
    }

    .version-center {
      display: flex;
      align-items: center;
      gap: 9px;
      white-space: nowrap;
      line-height: 1;
    }

    .shield {
      width: clamp(19px, 3.5vh, 24px);
      height: clamp(22px, 4vh, 28px);
      display: grid;
      place-items: center;
      border: 1px solid var(--gold);
      color: var(--gold-dark);
      font-size:14px;
      clip-path: polygon(50% 0, 94% 18%, 94% 69%, 50% 100%, 6% 69%, 6% 18%);
    }

    @media (max-width: 600px) {
      .login-language-toggle {
        top: max(9px, calc(env(safe-area-inset-top) + 6px));
        right: max(9px, calc(env(safe-area-inset-right) + 6px));
        grid-template-columns: repeat(2, 34px);
        gap: 4px;
      }
      .login-language-toggle button {
        width: 34px;
        height: 26px;
        border-radius: 6px;
        font-size: 14px;
      }

      .screen {
        width: min(100%, 520px);
        padding-inline: 14px;
      }

      .logo-frame {
        height: clamp(50px, 10vh, 72px);
      }

      .logo-frame img {
        top: 0;
        transform: translateY(-32%);
      }
      .options { gap: 8px; font-size: 15px; }
      .version { font-size: 14px; }
      .options a { white-space: normal; text-align: right; }
      .assessment-head { padding-inline: 15px; }
      .assessment-head::after { width: 27px; }
      .assessment-body { padding-inline: 13px; }
      .secondary { padding-right: 42px; }
      .version { gap: 10px; }
    }

    /* Tablet y móvil horizontal: encabezado compartido, con el selector
       anclado al mismo borde derecho que los fields. */
    @media (min-width: 601px) and (max-width: 999px),
           (max-width: 600px) and (orientation: landscape) {
      .login-language-toggle {
        position: absolute;
        top: calc(50% + var(--welcome-shift, 0px));
        right: 0;
        transform: translateY(-50%);
      }
    }

    /* Móvil vertical: utilidad en la esquina superior derecha, alineada con
       el borde derecho de los fields y fuera del bloque de bienvenida. */
    @media (max-width: 600px) and (orientation: portrait) {
      .login-language-toggle.ap-auto-toggle--compact {
        position: fixed;
        top: max(clamp(18px, 3.5dvh, 30px), calc(env(safe-area-inset-top) + 8px));
        right: max(clamp(28px, 10vw, 42px), calc(env(safe-area-inset-right) + 8px));
        grid-template-columns: repeat(2, 34px) !important;
        gap: 4px !important;
        transform: none;
        margin: 0;
      }
    }

    @media (max-height: 650px) {
      .screen { padding-top: 10.8864px; padding-bottom: 10.8864px; }
      .logo-frame { height: min(112px, 17vw); }
      .welcome {
      flex: 0 0 auto;
      margin: 3px 0 clamp(8px, 1.5vh, 15px);
      text-align: center;
    }
      .welcome h1 { font-size: 37.5px; }
      .welcome::after { margin-top: 5px; }
      .group { margin-top: 5px; }
      .group + .group {
      margin-top: clamp(21px, 3.6vh, 36px);
    }

    .group > label { margin-bottom: 3px; font-size: 16.5px; transform: translateY(-3.75px); }
      .field { height: 58.5px; }
      .options { min-height: 27px; font-size: 15px; }
      .version { font-size: 14px; }
      .primary { height: 58.5px; font-size: 21.78px; }
      .assessment { margin-top: 5px; }
      .assessment-head { height: 37px; }
      .assessment-body { padding-top: 4px; padding-bottom: 4px; }
      .assessment-body p { margin-bottom: 3px; font-size:14px; }
      .secondary { height: 32px; font-size:14px; }
      .note { margin-top: 2px; font-size:14px; }
      .version { margin-top: 3px; margin-bottom: 5.4432px; }
    }
  
    /* BANDAS LATERALES AP: decorativas y exclusivas de desktop. */
    body::before,
    body::after {
      content: "";
      display: none;
      position: fixed;
      top: 0;
      bottom: 0;
      width: clamp(148.5px, 19.8vw, 297px);
      background: #0b0b0b;
      pointer-events: none;
      z-index: 0;
    }

    body::before { left: 0; }
    body::after { right: 0; }

    .screen {
      position: relative;
      z-index: 1;
    }

    @media (min-width: 1000px) {
      body {
        display: grid;
        grid-template-columns: 1fr 1fr;
      }

      body::before {
        display: block;
        width: 50%;
      }

      body::after { display: none; }

      .desktop-brand-panel {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 1;
      }

      .desktop-brand-panel img {
        display: block;
        width: min(76.5%, 529px);
        height: auto;
      }

      .screen {
        grid-column: 2;
        grid-row: 1;
        width: min(100%, 690px);
        margin: 0;
        padding-inline: 40px;
        justify-self: center;
      }

      .logo-frame { display: none; }
    }
  
    /* Iconografía uniforme del formulario. */
    .field-icon {
      width: 24px;
      height: 24px;
      display: grid;
      place-items: center;
      align-self: center;
      flex: 0 0 24px;
      color: #686b6b;
    }

    .field-icon svg {
      width: 28.8px;
      height: 28.8px;
      display: block;
      fill: none;
      stroke: currentColor;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .eye svg {
      width: 29.04px;
      height: 29.04px;
      display: block;
      fill: none;
      stroke: currentColor;
      stroke-width: 1.7;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .eye {
      width: 32px;
      height: 32px;
      display: grid;
      place-items: center;
      align-self: center;
      flex: 0 0 32px;
      padding: 0;
      border: 0;
      border-radius: 50%;
      color: #686b6b;
      background: transparent;
      transform: none;
      cursor: pointer;
    }

    .eye-slash {
      opacity: 1;
      transition: opacity var(--ap-duration-fade,250ms) ease;
    }

    .eye.is-revealing .eye-slash { opacity: 0; }

    .eye::after { display: none; }
    @media(hover:hover) and (pointer:fine){.eye:hover { background: rgba(104,107,107,.09); }}
    .eye:focus-visible { outline: 2px solid var(--ap-gold); outline-offset: 2px; }

    /* Proporciones específicas para celular. */
    @media (max-width: 600px) {
      .screen {
        width: 100%;
        padding: clamp(18px, 3.5dvh, 30px) clamp(28px, 10vw, 42px);
      }

      .logo-frame { height: auto; aspect-ratio: 944 / 561; }
      .logo-desktop { display: none; }
      .logo-frame .logo-mobile,
      .logo-frame .logo-mobile-dark,
      .logo-frame .logo-mobile-dark-with-tagline {
        clip-path: inset(0 0 9% 0);
      }
      .logo-frame .logo-mobile {
        display: block;
        width: 100%;
        height: auto;
        position: static;
        margin: 0 auto;
        transform: none;
      }

      .welcome { margin: 2px 0 10px; }
      .welcome h1 { font-size: clamp(22.4px, 3.5vh, 26.6px); justify-content: center; text-align: center; }
      .welcome::after {
        width: 42px;
        height: 2px;
        margin-top: 8px;
      }

      .group { margin-top: 4px; }
      .group + .group { margin-top: 18px; }
      .group > label {
        margin-bottom: 4px;
        font-size: 16px;
        transform: translateY(-4px);
      }

      .field {
        height: 58px;
        gap: 12px;
        padding: 0 14px;
      }
      .field input { font-size: 18px; }
      .field-icon svg { width: 24px; height: 24px; }
      .eye svg { width: 26px; height: 26px; }

      .options {
        min-height: 26px;
        margin-top: 14px;
        margin-bottom: 14px;
        font-size: 14px;
      }
      .remember-control { width: 18px; height: 18px; }

      .primary {
        height: 58px;
        font-size: 21px;
        border-radius: 8px;
      }
      .arrow { width: 24px; height: 24px; right: 18px; }

      .version {
        margin-top: 4px;
        margin-bottom: 8px;
        gap: 10px;
        font-size:14px;
      }
    }

    @media (min-width: 601px) {
      .logo-frame .logo-desktop {
        width: 100%;
        height: auto;
        position: static;
        margin: 0;
        transform: none;
        clip-path: inset(0 0 21% 0);
      }

      .welcome { --welcome-shift: clamp(8.1px, 1.41vh, 11.1px); }
      .welcome h1,
      .welcome::after { transform: translateY(var(--welcome-shift)); }
    }

    @media (min-width: 1000px) {
      .screen { padding-block: 28px; }
      .login-language-toggle {
        top: max(28px, calc(env(safe-area-inset-top) + 8px));
        right: max(40px, calc(25vw - 305px), calc(env(safe-area-inset-right) + 8px));
      }
      .screen .welcome {
        margin-top: 0;
        transform: none;
      }
      .screen .welcome h1,
      .screen .welcome::after { transform: translateY(21px); }
      .screen .version { margin-bottom: 0; }
    }

    /* El viewport corto debe poder desplazarse después de cualquier rotación.
       No depende del tipo de puntero: algunos navegadores conservan `fine`
       durante el cambio de orientación aunque la pantalla sea táctil. */
    @media (orientation: landscape) and (max-height: 600px) {
      html,
      body {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
      }

      .screen {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .login-language-toggle button { transition-duration: 0s; }
    }
  
