:root {
    --auth-bg: #090a0a;
    --auth-surface: #141515;
    --auth-surface-2: #191a1a;
    --auth-border: #292a2a;
    --auth-border-strong: #363737;
    --auth-text: #f5f5f3;
    --auth-muted: #9b9c98;
    --auth-muted-2: #6e706d;
    --auth-accent: #91a7b5;
    --auth-accent-2: #738a98;
    --auth-danger: #ef7474;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.auth-v2 {
    margin: 0;
    min-height: 100vh;
    color: var(--auth-text);
    background: radial-gradient(circle at 50% -10%, rgba(185,200,209,.045), transparent 34%), var(--auth-bg);
    font-family: 'Onest', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
a { color: inherit; }
button, input { font: inherit; }
.auth-v2-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 34px 20px;
}
.auth-v2-shell {
    position: relative;
    width: min(100%, 670px);
    overflow: hidden;
    border: 1px solid var(--auth-border);
    border-radius: 18px;
    background: rgba(20,21,21,.96);
    box-shadow: 0 30px 90px rgba(0,0,0,.46), 0 1px 0 rgba(255,255,255,.035) inset;
}
.auth-v2-shell::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--auth-accent), var(--auth-accent-2), transparent 84%);
}
.auth-v2-brandbar {
    min-height: 78px;
    padding: 17px 22px 17px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--auth-border);
    background: rgba(255,255,255,.012);
}
.auth-v2-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}
.auth-v2-logo-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #363737;
    border-radius: 11px;
    background: #191a1a;
    box-shadow: 0 0 0 4px rgba(145,167,181,.055);
}
.auth-v2-logo-mark img { width: 31px; height: 31px; object-fit: contain; }
.auth-v2-logo-copy { display: grid; line-height: 1.08; }
.auth-v2-logo-copy strong { font-size: 15px; font-weight: 800; letter-spacing: -.025em; }
.auth-v2-logo-copy small { margin-top: 5px; color: var(--auth-muted-2); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.auth-v2-secure {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #b6b8b3;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}
.auth-v2-secure i,
.auth-v2-footer i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--auth-accent-2);
    box-shadow: 0 0 0 4px rgba(145,167,181,.03);
}
.auth-v2-content { padding: 34px 34px 30px 37px; }
.auth-v2-intro { max-width: 540px; }
.auth-v2-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #738a98;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
}
.auth-v2-kicker::before { content: ''; width: 18px; height: 1px; background: currentColor; opacity: .7; }
.auth-v2-intro h1 {
    margin: 0;
    max-width: 520px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.03;
    letter-spacing: -.045em;
    font-weight: 800;
}
.auth-v2-intro p { margin: 13px 0 0; color: var(--auth-muted); font-size: 13px; line-height: 1.7; }
.auth-v2-alert {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(239,116,116,.27);
    border-left: 3px solid var(--auth-danger);
    border-radius: 10px;
    color: #ffd0d0;
    background: rgba(239,116,116,.075);
    font-size: 12px;
    font-weight: 600;
}
.auth-v2-discord {
    min-height: 64px;
    margin-top: 26px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #363737;
    border-radius: 12px;
    color: var(--auth-text);
    background: linear-gradient(90deg, rgba(145,167,181,.07), rgba(145,167,181,.025));
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.auth-v2-discord:hover { transform: translateY(-1px); border-color: #555754; background: linear-gradient(90deg, rgba(145,167,181,.11), rgba(145,167,181,.04)); }
.auth-v2-discord.is-loading { opacity: .78; }
.auth-v2-discord-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #f5e7dd;
    background: rgba(145,167,181,.10);
}
.auth-v2-discord-icon svg { width: 21px; height: 21px; fill: currentColor; }
.auth-v2-discord-copy { min-width: 0; flex: 1; display: grid; line-height: 1.1; }
.auth-v2-discord-copy strong { font-size: 13px; font-weight: 800; }
.auth-v2-discord-copy small { margin-top: 5px; color: var(--auth-muted); font-size: 10px; }
.auth-v2-arrow { color: #738a98; font-size: 18px; }
.auth-v2-divider {
    margin: 24px 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--auth-muted-2);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
}
.auth-v2-divider::before,
.auth-v2-divider::after { content: ''; height: 1px; flex: 1; background: var(--auth-border); }
.auth-v2-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-v2-field { display: grid; gap: 7px; color: #bfc1bc; font-size: 10px; font-weight: 700; }
.auth-v2-field input {
    width: 100%;
    height: 47px;
    padding: 0 13px;
    outline: 0;
    border: 1px solid var(--auth-border-strong);
    border-radius: 10px;
    color: var(--auth-text);
    background: #101111;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.auth-v2-field input::placeholder { color: #666864; }
.auth-v2-field input:focus { border-color: #555754; box-shadow: 0 0 0 3px rgba(145,167,181,.07); background: #121313; }
.auth-v2-password { position: relative; display: block; }
.auth-v2-password input { padding-right: 48px; }
.auth-v2-password button {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: #8d8f8a;
    background: #1d1e1e;
    cursor: pointer;
}
.auth-v2-password button:hover { color: #f0f0ec; background: #292a2a; }
.auth-v2-password button svg { width: 17px; height: 17px; fill: currentColor; }
.auth-v2-submit {
    width: 100%;
    height: 49px;
    margin-top: 14px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #d2b9a7;
    border-radius: 10px;
    color: #10171b;
    background: linear-gradient(90deg, #91a7b5, #a9bbc6);
    box-shadow: 0 12px 30px rgba(145,167,181,.10);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    transition: transform .15s ease, filter .15s ease;
}
.auth-v2-submit:hover { transform: translateY(-1px); filter: brightness(1.035); }
.auth-v2-submit.is-loading { cursor: wait; filter: saturate(.6); }
.auth-v2-footer {
    min-height: 52px;
    padding: 0 24px 0 27px;
    display: flex;
    align-items: center;
    gap: 18px;
    border-top: 1px solid var(--auth-border);
    color: var(--auth-muted-2);
    background: #101111;
    font-size: 9px;
}
.auth-v2-footer span { display: inline-flex; align-items: center; gap: 7px; }
.auth-v2-footer span:last-child { margin-left: auto; }
.auth-v2-footer i { width: 6px; height: 6px; box-shadow: none; }
.auth-v2-footer i.is-blue { background: var(--auth-accent); }
.auth-v2-footer i.is-green { background: var(--auth-accent-2); }
@media (max-width: 680px) {
    .auth-v2-page { padding: 18px 12px; align-items: start; }
    .auth-v2-shell { margin-top: 16px; border-radius: 14px; }
    .auth-v2-brandbar { padding: 15px 16px 15px 19px; }
    .auth-v2-secure { display: none; }
    .auth-v2-content { padding: 27px 20px 25px 23px; }
    .auth-v2-field-grid { grid-template-columns: 1fr; }
    .auth-v2-footer { padding: 14px 20px 14px 23px; flex-wrap: wrap; gap: 10px 16px; }
    .auth-v2-footer span:last-child { width: 100%; margin-left: 0; }
}


/* Chrome / Edge autofill: сохраняем тёмную палитру MyOneSecret. */
.auth-v2-field input:-webkit-autofill,
.auth-v2-field input:-webkit-autofill:hover,
.auth-v2-field input:-webkit-autofill:focus,
.auth-v2-field input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--auth-text) !important;
    caret-color: var(--auth-text);
    -webkit-box-shadow: 0 0 0 1000px #101111 inset !important;
    box-shadow: 0 0 0 1000px #101111 inset !important;
    border-color: var(--auth-border-strong) !important;
    transition: background-color 9999s ease-out 0s;
}
