html {
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
        calc(24px + env(safe-area-inset-top, 0px))
        calc(24px + env(safe-area-inset-right, 0px))
        calc(24px + env(safe-area-inset-bottom, 0px))
        calc(24px + env(safe-area-inset-left, 0px));
    background-image:
        radial-gradient(circle 420px at 40px 40px, rgba(210, 214, 65, 0.5), transparent 100%),
        radial-gradient(circle 420px at calc(100% - 40px) calc(100% - 40px), rgba(160, 113, 224, 0.5), transparent 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 36px 32px;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.login-logo img {
    width: 44px;
    height: 44px;
}

.login-title {
    margin: 0;
    text-align: center;
    font-family: 'Monr', sans-serif;
    font-size: 20px;
    font-weight: 400;
}

.login-subtitle {
    margin: 8px 0 28px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

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

.login-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
}

.login-field input {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.login-field input::-webkit-contacts-auto-fill-button,
.login-password-wrap input::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    position: absolute;
    right: 0;
}

.login-field input:-webkit-autofill,
.login-field input:-webkit-autofill:hover,
.login-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    transition: background-color 9999s ease-in-out 0s;
}

.login-field input:focus {
    border-color: var(--text);
}

.login-password-wrap {
    position: relative;
}

.login-password-wrap input {
    padding-right: 44px;
}

.login-password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
    padding: 0;
}

.login-password-toggle svg {
    width: 20px;
    height: 20px;
}

.login-error {
    margin: 0;
    border-radius: 12px;
    padding: 10px 14px;
    border: 1px solid #e0caca;
    background: #fff1f1;
    color: #9f2020;
    font-size: 13px;
}

.login-submit {
    margin-top: 6px;
}

@media (max-width: 420px) {
    .login-container {
        padding: 28px 22px;
    }
}

/* FJ:ios-login */
.login-container {
    margin: auto;
}

.login-field input {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.login-password-toggle {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

@media (max-height: 560px) {
    .login-container {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .login-subtitle {
        margin-bottom: 18px;
    }
}

/* FJ:login-alert */
.login-alert {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    overflow: hidden;
    transform: translateY(-8px);
    transition: max-height 0.35s ease, opacity 0.3s ease, margin-bottom 0.35s ease, transform 0.35s ease;
}

.login-alert.is-open {
    max-height: 160px;
    opacity: 1;
    margin-bottom: 18px;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .login-alert {
        transition: none;
    }
}
