    :root {
      --blue: #00b7ff;
      --blue-2: #245cff;
      --red: #ff2e32;
      --orange: #ff9c16;
      --ink: #060a19;
      --panel: rgba(7, 12, 34, .76);
      --line: rgba(140, 190, 255, .24);
      --text: #f6f8ff;
      --muted: #9ba9c9;
      --radius: 22px;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { width: 100%; height: 100%; margin: 0; }
    body {
      color: var(--text);
      font-family: "Rajdhani", system-ui, sans-serif;
      background: #050814;
    }
    button, input { font: inherit; }
    button, a { -webkit-tap-highlight-color: transparent; }
    button { cursor: pointer; }

    /* Background - stays full viewport, outside ui-root */
    .bg-layer {
      position: fixed;
      inset: 0;
      z-index: 0;
      background:
        radial-gradient(ellipse at 0% 50%, rgba(0, 102, 255, .32), transparent 43%),
        radial-gradient(ellipse at 100% 50%, rgba(255, 45, 0, .28), transparent 43%),
        linear-gradient(110deg, #030818, #0a1028 45%, #15080d);
    }

    .bg-layer::before {
      content: "";
      position: absolute;
      inset: -20%;
      z-index: -1;
      background:
        repeating-linear-gradient(115deg, transparent 0 90px, rgba(0, 180, 255, .045) 91px 93px, transparent 94px 170px),
        repeating-linear-gradient(65deg, transparent 0 130px, rgba(255, 45, 45, .04) 131px 133px, transparent 134px 230px);
      transform: rotate(-8deg);
      animation: drift 22s linear infinite;
    }

    #energyCanvas {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      z-index: 1;
      opacity: .85;
      pointer-events: none;
    }

    @keyframes drift {
      to { transform: translate(80px, -50px) rotate(-8deg); }
    }

    /* ========== UI ROOT - Virtual 1920x1080 ========== */
    #ui-root {
      z-index: 10;
    }

    /* Login Layout */
    .login-layout {
      position: absolute;
      top: 0; left: 0;
      width: 1920px;
      height: 1080px;
      display: grid;
      grid-template-columns: 1fr 520px 100px 460px 1fr;
      grid-template-rows: 1fr;
      align-items: center;
    }

    .brand-area {
      grid-column: 2;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 18px;
      filter: drop-shadow(0 0 30px rgba(0, 0, 0, .45));
    }

    .logo {
      width: 520px;
      animation: hover 5s ease-in-out infinite;
      user-select: none;
    }

    .tagline {
      color: #d9e8ff;
      font-size: 19px;
      font-weight: 600;
      letter-spacing: .28em;
      text-transform: uppercase;
      text-shadow: 0 0 16px rgba(0, 183, 255, .7);
    }

    @keyframes hover {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-9px); }
    }

    /* Login Card */
    .login-card {
      grid-column: 4;
      width: 460px;
      position: relative;
      padding: 42px 40px;
      border: 1px solid rgba(107, 191, 255, .36);
      border-radius: 22px;
      background:
        linear-gradient(145deg, rgba(24, 46, 94, .28), transparent 42%),
        var(--panel);
      box-shadow:
        0 24px 80px rgba(0, 0, 0, .5),
        inset 0 1px 0 rgba(255, 255, 255, .08),
        0 0 0 1px rgba(0, 0, 0, .4);
      backdrop-filter: blur(22px);
    }

    .login-card::before,
    .login-card::after {
      content: "";
      position: absolute;
      width: 74px;
      height: 74px;
      pointer-events: none;
    }

    .login-card::before {
      top: -1px; left: -1px;
      border-top: 3px solid var(--blue);
      border-left: 3px solid var(--blue);
      border-radius: 22px 0 0 0;
      filter: drop-shadow(0 0 8px var(--blue));
    }

    .login-card::after {
      right: -1px; bottom: -1px;
      border-right: 3px solid var(--red);
      border-bottom: 3px solid var(--red);
      border-radius: 0 0 22px 0;
      filter: drop-shadow(0 0 8px var(--red));
    }

    .card-panel { display: none; }
    .card-panel.active { display: block; }

    .card-heading { margin-bottom: 28px; }
    .eyebrow {
      margin: 0 0 5px;
      color: var(--blue);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: .3em;
      text-transform: uppercase;
    }

    h1 {
      margin: 0;
      font-size: 40px;
      line-height: 1;
      font-weight: 700;
      letter-spacing: .04em;
    }

    .subtitle {
      margin: 12px 0 0;
      color: var(--muted);
      font-size: 15px;
      letter-spacing: .03em;
    }

    .field { margin-top: 17px; }
    .field-label {
      display: block;
      margin: 0 0 8px 3px;
      color: #cbd8f3;
      font-size: 14px;
      font-weight: 600;
      letter-spacing: .08em;
    }

    .input-wrap { position: relative; }
    .input-icon {
      position: absolute;
      left: 17px;
      top: 50%;
      width: 19px;
      height: 19px;
      transform: translateY(-50%);
      color: #9cb9ef;
      pointer-events: none;
    }

    .field input {
      width: 100%;
      height: 56px;
      padding: 0 48px 0 52px;
      color: var(--text);
      background: rgba(2, 7, 22, .72);
      border: 1px solid var(--line);
      border-radius: 13px;
      outline: none;
      transition: border-color .2s, box-shadow .2s, background .2s;
      font-size: 15px;
    }

    .field input::placeholder { color: #64759a; }
    .field input:focus {
      border-color: var(--blue);
      background: rgba(3, 12, 33, .92);
      box-shadow: 0 0 0 3px rgba(0, 183, 255, .12), 0 0 22px rgba(0, 183, 255, .13);
    }

    .password-toggle {
      position: absolute;
      right: 8px;
      top: 8px;
      width: 40px;
      height: 40px;
      display: grid;
      place-items: center;
      border: 0;
      border-radius: 9px;
      color: #dbe8ff;
      background: transparent;
    }

    .password-toggle:hover, .password-toggle:focus-visible {
      background: rgba(0, 183, 255, .12);
      outline: none;
    }

    .under-row {
      display: flex;
      justify-content: flex-end;
      margin-top: 13px;
    }

    .text-link {
      color: #55d8ff;
      font-size: 15px;
      font-weight: 700;
      text-decoration: none;
      border-bottom: 1px solid transparent;
      transition: color .2s, border-color .2s;
    }

    .text-link:hover, .text-link:focus-visible {
      color: white;
      border-color: currentColor;
      outline: none;
    }

    .connect {
      position: relative;
      width: 100%;
      height: 62px;
      margin-top: 27px;
      border: 0;
      border-radius: 14px;
      color: white;
      font-size: 21px;
      font-weight: 700;
      letter-spacing: .13em;
      background: linear-gradient(100deg, #007dff, #2a43ff 44%, #ed2b28 72%, #ff8b17);
      box-shadow: 0 10px 28px rgba(0, 95, 255, .25), 0 0 24px rgba(255, 58, 25, .14);
      overflow: hidden;
      transition: transform .2s, filter .2s;
    }

    .connect::before {
      content: "";
      position: absolute;
      inset: 2px;
      border: 1px solid rgba(255, 255, 255, .35);
      border-radius: 12px;
      pointer-events: none;
    }

    .connect::after {
      content: "";
      position: absolute;
      top: 0; bottom: 0; left: -35%;
      width: 24%;
      transform: skewX(-20deg);
      background: rgba(255, 255, 255, .35);
      transition: left .55s;
    }

    .connect:hover { transform: translateY(-2px); filter: brightness(1.12); }
    .connect:hover::after { left: 120%; }
    .connect:active { transform: translateY(1px); }
    .connect:disabled { opacity: .4; cursor: not-allowed; transform: none; filter: none; }
    .connect:disabled::after { display: none; }

    .create {
      display: block;
      width: fit-content;
      margin: 22px auto 0;
      color: #e4ecff;
      font-size: 16px;
      font-weight: 600;
      text-decoration: none;
    }

    .create span { color: #55d8ff; font-weight: 700; }
    .status {
      min-height: 18px;
      margin: 14px 0 0;
      color: #ffb4a8;
      text-align: center;
      font-size: 13px;
    }

    .legal {
      margin: 22px 0 0;
      color: #62749b;
      text-align: center;
      font-size: 12px;
      letter-spacing: .04em;
    }

    .field-error {
      min-height: 18px;
      margin: 6px 0 0;
      color: #ff4444;
      font-size: 13px;
      font-weight: 600;
    }

    .back-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: #55d8ff;
      font-size: 15px;
      font-weight: 700;
      text-decoration: none;
      margin-bottom: 18px;
      border-bottom: 1px solid transparent;
      transition: color .2s, border-color .2s;
    }
    .back-link:hover { color: white; border-color: currentColor; }
    .back-link svg { width: 16px; height: 16px; }

    .sr-only {
      position: absolute;
      width: 1px; height: 1px;
      padding: 0; margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    /* Splash */
    .splash {
      position: fixed;
      inset: 0;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 40px;
      background: #050814;
    }

    .splash.hidden { display: none; }

    .splash-logo {
      width: min(70vw, 400px);
      animation: hover 5s ease-in-out infinite;
    }

    .splash-btn {
      padding: 16px 48px;
      border: 2px solid rgba(0, 183, 255, .5);
      border-radius: 14px;
      background: rgba(0, 183, 255, .12);
      color: #55d8ff;
      font-size: 20px;
      font-weight: 700;
      letter-spacing: .15em;
      cursor: pointer;
      transition: background .2s, transform .15s;
    }

    .splash-btn:hover { background: rgba(0, 183, 255, .25); }
    .splash-btn:active { transform: scale(.96); }

    @media (min-width: 769px) {
      .splash { display: none !important; }
    }