*,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html,
    body {
      height: 100%;
    }

    body {
      font-family: 'Sora', sans-serif;
      background: #f0f4ff;
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      overflow: hidden;
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background:
        radial-gradient(ellipse 80% 60% at 15% 20%, #dce8ff 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 80%, #e4edff 0%, transparent 55%),
        #f0f4ff;
      z-index: 0;
      animation: meshShift 12s ease-in-out infinite alternate;
    }

    @keyframes meshShift {
      from {
        filter: hue-rotate(0deg);
      }

      to {
        filter: hue-rotate(8deg);
      }
    }

    .blob {
      position: fixed;
      border-radius: 50%;
      pointer-events: none;
      z-index: 0;
      animation: blobFloat var(--d, 10s) ease-in-out infinite alternate;
    }

    .blob-a {
      width: 600px;
      height: 600px;
      background: radial-gradient(circle, #c7d9ff55, #a8c4ff22);
      top: -200px;
      left: -150px;
      --d: 11s;
      filter: blur(60px);
    }

    .blob-b {
      width: 450px;
      height: 450px;
      background: radial-gradient(circle, #dde8ff44, #c0d6ff11);
      bottom: -150px;
      right: -100px;
      --d: 14s;
      filter: blur(50px);
    }

    @keyframes blobFloat {
      from {
        transform: translate(0, 0) scale(1);
      }

      to {
        transform: translate(40px, 30px) scale(1.1);
      }
    }

    /* ── card ── */
    .card {
      position: relative;
      z-index: 1;
      width: min(960px, 100%);
      min-height: 560px;
      background: rgba(255, 255, 255, 0.75);
      backdrop-filter: blur(32px) saturate(180%);
      -webkit-backdrop-filter: blur(32px) saturate(180%);
      border: 1px solid rgba(255, 255, 255, 0.9);
      border-radius: 32px;
      box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.8) inset,
        0 40px 80px rgba(100, 130, 200, 0.18),
        0 8px 20px rgba(100, 130, 200, 0.1);
      display: grid;
      grid-template-columns: 1fr 1fr;
      overflow: hidden;
      animation: cardIn .7s cubic-bezier(.16, 1, .3, 1) both;
    }

    @keyframes cardIn {
      from {
        opacity: 0;
        transform: translateY(28px) scale(.97);
      }

      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @media (max-width: 700px) {
      .card {
        grid-template-columns: 1fr;
      }

      .side-art {
        display: none;
      }
    }

    /* ── art side ── */
    .side-art {
      background: linear-gradient(145deg, #1a2a6c, #2a4090, #3b5fd4);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 48px 40px;
      position: relative;
      overflow: hidden;
    }

    .side-art::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .12), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(120, 160, 255, .2), transparent 50%);
    }

    .side-art::after {
      content: '';
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
      background-size: 40px 40px;
      animation: gridSlide 20s linear infinite;
    }

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

      to {
        background-position: 40px 40px;
      }
    }

    .art-content {
      position: relative;
      z-index: 1;
      text-align: center;
    }

    .qr-box {
      width: 160px;
      height: 160px;
      margin: 0 auto 32px;
      position: relative;
      animation: qrFloat 5s ease-in-out infinite;
    }

    @keyframes qrFloat {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-10px);
      }
    }

    .qr-box svg {
      width: 100%;
      height: 100%;
    }

    .scan-beam {
      position: absolute;
      left: 8px;
      right: 8px;
      height: 2px;
      background: linear-gradient(90deg, transparent, #7eb8ff, #a0cdff, #7eb8ff, transparent);
      border-radius: 2px;
      top: 8px;
      animation: scanBeam 2.8s ease-in-out infinite;
      box-shadow: 0 0 8px 2px rgba(126, 184, 255, .5);
    }

    @keyframes scanBeam {
      0% {
        top: 12px;
        opacity: 0;
      }

      10% {
        opacity: 1;
      }

      90% {
        opacity: 1;
      }

      100% {
        top: calc(100% - 12px);
        opacity: 0;
      }
    }

    .qr-corner {
      position: absolute;
      width: 20px;
      height: 20px;
      border-color: rgba(255, 255, 255, .7);
      border-style: solid;
    }

    .qr-corner.tl {
      top: 0;
      left: 0;
      border-width: 2px 0 0 2px;
      border-radius: 4px 0 0 0;
    }

    .qr-corner.tr {
      top: 0;
      right: 0;
      border-width: 2px 2px 0 0;
      border-radius: 0 4px 0 0;
    }

    .qr-corner.bl {
      bottom: 0;
      left: 0;
      border-width: 0 0 2px 2px;
      border-radius: 0 0 0 4px;
    }

    .qr-corner.br {
      bottom: 0;
      right: 0;
      border-width: 0 2px 2px 0;
      border-radius: 0 0 4px 0;
    }

    .art-tagline {
      font-size: .7rem;
      font-weight: 600;
      letter-spacing: .2em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, .5);
      margin-bottom: 10px;
    }

    .art-title {
      font-size: 1.9rem;
      font-weight: 800;
      color: #fff;
      line-height: 1.1;
      margin-bottom: 10px;
    }

    .art-desc {
      font-size: .82rem;
      color: rgba(255, 255, 255, .55);
      line-height: 1.7;
    }

    .ring {
      position: absolute;
      border-radius: 50%;
      border: 1px solid rgba(255, 255, 255, .08);
      pointer-events: none;
    }

    .ring-1 {
      width: 260px;
      height: 260px;
      top: -60px;
      right: -60px;
      animation: ringPulse 6s ease-in-out infinite;
    }

    .ring-2 {
      width: 180px;
      height: 180px;
      bottom: -30px;
      left: -40px;
      animation: ringPulse 8s ease-in-out infinite reverse;
    }

    @keyframes ringPulse {

      0%,
      100% {
        transform: scale(1);
        opacity: .6;
      }

      50% {
        transform: scale(1.08);
        opacity: 1;
      }
    }
    .side-form {
      padding: 52px 48px;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .brand-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 36px;
      animation: fadeUp .5s .1s ease both;
    }

    .brand-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      border: 1px solid #e4ecff;
      background: #f4f8ff;
      overflow: hidden;
      display: grid;
      place-items: center;
      flex-shrink: 0;
    }

    .brand-icon img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .brand-text {
      font-size: .78rem;
      font-weight: 700;
      color: #1a2a6c;
      line-height: 1.3;
    }

    .brand-text small {
      display: block;
      font-weight: 400;
      color: #8fa0c8;
      font-size: .68rem;
    }

    .form-title {
      font-size: 2rem;
      font-weight: 800;
      color: #0d1b4b;
      line-height: 1.1;
      margin-bottom: 6px;
      animation: fadeUp .5s .15s ease both;
    }

    .form-caption {
      font-size: .82rem;
      color: #8fa0c8;
      margin-bottom: 30px;
      animation: fadeUp .5s .2s ease both;
    }

    @keyframes fadeUp {
      from {
        opacity: 0;
        transform: translateY(14px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .flash {
      background: #fff2f2;
      border: 1px solid #ffd6d6;
      color: #c0392b;
      border-radius: 12px;
      padding: 10px 14px;
      font-size: .8rem;
      font-weight: 600;
      margin-bottom: 18px;
    }

    .field-group {
      margin-bottom: 16px;
      animation: fadeUp .5s ease both;
    }

    .field-group:nth-child(1) {
      animation-delay: .25s;
    }

    .field-group:nth-child(2) {
      animation-delay: .32s;
    }

    .field-label {
      font-size: .7rem;
      font-weight: 700;
      letter-spacing: .1em;
      text-transform: uppercase;
      color: #6b7fa8;
      margin-bottom: 8px;
      display: block;
    }

    .field-wrap {
      position: relative;
    }

    .field {
      width: 100%;
      background: #f4f7ff;
      border: 1.5px solid #e2e9ff;
      border-radius: 14px;
      padding: 13px 16px;
      font-family: 'Sora', sans-serif;
      font-size: .88rem;
      color: #0d1b4b;
      outline: none;
      transition: all .2s ease;
    }

    .field::placeholder {
      color: #b8c4df;
    }

    .field:focus {
      border-color: #6b8fff;
      background: #fff;
      box-shadow: 0 0 0 4px rgba(107, 143, 255, .12);
    }

    .field:hover:not(:focus) {
      border-color: #c8d6ff;
    }

    .toggle-pass {
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      color: #b8c4df;
      cursor: pointer;
      font-size: .85rem;
      padding: 4px;
      transition: color .2s;
      line-height: 1;
    }

    .toggle-pass:hover {
      color: #6b8fff;
    }

    .forgot-row {
      text-align: right;
      margin: 10px 0 24px;
      animation: fadeUp .5s .38s ease both;
    }

    .forgot-link {
      font-size: .75rem;
      font-weight: 600;
      color: #8fa0c8;
      text-decoration: none;
      transition: color .2s;
    }

    .forgot-link:hover {
      color: #6b8fff;
    }

    .btn-main {
      width: 100%;
      padding: 14px;
      border: none;
      border-radius: 18px;
      clip-path: polygon(6% 0%, 94% 0%, 100% 6%, 100% 94%, 94% 100%, 6% 100%, 0% 94%, 0% 6%);
      font-family: 'Sora', sans-serif;
      font-size: .88rem;
      font-weight: 700;
      color: #fff;
      cursor: pointer;
      letter-spacing: .04em;
      position: relative;
      overflow: hidden;
      background: linear-gradient(135deg, #2a4090, #4266d4, #3b5fd4);
      background-size: 200% 100%;
      transition: transform .2s, box-shadow .2s, background-position .4s;
      animation: fadeUp .5s .44s ease both;
      box-shadow: 0 12px 28px rgba(42, 64, 144, .3), 0 4px 8px rgba(42, 64, 144, .2);
    }

    .btn-main:hover {
      transform: translateY(-2px);
      box-shadow: 0 18px 36px rgba(42, 64, 144, .35), 0 6px 12px rgba(42, 64, 144, .2);
      background-position: 100% 0;
    }

    .btn-main:active {
      transform: translateY(0);
    }

    .btn-main::after {
      content: '';
      position: absolute;
      top: -50%;
      left: -80%;
      width: 60%;
      height: 200%;
      background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .22), transparent);
      transform: skewX(-20deg);
      animation: btnShine 3.5s ease-in-out infinite;
    }

    @keyframes btnShine {
      0% {
        left: -80%;
      }

      40% {
        left: 130%;
      }

      100% {
        left: 130%;
      }
    }

    .btn-main span {
      position: relative;
      z-index: 1;
    }

    .signup-note {
      text-align: center;
      margin-top: 20px;
      font-size: .78rem;
      color: #8fa0c8;
      animation: fadeUp .5s .5s ease both;
    }

    .signup-note a {
      color: #3b5fd4;
      font-weight: 700;
      text-decoration: none;
      border-bottom: 1.5px solid #c0d0ff;
      padding-bottom: 1px;
      transition: border-color .2s, color .2s;
    }

    .signup-note a:hover {
      border-color: #3b5fd4;
    }

    .modal-content {
      border-radius: 20px !important;
      border: 1px solid #e2e9ff !important;
      box-shadow: 0 20px 60px rgba(42, 64, 144, .15) !important;
    }

    .modal-header {
      border-bottom: 1px solid #f0f4ff !important;
    }

    .modal-title {
      font-weight: 800 !important;
      color: #0d1b4b !important;
      font-size: 1rem !important;
    }

    html,
    body {
      height: auto;
    }

    body {
      font-family: 'Sora', sans-serif;
      background: #f0f4ff;

      /* instead of min-height:100vh + overflow:hidden */
      min-height: 100dvh;
      /* better on mobile than 100vh */
      padding: 20px;

      display: flex;
      align-items: center;
      justify-content: center;

      overflow-x: hidden;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background:
        radial-gradient(ellipse 80% 60% at 15% 20%, #dce8ff 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 80%, #e4edff 0%, transparent 55%),
        #f0f4ff;
      z-index: 0;
      animation: meshShift 12s ease-in-out infinite alternate;
      pointer-events: none;
    }
    .card {
      position: relative;
      z-index: 1;
      width: min(960px, 100%);
      min-height: unset;
      max-height: calc(100dvh - 40px);
      overflow: hidden;

      background: rgba(255, 255, 255, 0.75);
      backdrop-filter: blur(32px) saturate(180%);
      -webkit-backdrop-filter: blur(32px) saturate(180%);
      border: 1px solid rgba(255, 255, 255, 0.9);
      border-radius: 32px;
      box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.8) inset,
        0 40px 80px rgba(100, 130, 200, 0.18),
        0 8px 20px rgba(100, 130, 200, 0.1);

      display: grid;
      grid-template-columns: 1fr 1fr;
    }

    .side-form {
      padding: 52px 48px;
      display: flex;
      flex-direction: column;
      justify-content: center;

      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }

    @media (max-width: 700px) {
      body {
        padding: 14px;
        align-items: stretch;
        /* ✅ allow full height layout */
        justify-content: center;
      }

      .card {
        grid-template-columns: 1fr;
        border-radius: 22px;
        max-height: none;
        overflow: visible;
      }

      .side-art {
        display: none;
      }

      .side-form {
        padding: 28px 20px;
        overflow: visible;
      }

      .form-title {
        font-size: 1.65rem;
      }
    }

    @media (max-height: 640px) and (max-width: 900px) {
      .card {
        max-height: calc(100dvh - 24px);
      }

      .side-form {
        justify-content: flex-start;
      }
    }