﻿* {
    box-sizing: border-box;
}

:root {
    --recovery-bg: #eef3fb;
    --recovery-surface: rgba(255, 255, 255, 0.92);
    --recovery-border: rgba(148, 163, 184, 0.18);
    --recovery-ink: #0f172a;
    --recovery-muted: #64748b;
    --recovery-accent: #2563eb;
    --recovery-accent-dark: #1d4ed8;
    --recovery-highlight: #2563eb;
    --recovery-danger: #dc2626;
    --recovery-success: #15803d;
    --recovery-shadow: 0 28px 90px rgba(15, 23, 42, 0.12);
}

html,
body {
    min-height: 100%;
}

body.recovery-page {
    margin: 0;
    font-family: "DM Sans", sans-serif;
    color: var(--recovery-ink);
    background: linear-gradient(145deg, #f9fbff 0%, #eef4ff 46%, #f8fbff 100%);
    overflow-x: hidden;
}

.recovery-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 20px;
    isolation: isolate;
}

.recovery-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.recovery-backdrop::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(96vw, 980px);
    height: min(96vw, 980px);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(37, 99, 235, 0.08);
    box-shadow:
        0 0 0 110px rgba(255, 255, 255, 0.18),
        0 0 0 230px rgba(37, 99, 235, 0.02);
}

.recovery-backdrop::after {
    content: none;
}

.recovery-glow {
    display: none;
}

.recovery-glow-a {
    display: none;
}

.recovery-glow-b {
    display: none;
}

.recovery-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(148, 163, 184, 0.26) 1px, transparent 1.2px);
    background-size: 26px 26px;
    opacity: 0.16;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
}

.recovery-app-cloud {
    position: absolute;
    inset: 0;
}

.recovery-app-mark {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--size);
    height: var(--size);
    margin-left: calc(var(--size) * -0.5);
    margin-top: calc(var(--size) * -0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow:
        0 18px 42px rgba(148, 163, 184, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    opacity: 0.88;
    animation: recoveryFloat var(--drift) ease-in-out infinite;
    animation-delay: var(--delay);
}

.recovery-app-mark-core {
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, white);
    color: var(--accent);
}

.recovery-app-mark i {
    font-size: calc(var(--size) * 0.36);
}

.recovery-app-mark img {
    width: calc(var(--size) * 0.46);
    height: calc(var(--size) * 0.46);
    object-fit: contain;
}

@keyframes recoveryFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -14px, 0);
    }
}

.recovery-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: center;
}

.recovery-card {
    width: min(100%, 560px);
    padding: 32px;
    border-radius: 32px;
    background: var(--recovery-surface);
    border: 1px solid var(--recovery-border);
    box-shadow: var(--recovery-shadow);
    backdrop-filter: blur(18px);
    animation: recoveryCardEnter 0.45s ease-out;
}

@keyframes recoveryCardEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.recovery-brand-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 22px;
}

.recovery-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.recovery-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: var(--recovery-accent);
    font-size: 17px;
}

.recovery-brand-name {
    font-family: "DM Sans", sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--recovery-ink);
}

.recovery-copy {
    margin-bottom: 22px;
}

.recovery-eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--recovery-highlight);
}

.recovery-copy h1 {
    margin: 0;
    font-family: "DM Sans", sans-serif;
    font-size: clamp(29px, 4vw, 36px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--recovery-ink);
}

.recovery-description {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.75;
    color: var(--recovery-muted);
}

.recovery-feedback {
    display: none;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    font-size: 13px;
    line-height: 1.55;
}

.recovery-feedback.is-visible {
    display: flex;
}

.recovery-feedback.is-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.18);
}

.recovery-feedback.is-success {
    background: #f0fdf4;
    color: #166534;
    border-color: rgba(34, 197, 94, 0.18);
}

.recovery-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recovery-grid-fields {
    display: grid;
    gap: 16px;
}

.recovery-grid-fields-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recovery-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recovery-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--recovery-ink);
}

.recovery-input-wrap {
    position: relative;
}

.recovery-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.form-control-recovery {
    width: 100%;
    min-height: 56px;
    padding: 0 52px 0 46px;
    border-radius: 18px;
    border: 1px solid #dbe1ec;
    background: rgba(255, 255, 255, 0.92);
    color: var(--recovery-ink);
    font-size: 15px;
    font-family: "DM Sans", sans-serif;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-control-recovery::placeholder {
    color: #94a3b8;
}

.form-control-recovery:focus {
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
    background: #fff;
}

.form-control-recovery.is-invalid {
    border-color: rgba(220, 38, 38, 0.55);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease;
}

.toggle-password:hover {
    color: var(--recovery-accent);
    background: rgba(37, 99, 235, 0.08);
}

.form-error {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--recovery-danger);
    padding-left: 2px;
}

.recovery-strength {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: -4px;
}

.recovery-strength-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
}

.recovery-strength-progress {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #e2e8f0;
    transition: width 0.18s ease, background-color 0.18s ease;
}

.recovery-strength-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--recovery-muted);
}

.btn-recovery {
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--recovery-accent), var(--recovery-accent-dark));
    color: #fff;
    font-family: "DM Sans", sans-serif;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.20);
}

.btn-recovery:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.24);
}

.btn-recovery:disabled {
    cursor: wait;
    opacity: 0.9;
}

.btn-recovery.is-loading .btn-recovery-spinner {
    display: inline-block;
}

.btn-recovery-spinner {
    display: none;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 999px;
    animation: recoverySpin 0.7s linear infinite;
}

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

.recovery-helper-box {
    margin-top: 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 16px;
    border-radius: 20px;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.recovery-helper-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--recovery-accent);
    font-size: 14px;
}

.recovery-helper-box strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--recovery-ink);
}

.recovery-helper-box p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--recovery-muted);
}

.recovery-footer {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--recovery-muted);
}

.recovery-footer a {
    color: var(--recovery-accent-dark);
    text-decoration: none;
    font-weight: 700;
}

.recovery-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .recovery-shell {
        padding: 24px 14px;
    }

    .recovery-card {
        width: min(100%, 100%);
        padding: 22px;
        border-radius: 24px;
    }

    .recovery-grid-fields-two {
        grid-template-columns: 1fr;
    }

    .recovery-app-mark {
        opacity: 0.8;
    }
}

@media (max-width: 480px) {
    .recovery-card {
        padding: 18px;
    }

    .recovery-copy h1 {
        font-size: 27px;
    }
}
