/* --- Страница входа и регистрации (Linear Minimal) --- */
body.login-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
    box-sizing: border-box;
    background-color: #090a0f;
    background-image:
        radial-gradient(640px 360px at 50% -6%, rgba(124, 58, 237, 0.22), transparent 72%),
        radial-gradient(480px 300px at 50% 108%, rgba(56, 189, 248, 0.08), transparent 70%);
    color: #f1f5f9;
}

.auth-shell {
    width: 100%;
    max-width: 400px;
}

.login-card {
    width: 100%;
    background: #10121a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px 28px 28px;
    box-sizing: border-box;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.auth-brand-icon {
    width: 44px;
    height: 44px;
    display: block;
    border-radius: 11px;
    margin-bottom: 12px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.22);
}

.auth-brand-title {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f8fafc;
    line-height: 1.2;
}

.auth-brand-subtitle {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

/* --- Переключатель Вход / Регистрация --- */
body.login-body .login-card .auth-toggle {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 4px !important;
    width: 100% !important;
    padding: 4px !important;
    margin: 0 0 22px 0 !important;
    box-sizing: border-box !important;
    background: #0a0c12 !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 10px !important;
}

body.login-body .login-card .auth-toggle button.toggle-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 36px !important;
    padding: 0 12px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 1px solid transparent !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    cursor: pointer;
    box-shadow: none !important;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

body.login-body .login-card .auth-toggle button.toggle-btn:hover:not(.active) {
    color: #cbd5e1 !important;
}

body.login-body .login-card .auth-toggle button.toggle-btn.active {
    background: rgba(124, 58, 237, 0.18) !important;
    border-color: rgba(139, 92, 246, 0.35) !important;
    color: #f8fafc !important;
}

/* --- Формы и поля --- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.auth-form.hidden {
    display: none !important;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label {
    font-size: 12.5px;
    font-weight: 500;
    color: #94a3b8;
    user-select: none;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-card .auth-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    margin: 0 !important;
    box-sizing: border-box;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: #161924;
    color: #f1f5f9;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-card .auth-input::placeholder {
    color: #475569;
}

.login-card .auth-input:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.login-card .auth-input:focus {
    border-color: #8b5cf6;
    background: #181c28;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.login-card .auth-input.auth-input-pass {
    padding-right: 38px;
}

.auth-eye-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.auth-eye-btn:hover {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
}

.auth-eye-btn svg.hidden {
    display: none;
}

/* --- Главная кнопка --- */
.auth-submit-btn {
    width: 100%;
    height: 41px;
    margin-top: 6px;
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-radius: 9px;
    background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.28);
}

.auth-submit-btn:hover {
    filter: brightness(1.07);
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.36);
}

.auth-submit-btn:active {
    transform: translateY(1px);
}

/* --- Сообщения об ошибках и успехе --- */
.auth-alert {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 12.5px;
    line-height: 1.4;
    text-align: left;
}

.auth-alert.hidden {
    display: none !important;
}

.auth-alert-error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.26);
}

.auth-alert-success {
    color: #86efac;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.26);
}

/* --- Тёмный фон при автозаполнении браузером --- */
body.login-body .login-card .auth-input:-webkit-autofill,
body.login-body .login-card .auth-input:-webkit-autofill:hover,
body.login-body .login-card .auth-input:-webkit-autofill:focus,
body.login-body .login-card .auth-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #161924 inset !important;
    box-shadow: 0 0 0 1000px #161924 inset !important;
    -webkit-text-fill-color: #f1f5f9 !important;
    caret-color: #f1f5f9 !important;
    transition: background-color 9999s ease-out 0s;
}
