/* Auth Widget - positioned top-right in site-header */
.auth-widget {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 100;
}

/* Steam login button */
.auth-steam-btn {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.2s;
}
.auth-steam-btn:hover {
    opacity: 0.85;
}
.auth-steam-btn img {
    height: 32px;
    display: block;
}
.auth-steam-text {
    display: inline-block;
    padding: 6px 14px;
    background: #171a21;
    color: #c7d5e0;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #2a475e;
    white-space: nowrap;
}
.auth-steam-text:hover {
    background: #1b2838;
}

/* Authenticated user */
.auth-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 8px;
    transition: background 0.2s;
    user-select: none;
}
.auth-user:hover {
    background: rgba(255,255,255,0.06);
}
.auth-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent, #4f86c6);
}
.auth-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-elevated, #1e2328);
    color: var(--text-muted, #666);
    font-weight: 700;
    font-size: 14px;
}
.auth-nickname {
    color: var(--text-primary, #e0e0e0);
    font-weight: 500;
    font-size: 14px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.auth-caret {
    color: var(--text-muted, #666);
    transition: transform 0.2s;
}
.auth-widget.open .auth-caret {
    transform: rotate(180deg);
}

/* Dropdown menu */
.auth-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: var(--bg-surface-elevated, #1e2328);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    min-width: 180px;
    padding: 6px 0;
    z-index: 200;
}
.auth-widget.open .auth-dropdown {
    display: block;
}
.auth-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary, #e0e0e0);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}
.auth-dropdown a:hover {
    background: rgba(255,255,255,0.06);
}
.auth-dropdown-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 4px 0;
}
.auth-logout {
    color: #e05050 !important;
}

/* Current user row highlight in tables */
.current-user-row {
    background: rgba(255, 215, 0, 0.12) !important;
    border-left: 3px solid #ffd700;
}
.current-user-row td:first-child {
    padding-left: calc(0.5em - 3px);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-widget {
        top: 10px;
        right: 10px;
    }
    .auth-nickname {
        display: none;
    }
    .auth-caret {
        display: none;
    }
}
