@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
  --red:    #D03027;
  --navy:   #0D2137;
  --blue:   #0A6E9E;
  --green:  #1D7A4E;
  --amber:  #B45309;
  --ink:    #15202B;
  --muted:  #57687A;
  --line:   #D9E3EC;
  --wash:   #F4F6F9;
  --paper:  #FFFFFF;
  --radius: 6px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--wash);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Nav --- */
.forgot-nav {
  background: var(--navy);
  padding: 0 clamp(16px, 4vw, 48px);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: white;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--red);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
}

.nav-signin-link {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

.nav-signin-link:hover { color: white; }

/* --- Main --- */
.forgot-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(32px, 6vw, 80px) 16px;
}

.forgot-card {
  width: 100%;
  max-width: 480px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: clamp(28px, 5vw, 44px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}

.forgot-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fde8e8;
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 20px;
}

.forgot-card h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--navy);
}

.forgot-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* --- Step indicators --- */
.step-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s, transform 0.2s;
}

.step-dot.active {
  background: var(--red);
  transform: scale(1.3);
}

.step-dot.done { background: var(--green); }

.step-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-left: 4px;
}

/* --- Form Elements --- */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.15s;
}

.field input:focus {
  outline: none;
  border-color: var(--blue);
}

.field input.error { border-color: var(--red); }

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}

/* --- OTP Input --- */
.otp-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.otp-digit {
  width: 48px;
  height: 56px;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  color: var(--navy);
  background: var(--paper);
  transition: border-color 0.15s;
}

.otp-digit:focus {
  outline: none;
  border-color: var(--blue);
}

/* --- Password strength --- */
.strength-track {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  margin-top: 8px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width 0.3s ease, background 0.3s ease;
}

.strength-fill.weak   { width: 25%; background: var(--red); }
.strength-fill.fair   { width: 50%; background: var(--amber); }
.strength-fill.good   { width: 75%; background: #2196F3; }
.strength-fill.strong { width: 100%; background: var(--green); }

.strength-label {
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
  color: var(--muted);
}

/* --- Buttons --- */
.btn-primary {
  width: 100%;
  height: 46px;
  border-radius: var(--radius);
  background: var(--red);
  color: white;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.15s;
  margin-top: 4px;
}

.btn-primary:hover:not(:disabled) { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-text {
  background: transparent;
  border: 0;
  color: var(--blue);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-top: 14px;
  display: block;
  text-align: center;
  width: 100%;
}

.btn-text:hover { text-decoration: underline; }

/* --- Status message --- */
.form-msg {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  display: none;
}

.form-msg.error   { background: #fde8e8; color: var(--red);   display: block; }
.form-msg.success { background: #e6f4ec; color: var(--green); display: block; }

/* --- Success state --- */
.success-state {
  text-align: center;
  padding: 20px 0;
  display: none;
}

.success-state.visible { display: block; }

.success-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e6f4ec;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px;
}

.success-state h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
}

.success-state p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.back-signin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  text-decoration: none;
}

.back-signin:hover { text-decoration: underline; }

/* --- Footer --- */
.forgot-footer {
  padding: 20px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
