:root { --shell-topbar: 76px; }
.topbar { overflow: visible; height: var(--shell-topbar); }
.topbar .environment-label { white-space: nowrap; }
.topbar .topbar-actions { gap: 20px; }
.topbar .shell-search { align-items: center; width: clamp(280px, calc(24vw + 100px), 500px); height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 0 6px 0 12px; background: var(--surface); transition: border-color .16s, box-shadow .16s; }
.topbar .shell-search:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.topbar .shell-search input { flex: 1; width: 100%; padding: 8px 0; font-size: 13px; }
.topbar .shell-search button { flex: 0 0 30px; height: 30px; color: var(--muted); border-radius: 8px; }
.topbar .shell-search button:hover { color: var(--accent); background: var(--accent-soft); }
.shell-new-task { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 42px; padding: 7px 16px 7px 8px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 8px color-mix(in srgb, var(--accent) 18%, transparent), inset 0 1px 0 rgb(255 255 255 / 16%); text-decoration: none; white-space: nowrap; font-size: 13px; font-weight: 650; transition: background .16s, box-shadow .16s; }
.shell-new-task > i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: color-mix(in srgb, var(--on-accent) 13%, transparent); font-size: 13px; }
.shell-new-task:hover { background: var(--accent-strong); color: var(--on-accent); border-color: var(--accent-strong); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 25%, transparent); }
.shell-new-task:active { box-shadow: none; }
.company-activity { position: relative; display: grid; flex-shrink: 0; justify-items: center; gap: 4px; padding-left: 20px; border-left: 1px solid var(--line); }
.company-switch { position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr 1fr; align-items: center; width: 104px; height: 30px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; background: color-mix(in srgb, var(--canvas) 85%, var(--ink) 15%); box-shadow: inset 0 2px 5px rgb(0 0 0 / 12%); cursor: pointer; }
.company-switch::before { content: ""; position: absolute; z-index: -1; box-sizing: border-box; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: inherit; border: 1px solid color-mix(in srgb, var(--line-strong) 65%, transparent); background: linear-gradient(var(--surface), var(--surface-muted)); box-shadow: 0 2px 5px rgb(0 0 0 / 12%), inset 0 1px 0 rgb(255 255 255 / 12%); transition: transform .18s ease; }
.company-switch[aria-checked="true"]::before { transform: translateX(100%); }
.company-switch > span { color: var(--muted); font-family: ui-monospace, monospace; font-size: 11px; font-weight: 750; letter-spacing: .06em; text-align: center; }
.company-switch-on { order: 1; }
.company-switch[aria-checked="true"] .company-switch-on { color: var(--success); }
.company-switch[aria-checked="false"] .company-switch-off { color: var(--attention-ink); }
.company-switch:hover { border-color: var(--accent); }
.company-activity-label { color: var(--muted); font-size: 8px; line-height: 1; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.company-switch-help { display: none; position: absolute; top: calc(100% + 12px); right: 0; width: 260px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-soft); background: var(--surface); box-shadow: var(--shadow-panel); font-size: 12px; line-height: 1.6; }
.company-activity:hover .company-switch-help, .company-activity:focus-within .company-switch-help { display: block; }
.topbar a:focus-visible, .topbar button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.global-stop-banner { color: var(--attention-ink); background: var(--attention-soft); border-bottom: 1px solid var(--attention-line); }
.global-stop-banner span { color: var(--attention-ink); }
@media (max-width: 1150px) {
  .topbar .environment-label { display: none; }
  .topbar .topbar-actions { width: 100%; justify-content: flex-end; gap: 14px; }
  .topbar .shell-search { flex: 1; max-width: 560px; }
  .topbar .shell-search input { width: 100%; }
  .company-activity { padding-left: 14px; }
}
@media (max-width: 720px) {
  :root { --shell-topbar: 72px; }
  .topbar { padding-inline: 12px; }
  .topbar .topbar-actions { gap: 10px; }
  .topbar .shell-search { max-width: none; }
  .topbar .shell-search input { font-size: 16px; }
  .company-activity { padding-left: 10px; }
}
@media (max-width: 560px) {
  .topbar .topbar-actions { gap: 8px; }
  .topbar .shell-search { padding-left: 8px; }
  .shell-new-task { width: 42px; padding: 7px; }
  .shell-new-task > span { display: none; }
  .company-activity { padding-left: 0; border-left: 0; }
  .company-switch { height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar .shell-search, .shell-new-task, .company-switch::before { transition: none; }
}
