*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold: #f5d76e;
  --gold-dk: #d4af37;
  --gold-dim: rgba(245, 215, 110, 0.12);
  --gold-glow: rgba(245, 215, 110, 0.4);
  --bg: #050505;
  --s1: #111111;
  --s2: #1a1a1a;
  --text: #ffffff;
  --dim: rgba(255, 255, 255, 0.6);
  --border: rgba(245, 215, 110, 0.2);
  --danger: #ff6b6b;
  --success: #6de07a;
}

html,
body {
  background: var(--bg);
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #030303;
}

/* Animated background canvas */
#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Floating glow orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(100px);
}

.orb1 {
  width: 450px;
  height: 450px;
  background: rgba(212, 175, 55, 0.08);
  top: -100px;
  right: -100px;
  animation: orbDrift1 20s ease-in-out infinite alternate;
}

.orb2 {
  width: 350px;
  height: 350px;
  background: rgba(245, 215, 110, 0.06);
  bottom: -50px;
  left: -100px;
  animation: orbDrift2 25s ease-in-out infinite alternate;
}

@keyframes orbDrift1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 60px) scale(1.1); }
}

@keyframes orbDrift2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, -40px) scale(1.15); }
}

.page {
  width: 100%;
  max-width: 520px;
  padding: 30px 24px 60px;
  position: relative;
  z-index: 1;
}

/* LOGO */
.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0 32px;
}

.logo-ring {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  background: linear-gradient(135deg, #161616 0%, #201a09 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15), inset 0 2px 0 rgba(255,255,255,0.05);
  position: relative;
}

.logo-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: radial-gradient(circle at top, rgba(245, 215, 110, 0.2), transparent 70%);
}

.logo-ring img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.logo-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}

.logo-sub {
  font-size: 13px;
  color: var(--dim);
  margin-top: 4px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 600;
}

/* CARD */
.card {
  background: rgba(17, 17, 17, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-top: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 32px 28px;
  margin-bottom: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.card-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.card-sub {
  font-size: 14px;
  color: var(--dim);
  margin-bottom: 24px;
  line-height: 1.6;
  font-weight: 400;
}

/* FORM */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-icon svg {
  width: 22px;
  height: 22px;
  stroke: rgba(255, 255, 255, 0.4);
  fill: none;
  stroke-width: 2;
  transition: stroke 0.3s ease;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 18px 18px 18px 52px;
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  color: var(--text);
  outline: none;
  transition: all 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
  font-weight: 500;
}

.form-input:focus {
  border-color: var(--gold);
  background: rgba(20, 15, 0, 0.6);
  box-shadow: 0 0 0 4px rgba(245, 215, 110, 0.1);
}

.form-input:focus~.input-icon svg {
  stroke: var(--gold);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

/* BUTTON */
.btn {
  display: block;
  width: 100%;
  padding: 20px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--gold-dk), var(--gold));
  background-size: 200%;
  color: #000;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
  animation: goldShift 4s ease infinite;
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  letter-spacing: 0.5px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  box-shadow: 0 12px 32px rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
}

@keyframes goldShift {
  0% { background-position: 0% }
  50% { background-position: 100% }
  100% { background-position: 0% }
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  animation: sweep 3s ease-in-out infinite;
}

@keyframes sweep {
  0% { transform: translateX(-100%) }
  50% { transform: translateX(100%) }
  100% { transform: translateX(100%) }
}

.btn:active {
  transform: scale(0.97) translateY(0);
}

/* ALERTS */
.alert-error {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: var(--danger);
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.08);
}

.alert-success {
  background: rgba(109, 224, 122, 0.12);
  border: 1px solid rgba(109, 224, 122, 0.3);
  color: var(--success);
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 8px 20px rgba(109, 224, 122, 0.08);
}

/* OTP */
.email-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
  gap: 12px;
}

.email-chip-addr {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0 12px;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255,255,255,0.05);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pin-dot.filled {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 16px var(--gold-glow);
  transform: scale(1.2);
}

.pin-pad {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.pin-key {
  height: 70px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.pin-key:hover {
  background: rgba(255, 255, 255, 0.06);
}

.pin-key:active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
  transform: scale(0.92);
  box-shadow: 0 4px 15px rgba(245, 215, 110, 0.15);
}

.pin-key.del {
  font-size: 22px;
  color: var(--dim);
}

.resend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.resend-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.resend-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--gold);
  border-color: var(--border);
}

.otp-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  margin-top: 10px;
  font-weight: 500;
}

/* MISC */
.back-btn {
  font-size: 14px;
  font-weight: 600;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  cursor: pointer;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 8px 16px;
  border-radius: 20px;
  font-family: inherit;
  transition: all 0.2s;
}

.back-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

.staff-link {
  text-align: center;
  margin-top: 32px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

.staff-link a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}

.staff-link a:hover {
  background: rgba(245, 215, 110, 0.1);
}
