* {
    box-sizing: border-box;
}
body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 24px;
    background: radial-gradient(circle at 15% 15%, #efe1d1 0, transparent 34%), var(--color-ivory);
}
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    right: -10vw;
    bottom: -24vw;
    width: 58vw;
    height: 58vw;
    border: 1px solid var(--color-sand);
    border-radius: 50%;
}
.login-card {
    width: min(460px, 100%);
    padding: clamp(30px, 6vw, 52px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: rgb(255 255 255 / 86%);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
}
.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 54px;
    color: var(--color-charcoal);
    text-decoration: none;
}
.login-brand img {
    width: 46px;
}
.login-card > span {
    color: var(--color-primary);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}
h1 {
    margin: 12px 0 14px;
    color: var(--color-charcoal);
    font-size: clamp(2.4rem, 7vw, 3.5rem);
    line-height: 1.02;
}
.login-card > p {
    margin: 0 0 30px;
    color: var(--color-muted);
    line-height: 1.6;
}
form {
    display: grid;
    gap: 18px;
}
label {
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 500;
}
input {
    width: 100%;
    margin-top: 7px;
    padding: 13px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: white;
}

.auth-password-field {
    position: relative;
    display: block;
    margin-top: 7px;
}

.auth-password-field input {
    margin-top: 0;
    padding-right: 48px;
}

.auth-password-field button {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 38px;
    min-height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-muted);
    cursor: pointer;
    transform: translateY(-50%);
}

.auth-password-field button:hover,
.auth-password-field button:focus {
    background: #f0e8dd;
    color: var(--color-charcoal);
    outline: none;
}

.auth-password-field .material-symbols-outlined {
    display: block;
    font-size: 22px;
    line-height: 34px;
}

button {
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    background: var(--color-primary);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}
button:hover {
    background: var(--color-primary-dark);
}
button:disabled {
    cursor: wait;
    opacity: 0.65;
}
#login-error {
    min-height: 1.3em;
    margin: -4px 0;
    color: var(--color-danger);
    font-size: 0.85rem;
}
.login-secondary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.login-secondary-actions a {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-primary-dark);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition:
        border-color 180ms ease,
        background 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.login-secondary-actions a:hover,
.login-secondary-actions a:focus-visible {
    border-color: var(--color-primary);
    background: #f0e8dd;
    color: var(--color-charcoal);
    outline: none;
    transform: translateY(-1px);
}

.login-back-link {
    display: block;
    margin-top: 20px;
    color: var(--color-muted);
    font-size: 0.85rem;
    text-align: center;
    text-decoration: none;
}

.login-back-link:hover,
.login-back-link:focus-visible {
    color: var(--color-primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 420px) {
    .login-secondary-actions {
        grid-template-columns: 1fr;
    }
}
