:root {
    --r-bg: #f6f5f1;
    --r-card: #ffffff;
    --r-text: #08080a;
    --r-muted: #64748b;
    --r-border: #e2e8f0;
    --r-primary: #0a7f9c;
    --r-accent: #12b3d6;
    --r-amber: #ffb63c;
    --r-danger: #ef4444;
    --r-danger-soft: rgba(239, 68, 68, .08);
    --r-success: #10b981;
    --r-success-soft: rgba(16, 185, 129, .10);
    --r-shadow: 0 24px 70px rgba(8, 8, 10, .12);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    color: var(--r-text);
    background:
        radial-gradient(900px 500px at 50% -10%, rgba(18, 179, 214, .12), transparent 60%),
        radial-gradient(700px 420px at 100% 100%, rgba(255, 182, 60, .10), transparent 60%),
        var(--r-bg);
}

.reset-card {
    width: 100%;
    max-width: 540px;
    padding: 34px;
    border: 1px solid var(--r-border);
    border-radius: 24px;
    background: var(--r-card);
    box-shadow: var(--r-shadow);
}

.reset-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}
.reset-logo {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #6d28d9, #12b3d6);
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 10px 24px rgba(109, 40, 217, .22);
}
.reset-brand strong {
    display: block;
    font-size: .95rem;
    letter-spacing: -.01em;
}
.reset-brand small {
    display: block;
    margin-top: 2px;
    color: var(--r-muted);
    font-size: .72rem;
}

.reset-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(18, 179, 214, .10);
    color: var(--r-primary);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.reset-card h1 {
    margin: 14px 0 8px;
    font-size: clamp(1.55rem, 4vw, 2rem);
    line-height: 1.1;
    letter-spacing: -.03em;
}
.reset-lead {
    margin: 0 0 22px;
    color: var(--r-muted);
    font-size: .9rem;
    line-height: 1.55;
}

.reset-form {
    display: grid;
    gap: 12px;
}
.reset-label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: .8rem;
    font-weight: 650;
}
.reset-input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--r-border);
    border-radius: 12px;
    background: #fff;
    color: var(--r-text);
    font: inherit;
    font-size: .92rem;
    outline: 0;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.reset-input:focus {
    border-color: var(--r-accent);
    box-shadow: 0 0 0 4px rgba(18, 179, 214, .14);
}
.reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #0a7f9c, #12b3d6);
    color: #fff;
    font: inherit;
    font-size: .9rem;
    font-weight: 750;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
    box-shadow: 0 12px 26px rgba(10, 127, 156, .22);
}
.reset-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(10, 127, 156, .28);
}
.reset-btn:disabled {
    opacity: .65;
    cursor: wait;
    transform: none;
}
.reset-note {
    margin: 4px 0 0;
    color: var(--r-muted);
    font-size: .76rem;
    line-height: 1.5;
}

.reset-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 16px 0;
    padding: 12px 14px;
    border-left: 4px solid var(--r-danger);
    border-radius: 10px;
    background: var(--r-danger-soft);
    color: #991b1b;
    font-size: .82rem;
    line-height: 1.45;
}
.reset-alert[hidden],
.reset-form[hidden],
.reset-success[hidden] {
    display: none !important;
}

.reset-success {
    padding: 22px;
    border: 1px solid rgba(16, 185, 129, .22);
    border-radius: 16px;
    background: var(--r-success-soft);
    text-align: center;
}
.reset-success-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--r-success);
    color: #fff;
    font-size: 1.2rem;
}
.reset-success h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}
.reset-success p {
    margin: 0 0 12px;
    color: #065f46;
    font-size: .84rem;
    line-height: 1.5;
}
.reset-success .reset-btn {
    display: inline-flex;
    min-height: 42px;
    padding: 0 16px;
    background: var(--r-success);
    box-shadow: none;
    text-decoration: none;
}

.reset-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--r-border);
}
.reset-links a,
.reset-help a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--r-muted);
    font-size: .76rem;
    font-weight: 600;
    text-decoration: none;
}
.reset-links a:hover,
.reset-help a:hover {
    color: var(--r-primary);
}
.reset-help {
    margin-top: 12px;
    text-align: center;
}

@media (max-width: 560px) {
    body { padding: 14px; }
    .reset-card { padding: 24px 18px; border-radius: 20px; }
    .reset-brand { margin-bottom: 18px; }
}

@media (prefers-color-scheme: dark) {
    :root {
        --r-bg: #0b0d12;
        --r-card: #111827;
        --r-text: #e5e7eb;
        --r-muted: #94a3b8;
        --r-border: #1f2937;
        --r-danger-soft: rgba(239, 68, 68, .12);
        --r-success-soft: rgba(16, 185, 129, .12);
        --r-shadow: 0 24px 70px rgba(0, 0, 0, .35);
    }
    .reset-label { color: #cbd5e1; }
    .reset-input { background: #0f172a; color: #e5e7eb; }
    .reset-success p { color: #a7f3d0; }
}
