.auth-gate[hidden] { display: none !important; }
.auth-gate {
    min-height: 100vh;
    width: 100%;
    display: grid;
    place-items: center;
    padding: 24px;
    box-sizing: border-box;
    color: #f5f2ff;
    background: radial-gradient(circle at 50% 18%, rgba(117, 77, 205, .22), transparent 42%), #09090f;
}
.auth-gate-card {
    width: min(100%, 430px);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 24px;
    background: rgba(22, 19, 34, .94);
    box-shadow: 0 24px 80px rgba(0,0,0,.38);
    padding: 32px;
    text-align: center;
}
.auth-gate-logo { font-size: 21px; letter-spacing: -.5px; text-align: left; }
.auth-gate-logo span { color: #a68aff; }
.auth-gate-icon {
    width: 68px; height: 68px; margin: 36px auto 20px;
    display: grid; place-items: center; border-radius: 20px;
    font-size: 32px; color: #d8caff;
    background: linear-gradient(145deg, #5733a4, #241b48);
}
.auth-gate-card h1 { font-size: 25px; line-height: 1.2; margin: 0 0 12px; }
.auth-gate-card p { color: #b7b0c7; line-height: 1.6; margin: 0 0 24px; }
.auth-gate-button {
    display: block; text-decoration: none; padding: 15px 18px;
    border-radius: 13px; color: white; font-weight: 700;
    background: linear-gradient(100deg, #7652da, #4c70da);
}
.auth-gate-hint {
    padding: 13px; border-radius: 12px; color: #e6dfff;
    background: rgba(130, 100, 210, .16); line-height: 1.5;
}
.auth-gate-card small { display: block; color: #8f899d; margin-top: 22px; line-height: 1.5; }
body.auth-gate-active { margin: 0; }
body.auth-gate-active > aside,
body.auth-gate-active > main { display: none !important; }

.auth-gate-card { text-align:left; }
.auth-gate-card h1, .auth-gate-card > p { text-align:center; }
.auth-gate-tabs { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin:22px 0 18px; }
.auth-gate-tabs button { border:1px solid rgba(255,255,255,.1); border-radius:10px; padding:11px 8px; color:#c9c2d8; background:#171522; font-weight:700; cursor:pointer; }
.auth-gate-tabs button.active { color:white; border-color:#8b6be0; background:#38295b; }
.auth-gate-form label { display:block; margin:13px 0; color:#c3bdd1; font-size:12px; text-align:left; }
.auth-gate-form input { display:block; width:100%; margin-top:7px; box-sizing:border-box; padding:13px 14px; border:1px solid #39334c; border-radius:10px; outline:none; color:#f5f2ff; background:#0e0d16; font:inherit; }
.auth-gate-form input:focus { border-color:#8f70e2; box-shadow:0 0 0 3px rgba(143,112,226,.13); }
.auth-gate-form .auth-gate-button { width:100%; border:0; cursor:pointer; margin-top:13px; font:inherit; }
.auth-gate-link { display:block; border:0; background:none; color:#b9a2ff; text-decoration:underline; cursor:pointer; margin:16px auto 0; font:inherit; }
.auth-gate-message { margin:12px 0; padding:10px 12px; border-radius:9px; background:rgba(124,91,190,.16); color:#e3d8ff; line-height:1.5; font-size:12px; }
.auth-gate-message.error { background:rgba(180,60,80,.17); color:#ffc8d0; }
.auth-gate-form .auth-gate-button:disabled { opacity:.45; cursor:not-allowed; }
.account-access-status { margin:0 0 14px; padding:12px; border:1px solid var(--line); border-radius:9px; background:#191925; color:#c7c1d3; line-height:1.5; }
.account-access-status strong { display:block; color:#f5f2fb; margin-bottom:3px; }
.account-access-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:14px; }
.account-access-actions button { cursor:pointer; }
@media(max-width:520px) { .auth-gate-card { padding:24px 20px; } }

.auth-gate-divider { display:flex; align-items:center; gap:12px; margin:20px 0 14px; color:#81798f; font-size:11px; }
.auth-gate-divider::before,.auth-gate-divider::after { content:""; height:1px; flex:1; background:rgba(255,255,255,.12); }
.auth-gate-telegram { display:flex; justify-content:center; min-height:42px; }
.auth-gate-telegram-note { text-align:center; }
.cv-email-prompt-backdrop { position:fixed; inset:0; z-index:10000; display:grid; place-items:center; padding:20px; background:rgba(5,5,12,.78); backdrop-filter:blur(8px); }
.cv-email-prompt-card { width:min(100%,420px); padding:26px; border:1px solid rgba(255,255,255,.12); border-radius:20px; color:#f5f2ff; background:#171522; box-shadow:0 24px 80px rgba(0,0,0,.45); }
.cv-email-prompt-card h2 { margin:24px 0 10px; font-size:23px; }
.cv-email-prompt-card p { color:#b7b0c7; line-height:1.6; }
.cv-email-prompt-card .auth-gate-button { width:100%; border:0; cursor:pointer; margin-top:12px; }
.cv-email-prompt-telegram { display:block; box-sizing:border-box; width:100%; margin-top:12px; padding:13px 14px; border-radius:10px; color:#fff; text-align:center; text-decoration:none; background:#287db5; font-weight:700; }


/* Live password strength feedback for registration, reset and account settings. */
.auth-password-strength { margin: 10px 0 15px; padding: 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(8,7,14,.55); color: #bbb4cb; font-size: 12px; text-align: left; }
.auth-password-strength-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: #ddd6eb; font-weight: 700; }
.auth-password-strength-heading > span:last-child { color: #91899f; font-weight: 500; white-space: nowrap; }
.auth-password-strength-track { height: 6px; overflow: hidden; border-radius: 999px; background: #302b3d; }
.auth-password-strength-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: #c45d69; transition: width .18s ease, background .18s ease; }
.auth-password-strength[data-level="medium"] .auth-password-strength-fill { background: #d6a64a; }
.auth-password-strength[data-level="strong"] .auth-password-strength-fill { background: #42b985; }
.auth-password-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; margin-top: 10px; }
.auth-password-checks > span { color: #91899f; }
.auth-password-checks > span.passed { color: #7ed5ae; }
.auth-password-check-mark { display: inline-block; width: 14px; color: #777084; font-weight: 700; }
.auth-password-checks > span.passed .auth-password-check-mark { color: #42b985; }
.auth-password-strength > small { display: block; margin-top: 10px; color: #8f899d; line-height: 1.45; }
@media(max-width:420px) { .auth-password-checks { grid-template-columns: 1fr; } }
