/* forgot-password.css & reset-password.css — shared base */
body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 70% 30%, var(--primary-glow) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ── Wrapper — used by both pages, different class prefix ── */
.fp-wrapper,
.rp-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

/* ── Header ── */
.fp-header,
.rp-header { text-align: center; margin-bottom: 2rem; }

.fp-header .logo,
.rp-header .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.fp-header .logo span,
.rp-header .logo span { color: var(--text-primary); }

.fp-header h1,
.rp-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.fp-header p,
.rp-header p { color: var(--text-muted); font-size: 0.9rem; }

/* ── Card ── */
.fp-card,
.rp-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.fp-card .form-label,
.rp-card .form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.fp-card .form-control,
.rp-card .form-control {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.fp-card .form-control:focus,
.rp-card .form-control:focus {
    background: var(--surface-light);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    color: var(--text-primary);
    outline: none;
}

.fp-card .form-control::placeholder,
.rp-card .form-control::placeholder { color: var(--text-muted); }

.fp-card .form-control.is-invalid,
.rp-card .form-control.is-invalid {
    border-color: #ef4444 !important;
    background: var(--surface-light);
    background-image: none;
}

.fp-card .form-control.is-valid,
.rp-card .form-control.is-valid {
    border-color: #10b981 !important;
    background: var(--surface-light);
    background-image: none;
}

.fp-card .invalid-feedback,
.rp-card .invalid-feedback { color: #f87171; font-size: 0.78rem; margin-top: 0.3rem; display: none; }

.fp-card .invalid-feedback.d-block,
.rp-card .invalid-feedback.d-block { display: block; }

/* ── Password wrapper ── */
.password-wrapper { position: relative; }
.password-wrapper .form-control { padding-right: 2.75rem; }

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 0;
    line-height: 1;
    z-index: 10;
    transition: color 0.15s;
}

.toggle-password:hover { color: var(--primary); }

/* ── Strength bar ── */
.strength-track {
    background: var(--surface-light);
    border-radius: 3px;
    height: 4px;
    margin-top: 0.5rem;
}

#strengthBar {
    height: 4px;
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s, background-color 0.3s;
}

#strengthLabel {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: block;
}

/* ── Submit buttons ── */
.btn-fp,
.btn-rp {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-fp:hover,
.btn-rp:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 115, 21, 0.25);
}

.btn-fp:disabled,
.btn-rp:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Footer ── */
.fp-footer,
.rp-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.fp-footer a,
.rp-footer a {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s;
}

.fp-footer a:hover,
.rp-footer a:hover { color: var(--primary); }

/* ── Server message ── */
#serverMessage {
    display: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
}

#serverMessage.msg-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
    display: block;
}

#serverMessage.msg-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    display: block;
}