/* Supabase authentication gate: never bootstrap the old editor for an unverified role. */
body.auth-locked > :not(#auth-gate):not(script) {
    display: none !important;
}
.auth-gate[hidden], .auth-workspace-notice[hidden], .auth-login-form[hidden],
#auth-gate-logout[hidden] { display: none !important; }
.auth-gate {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: #e9ece7;
    display: grid;
    place-items: center;
    padding: 16px;
    box-sizing: border-box;
    font-family: Georgia, 'Times New Roman', serif;
}
.auth-window {
    box-sizing: border-box;
    width: min(430px, 100%);
    padding: clamp(20px, 4vw, 38px);
    border: 1px solid #bfc6c0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 45px rgba(18, 40, 30, .14);
}
.auth-window h1 { margin: 0; font-size: 29px; color: #243e31; }
.auth-intro { margin: 7px 0 23px; font-size: 14px; color: #58665c; }
.auth-login-form { display: grid; gap: 15px; }
.auth-login-form label { display: grid; gap: 6px; font: 13px Arial, sans-serif; color: #34443b; }
.auth-login-form input {
    display: block; box-sizing: border-box; width: 100%; min-height: 40px;
    padding: 8px 10px; font: 15px Arial, sans-serif;
    border: 1px solid #aab7ae; border-radius: 6px; background: white;
}
.auth-login-form button {
    min-height: 41px; border: none; border-radius: 6px;
    background: #2f5c46; color: white; font: 600 14px Arial, sans-serif;
}
.auth-login-form button:disabled { opacity: .6; cursor: wait; }
.auth-message { margin: 17px 0 10px; font: 13px/1.5 Arial, sans-serif; color: #4c5b51; }
.auth-message.auth-error { color: #a33434; }
.auth-secondary { border: 1px solid #9daea2; border-radius: 5px; background: #fff; padding: 8px 10px; font: 13px Arial, sans-serif; }
.auth-caption { margin: 14px 0 0; font: 11px/1.5 Arial, sans-serif; color: #7a847e; }
.auth-workspace-notice {
    position: fixed; z-index: 1600; top: 8px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 9px;
    box-sizing: border-box; width: min(490px, calc(100vw - 570px)); min-width: 280px;
    padding: 7px 10px; background: rgba(255, 247, 220, .98);
    border: 1px solid #b29a64; border-radius: 6px;
    box-shadow: 0 3px 11px #0002;
    color: #5c4926; font: 11px/1.35 Arial, sans-serif;
}
.auth-workspace-notice button { flex-shrink: 0; border: 1px solid #a18b60; background: white; padding: 5px 7px; border-radius: 4px; font: 11px Arial, sans-serif; }
@media (max-width: 900px) {
    .auth-workspace-notice { width: min(500px, calc(100vw - 20px)); min-width: 0; top: auto; bottom: 118px; }
}

.auth-cloud-error { color: #a33434; font-weight: 700; }

.auth-publication-link { color: #2f5c46; font: 600 11px Arial,sans-serif; white-space: nowrap; }
