/* ============================================================
   i-rana.com — Login / Auth Pages Stylesheet
   Used by: login.html, register.html, forgot-password.html,
            reset-password.html, email-verify.html
   ============================================================ */

/* ─── Base overrides for auth pages ─── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

/* Background glow effects */
.auth-page::before,
.auth-page::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.auth-page::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, transparent 70%);
  top: -150px;
  left: -150px;
}

.auth-page::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6,182,212,0.10) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
}

/* ─── Auth Card ─── */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

/* ─── Auth Header ─── */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 28px;
  text-decoration: none;
}

.auth-logo img {
  width: 40px;
  height: 40px;
}

.auth-logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
}

.auth-logo-text span {
  color: var(--cyan);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── Divider ─── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Auth Form ─── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form .form-label {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.auth-form .form-label .required {
  color: var(--cyan);
  margin-left: 2px;
}

/* Input wrapper for password show/hide */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper .form-input {
  padding-right: 44px;
  width: 100%;
}

.input-toggle-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.input-toggle-btn:hover { color: var(--text-secondary); }

.input-toggle-btn svg {
  width: 18px;
  height: 18px;
}

/* ─── Password strength bar ─── */
.password-strength {
  margin-top: 6px;
}

.password-strength__bar {
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
  margin-bottom: 4px;
}

.password-strength__fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
  width: 0%;
}

.password-strength--weak   .password-strength__fill { width: 25%; background: #ef4444; }
.password-strength--fair   .password-strength__fill { width: 50%; background: #f97316; }
.password-strength--good   .password-strength__fill { width: 75%; background: #eab308; }
.password-strength--strong .password-strength__fill { width: 100%; background: #22c55e; }

.password-strength__label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.password-strength--weak   .password-strength__label { color: #ef4444; }
.password-strength--fair   .password-strength__label { color: #f97316; }
.password-strength--good   .password-strength__label { color: #eab308; }
.password-strength--strong .password-strength__label { color: #22c55e; }

/* ─── Checkbox row (remember me / terms) ─── */
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.auth-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  accent-color: var(--cyan);
  cursor: pointer;
  margin-top: 2px;
}

.auth-check a {
  color: var(--cyan);
  text-decoration: none;
}

.auth-check a:hover { text-decoration: underline; }

/* ─── Forgot password link ─── */
.auth-forgot {
  text-align: right;
  font-size: 0.8rem;
}

.auth-forgot a {
  color: var(--cyan);
  text-decoration: none;
}

.auth-forgot a:hover { text-decoration: underline; }

/* ─── Auth submit button ─── */
.auth-btn {
  width: 100%;
  padding: 13px 24px;
  font-size: 0.938rem;
  font-weight: 600;
  justify-content: center;
  margin-top: 4px;
  letter-spacing: 0.01em;
}

/* ─── Auth footer links ─── */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--cyan);
  font-weight: 500;
  text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

/* ─── Error / success alert ─── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.4;
  margin-bottom: 4px;
}

.auth-alert--error {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
}

.auth-alert--success {
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  color: #86efac;
}

.auth-alert--info {
  background: rgba(6,182,212,0.10);
  border: 1px solid rgba(6,182,212,0.25);
  color: var(--cyan);
}

.auth-alert__icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ─── Email verification page ─── */
.verify-icon {
  width: 72px;
  height: 72px;
  background: rgba(6,182,212,0.12);
  border: 1px solid rgba(6,182,212,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2rem;
}

.verify-email-display {
  font-weight: 600;
  color: var(--cyan);
  word-break: break-all;
}

.resend-btn {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.resend-btn:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  text-decoration: none;
}

.resend-countdown {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── OTP / Code input ─── */
.otp-group {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.otp-input {
  width: 52px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  caret-color: var(--cyan);
}

.otp-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
}

.otp-input.filled {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ─── Social login buttons (future use) ─── */
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  text-decoration: none;
}

.social-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-light);
  color: var(--white);
}

.social-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ─── Terms page info box ─── */
.auth-terms-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-terms-box a {
  color: var(--cyan);
  text-decoration: none;
}

/* ─── Loading overlay on submit ─── */
.auth-loading {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(10,22,40,0.7);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-lg);
  z-index: 10;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

.auth-loading.active { display: flex; }

.auth-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.auth-loading__text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
    border-radius: var(--radius);
  }

  .auth-title   { font-size: 1.3rem; }
  .otp-input    { width: 44px; height: 50px; font-size: 1.3rem; }
  .otp-group    { gap: 8px; }
}
