/* 共用标题栏（templates/_topbar.html）：主界面/各业务页（base.html）与车间工作台
   （workshop.html）同一份样式，唯一来源本文件。工作台不引入 styles.css，因此这里
   必须自包含（含用户下拉菜单）。颜色用 #fff 字面量：styles.css 的 :root 没定义
   --on-blue（那是 workshop.css 的变量），两边取值相同。 */
.topbar { display: flex; align-items: center; height: 44px; padding: 0 12px; background: var(--brand-primary); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 24px; color: #fff; text-decoration: none; white-space: nowrap; }
.brand:hover { color: #fff; }
.topbar-logo { width: 34px; height: 34px; border-radius: 4px; display: block; flex: 0 0 auto; }
.version { margin-left: 10px; color: rgba(255, 255, 255, .78); font-size: 13px; white-space: nowrap; }
.topbar-tools { display: flex; align-items: center; gap: 15px; font-size: 14px; margin-left: auto; color: #fff; }
.topbar-link { background: none; border: none; padding: 0; font-size: 14px; color: #fff; text-decoration: none; cursor: pointer; height: auto; line-height: normal; white-space: nowrap; }
.topbar-link:hover { background: none; color: #fff; opacity: .8; }
/* AI 助手独立产品入口（2026-11-05）：靛蓝实心胶囊+✦，与普通链接拉开档次；
   深色品牌栏上用亮一档的靛蓝保证对比（不是 --brand-primary 同色看不出） */
.topbar-ai { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff; text-decoration: none; white-space: nowrap; background: #4f46e5; border: 1px solid rgba(255, 255, 255, .35); }
.topbar-ai:hover { background: #6366f1; color: #fff; }
.topbar-user { color: #fff; font-size: 14px; }
.user-menu-wrap { display: flex; align-items: center; position: relative; }
.user-menu-btn { display: inline-flex; align-items: center; gap: 4px; }
.caret { font-size: 9px; opacity: .85; }
/* 用户下拉菜单：base 页有 styles.css 的通用 .menu（订单详情导出菜单还在用，保留），
   工作台没有——限定 .topbar 内自带一份，两边渲染一致且互不依赖。 */
.topbar .menu-wrap { position: relative; }
.topbar .menu {
  position: absolute; right: 0; top: 100%; margin-top: 4px;
  background: #fff; border: 1px solid #d9dee7; border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); z-index: 50; min-width: 140px;
}
.topbar .menu.hidden { display: none; }
.topbar .menu a { display: block; padding: 8px 14px; color: var(--text); text-decoration: none; font-size: 14px; white-space: nowrap; }
.topbar .menu a:hover { background: #f5f7fa; }
/* 窄屏（≤700px）：工具区不再整体隐藏——管理员要能找到「设置」，人人要能退出；
   顶栏允许换行，工具区整体换到下一行右对齐（修复旧版 mobile display:none 缺陷）。 */
@media (max-width: 700px) {
  .topbar { height: auto; min-height: 44px; flex-wrap: wrap; padding: 7px 12px; gap: 4px 10px; }
  .topbar-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
}

/* 消息铃铛（2026-11-14）：功能上新面板，右侧下拉、按日期分组 */
.news-btn { position: relative; display: inline-flex; align-items: center; }
.news-dot { position: absolute; top: -3px; right: -4px; width: 8px; height: 8px;
  border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px var(--topbar-bg, #0d0d0d); }
.news-dot[hidden] { display: none; }
