/* ====================================================
   CryptoBotiq – Auth Pages (Login & Register) CSS
   ==================================================== */

html.auth-page {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
}

html.auth-page body.auth-body {
  height: auto;
  min-height: 100vh;
}

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 48px 24px;
}

.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.auth-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  margin: auto 0;
  flex-shrink: 0;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6), var(--shadow-blue);
  animation: fadeInUp 0.5s ease both;
}

/* ---- LOGO ---- */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
}
.auth-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.auth-logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- TITLE ---- */
.auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.auth-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
}

/* ---- FORM ---- */
.auth-form { display: flex; flex-direction: column; gap: 0; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.form-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}
.form-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px 13px 42px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: all 0.25s;
}
.form-input::placeholder { color: var(--text-dim); }
.form-input:focus {
  border-color: var(--blue);
  background: rgba(0, 212, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}
.form-input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.toggle-pass:hover { opacity: 1; }

.form-error {
  font-size: 0.78rem;
  color: var(--red);
  min-height: 16px;
}

.form-link {
  font-size: 0.82rem;
  color: var(--blue);
  font-weight: 500;
  transition: color 0.2s;
}
.form-link:hover { color: var(--purple); }
.form-link-strong {
  color: var(--blue);
  font-weight: 700;
  transition: color 0.2s;
}
.form-link-strong:hover { color: var(--purple); }

/* ---- CHECKBOX ---- */
.form-check-row, .terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  flex-direction: column;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.check-input { display: none; }
.check-custom {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 5px;
  flex-shrink: 0;
  background: transparent;
  transition: all 0.2s;
  position: relative;
}
.check-input:checked + .check-custom {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-color: transparent;
}
.check-input:checked + .check-custom::after {
  content: '✓';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ---- SUBMIT ---- */
.auth-submit {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 1rem;
  margin-top: 4px;
  border: none;
}
.auth-submit-half {
  flex: 1;
  justify-content: center;
  padding: 13px;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
}
.auth-back {
  flex: 0 0 auto;
  padding: 13px 20px;
}
.form-step-btns {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

/* ---- SPINNER ---- */
.btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- DIVIDER ---- */
.auth-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
  color: var(--text-dim);
  font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ---- SECURITY BADGE ---- */
.auth-security-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 24px;
  line-height: 1.4;
}

/* ---- AUTH FOOTER ---- */
.auth-footer-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 20px;
}

/* ============================================================
   REGISTER STEPS PROGRESS
   ============================================================ */
.reg-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
}
.reg-step {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--card);
  transition: all 0.3s;
  flex-shrink: 0;
}
.reg-step.active {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: white;
  box-shadow: var(--glow-blue);
}
.reg-step.done {
  border-color: var(--green);
  background: var(--green);
  color: white;
}
.reg-step-line {
  height: 2px;
  width: 60px;
  background: var(--border);
  transition: background 0.4s;
}
.reg-step-line.done {
  background: linear-gradient(90deg, var(--blue), var(--purple));
}

.reg-step-content {
  display: none;
}
.reg-step-content.active {
  display: flex;
  flex-direction: column;
}

/* ---- PASSWORD STRENGTH ---- */
.password-strength {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}
.pass-bar {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: all 0.4s ease;
  background: var(--red);
}
.pass-strength-label {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 2px;
  color: var(--text-muted);
}
.optional {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 400;
}
.required-star {
  color: var(--red);
}

/* ---- CAPTCHA ---- */
.captcha-group { margin-bottom: 4px; }
.captcha-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 10px;
}
.captcha-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(168,85,247,0.08));
  border: 1px dashed rgba(0,212,255,0.35);
  border-radius: 12px;
  user-select: none;
}
.captcha-question {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--blue);
}
.captcha-refresh {
  width: 52px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg2);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.captcha-refresh:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.captcha-input-wrap { margin-top: 0; }

/* ---- RESPONSIVE ---- */
@media (max-width: 520px) {
  .auth-card { padding: 28px 20px; border-radius: 18px; }
  .auth-title { font-size: 1.35rem; }
}
