/* ==========================================================================
   password.css — standalone password pages
   (forgot password, link sent, set new password, reset complete, changed)
   ========================================================================== */

body {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 48px);
    background:
        radial-gradient(70% 60% at 100% 0%, rgba(201, 131, 47, .28) 0%, rgba(201, 131, 47, 0) 60%),
        radial-gradient(60% 60% at 0% 100%, rgba(196, 84, 31, .30) 0%, rgba(196, 84, 31, 0) 60%),
        #1f1510;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--star-pattern);
    pointer-events: none;
}

.zodiac-decoration {
    position: fixed;
    right: -140px;
    bottom: -140px;
    width: 460px;
    height: 460px;
    opacity: .09;
    pointer-events: none;
    animation: pwSpin 120s linear infinite;
}

@keyframes pwSpin {
    to { transform: rotate(360deg); }
}

/* ---------- Card ---------- */
.forgot-container,
.reset-container,
.success-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    padding: clamp(30px, 5vw, 48px);
    border-radius: var(--radius-xl);
    background: #fff;
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .65);
    text-align: center;
}

.reset-container {
    max-width: 520px;
}

.forgot-container::before,
.reset-container::before,
.success-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--grad-brand);
}

.header-section {
    margin-bottom: 8px;
}

.icon-container,
.email-icon-box {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--gold-tint);
    box-shadow: 0 0 0 8px rgba(251, 241, 225, .55);
}

.icon-container svg {
    width: 32px;
    height: 32px;
    fill: var(--brand);
}

.email-icon-box {
    width: 60px;
    height: 60px;
    margin: 22px auto;
}

.email-icon-box svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--brand);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.forgot-container h2,
.reset-container h2,
.success-container h2,
.success-title {
    margin-bottom: 8px;
    color: var(--ink);
    font-size: clamp(30px, 4vw, 38px);
    font-weight: 500;
    line-height: 1.15;
}

.subtitle,
.success-message {
    max-width: 380px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}

.instruction {
    margin-top: 8px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

.divider {
    margin: 18px 0 22px;
}

/* success mark */
.success-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    font-size: 34px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 0 0 9px var(--success-bg), 0 16px 30px -12px rgba(47, 122, 75, .7);
    animation: pwPop .5s var(--ease);
}

.success-icon svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes pwPop {
    from { opacity: 0; transform: scale(.6); }
    to { opacity: 1; transform: none; }
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-soft);
    opacity: .7;
    animation: pwFloat 6s ease-in-out infinite;
}

.particle:nth-child(1) { top: 16%; left: 12%; }
.particle:nth-child(2) { top: 26%; right: 14%; animation-delay: 1.5s; width: 6px; height: 6px; }
.particle:nth-child(3) { bottom: 18%; left: 18%; animation-delay: 3s; }

@keyframes pwFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ---------- Form ---------- */
form {
    display: grid;
    gap: 18px;
    text-align: left;
}

.messages {
    text-align: left;
}

.messages .alert ul,
.alert .errorlist {
    margin: 4px 0 0 18px;
}

.error-messages {
    padding: 12px 16px;
    border: 1px solid var(--danger-line);
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-sm);
    background: var(--danger-bg);
    color: #7f1c16;
    font-size: 14px;
    line-height: 1.55;
}

.error {
    color: var(--danger);
    font-size: 13px;
}

.error ul {
    margin: 0;
    list-style: none;
}

.form-group input {
    background-color: var(--bg) !important;
}

.form-group input:focus {
    background-color: #fff !important;
}

.password-requirements {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg);
}

.password-requirements h4 {
    margin-bottom: 8px;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
}

.password-requirements ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.password-requirements li {
    position: relative;
    padding-left: 22px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
}

.password-requirements li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 8px no-repeat;
}

/* ---------- Buttons ---------- */
.submit-btn,
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 14px 24px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--grad-brand);
    color: #fff;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .03em;
    cursor: pointer;
    box-shadow: var(--shadow-brand);
    transition: transform var(--t) var(--ease), background var(--t-fast) ease;
}

.login-btn {
    margin-top: 22px;
}

.submit-btn:hover,
.login-btn:hover {
    background: var(--grad-brand-hover);
    color: #fff;
    transform: translateY(-2px);
}

.back-link,
.retry-link {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 15px;
}

.back-link a,
.retry-link a {
    color: var(--brand);
    font-weight: 600;
}

.back-link a:hover,
.retry-link a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 22px;
    padding: 14px 16px;
    border: 1px solid var(--gold-soft);
    border-radius: var(--radius);
    background: var(--gold-tint);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    text-align: left;
}

.info-box svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 1px;
    fill: none;
    stroke: var(--gold-600);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.info-box p {
    margin: 0;
}

/* password_change_done */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

@media (max-width: 480px) {
    body {
        align-items: flex-start;
        padding: 0;
    }

    .forgot-container,
    .reset-container,
    .success-container {
        min-height: 100vh;
        max-width: none;
        border-radius: 0;
        padding-top: 48px;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .zodiac-decoration {
        width: 300px;
        height: 300px;
        right: -100px;
        bottom: -100px;
    }
}
