/* Умный поиск в шапке портала (23.11.2026) — в стиле «Шапок модулей v2»: белая панель, синий акцент, тени */
.gs-box { position: relative; flex: 1 1 360px; max-width: 520px; min-width: 140px; margin-left: 6px; }
.gs-box input {
  width: 100%; height: 36px; box-sizing: border-box; padding: 0 64px 0 34px;
  border: 1px solid #dbe4f3; border-radius: 10px; font-size: 14px; color: #0f172a;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  box-shadow: 0 2px 8px rgba(15,23,42,.06), inset 0 1px 0 rgba(255,255,255,.9);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.gs-box input::placeholder { color: #64748b; }
.gs-box input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.18), 0 4px 14px rgba(37,99,235,.12); background: #fff; }
.gs-box .gs-lens { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #2563eb; pointer-events: none; font-size: 14px; }
.gs-box .gs-kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none;
  font: 600 11px/1 Inter, system-ui, sans-serif; color: #475569; background: #eef2fb;
  border: 1px solid #dbe4f3; border-radius: 6px; padding: 4px 6px;
}
.gs-box input:focus ~ .gs-kbd { display: none; }
.gs-pop {
  display: none; position: absolute; left: 0; top: 42px; width: min(580px, calc(100vw - 24px));
  max-height: min(70vh, 560px); overflow-y: auto; z-index: 1200;
  background: #fff; border: 1px solid #dbe4f3; border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15,23,42,.18), 0 2px 6px rgba(15,23,42,.06); padding: 6px;
}
.gs-pop.open { display: block; }
.gs-group + .gs-group { border-top: 1px solid #eef2f7; margin-top: 4px; padding-top: 4px; }
.gs-dept { display: flex; align-items: center; gap: 6px; padding: 6px 10px 4px; font-size: 11px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; color: #1d4ed8; }
.gs-ico { font-size: 14px; }
.gs-item { padding: 7px 10px 7px 30px; border-radius: 8px; cursor: pointer; }
.gs-item.active { background: linear-gradient(180deg, #eff5ff 0%, #e3edff 100%); box-shadow: inset 3px 0 0 #2563eb; }
.gs-title { font-size: 14px; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-sub { font-size: 12px; color: #475569; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-empty { padding: 12px; font-size: 13px; color: #475569; }
@media (max-width: 1024px) {
  body #topbar { flex-wrap: nowrap; }                 /* иначе поле уезжает второй строкой под шапку */
}
@media (max-width: 768px) {
  body #topbar { padding: 0 10px; gap: 6px; }
  .gs-box { min-width: 90px; flex: 1 1 0; margin-left: 0; }
  #topbarTitle { flex: 0 1 auto; max-width: 28%; }
  #topbar:focus-within #topbarTitle, #topbar:focus-within .topbar-plant { display: none !important; }   /* пока ищем — поле шире */
  .gs-box input { padding-right: 10px; font-size: 16px; }
  .gs-box .gs-kbd { display: none; }
  .gs-pop { position: fixed; left: 12px; right: 12px; top: 56px; width: auto; }
}
