/* auth.css — shared styles for login and register pages */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* nav */
nav {
  height: 64px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 8, 8, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--white-line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--blue);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  color: white;
  transition: transform 0.3s ease;
}

.nav-logo:hover .logo-mark { transform: rotate(8deg) scale(1.1); }

.logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--white);
}

.logo-text span { color: var(--blue); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-hint {
  font-size: 13px;
  color: var(--white-dim);
}

.btn-nav {
  padding: 8px 18px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
}

.btn-nav-primary {
  background: var(--blue);
  color: white;
  border: none;
  font-weight: 700;
}

.btn-nav-primary:hover {
  background: var(--blue-dim);
  box-shadow: 0 6px 20px var(--blue-glow);
}

.btn-nav-ghost {
  background: transparent;
  color: var(--white-dim);
  border: 1px solid var(--black-border);
  font-weight: 600;
}

.btn-nav-ghost:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.2);
}

/* page layout */
.page-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 64px);
}

/* left panel */
.left-panel {
  background: var(--black-soft);
  border-right: 1px solid var(--black-border);
  padding: 60px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.left-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.left-panel::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 82, 233, 0.18) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  animation: glow-pulse 8s ease-in-out infinite;
}

.left-content { position: relative; z-index: 2; }

.left-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.left-tag::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--blue);
}

.left-headline {
  font-family: var(--font-display);
  font-size: clamp(48px, 5vw, 72px);
  line-height: 0.93;
  letter-spacing: 1px;
  color: var(--white);
  margin-bottom: 28px;
}

.left-headline em   { font-style: normal; color: var(--blue); }
.left-headline .outline {
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.3);
  color: transparent;
}

.left-body {
  font-size: 15px;
  color: var(--white-dim);
  line-height: 1.75;
  font-weight: 300;
  max-width: 400px;
  margin-bottom: 44px;
}

/* right panel */
.right-panel {
  background: var(--black);
  padding: 60px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.right-panel::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 82, 233, 0.08) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.form-wrap {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  animation: fadeSlideUp 0.6s ease-out both;
}

.form-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.form-title {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 0.93;
  letter-spacing: 1px;
  color: var(--white);
  margin-bottom: 10px;
}

.form-title em { font-style: normal; color: var(--blue); }

.form-sub {
  font-size: 14px;
  color: var(--white-dim);
  margin-bottom: 40px;
  line-height: 1.6;
}

/* step panels */
.step-panel { display: none; }

.step-panel.active {
  display: block;
  animation: stepIn 0.35s ease-out both;
}

/* form fields */
.field { margin-bottom: 20px; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.field-required { color: var(--danger); margin-left: 2px; }

.field-input,
.field-select {
  width: 100%;
  background: var(--black-soft);
  border: 1px solid var(--black-border);
  border-radius: 6px;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--white);
  outline: none;
  transition: all 0.25s ease;
  -webkit-appearance: none;
}

.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.field-select option { background: var(--black-card); color: var(--white); }

.field-input::placeholder { color: rgba(255, 255, 255, 0.18); }

.field-input:focus,
.field-select:focus {
  border-color: var(--blue);
  background: var(--black-card);
  box-shadow: 0 0 0 3px rgba(6, 82, 233, 0.15);
}

.field-hint {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
  line-height: 1.5;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* email info box */
.email-box {
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.email-box-ico {
  flex-shrink: 0;
  color: var(--blue);
  display: flex;
}

.email-box-text { flex: 1; }

.email-box-label {
  font-size: 11px;
  color: #6fa3ff;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.email-box-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

.email-box-exp {
  font-size: 11px;
  color: var(--white-dim);
  margin-top: 2px;
}

/* otp inputs */
.otp-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.otp-input {
  flex: 1;
  background: var(--black-soft);
  border: 1px solid var(--black-border);
  border-radius: 8px;
  height: 58px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--white);
  outline: none;
  transition: all 0.25s ease;
  -webkit-appearance: none;
  caret-color: var(--blue);
}

.otp-input:focus {
  border-color: var(--blue);
  background: var(--black-card);
  box-shadow: 0 0 0 3px rgba(6, 82, 233, 0.15);
}

.otp-input.filled {
  border-color: rgba(6, 82, 233, 0.4);
  background: rgba(6, 82, 233, 0.06);
  color: #6fa3ff;
}

/* submit button */
.btn-submit {
  width: 100%;
  padding: 15px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
}

.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-submit:hover:not(:disabled) {
  background: var(--blue-dim);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--blue-glow);
}

.btn-submit:hover::before { opacity: 1; }

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* links below form */
.form-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

.form-link {
  font-size: 13px;
  color: var(--white-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.form-link:hover { color: var(--white); }

.form-link-blue {
  font-size: 13px;
  color: #6fa3ff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.form-link-blue:hover { color: white; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--white-dim);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  transition: color 0.2s;
  margin-top: 20px;
}

.back-link:hover { color: var(--white); }

.resend-row {
  text-align: center;
  margin-top: 14px;
}

.resend-row a {
  font-size: 13px;
  color: var(--white-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.resend-row a:hover { color: #6fa3ff; }

/* alert messages */
#alert-container { margin-bottom: 4px; }

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: alertIn 0.3s ease-out;
}

.alert-success { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success); }
.alert-error   { background: var(--danger-bg);  border: 1px solid var(--danger-border);  color: var(--danger); }
.alert-info    { background: var(--blue-light);  border: 1px solid var(--blue-border);    color: #6fa3ff; }
.alert-warn    { background: var(--warn-bg);     border: 1px solid var(--warn-border);    color: var(--warn); }

/* security footer */
.security-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--black-border);
  justify-content: center;
}

.sf-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
  animation: blink 2s ease-in-out infinite;
}

.sf-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* mobile */
@media (max-width: 900px) {
  .page-body { grid-template-columns: 1fr; }
  .left-panel { display: none; }
  .right-panel { padding: 40px 24px; justify-content: flex-start; padding-top: 50px; }
  .form-wrap { max-width: 100%; }
  .form-title { font-size: 40px; }
  .otp-input { height: 52px; font-size: 24px; }
}

@media (max-width: 480px) {
  nav { padding: 0 20px; }
  .nav-hint { display: none; }
  .otp-row { gap: 7px; }
  .otp-input { height: 48px; font-size: 22px; border-radius: 6px; }
  .field-row { grid-template-columns: 1fr; }
}
