/* Azimut Suite — Forgot Password
   AzimutSuite / GWS design language: white card on light slate, navy accents,
   IBM Plex Sans, hairline borders, subtle elevation. Mirrors the login page
   (auth-login.css) and registration page (auth-register.css).

   Everything is scoped under .forgot-stage (the page wrapper) so the shared
   global .auth-card / .form-control / .btn styles used elsewhere are never
   touched. The form action, method, CSRF token and field names are unchanged
   in the template — this file is purely visual. */

.forgot-stage {
    --fp-navy: #2C3E50;          /* primary / accent */
    --fp-navy-deep: #1a2836;     /* hover */
    --fp-bg: #f8f9fa;            /* page background */
    --fp-card: #ffffff;          /* card / surface */
    --fp-surface: #f8fafc;       /* subtle inner surface */
    --fp-ink: #1e293b;           /* primary text */
    --fp-muted: #64748b;         /* secondary text */
    --fp-faint: #94a3b8;         /* placeholders, tertiary */
    --fp-line: #e2e8f0;          /* hairline border */
    --fp-line-strong: #cbd5e1;   /* stronger border */
    --fp-success: #10B981;
    --fp-error: #EF4444;
    --fp-radius: 12px;           /* card */
    --fp-radius-sm: 8px;         /* button, input */
    --fp-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
    --fp-ring: 0 0 0 3px rgba(44, 62, 80, 0.10);
    --fp-ease: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --fp-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* The wrapper is the card */
    max-width: 460px;
    margin: 1.5rem auto 2.5rem;
    background: var(--fp-card);
    border: 1px solid var(--fp-line);
    box-shadow: var(--fp-shadow-lg);
    border-radius: var(--fp-radius);
    overflow: hidden;
    font-family: var(--fp-sans);
}

.forgot-stage__body {
    padding: 2.5rem 2.5rem 2.25rem;
    color: var(--fp-ink);
}
@media (max-width: 768px) { .forgot-stage__body { padding: 2rem 1.5rem; } }
@media (max-width: 480px) { .forgot-stage__body { padding: 1.5rem 1.2rem; } }

/* Header: icon chip + title + helpful subtext */
.forgot-stage__header {
    text-align: center;
    margin-bottom: 1.75rem;
}
.forgot-stage__icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 62, 80, 0.08);
    color: var(--fp-navy);
    border-radius: 14px;
    font-size: 1.2rem;
}
.forgot-stage__title {
    font-family: var(--fp-sans);
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--fp-ink);
    margin: 0 0 0.5rem;
}
.forgot-stage__subtitle {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--fp-muted);
    margin: 0 auto;
    max-width: 34ch;
}

/* Field */
.forgot-stage__field { margin-bottom: 1.25rem; }
.forgot-stage__label {
    display: block;
    font-family: var(--fp-sans);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--fp-ink);
    margin-bottom: 0.4rem;
}

/* Input with a leading icon, mirroring the login input group */
.forgot-stage__input-wrap {
    position: relative;
}
.forgot-stage__input-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fp-faint);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color var(--fp-ease);
}
.forgot-stage__input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.85rem 0.7rem 2.5rem;
    background: #fff;
    color: var(--fp-ink);
    border: 1.5px solid var(--fp-line);
    border-radius: var(--fp-radius-sm);
    font-family: var(--fp-sans);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--fp-ease), box-shadow var(--fp-ease);
}
.forgot-stage__input::placeholder { color: var(--fp-faint); }
.forgot-stage__input:focus {
    border-color: var(--fp-navy);
    box-shadow: var(--fp-ring);
}
.forgot-stage__input:focus + .forgot-stage__input-icon,
.forgot-stage__input-wrap:focus-within .forgot-stage__input-icon { color: var(--fp-navy); }

/* Neutralize forms.js green/red validation tint — the new look shows only the
   navy focus ring, matching the login page. */
.forgot-stage__input.is-valid,
.forgot-stage__input.is-invalid {
    border-color: var(--fp-line);
    background-image: none;
}
.forgot-stage__input.is-valid:focus,
.forgot-stage__input.is-invalid:focus {
    border-color: var(--fp-navy);
    box-shadow: var(--fp-ring);
}

/* Primary submit — solid navy, sentence case */
.forgot-stage__submit {
    width: 100%;
    padding: 0.8rem 1.25rem;
    background: var(--fp-navy);
    color: #fff;
    border: none;
    border-radius: var(--fp-radius-sm);
    font-family: var(--fp-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color var(--fp-ease);
}
.forgot-stage__submit:hover { background: var(--fp-navy-deep); }
.forgot-stage__submit:disabled { background: #94a3b8; cursor: not-allowed; }

/* Back to sign in */
.forgot-stage__back {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.86rem;
    color: var(--fp-muted);
}
.forgot-stage__back a {
    color: var(--fp-navy);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--fp-line);
    padding-bottom: 1px;
    transition: border-color var(--fp-ease), color var(--fp-ease);
}
.forgot-stage__back a:hover {
    color: var(--fp-navy-deep);
    border-bottom-color: var(--fp-navy);
}

/* Motion (respect reduced-motion) */
@keyframes fp-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.forgot-stage { animation: fp-fade-up 0.4s ease-out both; }
@media (prefers-reduced-motion: reduce) { .forgot-stage { animation: none; } }
