:root {
    color-scheme: light;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
    background: #f3f6fb;
}

* { box-sizing: border-box; }
body { margin: 0; }
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}
a { color: #2457c5; }

.site-header {
    min-height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #d9e2f1;
}
.brand { color: #173f91; font-size: 1.2rem; font-weight: 750; text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 16px; }
.site-header form { margin: 0; }
.link-button { border: 0; padding: 0; background: transparent; color: #2457c5; cursor: pointer; font: inherit; }

.messages { width: min(620px, calc(100% - 32px)); margin: 20px auto 0; }
.messages > div { padding: 12px 16px; border-radius: 10px; background: #e8f0ff; }

.auth-page, .page-card {
    width: min(620px, calc(100% - 32px));
    margin: 64px auto;
}
.auth-box, .page-card {
    padding: 32px;
    border: 1px solid #d9e2f1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(24, 54, 112, 0.08);
}
.auth-heading { margin-bottom: 24px; }
.auth-heading h1 { margin: 0 0 8px; }
.auth-heading p { margin: 0; color: #5f6f86; }
.form-grid { display: grid; gap: 16px; }
.auth-field { display: grid; gap: 6px; }
.auth-field input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #c8d4e6;
    border-radius: 9px;
    font: inherit;
}
.auth-submit, .google-auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 9px;
    background: #2457c5;
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.auth-submit--ghost {
    border: 1px solid #c8d4e6;
    background: #fff;
    color: #2457c5;
}
.social-auth-form { display: grid; }
.google-auth-button { width: 100%; background: #fff; color: #172033; border: 1px solid #c8d4e6; }
.google-auth-mark { font-weight: 800; color: #4285f4; }
.auth-divider { display: flex; align-items: center; justify-content: center; margin: 18px 0; color: #748197; }
.auth-errors, .errorlist { color: #a22929; }
.auth-switch, .auth-note { margin: 20px 0 0; color: #5f6f86; }
.auth-help { color: #748197; font-size: 0.9rem; }
.no-access-card {
    text-align: center;
}
.no-access-mark {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #e8f0ff;
    color: #2457c5;
    font-size: 1.5rem;
    font-weight: 850;
}
.no-access-card h1 {
    margin: 18px 0 10px;
}
.no-access-card p {
    margin: 0;
    color: #5f6f86;
    line-height: 1.5;
}
.no-access-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: nowrap;
    margin-top: 24px;
}
.no-access-actions form {
    display: inline-flex;
    margin: 0;
}
.no-access-actions .auth-submit {
    min-width: 118px;
    height: 44px;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 14px 16px;
    }

    .site-header nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px 14px;
    }

    .auth-page,
    .page-card {
        width: min(100% - 24px, 620px);
        margin: 24px auto;
    }

    .auth-box,
    .page-card {
        padding: 20px;
        border-radius: 12px;
    }

    .messages {
        width: min(100% - 24px, 620px);
    }

    .no-access-actions .auth-submit {
        min-width: 128px;
    }
}
