/* =========================================================================
 * AI寻宠 · 公共顶栏样式（单一维护点：static/app/topbar.css）
 * 由 /static/app/nav.js 渲染整段 <nav class="topbar"> 到 #app-topbar。
 * 各页面只需 <link rel="stylesheet" href="/static/app/topbar.css">，不再内联。
 * ========================================================================= */

.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 28px;
    background: rgba(11,18,32,0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    z-index: 900;
}
.topbar::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34,211,238,0.5), transparent);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .logo {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0ea5b7, #2563eb 55%, #f59e0b);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 18px rgba(34,211,238,0.35);
}
.brand .name { font-size: 17px; font-weight: 800; letter-spacing: 1px; color: var(--text); }
.brand .name b { color: var(--cyan); font-weight: 800; }
.nav-tabs { display: flex; gap: 4px; flex: 1; }
.nav-tab {
    background: none; border: none; cursor: pointer;
    color: var(--muted); font-size: 14px; font-weight: 600;
    padding: 8px 16px; border-radius: 9px;
    display: flex; align-items: center; gap: 7px;
    transition: all .18s;
    position: relative;
}
.nav-tab:hover { color: var(--text); background: rgba(148,163,184,0.08); }
.nav-tab.active { color: var(--cyan); background: var(--cyan-soft); }
.nav-tab.active::after {
    content: '';
    position: absolute; left: 14px; right: 14px; bottom: -13px;
    height: 2px; border-radius: 2px;
    background: var(--cyan);
    box-shadow: 0 0 10px rgba(34,211,238,0.7);
}
.sys-badge {
    display: flex; align-items: center; gap: 7px;
    padding: 5px 13px; border-radius: 20px;
    background: rgba(52,211,153,0.1);
    border: 1px solid rgba(52,211,153,0.25);
    color: #6ee7b7; font-size: 12px; font-weight: 600;
}
.sys-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ===== 头像下拉 ===== */
.avatar-wrap { position: relative; }
.avatar-btn {
    width: 38px; height: 38px; border-radius: 50%;
    border: 2px solid rgba(34,211,238,0.5);
    background: linear-gradient(135deg, #1d4ed8, #0e7490);
    color: white; font-size: 16px; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .18s;
}
.avatar-btn:hover { box-shadow: 0 0 14px rgba(34,211,238,0.45); }
.avatar-menu {
    position: absolute; right: 0; top: 48px;
    width: 210px;
    background: var(--panel-solid);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.5);
    padding: 6px;
    opacity: 0; transform: translateY(-6px);
    pointer-events: none;
    transition: all .18s;
    z-index: 950;
}
.avatar-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.avatar-menu .am-user {
    padding: 10px 12px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.avatar-menu .am-user .au-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #1d4ed8, #0e7490);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
}
.avatar-menu .am-user .au-name { font-size: 13px; font-weight: 600; }
.avatar-menu .am-user .au-sub { font-size: 11px; color: var(--dim); }
.avatar-menu .am-item {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 12px; border-radius: 8px;
    font-size: 13px; color: var(--muted);
    cursor: pointer; text-decoration: none; background: none; border: none; width: 100%; text-align: left;
    transition: all .14s;
}
.avatar-menu .am-item:hover { background: rgba(148,163,184,0.1); color: var(--text); }
.avatar-menu .am-item.danger { color: #fca5a5; }
.avatar-menu .am-item.danger:hover { background: rgba(248,113,113,0.12); color: #f87171; }
.avatar-menu .am-item.danger:hover path { fill: #f87171; }
.avatar-menu .am-item svg { width: 15px; height: 15px; fill: currentColor; opacity: .8; }
