/* ═══════════════════════════════════════════════════
   auth.css  —  Shared styles for all auth pages:
   login.php | otp_verify.php | totp_setup.php
═══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ── Page background ── */
body {
  min-height: 100vh;
  background: linear-gradient(135deg, #F0F4FF 0%, #FAFCFF 55%, #FFF5F0 100%);
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

/* ── Card ── */
.card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(234, 88, 12, 0.10);
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.04),
    0 10px 30px rgba(0, 0, 0, 0.07),
    0 30px 60px rgba(0, 0, 0, 0.05);
  padding: 48px 44px 40px;
  animation: fade-up 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo + brand ── */
.card-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.card-logo {
  width: 110px;
  height: auto;
  object-fit: contain;
  margin-bottom: 10px;
}

.card-brand-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #EA580C;
}

/* ── Heading ── */
.card-title {
  font-size: 25px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.card-title.center { text-align: center; }

.card-sub {
  font-size: 14px;
  color: #6B7280;
  margin-bottom: 30px;
  line-height: 1.5;
}

.card-sub.center { text-align: center; }
.card-sub strong { color: #111827; font-weight: 700; }

/* ── Error box ── */
.err {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-left: 3px solid #EA580C;
  border-radius: 8px;
  color: #9A3412;
  font-size: 13px;
  font-weight: 500;
  padding: 11px 14px;
  margin-bottom: 22px;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-5px); }
  75%       { transform: translateX(5px); }
}

/* ── Form fields (login page) ── */
.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 7px;
}

.pw-wrap { position: relative; }

.field input {
  width: 100%;
  background: #F9FAFB;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px 40px 12px 14px;
  font-family: inherit;
  font-size: 14.5px;
  color: #111827;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.field input::placeholder { color: #C4C9D4; }

.field input:focus {
  border-color: #EA580C;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.10);
}

.pw-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9CA3AF;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}
.pw-eye:hover { color: #EA580C; }

/* ── Button (shared) ── */
.btn {
  width: 100%;
  margin-top: 6px;
  padding: 14px;
  background: linear-gradient(135deg, #EA580C 0%, #C2410C 100%);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.30);
  transition: box-shadow 0.18s, transform 0.12s, opacity 0.15s;
}

.btn:hover {
  box-shadow: 0 6px 22px rgba(234, 88, 12, 0.42);
  transform: translateY(-1px);
}

.btn:active { transform: scale(0.98); opacity: 0.95; }

/* ── Footer note (login page) ── */
.note {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* ════════════════════════════════════════
   OTP VERIFY PAGE
════════════════════════════════════════ */

/* Shield icon circle */
.shield-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #FFF7ED;
  border: 2px solid #FED7AA;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 22px;
  color: #EA580C;
}

/* 6-box OTP row */
.otp-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.otp-box {
  width: 48px;
  height: 56px;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  background: #F9FAFB;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  text-align: center;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  caret-color: #EA580C;
}

.otp-box:focus {
  border-color: #EA580C;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}

.otp-box.filled {
  border-color: #FB923C;
  background: #FFF7ED;
}

#otp-real { display: none; }

/* Countdown timer */
.timer-hint {
  text-align: center;
  font-size: 12px;
  color: #9CA3AF;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.timer-num {
  font-weight: 700;
  color: #EA580C;
  min-width: 18px;
  display: inline-block;
}

/* Back to login link */
.back-link {
  display: block;
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: #9CA3AF;
  text-decoration: none;
  transition: color 0.15s;
}

.back-link:hover { color: #EA580C; text-decoration: none; }
.back-link i { margin-right: 4px; }

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */

@media (max-width: 480px) {
  .card { padding: 36px 24px 28px; border-radius: 16px; }
  .card-title { font-size: 22px; }
  .otp-box { width: 42px; height: 50px; font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
}
