/* ============================================================
 * 独立导航页 nav.php 专用样式（仅该页加载）
 *
 * 页面无页头信息，直接进入「分组标题 + 按钮网格」。
 * 不引入 240px 固定侧栏，也不改动本站 mini 侧栏。
 * ============================================================ */

.nav-wrap { padding-top: 8px; padding-bottom: 32px; }

/* ===== 空态：仅一行轻提示，不做卡片、不占版面 ===== */
.nav-empty-hint {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-subtle);
}

/* ===== 分组 ===== */
.nav-groups { margin: 0; }
.nav-group {
    margin: 0 0 22px;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--border);
}
.nav-group:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.nav-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .2px;
    color: var(--text);
}
.nav-group-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 10px;
}
.nav-group-items a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 9px 13px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--card-border);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.nav-group-items a:hover {
    background: var(--bg-hover);
    border-color: var(--text-subtle);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.nav-group-items a > span:not(.nav-item-avatar) {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-group-items a > svg { width: 13px; height: 13px; fill: currentColor; flex: none; opacity: .5; }

/* ===== 按钮头像 ===== */
.nav-item-avatar {
    position: relative;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    font-style: normal;
    white-space: nowrap;
}
.nav-item-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.nav-item-avatar i { display: none; font-style: normal; }
.nav-item-avatar.is-failed img { display: none; }
.nav-item-avatar.is-failed i { display: inline; }

@media (max-width: 600px) {
    .nav-group-items { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
    .nav-group-items a { padding: 8px 10px; min-height: 42px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .nav-group-items a { transition: none; }
    .nav-group-items a:hover { transform: none; }
}

@media (prefers-color-scheme: dark) {
    .nav-group-items a { color: var(--text); }
    .nav-group-items a:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .28); }
}
