html.auth-pending body > :not(#ifed-auth-gate-mount) {
    display: none !important;
    visibility: hidden !important;
}

html.auth-pending,
html.auth-pending body {
    overflow: hidden;
    background: #fafafa;
}

#ifed-auth-gate-mount {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #fafafa 0%, #f3efe6 100%);
}

html.auth-pending #ifed-auth-gate-mount,
html.auth-denied #ifed-auth-gate-mount {
    display: flex;
}

.auth-gate-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid rgba(203, 168, 100, 0.35);
    border-radius: 12px;
    padding: 36px 32px 32px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.auth-gate-card *,
.auth-gate-card *::before,
.auth-gate-card *::after {
    box-sizing: border-box;
}

#auth-gate-form {
    width: 100%;
}

.auth-gate-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 auto 20px;
}

.auth-gate-logo {
    display: block;
    width: 120px;
    margin: 0;
}

.auth-gate-logo--fyrstgen {
    width: 140px;
}

.auth-gate-logo-sep {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    color: #cba864;
    line-height: 1;
    flex-shrink: 0;
}

.auth-gate-card h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 400;
    text-align: center;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.auth-gate-subtitle {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    font-weight: 300;
    line-height: 1.5;
    margin: 0 0 28px;
}

.auth-gate-field {
    margin-bottom: 16px;
}

.auth-gate-field label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 6px;
    font-weight: 500;
}

.auth-gate-field input {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.auth-gate-field input:focus {
    outline: none;
    border-color: #cba864;
}

.auth-gate-btn {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 8px;
    padding: 13px 16px;
    background: #cba864;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.auth-gate-btn:hover {
    background: #b89a5a;
}

.auth-gate-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.auth-gate-error {
    margin-top: 14px;
    padding: 10px 12px;
    background: rgba(180, 40, 40, 0.08);
    border: 1px solid rgba(180, 40, 40, 0.2);
    border-radius: 6px;
    color: #a03030;
    font-size: 0.8rem;
    line-height: 1.5;
    display: none;
}

.auth-gate-error.is-visible {
    display: block;
}

.auth-gate-card--verify {
    padding-bottom: 36px;
}

.auth-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(203, 168, 100, 0.45);
    border-radius: 8px;
    color: #777;
    font-size: 0.75rem;
    font-weight: 300;
    font-family: inherit;
    line-height: 1.5;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.auth-header-btn:hover {
    color: #cba864;
    border-color: #cba864;
    background: rgba(203, 168, 100, 0.08);
}

.auth-header-slot {
    display: flex;
    align-items: center;
}

@media (max-width: 640px) {
    .auth-header-btn {
        padding: 5px 10px;
        font-size: 0.6875rem;
    }

    .site-header-right {
        gap: 10px;
    }
}
