/* base.css makes the document a fixed-height app shell; the sign-in page is a page that scrolls. */
html,
body {
    height: auto;
    max-height: none;
    overflow: visible;
}

body {
    --login-gutter: clamp(28px, 6vw, 64px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    min-height: var(--viewport-height);
    padding: var(--login-gutter) 16px;
    /* Installed, iOS draws the page under the status bar and blurs what is right below it */
    padding-top: max(var(--login-gutter), calc(env(safe-area-inset-top, 0px) + 22px));
    padding-bottom: max(var(--login-gutter), env(safe-area-inset-bottom, 0px));
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--ink);
    text-decoration: none;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 72px;
    height: 68px;
    background: var(--attention);
    color: var(--on-attention);
    border-radius: 34px 34px 34px 6px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 54px;
    line-height: 1;
    user-select: none;
}

.login-wordmark {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.login-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 60px;
    line-height: 0.9;
}

.login-by {
    font-size: 16px;
    color: var(--text-2);
}

.login-card {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: 100%;
    max-width: 440px;
    padding: 32px 28px 28px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
}

.login-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-heading h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 30px;
    line-height: 1.05;
}

.login-subtitle {
    font-size: 15px;
    line-height: 1.45;
    color: var(--text-2);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.login-field label {
    font-size: 14px;
    font-weight: 700;
}

.login-field input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    background: var(--raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-control);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.3;
}

.login-field input::placeholder {
    color: var(--text-3);
    opacity: 1;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-top: -6px;
    font-size: 14px;
    color: var(--text-2);
    cursor: pointer;
}

.login-remember input {
    flex: none;
    width: 20px;
    height: 20px;
    accent-color: var(--ink);
    cursor: pointer;
}

.btn-login {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    background: var(--ink);
    border: 1px solid var(--ink);
    border-radius: var(--radius-control);
    color: var(--on-ink);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.btn-login:hover {
    background: var(--text-2);
    border-color: var(--text-2);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-error {
    display: none;
    position: relative;
    padding: 12px 14px 12px 44px;
    background: var(--paper);
    border: 1px solid var(--danger);
    border-radius: var(--radius-control);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.45;
}

.login-error::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 16px;
    width: 12px;
    height: 12px;
    background: var(--danger);
}

@media (max-width: 480px) {
    .login-logo {
        width: 56px;
        height: 53px;
        border-radius: 27px 27px 27px 5px;
        font-size: 42px;
    }

    .login-name {
        font-size: 46px;
    }
}
