
  /* ============================================================
     Light, soft-blue canvas login — one centered glass card.
     Signature visual: an animated diagram of scattered sources
     converging into a data lake, which fans out into AI use cases.
     Every color below is one of the design system's tokens (or an
     rgba() derived directly from a token's hex, for alpha only).
     ============================================================ */
  html, body { height: 100%; }
  body {
    background: var(--ink);
    color: var(--txt);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
  }

  /* ---------- Signature visual: sources -> data lake -> AI ---------- */
  .data-flow {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .data-flow .grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(61,95,143,0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(61,95,143,0.06) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 78%);
    mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 78%);
  }
  .data-flow .flow-svg { width: 100%; height: 100%; display: block; }

  .flow-svg .lake-pulse { animation: dotPulse 2.4s ease-in-out infinite; transform-origin: 800px 450px; }
  @keyframes dotPulse { 0%, 100% { r: 7; opacity: 1; } 50% { r: 11; opacity: 0.6; } }
  .flow-svg .lake-ring { opacity: 0.16; animation: ringPulse 6s ease-in-out infinite; transform-origin: 800px 450px; }
  .flow-svg .lake-ring--2 { animation-delay: -3s; }
  @keyframes ringPulse {
    0%, 100% { transform: scale(0.94); opacity: 0.22; }
    50% { transform: scale(1.04); opacity: 0.1; }
  }

  /* Particle motion: CSS offset-path (compositor thread), not SMIL.
     Each rule is a fully self-contained shorthand — splitting duration/delay
     into a separate lower-specificity rule let the shared base rule's
     implicit 0s duration win the cascade, so every particle sat frozen. */
  @keyframes flowAlong { from { offset-distance: 0%; } to { offset-distance: 100%; } }
  .particle--s1 { offset-path: path("M140,230 C450,230 550,370 800,450"); animation: flowAlong 4.6s linear 0s infinite; }
  .particle--s2 { offset-path: path("M140,340 C450,340 600,400 800,450"); animation: flowAlong 5.2s linear -0.9s infinite; }
  .particle--s3 { offset-path: path("M140,560 C450,560 600,500 800,450"); animation: flowAlong 4.9s linear -1.7s infinite; }
  .particle--s4 { offset-path: path("M140,740 C450,740 550,550 800,450"); animation: flowAlong 5.6s linear -0.4s infinite; }
  .particle--a1 { offset-path: path("M800,450 C1050,450 1150,300 1460,250"); animation: flowAlong 4.4s linear -0.3s infinite; }
  .particle--a2 { offset-path: path("M800,450 C1050,450 1250,450 1460,450"); animation: flowAlong 5s linear -1.2s infinite; }
  .particle--a3 { offset-path: path("M800,450 C1050,450 1150,600 1460,650"); animation: flowAlong 4.7s linear -2.1s infinite; }

  @media (prefers-reduced-motion: reduce) {
    .flow-svg .particle { display: none; }
    .flow-svg .lake-ring, .flow-svg .lake-pulse { animation: none; }
  }

  /* ---------- Stage / card ---------- */
  .stage {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-5) var(--space-10);
  }

  /* The card's own silhouette is a storage vessel: a wide elliptical
     lid, a banded cylindrical body with two seam rings, and a shallow
     elliptical base — the classic database/data-lake glyph, stretched
     into a usable form container instead of a plain rectangle. */
  .glass-card {
    width: 100%;
    max-width: 408px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--line);
    border-radius: 50% / 78px 78px 34px 34px;
    box-shadow: 0 20px 50px rgba(76,154,255,0.16), 0 0 0 1px rgba(255,255,255,0.6) inset;
    padding: 40px var(--space-8) 60px;
    position: relative;
    animation: cardIn 0.6s var(--easing) 1.5s backwards;
  }
  /* lid seam: the wavy "liquid surface" line where the dome meets the body */
  .glass-card .lid-wave {
    display: block;
    width: 100%;
    height: 16px;
    margin: 0 0 var(--space-6);
    overflow: visible;
  }
  /* base seam: where the cylinder body meets its shallow base */
  .glass-card::after {
    content: "";
    position: absolute;
    left: 16%;
    right: 16%;
    bottom: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(76,154,255,0.4), transparent);
  }
  @keyframes cardIn {
    from { opacity: 0; transform: translateY(18px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* nameplate: the brand mark, presented as a label on the vessel */
  .nameplate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
  }
  .nameplate .logo-chip { display: flex; }
  .nameplate .logo-chip img { height: 32px; width: auto; display: block; }
  .nameplate-text {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--faint);
    text-align: center;
  }

  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--steel);
    margin-bottom: var(--space-5);
  }
  .eyebrow::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--steel);
    box-shadow: 0 0 0 3px rgba(76,154,255,0.25), 0 0 10px rgba(76,154,255,0.8);
  }

  .glass-card h1 {
    color: var(--txt);
    font-size: 25px;
    letter-spacing: -0.4px;
    margin-bottom: var(--space-2);
  }
  .glass-card .subhead {
    color: var(--faint);
    font-size: 14px;
    margin-bottom: var(--space-8);
  }

  #loginAlert { display: none; }

  /* ---------- Underline-only floating fields ---------- */
  .uline-field {
    position: relative;
    margin-bottom: var(--space-8);
  }
  .uline-field input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid var(--line);
    border-radius: 0;
    padding: 10px 2px 10px;
    font-size: 15.5px;
    color: var(--txt);
    transition: border-color var(--duration-base) var(--easing);
  }
  .uline-field input::placeholder { color: transparent; }
  .uline-field input:hover { border-color: var(--dim); }
  .uline-field input:focus { outline: none; border-color: var(--steel); }

  .uline-field label {
    position: absolute;
    left: 2px;
    top: 10px;
    margin: 0;
    font-size: 15.5px;
    font-weight: 400;
    color: var(--faint);
    pointer-events: none;
    transition: all var(--duration-base) var(--easing);
  }
  .uline-field input:focus + label,
  .uline-field input:not(:placeholder-shown) + label,
  .uline-field input:-webkit-autofill + label {
    top: -14px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--steel);
    letter-spacing: 0.2px;
  }
  .uline-field input:-webkit-autofill,
  .uline-field input:-webkit-autofill:hover,
  .uline-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--txt);
    -webkit-box-shadow: 0 0 0 1000px var(--panel) inset;
    box-shadow: 0 0 0 1000px var(--panel) inset;
    transition: background-color 5000s ease-in-out 0s, color 5000s ease-in-out 0s;
  }

  /* animated glow underline */
  .uline-field::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--steel), var(--dim));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--duration-base) var(--easing);
    box-shadow: 0 0 12px rgba(76,154,255,0.45);
  }
  .uline-field:focus-within::after { transform: scaleX(1); }

  .form-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 var(--space-8);
    font-size: 13px;
  }
  .remember-me { display: flex; align-items: center; gap: var(--space-2); color: var(--faint); cursor: pointer; }
  .remember-me input[type="checkbox"] { width: 16px; height: 16px; padding: 0; accent-color: var(--steel); cursor: pointer; }
  .forgot-link { font-size: 13px; font-weight: 500; color: var(--steel); }
  .forgot-link:hover { color: var(--txt); }

  /* ---------- Gradient glow button ---------- */
  .btn-glow {
    width: 100%;
    justify-content: center;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-6);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.1px;
    color: var(--ink);
    background: linear-gradient(135deg, var(--steel) 0%, var(--steel-dark) 100%);
    box-shadow: 0 8px 24px rgba(76,154,255,0.35);
    cursor: pointer;
    transition: transform var(--duration-base) var(--easing),
                box-shadow var(--duration-base) var(--easing),
                background var(--duration-base) var(--easing);
  }
  .btn-glow:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--steel-light) 0%, var(--steel) 100%);
    box-shadow: 0 14px 36px rgba(76,154,255,0.45);
  }
  .btn-glow:active { transform: translateY(0); }
  .btn-glow:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

  .divider {
    display: flex; align-items: center; gap: var(--space-4);
    margin: var(--space-8) 0 var(--space-6);
    color: var(--faint); font-size: 11px; letter-spacing: 0.08em;
  }
  .divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

  .signup-line { text-align: center; font-size: 14px; color: var(--faint); }
  .signup-line a { font-weight: 600; color: var(--steel); }
  .signup-line a:hover { color: var(--txt); }

  .mini-foot {
    position: relative;
    z-index: 2;
    max-width: none;
    text-align: center;
    padding: 0 var(--space-6) var(--space-8);
    color: var(--faint);
    font-size: 12px;
  }

  @media (max-width: 480px) {
    .glass-card { padding: 34px var(--space-5) 48px; }
    .stage { padding: var(--space-6) var(--space-4) var(--space-8); }
  }


/* ================= Keycloak pages other than the main sign-in (OTP, set password, verify email, ...) =================
   Keycloak's stock templates are styled through theme.properties class names mapped to the classes below. */
.uline-static { position: relative; margin-bottom: var(--space-8); }
.uline-static-label { display: block; font-size: 11.5px; font-weight: 600; color: var(--steel); letter-spacing: .2px; margin-bottom: 2px; }
.uline-static-input, .uline-static input[type="text"], .uline-static input[type="password"], .uline-static input[type="email"] {
  width: 100%; background: transparent; border: none; border-bottom: 1.5px solid var(--line); border-radius: 0;
  padding: 10px 2px; font-size: 15.5px; color: var(--txt); transition: border-color var(--duration-base) var(--easing);
}
.uline-static-input:hover { border-color: var(--dim); }
.uline-static-input:focus { outline: none; border-color: var(--steel); }
.uline-static::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--steel), var(--dim)); transform: scaleX(0); transform-origin: center;
  transition: transform var(--duration-base) var(--easing); box-shadow: 0 0 12px rgba(76,154,255,.45); }
.uline-static:focus-within::after { transform: scaleX(1); }
.field-error, #input-error { display: block; color: #c0392b; font-size: 12.5px; margin-top: 6px; }
.btn-block { width: 100%; }
.forgot-wrap { text-align: right; }
#kc-form-buttons, #kc-form-options { margin: 0; }
#kc-content a { color: var(--steel); font-weight: 500; }
#kc-content a:hover { color: var(--txt); }
#kc-content input[type="submit"].btn-glow { width: 100%; }
#kc-content hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
#kc-content img#kc-totp-qr, #kc-content img { max-width: 100%; height: auto; }
#kc-content ol, #kc-content ul { padding-left: 20px; margin: 8px 0 16px; color: var(--faint); font-size: 14px; }
#kc-content p { color: var(--faint); font-size: 14px; }
#kc-content code, #kc-content .kc-totp-secret { font-family: var(--font-mono); font-size: 13px; word-break: break-all; }
.alert-error { display: flex; }
/* "Sign in with Passkey" (Keycloak passkeys macro) sits under the primary button, in the design system's secondary style */
#authenticateWebAuthnButton { display: flex; justify-content: center; width: 100%; margin-top: 14px; text-decoration: none; }
/* it is an <a>: beat the generic '#kc-content a' link colour so the label stays readable (white on the glow gradient) */
#kc-content a#authenticateWebAuthnButton, #kc-content a#authenticateWebAuthnButton:hover { color: var(--ink); font-weight: 700; }
