html {
    min-height: 100%;
    background:
        repeating-linear-gradient(-45deg,
            #eeeeee 0,
            #eeeeee 20px,
            #dddddd 20px,
            #dddddd 40px);
}

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    background: transparent;
    color: #252525;
}

main.auth-main {
    width: min(100% - 32px, 480px);
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

main.auth-main>* {
    width: 100%;
}

.auth-heading {
    text-align: center;
}

.auth-heading h1 {
    margin: 0;
    color: #252525;
    font-size: clamp(26px, 6vw, 32px);
    line-height: 1.35;
}

.auth-description {
    margin: 10px 0 0;
    color: #3d3d3d;
    font-size: 14px;
    line-height: 1.7;
}

.auth-card {
    padding: 28px;
    background:
        linear-gradient(135deg,
            rgba(255, 246, 206, 0.98),
            rgba(255, 232, 156, 0.94));
    border: 1px solid rgba(78, 61, 0, 0.45);
    border-radius: 14px;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    color: #252525;
}

.auth-step {
    margin: 0;
}

.auth-step[hidden] {
    display: none !important;
}

.auth-field {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
}

.auth-field label {
    color: #252525;
    font-size: 14px;
    font-weight: 700;
}

.auth-card input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #9a9a9a;
    border-radius: 8px;
    background: #ffffff;
    color: #252525;
    font: inherit;
    line-height: 1.4;
}

.auth-card input::placeholder {
    color: #8a8a8a;
}

.auth-card input:focus {
    outline: none;
    border-color: #252525;
    box-shadow: 0 0 0 3px rgba(255, 207, 33, 0.55);
}

.auth-card button {
    width: 100%;
    min-height: 46px;
    margin-top: 4px;
    border: 1px solid #252525;
    border-radius: 8px;
    background: #252525;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        background-color 0.15s ease,
        opacity 0.15s ease;
}

.auth-card button:hover {
    background: #000000;
    opacity: 1;
    transform: translateY(-1px);
}

.auth-card button:disabled {
    cursor: wait;
    opacity: 0.55;
    transform: none;
}

.two-factor-panel h2 {
    margin: 0;
    color: #252525;
    font-size: 22px;
}

.two-factor-description {
    margin: 10px 0 20px;
    color: #3d3d3d;
    font-size: 14px;
    line-height: 1.7;
}

#twoFactorCode {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-align: center;
}

.two-factor-actions {
    display: grid;
    gap: 9px;
    margin-top: 16px;
}

.auth-card .secondary-button {
    margin-top: 0;
    border-color: rgba(78, 61, 0, 0.55);
    background: rgba(255, 255, 255, 0.62);
    color: #252525;
}

.auth-card .secondary-button:hover {
    background: rgba(255, 255, 255, 0.82);
}

.auth-card .text-button {
    min-height: auto;
    margin-top: 0;
    padding: 7px 8px;
    border: 0;
    background: transparent;
    color: #444444;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    box-shadow: none;
}

.auth-card .text-button:hover {
    background: transparent;
    color: #000000;
    opacity: 1;
    transform: none;
}

#loginMessage {
    min-height: 1.7em;
    margin: 0;
    color: #252525;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    text-align: center;
}

@media (max-width: 520px) {
    main.auth-main {
        width: min(100% - 24px, 480px);
        padding: 28px 0;
    }

    .auth-card {
        padding: 22px 18px;
        border-radius: 12px;
    }

    .auth-heading h1 {
        font-size: 25px;
    }
}