/**
 * 统一顶部导航栏样式
 *
 * 三段式布局：左（返回）/ 中（搜索或页面操作）/ 右（Menu 按钮）
 * 类名前缀：nb-
 *
 * @author Claude Code
 * @since 2026-03-21
 */

/* ========== NavBar 主容器 ========== */
.nb-bar {
    position: fixed;
    top: 0;
    left: var(--sb-w, 220px);
    right: 0;
    z-index: 120;
    background: #f7f8fa;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: left .2s;
}
body.mini-navbar .nb-bar { left: var(--sb-w-mini, 70px); }

/* ========== 三段式区域 ========== */
.nb-left   { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nb-center { flex: 1; display: flex; align-items: center; justify-content: flex-start; gap: 8px; min-width: 0; }
.nb-right  { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ========== 按钮样式微调 ========== */
.nb-bar .btn { min-width: 72px; }
.nb-bar .btn-group .btn { min-width: 0; }
.nb-bar .dropdown .btn { min-width: 0; }

/* ========== 暂存状态（create/update slot 内） ========== */
.nb-bar .rf-draft-status { font-size: 13px; color: #999; }

/* ========== 返回按钮（实心图标，无边框） ========== */
.nb-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 14px;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    background: var(--ombox-primary, #0087F7);
    transition: background-color .15s;
}
.nb-back-btn:hover { background: #0070D6; color: #fff; }
.nb-back-btn:active { background: #005bb5; color: #fff; }
body.dark-mode .nb-back-btn { background: var(--ombox-primary, #0087F7); color: #fff; }
body.dark-mode .nb-back-btn:hover { background: #339df7; color: #fff; }

/* ========== 向后兼容空规则 ========== */
.rf-sticky-actions { /* alias → .nb-bar */ }
.rv-actions-bar { /* alias → .nb-bar */ }

/* ========== Dark Mode ========== */
body.dark-mode .nb-bar {
    background: var(--bg-secondary, #252526);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ========== 手机端 ========== */
@media (max-width: 767px) {
    .nb-bar {
        position: sticky;
        left: 0;
        padding: 8px 12px;
        box-shadow: none;
    }
    .nb-bar .btn { min-width: 0; padding: 6px 12px; font-size: 15px; }
    .nb-center { justify-content: flex-start; }
    .nb-search-form { max-width: 100%; }
    body.dark-mode .nb-bar { background: var(--bg-primary, #1e1e1e); }
}

/* ========== 打印 ========== */
@media print {
    .nb-bar { display: none; }
}
