/* ReviewDeck - Auth Styles */
.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at left top, rgba(66, 133, 244, .14), transparent 28%),
    radial-gradient(circle at right 20%, rgba(52, 168, 83, .14), transparent 26%),
    linear-gradient(135deg, #ffffff 0%, #f8f9fa 55%, #eef3fd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-container { width: 100%; max-width: 1240px; display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(420px, .95fr); border-radius: 32px; overflow: hidden; background: rgba(255,255,255,.82); border: 1px solid rgba(255,255,255,.85); box-shadow: 0 28px 64px rgba(60, 64, 67, .12); backdrop-filter: blur(20px); }

.auth-brand { padding: 48px 42px; background: linear-gradient(160deg, #0f172a 0%, #1d4ed8 42%, #2563eb 72%, #60a5fa 100%); color: #fff; display: flex; flex-direction: column; justify-content: space-between; min-height: 620px; position: relative; overflow: hidden; }
.auth-brand::before {
  content: '';
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18) 0%, transparent 68%);
  pointer-events: none;
}
.auth-brand a { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.auth-brand-logo { height: 60px; width: auto; background: #fff; border-radius: 14px; padding: 10px 18px; box-shadow: 0 8px 24px rgba(0,0,0,.15); display: block; }
.auth-brand-top { position: relative; z-index: 1; }
.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.88);
}
.auth-brand-content { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 18px; }
.auth-brand-content h1 {
  font-size: 52px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.04em;
  max-width: 11ch;
}
.auth-brand-content p {
  font-size: 16px;
  line-height: 1.85;
  color: rgba(255,255,255,.8);
  max-width: 42ch;
}
.auth-brand-points {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}
.auth-brand-point {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  padding: 14px 16px;
  backdrop-filter: blur(10px);
}
.auth-brand-point strong {
  display: block;
  font-size: 14px;
  color: #fff;
  margin-bottom: 4px;
}
.auth-brand-point span {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,.72);
}

.auth-card { padding: 48px 46px; background: rgba(255,255,255,.88); display: flex; flex-direction: column; justify-content: center; }
.auth-card > .alert { margin-bottom: 20px; border-radius: 12px; }
.auth-card-logo-wrap { text-align: center; margin-bottom: 20px; }
.auth-card-logo { width: 200px !important; height: 150px !important; object-fit: contain; display: inline-block; }

.auth-card-header { margin-bottom: 30px; text-align: left; }
.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .08);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.auth-card-header h2 { font-size: 42px; line-height: 1.05; font-weight: 700; color: var(--gray-900); margin-bottom: 12px; }
.auth-card-header p { color: var(--gray-500); font-size: 17px; max-width: 420px; }

.auth-form .form-group { margin-bottom: 20px; }
.auth-form .form-control {
  min-height: 54px;
  border-radius: 18px;
}
.auth-form .btn { margin-top: 10px; min-height: 52px; font-size: 15px; }
.auth-inline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.auth-inline-btn {
  margin-top: 0;
  min-width: 128px;
  justify-content: center;
}
.auth-resend-form {
  margin-top: 12px;
}
.btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}
.auth-helper-row {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(226,232,240,.9);
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.65;
}

.auth-footer { text-align: left; margin-top: 22px; font-size: 15px; color: var(--gray-500); }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 700; }
.auth-footer a:hover { text-decoration: underline; }

.error-stack { white-space: pre-wrap; }

@media (max-width: 900px) {
  .auth-container { grid-template-columns: 1fr; max-width: 520px; }
  .auth-brand { min-height: auto; padding: 30px 28px; gap: 18px; }
  .auth-brand-content h1 { font-size: 32px; max-width: none; }
  .auth-card { padding: 32px 28px; }

  .auth-card-header h2 { font-size: 34px; }
  .auth-inline-row { grid-template-columns: 1fr; }
  .auth-inline-btn { width: 100%; }
}

/* ─── Signup Redesign ─── */

/* Progress steps */
.signup-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}
.signup-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: #e2e8f0;
  color: #94a3b8;
  transition: background .25s, color .25s;
}
.step-label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  transition: color .25s;
}
.signup-step.step-active .step-dot { background: #2563eb; color: #fff; }
.signup-step.step-active .step-label { color: #1d4ed8; }
.signup-step.step-done .step-dot { background: #16a34a; color: #fff; }
.signup-step.step-done .step-label { color: #15803d; }
.steps-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 10px;
  border-radius: 2px;
  transition: background .3s;
}
.steps-line.line-active { background: #2563eb; }

/* Field helpers */
.label-hint {
  font-size: 12px;
  font-weight: 400;
  color: #94a3b8;
  margin-left: 4px;
}
.field-hint {
  margin-top: 5px;
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.5;
}
.field-error {
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 3px solid #ef4444;
  font-size: 13px;
  color: #dc2626;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.45;
}
.field-error::before {
  content: '!';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.field-error[hidden] { display: none; }
.field-success {
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 3px solid #16a34a;
  font-size: 13px;
  color: #15803d;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.field-success[hidden] { display: none; }
.form-control.field-invalid { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.form-control.field-valid { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.1); }
.form-control[readonly] { background: #f8fafc; color: #64748b; cursor: default; }

/* Password match badges */
.pw-match-badge { font-size: 12px; font-weight: 500; margin-left: 8px; vertical-align: middle; }
.pw-match-badge[hidden] { display: none; }
.pw-match--ok  { color: #16a34a; }
.pw-match--err { color: #ef4444; }

/* Password input */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap .form-control { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #94a3b8;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: color .2s;
}
.pw-toggle:hover { color: #475569; }
.pw-toggle.active { color: #2563eb; }

/* Phone input */
.phone-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-200, #e2e8f0);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.phone-wrap:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.phone-wrap.wrap-invalid { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.phone-field {
  flex: 1;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-height: 54px;
  background: transparent;
}
.phone-field:focus { outline: none; }
.phone-status {
  padding: 0 14px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.status-spinner { animation: spin .75s linear infinite; color: #2563eb; }
.status-spinner[hidden] { display: none; }
.status-check { color: #16a34a; }
.status-check[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* OTP Badge */
.otp-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-left: 8px;
  vertical-align: middle;
}
.otp-badge--sent { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.otp-badge--verified { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.otp-badge[hidden] { display: none; }

/* OTP Section */
.otp-section {
  margin-top: 4px;
  padding: 20px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
}
.otp-section[hidden] { display: none; }
.otp-section-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.otp-section-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1.5px solid #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  flex-shrink: 0;
}
.otp-section-title { font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 2px; }
.otp-section-sub { font-size: 13px; color: #64748b; }
.otp-section-sub strong { color: #374151; }

/* OTP Boxes */
.otp-boxes {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.otp-box {
  width: 46px;
  height: 52px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  caret-color: #2563eb;
  transition: border-color .15s, box-shadow .15s;
  flex: 1;
  min-width: 0;
}
.otp-box:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.otp-box::placeholder { color: #cbd5e1; font-size: 20px; }
.otp-box.box-filled { border-color: #2563eb; background: #eff6ff; }
.otp-box.box-error { border-color: #ef4444; background: #fef2f2; }
.otp-box[readonly] { background: #f1f5f9; color: #64748b; cursor: default; }

/* OTP Footer */
.otp-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.otp-footer[hidden] { display: none; }
.otp-countdown { font-size: 13px; color: #64748b; }
.otp-countdown strong { color: #374151; }
.otp-expiry { font-size: 13px; color: #64748b; margin-right: auto; margin-left: auto; }
.otp-expiry strong { color: #374151; }
.otp-expiry[hidden] { display: none; }
.btn-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color .15s;
}
.btn-link:hover { text-decoration-color: #2563eb; }
.btn-link[hidden] { display: none; }
.otp-verify-btn { flex-shrink: 0; }
.btn-sm { min-height: 38px !important; padding: 0 16px !important; font-size: 13px !important; border-radius: 10px !important; }

/* Register button */
.register-btn {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Signup card extra */
.signup-card .auth-card-header { margin-bottom: 22px; }
.signup-card .auth-card-header h2 { font-size: 36px; }

@media (max-width: 900px) {
  .signup-steps { margin-bottom: 20px; }
  .otp-boxes { gap: 6px; }
  .otp-box { height: 46px; font-size: 18px; }
  .signup-card .auth-card-header h2 { font-size: 28px; }
}
@media (max-width: 400px) {
  .otp-box { font-size: 16px; }
}
