/* =========================================================
   Drip Tea - Forgot / Reset password theme
   Same look as the Login page: soft-gray background, white neumorphic
   card, black curved header (like the login panel), inset inputs and
   caramel pill buttons.
   ========================================================= */
:root {
  --orange: #C57C4D;
  --orange-deep: #B06A3D;
  --bg: #d4d4d4;
  --shadow-dark: #b1b1b1;
  --shadow-light: #f4f4f4;
  --ink: #1b1b1b;
  --ink-soft: #4f4f4f;
  --ink-faint: #7a7a7a;
  --border: #ead9cf;
  --btn-bg: linear-gradient(145deg, #d08556, #bb7142);
  --r-lg: 26px;
  --r-md: 18px;
  --r-pill: 999px;
}

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

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ---------- Card ---------- */
.recovery-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: var(--r-lg);
  box-shadow: 9px 9px 20px var(--shadow-dark), -9px -9px 20px var(--shadow-light);
  overflow: hidden;
}

/* black curved header, same black as the login panel */
.recovery-head {
  background: #000000;
  background-image: radial-gradient(circle at 30% 20%, #1c1c1c 0%, #000000 70%);
  color: #ffffff;
  text-align: center;
  padding: 30px 28px 38px;
  border-radius: 0 0 48px 48px;
}
.recovery-head img { height: 64px; width: auto; max-width: 70%; margin-bottom: 10px; }
.recovery-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
.recovery-head p { font-size: 13.5px; color: #dcdcdc; margin-top: 8px; line-height: 1.5; }

.recovery-body { padding: 28px 30px 30px; }

/* ---------- Messages ---------- */
.r-alert {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  background: #ffffff;
  box-shadow: 5px 5px 14px #e0e0e0, -4px -4px 12px #ffffff;
  margin-bottom: 18px;
}
.r-alert.error   { color: #b3261e; border-left: 5px solid #d9534f; }
.r-alert.success { color: #1e7b4a; border-left: 5px solid #198754; }
.r-alert.warn    { color: #8a5a00; border-left: 5px solid #e0a100; }
.r-alert a { color: var(--orange-deep); font-weight: 700; word-break: break-all; text-decoration: underline; }

/* ---------- Inputs (soft inset, icon on the right like Login) ---------- */
.r-field { position: relative; margin-bottom: 14px; }
.r-field input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 18px;
  background: #f3f3f3;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  box-shadow: inset 3px 3px 7px #d9d9d9, inset -3px -3px 7px #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;          /* 16px stops iPhones zooming in on focus */
  font-weight: 600;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.r-field input::placeholder { color: var(--ink-faint); font-weight: 500; }
.r-field input:focus {
  border-color: var(--orange);
  box-shadow: inset 3px 3px 7px #d9d9d9, inset -3px -3px 7px #ffffff, 0 0 0 3px rgba(197, 124, 77, .18);
}
.r-field input.invalid { border-color: #d9534f; }
.r-field i {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: var(--orange);
  pointer-events: none;
}
.r-field .toggle-password { pointer-events: auto; cursor: pointer; color: var(--ink-faint); }
.r-field .toggle-password:hover { color: var(--orange-deep); }

.r-hint {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-faint);
  text-align: left;
  margin: -4px 4px 16px;
  min-height: 18px;
}
.r-hint.ok  { color: #1e7b4a; }
.r-hint.bad { color: #b3261e; }

/* ---------- Buttons ---------- */
.r-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .3px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 5px 5px 11px #cfcfcf, -5px -5px 11px #ffffff;
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.r-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.r-btn:active { transform: translateY(0); box-shadow: inset 3px 3px 7px rgba(0,0,0,.25); }

.r-back {
  display: block;
  text-align: center;
  margin-top: 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .2s;
}
.r-back:hover { color: var(--orange-deep); }
.r-back i { margin-right: 6px; }

/* success / invalid-link states */
.r-state { text-align: center; }
.r-state .r-icon { font-size: 52px; margin-bottom: 14px; }
.r-state .r-icon.ok  { color: #198754; }
.r-state .r-icon.bad { color: #d9534f; }
.r-state h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.r-state p { font-size: 14px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 22px; }

/* ---------- Loading overlay (same as Login) ---------- */
#loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #ffffff;
  font-weight: 600;
}
#loading-overlay .spinner {
  border: 4px solid rgba(255,255,255,.3);
  border-top-color: var(--orange);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Phones: full screen, like the Login page ---------- */
@media (max-width: 650px) {
  body { display: block; min-height: 0; padding: 0; background: #ffffff; }
  .recovery-card {
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
  }
  .recovery-head { padding: 26px 24px 34px; border-radius: 0 0 20vw 20vw; }
  .recovery-head img { height: 56px; }
  .recovery-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px 24px 28px;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
  }
}

/* small / short phones: tighten the header so everything still fits */
@media (max-width: 650px) and (max-height: 620px) {
  .recovery-head { padding: 18px 20px 26px; }
  .recovery-head img { height: 44px; margin-bottom: 6px; }
  .recovery-head h1 { font-size: 22px; }
  .recovery-head p { font-size: 12.5px; margin-top: 6px; }
  .recovery-body { padding: 16px 24px 20px; }
  .r-alert { margin-bottom: 12px; padding: 10px 14px; }
  .r-back { margin-top: 14px; }
}
