*,
*::before,
*::after {
    box-sizing: border-box;
}

.login-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 16px;
}

.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(ellipse at 50% 50%, hsl(210, 100%, 97%), hsl(0, 0%, 100%));
    background-repeat: no-repeat;
}

.login-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 450px;
    padding: 32px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface);
    box-shadow:
        hsla(220, 30%, 5%, 0.05) 0 5px 15px 0,
        hsla(220, 25%, 10%, 0.05) 0 15px 35px -5px;
}

.login-title {
    margin: 0;
    width: 100%;
    font-size: clamp(2rem, 10vw, 2.15rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

.login-subtitle {
    margin: -8px 0 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.login-field label {
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-weight: 500;
}

.login-input-group {
    display: flex;
    align-items: center;
    width: 100%;
    height: 48px;
    padding: 0 11px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input-group:hover {
    border-color: #9ca3af;
}

.login-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.login-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 7px 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
}

.login-input::placeholder {
    opacity: 0.7;
    color: #6b7280;
}

.login-input:focus {
    outline: none;
}

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

.login-password-toggle {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: -6px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
}

.login-password-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}

.login-password-toggle svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.login-password-toggle .login-icon-hide {
    display: none;
}

.login-password-toggle.is-visible .login-icon-show {
    display: none;
}

.login-password-toggle.is-visible .login-icon-hide {
    display: block;
}

.login-alert {
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: var(--font-size-sm);
}

.login-submit {
    width: 100%;
    height: 42px;
    margin-top: 16px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.login-submit:hover {
    background: var(--primary-dark);
}

@media (min-width: 600px) {
    .login-page {
        padding: 32px;
    }
}
