.auth-body .site-header { position: sticky; }

.auth-shell {
    padding: 48px 0 80px;
    min-height: calc(100vh - var(--nav-h) - 58px);
}

.auth-grid {
    display: grid;
    grid-template-columns: minmax(300px, 440px) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 28px 24px;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    font-family: var(--serif);
    font-size: 28px;
    margin: 8px 0 8px;
    font-weight: 500;
}

.auth-lead {
    margin: 0 0 22px;
    color: var(--text-soft);
    font-size: 14px;
}

.auth-field { margin-bottom: 14px; }

.auth-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.auth-input,
.auth-select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: var(--bg-elev);
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.auth-input:focus,
.auth-select:focus {
    border-color: var(--accent);
}

.auth-input::placeholder { color: #5d6675; }

.auth-input-wrap { position: relative; }
.auth-input-wrap--toggle .auth-input { padding-right: 44px; }

.auth-toggle-pass {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.auth-toggle-pass:hover { color: var(--text); background: var(--surface-2); }
.auth-toggle-pass svg { display: block; }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 4px 0 16px;
    font-size: 13px;
}

.auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text-soft);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}
.auth-checkbox input {
    margin-top: 3px;
    accent-color: var(--accent);
}
.auth-checkbox a { color: var(--accent-2); }

.auth-link {
    color: var(--accent-2);
    font-size: 13px;
    font-weight: 600;
}
.auth-link:hover { color: var(--text); }

.auth-btn {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 4px;
    background: var(--accent);
    color: #14110c;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
}
.auth-btn:hover:not(:disabled) { background: var(--accent-2); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-btn.is-loading {
    color: transparent !important;
    position: relative;
}
.auth-btn.is-loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(20, 17, 12, 0.25);
    border-top-color: #14110c;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.auth-footer-text {
    margin: 18px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}
.auth-footer-text a { color: var(--accent-2); font-weight: 600; }

.auth-error {
    display: none;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 4px;
    background: rgba(196, 93, 93, 0.12);
    border: 1px solid rgba(196, 93, 93, 0.35);
    color: #f0b4b4;
    font-size: 13px;
}
.auth-error.is-visible { display: block; }

.auth-strength {
    height: 3px;
    border-radius: 99px;
    background: var(--line);
    margin-top: 8px;
    overflow: hidden;
    display: none;
}
.auth-strength.is-on { display: block; }
.auth-strength-bar { height: 100%; width: 0; transition: width 0.25s, background 0.25s; }
.auth-strength-label { font-size: 11px; color: var(--muted); margin-top: 4px; }

.auth-note {
    margin-top: 16px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.auth-loading {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(8, 11, 16, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
}
.auth-loading.is-visible { display: flex; }
.auth-loading-spinner {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(184, 149, 106, 0.25);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.auth-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    padding: 0.875rem 1.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 2000;
    transition: transform 0.35s ease, opacity 0.35s ease;
    opacity: 0;
    max-width: min(90vw, 400px);
    text-align: center;
}
.auth-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.auth-toast--ok {
    background: rgba(63, 157, 114, 0.18);
    border: 1px solid rgba(63, 157, 114, 0.4);
    color: #9ad4b8;
}
.auth-toast--err {
    background: rgba(196, 93, 93, 0.16);
    border: 1px solid rgba(196, 93, 93, 0.4);
    color: #f0b4b4;
}

@keyframes spin { to { transform: rotate(360deg); } }

.lang-switcher {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 80;
}

@media (max-width: 980px) {
    .auth-grid { grid-template-columns: 1fr; }
    .auth-shell { padding: 28px 0 56px; }
}
