/*
 * Оверлей авторизации пользователей сайта.
 * Подключается ко всем страницам вместе с script/auth.js.
 * Пока пользователь не авторизован, контент страницы размывается,
 * посередине показывается окно входа.
 */

body.auth-locked .app-shell,
body.auth-locked > *:not(.auth-overlay) {
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.35);
}

.auth-overlay[hidden] {
    display: none;
}

.auth-modal {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    padding: 28px 26px 24px;
    text-align: center;
}

.auth-modal-logo img {
    max-width: 120px;
    height: auto;
}

.auth-modal .auth-eyebrow {
    margin: 14px 0 4px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #0f766e;
    font-weight: 700;
}

.auth-modal h1 {
    margin: 0 0 6px;
    font-size: 20px;
    color: #0f172a;
}

.auth-modal .auth-sub {
    margin: 0 0 18px;
    font-size: 14px;
    color: #64748b;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.auth-form label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.auth-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 8px;
}

.auth-form input:focus {
    outline: 2px solid #0f766e;
    outline-offset: 1px;
    border-color: #0f766e;
}

.auth-form button {
    margin-top: 6px;
    padding: 11px 14px;
    border: none;
    border-radius: 8px;
    background: #0f766e;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.auth-form button:disabled {
    opacity: 0.6;
    cursor: default;
}

.auth-error {
    display: none;
    margin-bottom: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 13px;
    text-align: left;
}

.auth-error.visible {
    display: block;
}

/* Индикатор пользователя в шапке (добавляется скриптом) */
.auth-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
}

.auth-user-chip .auth-user-name {
    font-weight: 600;
}

.auth-user-chip button {
    padding: 5px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    cursor: pointer;
}

.auth-user-chip button:hover {
    background: #f1f5f9;
}
