@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

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

/* ══ VARIABLES ══ */
:root {
  --gold:   #f4ce14;
  --green:  #4cbb17;
  --bg:     #060606;
  --border: rgba(255,255,255,0.08);
  --text:   #f7f7f9;
  --muted:  rgba(247,247,249,0.4);
  --error:  #f87171;
}
/* ══ LAYOUT ══ */
.page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 460px;
  height: 100vh;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;           /* căn giữa */
}

/* ══ BASE ══ */
html, body {
  height: 100%;
  background: var(--bg);
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  overflow: hidden;
  justify-content: center;  /* ← thêm */
}

/* ══ BACKGROUND ══ */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.bg-mesh {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 75% 50%, rgba(76,187,23,.06) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 20% 30%, rgba(244,206,20,.04) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 85% 85%, rgba(76,187,23,.05) 0%, transparent 55%);
  animation: meshPulse 10s ease-in-out infinite alternate;
}
@keyframes meshPulse { 0% { opacity: .6; } 100% { opacity: 1; } }

.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(76,187,23,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76,187,23,.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

.bg-noise {
  position: absolute; inset: 0;
  opacity: .03; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

.bg-words { position: absolute; inset: 0; overflow: hidden; }

.bg-word {
  position: absolute;
  font-size: 10px; font-weight: 800;
  letter-spacing: .18em; text-transform: uppercase;
  white-space: nowrap; pointer-events: none;
  animation: wordScroll 22s linear infinite; opacity: 0;
}
.bg-word:nth-child(1) { top: 10%; color: rgba(76,187,23,.055);  animation-delay: 0s;  animation-duration: 24s; }
.bg-word:nth-child(2) { top: 24%; color: rgba(244,206,20,.04);  animation-delay: 4s;  animation-duration: 20s; }
.bg-word:nth-child(3) { top: 40%; color: rgba(76,187,23,.045);  animation-delay: 8s;  animation-duration: 26s; }
.bg-word:nth-child(4) { top: 56%; color: rgba(244,206,20,.035); animation-delay: 2s;  animation-duration: 22s; }
.bg-word:nth-child(5) { top: 72%; color: rgba(76,187,23,.05);   animation-delay: 6s;  animation-duration: 28s; }
.bg-word:nth-child(6) { top: 86%; color: rgba(244,206,20,.04);  animation-delay: 10s; animation-duration: 21s; }
@keyframes wordScroll {
  0%   { transform: translateX(-5%); opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { transform: translateX(105vw); opacity: 0; }
}

/* ══ LAYOUT ══ */
.page {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 460px;
  height: 100vh;
}

/* ══ LEFT PANEL ══ */
.left {
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px 64px;
  border-right: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
}

.logo-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 52px;
  opacity: 0; animation: fadeUp .5s ease .1s forwards;
}
.logo-img {
  width: 160px;
  height: auto;
  display: block;
}

/* Badge ripple */
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(76,187,23,.1);
  border: 1.5px solid rgba(76,187,23,.5);
  border-radius: 999px;
  padding: 7px 16px 7px 7px;
  margin-bottom: 24px; width: fit-content;
  box-shadow: 0 0 14px rgba(76,187,23,.1);
  opacity: 0; animation: fadeUp .5s ease .2s forwards;
}
.rpl { position: relative; width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.rpl .ring { position: absolute; border-radius: 50%; border: 1.5px solid var(--green); animation: rpl 2.4s ease-out infinite; opacity: 0; }
.rpl .ring:nth-child(1) { width: 100%;  height: 100%;  animation-delay: 0s;   }
.rpl .ring:nth-child(2) { width: 160%;  height: 160%;  animation-delay: .6s;  }
.rpl .ring:nth-child(3) { width: 240%;  height: 240%;  animation-delay: 1.2s; }
.rpl .core { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); position: relative; z-index: 1; }
@keyframes rpl { 0% { opacity: .7; transform: scale(.5); } 100% { opacity: 0; transform: scale(1); } }
.badge-txt { font-size: 11px; font-weight: 700; color: var(--green); }

.headline {
  font-size: 44px; font-weight: 900; line-height: 1.1; letter-spacing: -.02em;
  margin-bottom: 18px;
  opacity: 0; animation: fadeUp .5s ease .3s forwards;
}
.headline-grad {
  background: linear-gradient(90deg, var(--gold) 0%, var(--green) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.desc {
  font-size: 14px; font-weight: 600; color: var(--muted);
  line-height: 1.75; max-width: 380px; margin-bottom: 36px;
  opacity: 0; animation: fadeUp .5s ease .4s forwards;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; opacity: 0; animation: fadeUp .5s ease .5s forwards; }
.pill  { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 5px 13px; border-radius: 6px; }
.pi { background: rgba(244,206,20,.12); color: var(--gold);  border: 1px solid rgba(244,206,20,.3); }
.pt { background: rgba(76,187,23,.12);  color: var(--green); border: 1px solid rgba(76,187,23,.3);  }
.pd { background: rgba(255,255,255,.05); color: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.1); }
.pe { background: rgba(76,187,23,.18);  color: var(--green); border: 1px solid rgba(76,187,23,.4);  }

/* ══ RIGHT PANEL ══ */
.right {
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 44px;
  background: rgba(255,255,255,.015);
  position: relative; overflow-y: auto;
}
.right::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--green) 40%, var(--gold) 60%, transparent);
}

.form-hd   { margin-bottom: 28px; opacity: 0; animation: fadeUp .5s ease .25s forwards; }
.form-title { font-size: 24px; font-weight: 900; letter-spacing: -.01em; margin-bottom: 6px; }
.form-reg  { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.form-reg a { color: var(--green); text-decoration: none; font-weight: 700; transition: color .18s; }
.form-reg a:hover { color: var(--gold); }

/* Social */
.socials { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; opacity: 0; animation: fadeUp .5s ease .35s forwards; }
.btn-soc {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px; padding: 12px 14px;
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 700;
  color: rgba(255,255,255,.7); cursor: pointer; width: 100%;
  transition: border-color .18s, background .18s, color .18s, transform .15s;
}
.btn-soc:hover { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); color: var(--text); transform: translateY(-1px); }

/* Divider */
.divider { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; opacity: 0; animation: fadeUp .5s ease .4s forwards; }
.div-line { flex: 1; height: 1px; background: var(--border); }
.div-txt  { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.2); }

/* Error */
.error-msg {
  display: none;
  background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3);
  border-radius: 8px; padding: 10px 14px;
  font-size: 12px; font-weight: 700; color: var(--error); margin-bottom: 14px;
}
.error-msg.show { display: block; animation: fadeUp .3s ease forwards; }

/* Fields */
.fields { display: flex; flex-direction: column; gap: 14px; margin-bottom: 6px; opacity: 0; animation: fadeUp .5s ease .45s forwards; }
.field  { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.field-wrap  { position: relative; }
.field-input {
  width: 100%;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 9px; padding: 11px 14px;
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 600; color: var(--text);
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field-input::placeholder { color: rgba(255,255,255,.18); }
.field-input:focus { border-color: rgba(76,187,23,.6); background: rgba(76,187,23,.04); box-shadow: 0 0 0 3px rgba(76,187,23,.08); }
.field-input.error { border-color: rgba(248,113,113,.5) !important; box-shadow: 0 0 0 3px rgba(248,113,113,.08) !important; }
.pwd-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.3); padding: 2px; transition: color .18s;
}
.pwd-toggle:hover { color: rgba(255,255,255,.7); }

/* Remember + Forgot */
.form-row { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 18px; opacity: 0; animation: fadeUp .5s ease .5s forwards; }
.remember { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.remember input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--green); cursor: pointer; }
.remember-txt { font-size: 12px; font-weight: 600; color: var(--muted); }
.forgot { font-size: 12px; font-weight: 700; color: var(--muted); text-decoration: none; transition: color .18s; }
.forgot:hover { color: var(--gold); }

/* Submit */
.btn-submit {
  width: 100%; background: var(--green);
  border: none; border-radius: 10px; padding: 13px 20px;
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 800; letter-spacing: .04em; color: #000;
  cursor: pointer;
  transition: background .18s, transform .15s, box-shadow .18s;
  position: relative; overflow: hidden;
  opacity: 0; animation: fadeUp .5s ease .55s forwards;
}
.btn-submit:hover:not(:disabled)  { background: #5dd620; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(76,187,23,.35); }
.btn-submit:active:not(:disabled) { transform: translateY(0); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }
.btn-submit .spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(0,0,0,.3); border-top-color: #000; border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto; }
.btn-submit.loading .btn-txt    { display: none; }
.btn-submit.loading .spinner    { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Note */
.form-note { margin-top: 20px; text-align: center; font-size: 10px; font-weight: 600; color: rgba(255,255,255,.18); line-height: 1.7; opacity: 0; animation: fadeUp .5s ease .6s forwards; }
.form-note a { color: rgba(255,255,255,.35); text-decoration: none; transition: color .18s; }
.form-note a:hover { color: var(--gold); }

/* ══ ANIMATION ══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══ RESPONSIVE ══ */
@media (max-width: 768px) {
  html, body { overflow: auto; }
  .page { grid-template-columns: 1fr; height: auto; }
  .left { display: none; }
  .right { min-height: 100vh; padding: 40px 24px; overflow: visible; }
}
