.login {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    box-sizing: border-box;
}

/* Centred logo above the input boxes (no longer baked into the background), scaling with the layout. */
.login__logo {
    display: block;
    width: min(220px, 100%);
    height: auto;
    margin: 0 auto 0.5rem;
}

.login__form {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    gap: 0.4rem;
    /* Nudge the form up 15vh from the centred position. */
    transform: translateY(-12vh);
}

.login__label {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.login__input {
    padding: 0.7rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    box-sizing: border-box;
}

/* Wraps the password input so the toggle button can be positioned inside it. */
.login__password {
    position: relative;
    display: flex;
}

.login__password .login__input {
    flex: 1;
    /* Leave room so the password text never runs under the eye button. */
    padding-right: 2.8rem;
}

.login__toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* appearance:none kills the native button chrome (mobile browsers otherwise draw a grey,
       rounded background that makes the icon look like a separate button on top of the field). */
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
}

.login__toggle:hover {
    color: #222;
}

/* Show exactly one icon: the open eye by default, the crossed-out eye once revealed. */
.login__toggle .login__eye--hide,
.login__toggle.is-revealed .login__eye--show {
    display: none;
}

.login__toggle.is-revealed .login__eye--hide {
    display: block;
}

.login__button {
    margin-top: 1.2rem;
    padding: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background-color: #2563eb;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.05s ease, filter 0.1s ease;
}

.login__button:hover {
    background-color: #1d4ed8;
}

.login__button:active {
    transform: scale(0.97);
    filter: brightness(0.9);
}

.login__notice {
    margin: 0;
    padding: 0.6rem 0.8rem;
    background-color: #fef3c7;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.login__error {
    margin: 0;
    padding: 0.6rem 0.8rem;
    color: #b91c1c;
    background-color: #fee2e2;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}
