:root {
    color-scheme: light;
    --auth-ink: #142a3e;
    --auth-muted: #4f6577;
    --auth-accent: #075d91;
    --auth-accent-hover: #084a72;
    --auth-border: #d6e0e8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #edf3f9;
    background-image:
        radial-gradient(ellipse at 16% 10%, #fbfdff, transparent 52%),
        radial-gradient(ellipse at 92% 94%, #cfe5f4, transparent 55%);
    color: var(--auth-ink);
    font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
}

.auth-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: clamp(16px, 4vh, 40px) clamp(12px, 4vw, 28px);
}

.auth-card {
    width: 100%;
    max-width: 456px;
    padding: clamp(24px, 5vh, 36px) clamp(18px, 6vw, 42px);
    background: #fff linear-gradient(180deg, #f3f9fe, #fff 160px);
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    box-shadow: 0 4px 12px rgb(20 42 62 / 5%), 0 24px 64px rgb(20 42 62 / 12%);
}

.auth-brand {
    display: grid;
    justify-items: center;
    margin-bottom: clamp(16px, 3vh, 24px);
}

.auth-logo {
    display: block;
    width: 124px;
    max-width: 100%;
    height: auto;
}

.auth-card h1 {
    margin: 0 0 clamp(18px, 3vh, 24px);
    text-align: center;
    font-size: clamp(26px, 5vw, 32px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.auth-field + .auth-field {
    margin-top: 16px;
}

.auth-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.auth-input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 10px 13px;
    border: 1px solid #798da0;
    border-radius: 9px;
    background: #fff;
    color: var(--auth-ink);
    font: inherit;
}

.auth-input:disabled {
    border-color: var(--auth-border);
    background: #f1f5f8;
    color: var(--auth-muted);
    opacity: 1;
}

.auth-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 12px;
    margin-top: 8px;
    font-size: 14px;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 8px;
}

.auth-remember input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--auth-accent);
    cursor: pointer;
}

.auth-remember label {
    padding: 10px 0;
    cursor: pointer;
}

.auth-card a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--auth-accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.auth-card a:hover {
    color: var(--auth-accent-hover);
}

.auth-button {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 20px 0 0;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--auth-accent);
    color: #fff;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.auth-options + .auth-button {
    margin-top: 8px;
}

.auth-button:hover {
    background: var(--auth-accent-hover);
}

.auth-card :focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 3px;
}

.auth-secondary {
    margin: 12px 0 0;
    text-align: center;
    font-size: 14px;
}

.auth-secondary-divided {
    margin-top: 16px;
    padding-top: 6px;
    border-top: 1px solid var(--auth-border);
}

.auth-message:not(:empty) {
    display: block;
    margin-bottom: 16px;
    padding: 9px 12px;
    border-radius: 8px;
    background: #f2f6f9;
    color: var(--auth-ink);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.auth-message-error:not(:empty) {
    color: #9a2633;
}

.auth-footer {
    color: var(--auth-muted);
    text-align: center;
    font-size: 13px;
}

@media (max-height: 640px) {
    .auth-layout {
        gap: 12px;
    }

    .auth-logo {
        width: 92px;
    }
}
