
  :root {
    --bg: #07050b;
    --panel: #14101b;
    --panel-2: #1b1625;
    --edge: #372a44;
    --field: #0e0b14;
    --field-edge: #3a3047;
    --text: #f7f2fc;
    --muted: #b7a8c9;
    --pink: #ff4d94;
    --pink-soft: #ff9cc6;
    --error: #ff6b7a;
    --ok: #5fe0a0;
  }
  * { box-sizing: border-box; }
  html, body { height: 100%; margin: 0; }
  body {
    background:
      radial-gradient(800px 480px at 8% -5%, rgba(255,77,148,.18), transparent 70%),
      radial-gradient(700px 480px at 100% 100%, rgba(140,60,255,.12), transparent 70%),
      var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    display: grid; place-items: center; padding: 24px 16px;
    overflow-x: hidden;
  }

  /* ---------- shell ---------- */
  .shell {
    position: relative;
    width: 100%; max-width: 960px; min-height: 600px;
    display: grid; grid-template-columns: 1fr 1.05fr;
    background: var(--panel);
    border: 1px solid var(--edge);
    border-radius: 26px; overflow: hidden;
    box-shadow: 0 40px 90px -35px rgba(255,77,148,.45), 0 0 0 1px rgba(255,255,255,.02) inset;
    animation: enter .9s cubic-bezier(.2,.8,.2,1) both;
  }
  @keyframes enter { from { opacity: 0; transform: translateY(24px) scale(.975); } to { opacity: 1; transform: none; } }

  /* animated border: two pink lights chase each other around the card edge */
  @property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
  .shell::before {
    content: ""; position: absolute; inset: 0; z-index: 6; pointer-events: none;
    border-radius: inherit; padding: 2px;
    background: conic-gradient(from var(--angle),
      transparent 0%, rgba(255,77,148,.0) 8%, #ff4d94 22%, #ffd1e6 25%, transparent 32%,
      transparent 50%, rgba(255,77,148,.0) 58%, #ff4d94 72%, #ffd1e6 75%, transparent 82%, transparent 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: orbitBorder 6s linear infinite;
  }
  @keyframes orbitBorder { to { --angle: 360deg; } }


  /* ---------- brand panel ---------- */
  .brand {
    position: relative; overflow: hidden; isolation: isolate;
    display: grid; place-items: center; align-content: center; gap: 22px;
    padding: 44px 24px;
    background: linear-gradient(160deg, #2e1638 0%, #170f20 55%, #100a17 100%);
    border-right: 1px solid var(--edge);
    perspective: 900px;
  }
  .stripes {
    position: absolute; inset: 0; z-index: -3; opacity: .55;
    background: repeating-linear-gradient(135deg, rgba(255,120,180,.10) 0 1px, transparent 1px 22px);
    animation: slide 16s linear infinite;
  }
  @keyframes slide { to { background-position: 220px 0; } }
  .glow {
    position: absolute; inset: 0; z-index: -2;
    background: radial-gradient(circle at var(--mx,50%) var(--my,42%), rgba(255,77,148,.32), transparent 55%);
  }
  .vignette { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.45)); }

  .emblem {
    position: relative; width: 270px; height: 270px; display: grid; place-items: center;
    transform-style: preserve-3d;
    transform: rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
    transition: transform .25s ease-out;
  }
  .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255,77,148,.45); }
  .ring.static { inset: 20px; background: radial-gradient(circle, rgba(255,77,148,.20), rgba(255,77,148,.03) 70%); border-color: rgba(255,77,148,.38); transform: translateZ(-30px); }
  .ring.pulse { animation: pulse 4s ease-out infinite; opacity: 0; }
  .ring.pulse.b { animation-delay: 2s; }
  @keyframes pulse { 0% { transform: scale(.7); opacity: .75; } 100% { transform: scale(1.4); opacity: 0; } }
  .ring.orbit { inset: 2px; border: 1.5px dashed rgba(255,150,200,.42); animation: turn 30s linear infinite; transform: translateZ(-10px); }
  .ring.orbit::after {
    content: ""; position: absolute; top: -4px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px;
    background: var(--pink); border-radius: 50%; box-shadow: 0 0 16px 4px var(--pink);
  }
  @keyframes turn { to { transform: rotate(360deg); } }

  .logo-wrap { position: relative; width: 190px; height: 190px; transform: translateZ(50px); animation: float 5.5s ease-in-out infinite; }
  @keyframes float { 50% { transform: translateZ(50px) translateY(-9px); } }
  .logo-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
  .logo-wrap .halo { filter: blur(22px) saturate(1.3); opacity: .85; transform: scale(1.12); animation: breathe 3.2s ease-in-out infinite; }
  @keyframes breathe { 50% { opacity: .45; transform: scale(1.22); } }

  .brand-name { letter-spacing: .4em; text-indent: .4em; font-size: .8rem; color: #ecdff6; font-weight: 600; }
  .brand-line { margin: 0; color: var(--muted); font-size: .9rem; text-align: center; max-width: 240px; }

  .ember { position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; background: var(--pink-soft); opacity: 0; z-index: -1; animation: rise linear infinite; }
  @keyframes rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .85; } 100% { transform: translateY(-680px) translateX(var(--dx,20px)); opacity: 0; } }

  /* ---------- form panel ---------- */
  .form-side { position: relative; padding: 46px 46px 34px; display: flex; flex-direction: column; justify-content: center; }
  .stagger > * { animation: up .6s cubic-bezier(.2,.8,.2,1) both; }
  .stagger > *:nth-child(1) { animation-delay: .25s; }
  .stagger > *:nth-child(2) { animation-delay: .32s; }
  .stagger > *:nth-child(3) { animation-delay: .39s; }
  .stagger > *:nth-child(4) { animation-delay: .46s; }
  .stagger > *:nth-child(5) { animation-delay: .53s; }
  .stagger > *:nth-child(6) { animation-delay: .60s; }
  .stagger > *:nth-child(7) { animation-delay: .67s; }
  @keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

  .eyebrow { margin: 0 0 8px; font-size: .74rem; letter-spacing: .2em; color: var(--pink-soft); font-weight: 700; }
  h1 { margin: 0 0 6px; font-size: 2.6rem; line-height: 1.05; font-weight: 800; letter-spacing: -.03em; }
  .sub { margin: 0 0 24px; color: var(--muted); }
  .swap { animation: fade .35s ease both; }
  @keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

  label { display: block; margin: 0 0 7px; font-size: .85rem; font-weight: 700; }
  .field { position: relative; margin-bottom: 16px; }
  input[type=email], input[type=password], input[type=text] {
    width: 100%; height: 52px; padding: 0 14px; font: inherit; font-size: 1rem; color: var(--text);
    background: var(--field); border: 1px solid var(--field-edge); border-radius: 13px; outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
  }
  input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255,77,148,.15); background: #120e1a; }
  .field.invalid input { border-color: var(--error); animation: shake .35s; }
  @keyframes shake { 20%,60% { transform: translateX(-5px); } 40%,80% { transform: translateX(5px); } }
  .has-eye input { padding-right: 64px; }
  .eye { position: absolute; right: 8px; bottom: 10px; height: 32px; padding: 0 10px; background: none; border: 0; border-radius: 8px; color: var(--muted); font-weight: 700; font-size: .8rem; cursor: pointer; }
  .eye:hover { color: var(--text); background: rgba(255,255,255,.05); }
  .hint { margin: 6px 0 0; font-size: .8rem; color: var(--pink-soft); display: none; }
  .hint.show { display: block; }

  .meter { display: flex; gap: 5px; margin-top: 9px; }
  .meter i { flex: 1; height: 4px; border-radius: 3px; background: #2a2236; transition: background .25s; }
  .meter[data-s="1"] i:nth-child(-n+1) { background: var(--error); }
  .meter[data-s="2"] i:nth-child(-n+2) { background: #ffb86b; }
  .meter[data-s="3"] i:nth-child(-n+3) { background: #d6e86b; }
  .meter[data-s="4"] i { background: var(--ok); }
  .meter-label { margin: 6px 0 0; font-size: .8rem; color: var(--muted); }

  .hide { display: none !important; }
  .row { display: flex; align-items: center; justify-content: space-between; margin: -2px 0 16px; }
  .check { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; font-size: .9rem; color: var(--muted); cursor: pointer; }
  .check input { appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--field-edge); border-radius: 5px; background: var(--field); display: grid; place-items: center; cursor: pointer; transition: all .2s; margin: 0; }
  .check input:checked { background: var(--pink); border-color: var(--pink); }
  .check input:checked::after { content: ""; width: 4px; height: 8px; border: solid #1a0710; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px,-1px); }
  .link { background: none; border: 0; padding: 2px 0; color: var(--pink-soft); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
  .link:hover { color: #fff; }

  .primary {
    position: relative; overflow: hidden; width: 100%; height: 52px; border: 0; border-radius: 13px; cursor: pointer;
    background: linear-gradient(135deg, #ff5a9d, #ff3d8b); color: #1a0710; font: inherit; font-weight: 800; font-size: 1rem;
    transition: transform .15s, box-shadow .25s, filter .2s;
  }
  .primary::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-20deg); transition: left .6s; }
  .primary:hover { box-shadow: 0 12px 30px -10px rgba(255,77,148,.9); filter: brightness(1.07); }
  .primary:hover::after { left: 120%; }
  .primary:active { transform: scale(.985); }
  .primary[disabled] { opacity: .8; cursor: progress; }
  .spin { display: none; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: turn .7s linear infinite; }
  .loading .spin { display: inline-block; }

  .or { display: flex; align-items: center; gap: 14px; margin: 18px 0; color: var(--muted); font-size: .88rem; }
  .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--edge); }

  .google { width: 100%; height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--panel-2); color: var(--text); font: inherit; font-weight: 700; border: 1px solid var(--field-edge); border-radius: 13px; cursor: pointer; transition: border-color .2s, transform .15s, background .2s; }
  .google:hover { border-color: var(--pink); background: #231c2f; }
  .google:active { transform: scale(.985); }
  .g { width: 22px; height: 22px; border-radius: 50%; background: #fff; display: grid; place-items: center; }

  .switch { margin: 20px 0 0; color: var(--muted); }
  .msg { min-height: 22px; margin: 12px 0 0; font-size: .92rem; }
  .msg.error { color: var(--error); }
  .msg.ok { color: var(--ok); }

  /* ---------- success overlay ---------- */
  .done {
    position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center;
    background: var(--panel); opacity: 0; pointer-events: none; transition: opacity .35s;
  }
  .done.show { opacity: 1; pointer-events: auto; }
  .done svg { width: 96px; height: 96px; }
  .done circle { fill: none; stroke: var(--pink); stroke-width: 3; stroke-dasharray: 289; stroke-dashoffset: 289; }
  .done path { fill: none; stroke: var(--ok); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; }
  .done.show circle { animation: draw .7s ease forwards; }
  .done.show path { animation: draw .45s .55s ease forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  .done h2 { margin: 0; font-size: 1.6rem; }
  .done p { margin: 0; color: var(--muted); }

  :focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

  /* ---------- mobile ---------- */
  @media (max-width: 780px) {
    .shell { grid-template-columns: 1fr; min-height: 0; }
    .brand { padding: 22px 20px; grid-auto-flow: column; gap: 16px; justify-content: center; border-right: 0; border-bottom: 1px solid var(--edge); }
    .emblem { width: 92px; height: 92px; }
    .logo-wrap { width: 70px; height: 70px; transform: none; animation: none; }
    .ring.static { inset: 6px; transform: none; }
    .ring.orbit { transform: none; }
    .ring.pulse.b, .ember, .brand-line, .halo { display: none; }
    .brand-name { text-indent: 0; letter-spacing: .3em; }
    .form-side { padding: 28px 22px 26px; }
    h1 { font-size: 2.1rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .stagger > * { opacity: 1 !important; }
  }

.google, a.link { text-decoration:none; }
.form-side .msg:empty { display:none; }
