/* ============================================================
 * 批 V18 V18-32 顶栏「＋ 新建任务」+ 全站搜索的样式（改法清单 #364，审核方 11-17 18:45；设计稿 rv/V18-designs V18-32 的 gs- 那一段）
 *   · 元素是 public/js/topsearch.js 运行时插进顶栏的（#gs-box、#top-new）；core.js 的外框模板、外壳样式 core-v17-shell.css 都不动
 *   · 每条都写成 body.app-shell .topbar .gs-… / #top-new（只管顶栏里这两样）；颜色只用 --u- 变量（<mark> 的黄底照稿）
 *   · index.html 里这一行排在 core-v17-o6.css 前面（审核方 #275 定的 o6 → fin → u1 → ui → shell → </head> 那几行要连着，用例 5585 / 5651 / 5507 / 5538）
 * ============================================================ */
body.app-shell .topbar .gs-box { position: relative; flex: 0 1 380px; min-width: 0; margin-left: 24px; }
body.app-shell .topbar .gs-in { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px; border: 1px solid var(--u-line); border-radius: var(--u-radius-md); background: var(--u-ground); color: var(--u-ink-3); font-size: 14px; cursor: text; box-sizing: border-box; }
body.app-shell .topbar .gs-in .u-ic { flex: none; }
body.app-shell .topbar .gs-box.on .gs-in { background: var(--u-surface); border-color: var(--u-brand); outline: 2px solid var(--u-brand-soft); color: var(--u-ink); }
/* 输入框带 .search-ipt：老样式里通用 input 那条（app.css）把它排除在外，不会套上边框和白底 */
body.app-shell .topbar .gs-q { flex: 1; width: auto; min-width: 0; height: 34px; padding: 0; border: 0; border-radius: 0; outline: 0; background: none; box-shadow: none; font: inherit; font-size: 14px; color: var(--u-ink); transition: none; }
body.app-shell .topbar .gs-q::placeholder { color: var(--u-ink-3); opacity: 1; }
body.app-shell .topbar .gs-q::-webkit-search-cancel-button { -webkit-appearance: none; }
body.app-shell .topbar .gs-kbd { flex: none; padding: 0 6px; border: 1px solid var(--u-line); border-radius: 4px; background: var(--u-surface); font: 12px/18px var(--u-font); color: var(--u-ink-3); white-space: nowrap; }
body.app-shell .topbar .gs-spin { flex: none; width: 14px; height: 14px; border: 2px solid var(--u-line); border-top-color: var(--u-brand); border-radius: var(--u-radius-pill); opacity: 0; }
body.app-shell .topbar .gs-box.busy .gs-spin { opacity: 1; animation: gsSpin .8s linear infinite; }
@keyframes gsSpin { to { transform: rotate(360deg); } }
body.app-shell .topbar .gs-pop { position: absolute; left: 0; top: 44px; width: 560px; max-width: calc(100vw - 32px); max-height: calc(100vh - 80px); overflow: hidden auto; background: var(--u-surface); border: 1px solid var(--u-line); border-radius: var(--u-radius-lg); box-shadow: var(--u-shadow-pop); z-index: 60; font-size: 14px; line-height: 22px; }
body.app-shell .topbar .gs-pop[hidden] { display: none; }
body.app-shell .topbar .gs-g { padding: 8px 0 4px; border-top: 1px solid var(--u-line); }
body.app-shell .topbar .gs-g:first-child { border-top: 0; }
body.app-shell .topbar .gs-gh { display: flex; align-items: baseline; gap: 6px; padding: 2px 16px 4px; font-size: 12px; line-height: 18px; color: var(--u-ink-3); }
body.app-shell .topbar .gs-gh b { font-weight: 600; color: var(--u-ink-2); }
body.app-shell .topbar .gs-r { display: flex; align-items: center; gap: 12px; padding: 7px 16px; text-decoration: none; color: var(--u-ink); cursor: pointer; }
body.app-shell .topbar .gs-r.cur { background: var(--u-brand-soft); }
body.app-shell .topbar .gs-r .u-code, body.app-shell .topbar .gs-r .u-ava, body.app-shell .topbar .gs-r .u-tag { flex: none; }
body.app-shell .topbar .gs-r .m { display: flex; flex-direction: column; flex: 1; min-width: 0; }
body.app-shell .topbar .gs-r .t { font-size: 14px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.app-shell .topbar .gs-r .s { font-size: 12px; line-height: 18px; color: var(--u-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.app-shell .topbar .gs-r mark { background: #fff1c2; color: inherit; border-radius: 2px; padding: 0 1px; }
body.app-shell .topbar .gs-r .e { flex: none; font-size: 13px; color: var(--u-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
body.app-shell .topbar .gs-r .ent { flex: none; width: 12px; font-size: 12px; color: var(--u-ink-3); visibility: hidden; }
body.app-shell .topbar .gs-r.cur .ent { visibility: visible; }
body.app-shell .topbar .gs-none, body.app-shell .topbar .gs-err { padding: 16px; font-size: 13px; line-height: 20px; color: var(--u-ink-3); }
body.app-shell .topbar .gs-err { padding: 4px 16px 8px; }
body.app-shell .topbar .gs-none.gs-bad { color: var(--u-danger); }
body.app-shell .topbar .gs-ft { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--u-line); background: var(--u-surface-head); font-size: 12px; line-height: 18px; color: var(--u-ink-3); position: sticky; bottom: 0; }
body.app-shell .topbar .gs-ft .sp { flex: 1; }
body.app-shell .topbar #top-new { flex: none; margin-right: 4px; }
@media (max-width: 1400px) {
  body.app-shell .topbar .gs-box { flex-basis: 300px; margin-left: 16px; }
  body.app-shell .topbar #top-new span { display: none; }
  body.app-shell .topbar #top-new { width: 36px; padding: 0; }
}
/* 宽 < 900：只剩放大镜；点了（输入框拿到焦点）输入框盖住顶栏这一行，浮层整宽 */
@media (max-width: 900px) {
  body.app-shell .topbar .gs-box { flex: none; margin-left: 0; }
  body.app-shell .topbar .gs-in { width: 36px; padding: 0; justify-content: center; background: none; border-color: transparent; color: var(--u-ink-2); cursor: pointer; }
  body.app-shell .topbar .gs-q { width: 0; flex: none; opacity: 0; }
  body.app-shell .topbar .gs-kbd, body.app-shell .topbar .gs-spin { display: none; }
  body.app-shell .topbar .gs-box.on { position: static; }
  body.app-shell .topbar .gs-box.on .gs-in { position: absolute; left: 8px; right: 8px; top: 8px; width: auto; height: 40px; padding: 0 10px 0 12px; justify-content: flex-start; z-index: 61; }
  body.app-shell .topbar .gs-box.on .gs-q { flex: 1; width: auto; opacity: 1; }
  body.app-shell .topbar .gs-box.on .gs-spin { display: block; }
  body.app-shell .topbar .gs-box.on .gs-pop { left: 8px; right: 8px; top: 52px; width: auto; max-width: none; }
}
