/* ============================================================
   JMT Core — Auth Pages CSS
   Applies to: /login/ and /register/
   Version: 1.0
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --bg:    #02040b;
  --line:  rgba(255,255,255,.08);
  --muted: rgba(255,255,255,.50);
  --soft:  rgba(255,255,255,.26);
  --text:  rgba(255,255,255,.93);
  --green: #9cff38;
  --cyan:  #7de7ff;
  --red:   #ff6464;
  --en:    'Manrope', sans-serif;
  --th:    'Prompt', 'Manrope', sans-serif;
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
a { text-decoration: none; color: inherit; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: rgba(156,255,56,.4); border-radius: 2px; }

body {
  font-family: var(--en);
  background: var(--bg);
  color: var(--text);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── SCANLINES ───────────────────────────────────────────────── */
.jmt-scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,.032) 3px, rgba(0,0,0,.032) 4px
  );
}

/* ── LAYOUT ──────────────────────────────────────────────────── */
.jmt-auth-wrap {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 100vh;
}

/* ── LEFT — BRAND PANEL ──────────────────────────────────────── */
.jmt-auth-brand {
  position: relative;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 42px;
  overflow: hidden;
  background: linear-gradient(165deg, #020609 0%, #02040b 55%, #030810 100%);
}

/* Aurora */
.jmt-aurora { position: absolute; inset: 0; pointer-events: none; }
.jmt-aurora .a1 {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(156,255,56,.085) 0%, transparent 68%);
  top: -110px; left: -110px; filter: blur(56px);
  animation: jmtA1 11s ease-in-out infinite;
}
.jmt-aurora .a2 {
  position: absolute; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(125,231,255,.058) 0%, transparent 68%);
  bottom: 160px; right: -70px; filter: blur(44px);
  animation: jmtA2 14s ease-in-out infinite;
}
.jmt-aurora .a3 {
  position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(156,255,56,.042) 0%, transparent 68%);
  bottom: -50px; left: 60px; filter: blur(38px);
  animation: jmtA3 8s ease-in-out infinite;
}
@keyframes jmtA1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(24px,30px) scale(1.1); } }
@keyframes jmtA2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-18px,22px) scale(1.08); } }
@keyframes jmtA3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(14px,-20px) scale(1.06); } }

/* Brand logo */
.jmt-auth-logo {
  position: relative; z-index: 2;
  display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: 1.2px;
  color: var(--text);
  animation: jmtHup .7s ease both; animation-delay: .08s;
}
.jmt-auth-logo em { color: var(--green); font-style: normal; }

/* Brand mid */
.jmt-brand-mid { position: relative; z-index: 2; }

.jmt-eyebrow {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: rgba(156,255,56,.68);
  margin-bottom: 20px;
  animation: jmtHup .7s ease both; animation-delay: .18s;
}

.jmt-brand-headline {
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 500; line-height: 1.08; letter-spacing: -1.4px;
  margin-bottom: 40px;
  animation: jmtHup .85s cubic-bezier(.12,1,.3,1) both; animation-delay: .28s;
}

/* ── Unlock items (Register) ─────────────────────────────────── */
.jmt-unlock-label {
  font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--soft); margin-bottom: 14px;
  animation: jmtHup .7s ease both; animation-delay: .38s;
}

.jmt-unlocks {
  display: grid; gap: 9px;
  animation: jmtHup .7s ease both; animation-delay: .44s;
}

.jmt-unlock {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 13px 16px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 11px;
  background: rgba(255,255,255,.018);
  transition: border-color .25s;
}
.jmt-unlock:hover { border-color: rgba(156,255,56,.16); }

.jmt-unlock-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
  background: var(--green); box-shadow: 0 0 8px rgba(156,255,56,.6);
  margin-top: 5px;
}
.jmt-unlock-body { flex: 1; }
.jmt-unlock-name { font-size: 12px; font-weight: 400; color: var(--text); line-height: 1.4; margin-bottom: 2px; }
.jmt-unlock-desc { font-size: 11px; font-weight: 300; color: var(--soft); line-height: 1.5; }

/* ── Stat rows (Login) ───────────────────────────────────────── */
.jmt-stats-label {
  font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--soft); margin-bottom: 14px;
  animation: jmtHup .7s ease both; animation-delay: .38s;
}

.jmt-stats {
  display: grid; gap: 8px;
  animation: jmtHup .7s ease both; animation-delay: .44s;
}

.jmt-stat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(0,0,0,.22);
  transition: border-color .2s;
}
.jmt-stat-row:hover { border-color: rgba(255,255,255,.1); }
.jmt-stat-label { font-size: 12px; font-weight: 300; color: var(--muted); }
.jmt-stat-value { font-size: 13px; font-weight: 500; color: var(--text); letter-spacing: -.3px; }
.jmt-stat-value.green { color: var(--green); }
.jmt-stat-value.cyan  { color: var(--cyan); }

/* Brand footer */
.jmt-brand-footer {
  position: relative; z-index: 2;
  font-size: 11px; color: var(--soft); font-weight: 300;
  animation: jmtHup .7s ease both; animation-delay: .6s;
  display: flex; align-items: center; gap: 8px;
}
.jmt-brand-footer--dot::before {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(156,255,56,.5); box-shadow: 0 0 8px rgba(156,255,56,.5); flex-shrink: 0;
}

/* ── RIGHT — FORM PANEL ──────────────────────────────────────── */
.jmt-auth-form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px;
  position: relative;
  overflow-y: auto;
}

.jmt-auth-form-panel::before {
  content: ''; position: absolute;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(156,255,56,.028) 0%, transparent 65%);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  filter: blur(64px); pointer-events: none;
}

.jmt-auth-card {
  width: 100%; max-width: 440px;
  position: relative; z-index: 1;
  padding: 8px 0;
}

/* Card header */
.jmt-card-tag {
  display: block;
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: rgba(156,255,56,.68);
  margin-bottom: 14px;
  animation: jmtHup .7s ease both; animation-delay: .22s;
}
.jmt-card-title {
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 500; letter-spacing: -1.2px; line-height: 1.08;
  margin-bottom: 7px;
  animation: jmtHup .85s cubic-bezier(.12,1,.3,1) both; animation-delay: .32s;
}
.jmt-card-sub {
  font-size: 13px; font-weight: 300; color: var(--muted);
  line-height: 1.7; margin-bottom: 32px;
  animation: jmtHup .7s ease both; animation-delay: .42s;
}
.jmt-divider {
  width: 100%; height: 1px; background: var(--line);
  margin-bottom: 26px;
  animation: jmtHup .7s ease both; animation-delay: .48s;
}

/* ── FORM ELEMENTS ───────────────────────────────────────────── */
.jmt-form { animation: jmtHup .7s ease both; animation-delay: .54s; }

.jmt-form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.jmt-form-row-2 .jmt-field { margin-bottom: 0; }

.jmt-field { margin-bottom: 14px; position: relative; }

.jmt-label {
  display: block;
  font-size: 11px; font-weight: 400; letter-spacing: 1px;
  text-transform: uppercase; color: var(--soft);
  margin-bottom: 8px;
}
.jmt-label em { color: rgba(156,255,56,.5); font-style: normal; }

.jmt-input {
  display: block; width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,.032);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  color: var(--text);
  font-family: var(--en); font-size: 14px; font-weight: 300;
  outline: none;
  transition: border-color .25s, background .25s;
  -webkit-appearance: none;
}
.jmt-input:focus {
  border-color: rgba(156,255,56,.38);
  background: rgba(156,255,56,.025);
}
.jmt-input::placeholder { color: rgba(255,255,255,.22); }

/* Chrome autofill override — prevents white background */
.jmt-input:-webkit-autofill,
.jmt-input:-webkit-autofill:hover,
.jmt-input:-webkit-autofill:focus,
.jmt-input:-webkit-autofill:active {
  -webkit-text-fill-color: rgba(255,255,255,.93) !important;
  -webkit-box-shadow: 0 0 0 1000px #02040b inset !important;
  background-color: #02040b !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: rgba(255,255,255,.93);
  border-color: rgba(255,255,255,.1) !important;
}
/* Double-specificity fallback for stubborn autofill */
.jmt-form .jmt-input:-webkit-autofill,
.jmt-form .jmt-input:-webkit-autofill:hover,
.jmt-form .jmt-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #02040b inset !important;
  background-color: #02040b !important;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: rgba(255,255,255,.93) !important;
  -webkit-box-shadow: 0 0 0 1000px #02040b inset !important;
  background-color: #02040b !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Password toggle */
.jmt-input-wrap { position: relative; }
.jmt-input-wrap .jmt-input { padding-right: 46px; }

.jmt-pw-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px;
  color: rgba(255,255,255,.3); transition: color .2s;
  display: flex; align-items: center; justify-content: center;
}
.jmt-pw-toggle:hover { color: rgba(255,255,255,.6); }
.jmt-pw-toggle svg { width: 16px; height: 16px; display: block; }

/* Forgot link */
.jmt-forgot {
  display: block; text-align: right;
  font-size: 12px; font-weight: 300; color: var(--soft);
  margin-bottom: 22px; margin-top: -4px;
  transition: color .2s;
}
.jmt-forgot:hover { color: var(--green); }

/* Primary button */
.jmt-btn-primary {
  display: block; width: 100%;
  padding: 14px;
  background: var(--green); color: #061006;
  border: none; border-radius: 9px;
  font-family: var(--en); font-size: 13px; font-weight: 600;
  letter-spacing: .3px; cursor: pointer;
  transition: background .2s, box-shadow .2s;
  -webkit-appearance: none;
  position: relative; overflow: hidden;
}
.jmt-btn-primary:hover {
  background: #b8ff60;
  box-shadow: 0 0 44px rgba(156,255,56,.28);
}
.jmt-btn-primary:active { transform: scale(.99); }
.jmt-btn-primary:disabled { opacity: .5; cursor: wait; }

/* Or divider */
.jmt-or {
  display: flex; align-items: center; gap: 14px;
  margin: 20px 0;
}
.jmt-or::before, .jmt-or::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.jmt-or span { font-size: 11px; font-weight: 300; color: var(--soft); letter-spacing: .5px; }

/* Google button */
.jmt-btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  font-family: var(--en); font-size: 13px; font-weight: 300;
  color: var(--muted); cursor: pointer;
  transition: border-color .25s, color .25s, background .25s;
  -webkit-appearance: none;
}
.jmt-btn-google:hover {
  border-color: rgba(255,255,255,.22);
  color: var(--text);
  background: rgba(255,255,255,.028);
}
.jmt-btn-google svg { width: 17px; height: 17px; flex-shrink: 0; }

/* Terms */
.jmt-terms {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; font-weight: 300; color: var(--muted);
  margin: 18px 0 6px; cursor: pointer; line-height: 1.7;
}
.jmt-terms input[type="checkbox"] {
  width: 14px; height: 14px; accent-color: var(--green);
  flex-shrink: 0; margin-top: 3px; cursor: pointer;
}
.jmt-terms a { color: rgba(156,255,56,.7); transition: color .2s; }
.jmt-terms a:hover { color: var(--green); }

/* Error / notice messages */
.jmt-notice {
  display: none;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.jmt-notice.visible { display: block; }
.jmt-notice.error {
  border: 1px solid rgba(255,100,100,.22);
  background: rgba(255,100,100,.06);
  color: var(--red);
}
.jmt-notice.success {
  border: 1px solid rgba(156,255,56,.22);
  background: rgba(156,255,56,.06);
  color: var(--green);
}

/* Bottom links */
.jmt-auth-bottom {
  margin-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  animation: jmtHup .7s ease both; animation-delay: .7s;
}
.jmt-auth-link { font-size: 12px; font-weight: 300; color: var(--soft); transition: color .25s; }
.jmt-auth-link:hover { color: rgba(255,255,255,.6); }
.jmt-auth-alt { font-size: 12px; font-weight: 300; color: var(--muted); }
.jmt-auth-alt a { color: rgba(156,255,56,.72); font-weight: 400; margin-left: 4px; transition: color .25s; }
.jmt-auth-alt a:hover { color: var(--green); }

/* ── CUSTOM COUNTRY DROPDOWN ─────────────────────────────────── */
.jmt-custom-select { position: relative; width: 100%; }

.jmt-cs-trigger {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 13px 16px;
  background: rgba(255,255,255,.032);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 9px;
  color: var(--text);
  font-family: var(--en); font-size: 14px; font-weight: 300;
  cursor: pointer;
  transition: border-color .25s, background .25s;
  user-select: none;
}
.jmt-cs-trigger:hover,
.jmt-custom-select.open .jmt-cs-trigger {
  border-color: rgba(156,255,56,.38);
  background: rgba(156,255,56,.025);
}
.jmt-cs-trigger .cs-flag { font-size: 18px; line-height: 1; flex-shrink: 0; }
.jmt-cs-trigger .cs-label { flex: 1; text-align: left; }
.jmt-cs-trigger .cs-label.placeholder { color: rgba(255,255,255,.22); }

.jmt-cs-arrow {
  margin-left: auto; flex-shrink: 0;
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  color: rgba(255,255,255,.3);
}
.jmt-custom-select.open .jmt-cs-arrow { transform: rotate(180deg); }

.jmt-cs-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 200;
  background: #0c111a;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  overflow: hidden;
  max-height: 0; opacity: 0; pointer-events: none;
  transition: max-height .35s cubic-bezier(.22,1,.36,1), opacity .25s ease;
  box-shadow: 0 24px 60px rgba(0,0,0,.7);
}
.jmt-custom-select.open .jmt-cs-dropdown {
  max-height: 260px; opacity: 1; pointer-events: all;
}
.jmt-cs-list {
  overflow-y: auto; max-height: 258px; padding: 6px;
}
.jmt-cs-list::-webkit-scrollbar { width: 3px; }
.jmt-cs-list::-webkit-scrollbar-thumb { background: rgba(156,255,56,.3); border-radius: 2px; }

.jmt-cs-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 7px;
  font-size: 13px; font-weight: 300; color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.jmt-cs-option:hover { background: rgba(255,255,255,.055); color: var(--text); }
.jmt-cs-option.selected { background: rgba(156,255,56,.08); color: var(--text); }
.jmt-cs-option .cs-flag { font-size: 18px; line-height: 1; flex-shrink: 0; }

/* ── MOBILE LOGO ─────────────────────────────────────────────── */
.jmt-mobile-logo {
  display: none;
  font-size: 12px; font-weight: 600; letter-spacing: 1.2px;
  color: var(--text); margin-bottom: 24px;
}
.jmt-mobile-logo em { color: var(--green); font-style: normal; }

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes jmtHup {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */

/* 960px — stack brand above form (Register only) */
@media (max-width: 960px) {
  .jmt-auth-wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .jmt-auth-brand {
    border-right: none; border-bottom: 1px solid var(--line);
    padding: 36px 32px 40px;
  }
  .jmt-brand-headline { font-size: clamp(22px,5vw,32px); margin-bottom: 24px; }
  .jmt-unlocks { grid-template-columns: repeat(2,1fr); }
  .jmt-brand-footer { margin-top: 24px; }
  .jmt-auth-form-panel { padding: 44px 36px; }
}

/* 768px — mobile: hide brand, show centered card */
@media (max-width: 768px) {
  .jmt-auth-brand { display: none; }

  .jmt-auth-form-panel {
    min-height: 100dvh; min-height: 100vh; /* fallback */
    display: flex; align-items: center; justify-content: center;
    padding: 20px 16px;
    background: radial-gradient(ellipse 70% 60% at 50% 30%, rgba(156,255,56,.05), transparent);
  }

  .jmt-auth-card {
    max-width: 440px; width: 100%;
    background: rgba(255,255,255,.028);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    padding: 28px 24px;
    box-shadow: 0 48px 100px rgba(0,0,0,.6), 0 0 0 1px rgba(156,255,56,.04) inset;
    position: relative; overflow: hidden;
  }
  .jmt-auth-card::before {
    content: ''; position: absolute;
    width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(circle, rgba(156,255,56,.04) 0%, transparent 70%);
    top: -80px; right: -60px; filter: blur(40px);
    pointer-events: none; z-index: 0;
  }
  .jmt-auth-card > * { position: relative; z-index: 1; }

  .jmt-mobile-logo { display: flex; margin-bottom: 16px; }
  .jmt-card-tag { margin-bottom: 10px; }
  .jmt-card-title { font-size: 24px; margin-bottom: 5px; }
  .jmt-card-sub { margin-bottom: 18px; font-size: 12px; }
  .jmt-divider { margin-bottom: 16px; }
  .jmt-field { margin-bottom: 10px; }
  .jmt-label { margin-bottom: 6px; font-size: 10px; }
  .jmt-input { padding: 11px 14px; font-size: 13px; }
  .jmt-forgot { margin-bottom: 14px; font-size: 11px; }
  .jmt-btn-primary { padding: 12px; font-size: 12px; }
  .jmt-or { margin: 14px 0; }
  .jmt-btn-google { padding: 11px; font-size: 12px; }
  .jmt-terms { margin: 12px 0 4px; font-size: 11px; }
  .jmt-auth-bottom { margin-top: 16px; }
  .jmt-form-row-2 { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
  .jmt-form-row-2 .jmt-field { margin-bottom: 0; }
  .jmt-auth-bottom { flex-direction: row; gap: 0; align-items: center; }
  .jmt-cs-trigger { padding: 11px 14px; font-size: 13px; }
}

/* 620px */
@media (max-width: 620px) {
  .jmt-auth-form-panel { padding: 16px 14px; }
  .jmt-auth-card { padding: 24px 20px; }
  .jmt-card-title { font-size: 22px; }
  .jmt-form-row-2 { grid-template-columns: 1fr 1fr; gap: 8px; }
}

/* 400px */
@media (max-width: 400px) {
  .jmt-auth-form-panel { padding: 12px 10px; }
  .jmt-auth-card { padding: 22px 16px; border-radius: 14px; }
  .jmt-card-title { font-size: 20px; }
  .jmt-mobile-logo { margin-bottom: 12px; }
  .jmt-card-sub { margin-bottom: 14px; }
  .jmt-divider { margin-bottom: 12px; }
  .jmt-field { margin-bottom: 8px; }
  .jmt-input { padding: 10px 12px; font-size: 13px; }
  .jmt-btn-primary { padding: 11px; }
  .jmt-or { margin: 10px 0; }
  .jmt-btn-google { padding: 10px; }
  .jmt-terms { margin: 8px 0 2px; font-size: 10px; line-height: 1.5; }
  .jmt-auth-bottom { margin-top: 12px; }
  .jmt-form-row-2 { grid-template-columns: 1fr; gap: 0; }
  .jmt-form-row-2 .jmt-field { margin-bottom: 8px; }
}
