:root {
    color-scheme: dark;
    --auth-bg: #0b0c11;
    --auth-panel: #12131a;
    --auth-border: rgba(255, 255, 255, 0.12);
    --auth-muted: rgba(255, 255, 255, 0.62);
    --auth-red: #e53e3e;
    --auth-red-hover: #c92f2f;
}

* {
    box-sizing: border-box;
}

body.auth-recovery-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    background: #0a0a0f;
    color: #fff;
    font-family: Inter, "Segoe UI", sans-serif;
    overflow: hidden;
}

.auth-shell {
    width: 100%;
    min-height: 100vh;
    display: flex;
}

.auth-visual {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 100vh;
    padding: 40px;
    overflow: hidden;
    background: #0a0a0f;
}

.auth-visual::before {
    position: absolute;
    inset: -10px;
    background:
        linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.28)),
        url("../image/login-left-background.png") left center / cover no-repeat;
    filter: blur(5px);
    transform: scale(1.03);
    content: '';
    pointer-events: none;
}

.auth-visual-logo {
    position: relative;
    z-index: 1;
    width: 320px;
    max-width: 80%;
    height: auto;
}

.auth-form-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 480px;
    min-width: 420px;
    height: calc(100vh - 48px);
    margin: 24px 24px 24px 0;
    padding: 50px 44px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 24px;
    background: rgba(17, 17, 22, 0.96);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
    scrollbar-width: none;
}

.auth-form-panel::-webkit-scrollbar {
    display: none;
}

.auth-form-panel::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, transparent 10%, #e53e3e 50%, transparent 90%);
    content: '';
}

.auth-form {
    width: 100%;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #fca5a5;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-form h1 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1.15;
    font-weight: 800;
}

.auth-intro {
    margin: 0 0 30px;
    color: var(--auth-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

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

.auth-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 1;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.58);
    pointer-events: none;
}

.auth-input-wrap input {
    width: 100%;
    min-height: 54px;
    padding: 12px 16px 12px 46px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    outline: none;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font: inherit;
}

.auth-input-wrap.has-toggle input {
    padding-right: 50px;
}

.auth-input-wrap input:focus {
    border-color: var(--auth-red);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.14);
}

.auth-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.36);
}

.auth-code-wrap input {
    min-height: 66px;
    padding-left: 52px;
    font-family: Consolas, Monaco, monospace;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: 0.3em;
}

.auth-code-wrap input::placeholder {
    letter-spacing: 0.3em;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 54px;
    margin-top: 8px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #ef4444, #c62828);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-submit:hover {
    background: linear-gradient(135deg, #f05252, #d32f2f);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(229, 62, 62, 0.24);
}

.auth-notice {
    display: flex;
    gap: 11px;
    margin-bottom: 22px;
    padding: 13px 14px;
    border: 1px solid rgba(248, 113, 113, 0.24);
    border-radius: 12px;
    background: rgba(229, 62, 62, 0.08);
    color: #fecaca;
    font-size: 13px;
    line-height: 1.45;
}

.auth-notice.is-success {
    border-color: rgba(74, 222, 128, 0.24);
    background: rgba(34, 197, 94, 0.08);
    color: #bbf7d0;
}

.auth-dev-note,
.auth-rules {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    line-height: 1.5;
}

.auth-password-checklist {
    display: grid;
    gap: 9px;
    margin: 14px 0 18px;
    padding: 0;
    list-style: none;
}

.auth-password-checklist[hidden] {
    display: none;
}

.auth-password-checklist li {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 650;
    transition: color 0.18s ease;
}

.auth-password-checklist li i {
    width: 17px;
    color: rgba(255, 255, 255, 0.34);
    text-align: center;
    transition: color 0.18s ease, transform 0.18s ease;
}

.auth-password-checklist li.is-met,
.auth-password-checklist li.is-met i {
    color: #4ade80;
}

.auth-password-checklist li.is-met i {
    transform: scale(1.08);
}

.auth-submit:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    transform: none;
    box-shadow: none;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.auth-back:hover {
    color: #fff;
}

.auth-expired {
    padding: 18px 0;
}

.auth-expired-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border-radius: 8px;
    background: rgba(229, 62, 62, 0.12);
    color: #fca5a5;
    font-size: 20px;
}

@media (max-width: 900px) {
    body.auth-recovery-page {
        overflow-y: auto;
    }

    .auth-shell {
        min-height: 100vh;
        flex-direction: column;
    }

    .auth-visual {
        flex: none;
        min-height: 220px;
        padding: 36px 24px 28px;
        background-position: center 47%;
    }

    .auth-visual-logo {
        width: 240px;
        max-width: 72%;
    }

    .auth-form-panel {
        width: calc(100% - 32px);
        min-width: 0;
        height: auto;
        min-height: 0;
        margin: 16px;
        padding: 38px 28px 42px;
        border-radius: 20px;
    }

    .auth-form h1 {
        font-size: 30px;
    }
}

@media (max-width: 420px) {
    .auth-visual {
        min-height: 180px;
    }

    .auth-form-panel {
        padding: 30px 22px 38px;
    }
}
