/* ---- Аватарка пользователя (первая буква ника) ---- */
.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: #0a0a0b;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    cursor: default;
}

/* ---- Модалка авторизации ---- */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.auth-modal-overlay.is-open {
    display: flex;
}

.auth-modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 360px;
    position: relative;
}

.auth-modal h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

.auth-modal .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.auth-tabs button {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.auth-tabs button.active {
    background: var(--accent);
    color: #0a0a0b;
    border-color: var(--accent);
}

.auth-form label {
    display: block;
    font-size: 12.5px;
    color: var(--text-dim);
    margin-bottom: 6px;
    margin-top: 14px;
}

.auth-form input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.auth-form button[type="submit"] {
    width: 100%;
    margin-top: 20px;
    background: var(--accent);
    color: #04101f;
    font-weight: 700;
    border: none;
    padding: 12px;
    border-radius: 9px;
    font-size: 14px;
    cursor: pointer;
}

.auth-message {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    display: none;
}

.auth-message--success {
    background: rgba(52, 199, 89, 0.12);
    color: #34c759;
}

.auth-message--error {
    background: rgba(255, 69, 58, 0.12);
    color: #ff453a;
}
