:root {
    --primary: #7C3AED; --primary-600: #6D28D9; --primary-700: #5B21B6;
    --primary-300: #C4B5FD; --primary-50: #F5F3FF;
    --grad: linear-gradient(150deg, #8B5CF6 0%, #7C3AED 52%, #5B21B6 100%);
    --bg: #F6F5FB; --surface: #FFFFFF; --border: #ECEAF3; --border-strong: #E0DCEE;
    --text: #1B1530; --text-muted: #6B6680; --text-subtle: #9D98AC;
    --green: #16A34A; --green-bg: #E9F8EF; --amber: #D97706; --amber-bg: #FEF3E2; --red: #DC2626; --red-bg: #FDECEC;
    --shadow-lg: 0 30px 80px rgba(27,21,48,.16);
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; }
  body { background: radial-gradient(1100px 600px at 12% -10%, #EFEBFE 0%, transparent 55%), radial-gradient(900px 600px at 110% 120%, #EDE9FE 0%, transparent 50%), var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; font-size: 15px; display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: clamp(18px, 3vw, 32px); }
  button { font-family: inherit; cursor: pointer; border: none; background: none; }
  a { color: var(--primary); font-weight: 700; text-decoration: none; }
  a:hover { text-decoration: underline; }

  .wrap { display: flex; width: 100%; max-width: 1080px; min-height: min(720px, calc(100vh - 64px)); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface); border: 1px solid rgba(255,255,255,.6); }

  /* ===== brand panel ===== */
  .brand { display: flex; flex-direction: column; width: 50%; max-width: 540px; background: var(--grad); color: #fff; padding: clamp(30px, 3vw, 44px); position: relative; overflow: hidden; }
  .brand::after { content: ""; position: absolute; right: -130px; bottom: -130px; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.07); }
  .brand::before { content: ""; position: absolute; left: -90px; top: -90px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.06); }
  .brand-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 38px 38px; mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%); }
  .brand-logo { display: flex; align-items: center; gap: 11px; position: relative; z-index: 1; }
  .brand-mark { width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,.18); backdrop-filter: blur(4px); display: grid; place-items: center; }
  .brand-mark svg { width: 22px; height: 22px; color: #fff; }
  .brand-name { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
  .brand-head { margin-top: 36px; position: relative; z-index: 1; }
  .brand-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .02em; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); padding: 6px 12px; border-radius: 999px; }
  .brand-pill svg { width: 13px; height: 13px; }
  .brand-head h1 { font-size: 27px; font-weight: 800; letter-spacing: -.022em; line-height: 1.18; margin-top: 16px; max-width: 380px; }
  .brand-head p { font-size: 14.5px; opacity: .9; margin-top: 12px; line-height: 1.6; max-width: 360px; }

  /* live verify card */
  .live { margin-top: 28px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 18px; padding: 16px; position: relative; z-index: 1; backdrop-filter: blur(8px); }
  .live-top { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
  .live-top .lt { font-size: 13px; font-weight: 700; }
  .live-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.16); padding: 4px 10px; border-radius: 999px; }
  .live-badge .pulse { width: 7px; height: 7px; border-radius: 50%; background: #5EE6A8; box-shadow: 0 0 0 0 rgba(94,230,168,.6); animation: pulse 1.6s infinite; }
  @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(94,230,168,.5); } 70% { box-shadow: 0 0 0 7px rgba(94,230,168,0); } 100% { box-shadow: 0 0 0 0 rgba(94,230,168,0); } }
  .live-row { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.1); border-radius: 11px; padding: 10px 12px; margin-bottom: 8px; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; }
  .live-row.show { opacity: 1; transform: none; }
  .live-row .em { flex: 1; font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .live-row .tag { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
  .tag.ok { background: rgba(94,230,168,.22); color: #C7F9E0; }
  .tag.catch { background: rgba(252,211,77,.22); color: #FDE9B4; }
  .tag.bad { background: rgba(252,165,165,.22); color: #FBD3D3; }
  .live-foot { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 12px; }
  .live-stat { background: rgba(255,255,255,.1); border-radius: 11px; padding: 11px 6px; text-align: center; }
  .live-stat .n { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
  .live-stat .l { font-size: 10.5px; opacity: .82; font-weight: 600; margin-top: 1px; }

  .brand-foot { display: flex; align-items: center; gap: 14px; margin-top: 22px; position: relative; z-index: 1; }
  .avatars { display: flex; }
  .avatars span { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #7C3AED; margin-left: -9px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
  .avatars span:first-child { margin-left: 0; }
  .brand-foot .ft { font-size: 12.5px; line-height: 1.4; }
  .brand-foot .ft b { font-weight: 800; }
  .brand-foot .stars { color: #FFD46B; font-size: 12px; letter-spacing: 1px; }

  /* ===== form panel ===== */
  .panel { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; padding: clamp(30px, 4vw, 44px) clamp(22px, 3vw, 30px); }
  .form-card { width: 100%; max-width: 384px; margin: 0 auto; }
  .screen { display: none; animation: fade .35s ease; }
  .screen.active { display: block; }
  @keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

  .mobile-logo { display: none; align-items: center; gap: 11px; margin-bottom: 26px; }
  .mobile-logo .m-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; }
  .mobile-logo .m-mark svg { width: 21px; height: 21px; color: #fff; }
  .mobile-logo .m-name { font-size: 18px; font-weight: 800; }
  .mobile-logo .m-name b { color: var(--primary); }

  .form-card h2 { font-size: 27px; font-weight: 800; letter-spacing: -.025em; }
  .form-card .sub { color: var(--text-muted); margin-top: 7px; font-size: 14.5px; line-height: 1.5; }

  /* social */
  .social { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
  .social-slot { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .social-slot > div { width: 100%; display: flex; justify-content: center; }
  .social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 1.5px solid var(--border-strong); border-radius: 11px; padding: 12px; font-size: 14px; font-weight: 700; color: var(--text); background: #fff; transition: background .14s, border-color .14s, transform .1s; }
  .social-btn:hover { background: var(--bg); border-color: var(--primary-300); }
  .social-btn:active { transform: scale(.99); }
  .social-btn svg, .social-btn img { width: 18px; height: 18px; }
  .gicon { width: 18px; height: 18px; }
  .divider { display: flex; align-items: center; gap: 14px; margin: 22px 0 4px; color: var(--text-subtle); font-size: 12.5px; font-weight: 600; }
  .divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

  .field-group { margin-top: 18px; }
  .field-label { font-size: 13px; font-weight: 700; margin-bottom: 7px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .input { position: relative; display: flex; align-items: center; }
  .input > svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--text-subtle); pointer-events: none; }
  .input input { width: 100%; border: 1.5px solid var(--border-strong); border-radius: 12px; padding: 13px 15px 13px 42px; font-family: inherit; font-size: 15px; color: var(--text); outline: none; transition: border-color .14s, box-shadow .14s; background: var(--surface); }
  .input input::placeholder { color: var(--text-subtle); }
  .input input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
  .input .eye { position: absolute; right: 12px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--text-subtle); }
  .input .eye:hover { color: var(--primary); background: var(--primary-50); }
  .input .eye svg { width: 17px; height: 17px; }

  /* password strength */
  .pw-meter { display: flex; gap: 5px; margin-top: 9px; }
  .pw-meter i { flex: 1; height: 4px; border-radius: 4px; background: var(--border-strong); transition: background .2s; }
  .pw-note { font-size: 12px; font-weight: 600; margin-top: 7px; color: var(--text-subtle); min-height: 15px; }

  .row-between { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
  .check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-muted); font-weight: 600; cursor: pointer; }
  .check input { width: 16px; height: 16px; accent-color: var(--primary); }

  .btn-primary { width: 100%; margin-top: 22px; background: var(--grad); color: #fff; font-weight: 700; font-size: 15px; padding: 14px; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 10px 24px rgba(124,58,237,.3); transition: transform .12s, box-shadow .12s; }
  .btn-primary svg { width: 18px; height: 18px; }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(124,58,237,.38); }
  .btn-primary:active { transform: translateY(0); }
  .btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

  .alt { text-align: center; margin-top: 22px; font-size: 14px; color: var(--text-muted); font-weight: 500; }
  .terms { font-size: 12.5px; color: var(--text-subtle); margin-top: 16px; line-height: 1.55; }
  .hint { font-size: 12.5px; color: var(--red); font-weight: 600; margin-top: 10px; min-height: 16px; }

  /* trust chips under form */
  .trust-chips { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; margin-top: 24px; }
  .trust-chips span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
  .trust-chips svg { width: 14px; height: 14px; color: var(--green); }

  /* OTP */
  .otp-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; margin-bottom: 20px; }
  .otp-icon svg { width: 28px; height: 28px; }
  .otp-row { display: flex; gap: 10px; margin-top: 24px; }
  .otp-box { flex: 1; aspect-ratio: 1; max-width: 56px; text-align: center; font-size: 24px; font-weight: 800; border: 1.5px solid var(--border-strong); border-radius: 13px; outline: none; color: var(--text); transition: border-color .14s, box-shadow .14s; }
  .otp-box:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
  .otp-box.filled { border-color: var(--primary-300); background: var(--primary-50); }
  .resend { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--text-muted); font-weight: 500; }
  .resend b { color: var(--text); }
  .back-btn { display: inline-flex; align-items: center; gap: 7px; color: var(--text-muted); font-weight: 700; font-size: 13.5px; margin-bottom: 18px; }
  .back-btn:hover { color: var(--primary); text-decoration: none; }
  .back-btn svg { width: 16px; height: 16px; }

  @media (max-width: 1180px) {
    .wrap { max-width: 1000px; }
    .brand-head h1 { font-size: 24px; max-width: 340px; }
  }

  @media (max-width: 980px) {
    .brand { display: none; }
    .mobile-logo { display: flex; }
    .panel { padding: 40px 24px 32px; align-items: flex-start; }
    body { padding: 0; }
    .wrap { min-height: 100vh; border-radius: 0; box-shadow: none; border: none; }
    .form-card { max-width: 460px; }
  }

  @media (max-width: 640px) {
    body { display: block; min-height: auto; }
    .wrap { display: block; min-height: 100vh; }
    .panel { display: block; padding: 28px 18px 24px; }
    .form-card { max-width: none; }
    .mobile-logo { margin-bottom: 22px; }
    .form-card h2 { font-size: 34px; line-height: 1.08; }
    .form-card .sub { font-size: 14px; margin-top: 8px; }
    .social { margin-top: 20px; }
    .social-btn,
    .btn-primary { min-height: 52px; }
    .field-group { margin-top: 16px; }
    .field-label { align-items: flex-start; flex-wrap: wrap; }
    .input input { min-height: 52px; font-size: 16px; padding: 14px 15px 14px 42px; }
    .input .eye { right: 10px; width: 32px; height: 32px; }
    .row-between { margin-top: 14px; }
    .alt { margin-top: 18px; }
    .terms { margin-top: 14px; }
    .trust-chips { justify-content: flex-start; gap: 10px 14px; margin-top: 20px; }
    .otp-row { gap: 8px; }
    .otp-box { max-width: none; min-width: 0; height: 52px; aspect-ratio: auto; font-size: 21px; }
    .resend { margin-top: 18px; font-size: 13px; }
  }

  @media (max-width: 420px) {
    .panel { padding: 24px 14px 22px; }
    .mobile-logo { gap: 10px; margin-bottom: 18px; }
    .mobile-logo .m-mark { width: 34px; height: 34px; border-radius: 10px; }
    .mobile-logo .m-name { font-size: 17px; }
    .form-card h2 { font-size: 30px; }
    .social-btn { font-size: 13.5px; padding: 12px 10px; }
    .divider { gap: 10px; font-size: 12px; }
    .check { font-size: 13px; }
    .btn-primary { margin-top: 20px; padding: 13px; }
    .trust-chips span { font-size: 11.5px; }
    .otp-row { gap: 6px; margin-top: 20px; }
    .otp-box { height: 46px; font-size: 19px; border-radius: 11px; }
    .otp-icon { width: 52px; height: 52px; border-radius: 14px; margin-bottom: 18px; }
  }
