.remote-dock {
  position: relative; flex: 0 1 var(--remote-tabs-space, 0px); min-width: 0;
  display: flex; align-items: center; gap: 7px;
  color: var(--text-primary, var(--text));
}
.has-remote-dock .topbar:not(.remote-has-sessions) .remote-dock { display: none; }
.remote-dock button { display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; min-height: 33px; padding: 0 9px; border-radius: 7px; color: inherit; font-size: 12px; }
.remote-dock button[hidden] { display: none; }
.remote-dock button:hover { background: var(--accent-soft); }
.remote-dock button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.remote-mode { flex: none; white-space: nowrap; color: var(--text-secondary, var(--muted)); font-size: 12px; }
.remote-icon { width: 14px; height: 14px; display: inline-grid; place-items: center; }
.remote-icon svg { width: 14px; height: 14px; }
.remote-scroll-group { min-width: 0; display: flex; align-items: center; gap: 3px; flex: 0 1 auto; }
.remote-session-list { display: flex; align-items: center; gap: 5px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.remote-session-list::-webkit-scrollbar { display: none; }
.remote-dock .remote-scroll { display: none; flex: none; width: 24px; padding: 0; justify-content: center; }
.remote-overflow .remote-scroll { display: inline-flex; }
.remote-dock .remote-scroll:disabled { opacity: .32; }
.remote-arrow { display: inline-flex; }
.remote-arrow svg { width: 14px; height: 14px; }
.remote-arrow-left { transform: rotate(180deg); }
.remote-tab { display: flex; align-items: center; border: 1px solid var(--border-subtle, var(--line)); border-radius: 8px; flex-shrink: 0; }
.remote-tab.active { background: var(--accent-soft); border-color: var(--accent); }
.remote-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success, #38a87b); }
.remote-tab small { color: var(--text-secondary, var(--muted)); font-size: 10px; }
.remote-dock .remote-close { padding: 0 6px; }
.has-remote-dock .topbar .global-search-wrap {
  position: absolute; top: calc((var(--portal-header-height, 72px) - 40px) / 2); left: var(--remote-search-x, 50%);
  width: var(--remote-search-width, 310px); min-width: 0; max-width: none; transform: none; margin: 0;
  transition: left 160ms ease, width 160ms ease;
}
.has-remote-dock .topbar .global-search { min-width: 0; }
.has-remote-dock .topbar .global-search input { min-width: 0; text-overflow: ellipsis; }
.has-remote-dock .topbar-actions { margin-left: auto; flex: none; }
.has-remote-dock .topbar .remote-search-trigger { display: none; }
.has-remote-dock .remote-search-compact .remote-search-trigger {
  display: grid; place-items: center; position: absolute; left: var(--remote-search-x);
  top: calc((var(--portal-header-height, 72px) - 36px) / 2);
  width: 36px; height: 36px;
}
.has-remote-dock .remote-search-compact:not(.remote-search-open) .global-search-wrap { display: none; }
.has-remote-dock .remote-search-compact.remote-search-open .global-search-wrap {
  left: auto; right: max(10px, calc(100% - var(--remote-search-x) - 36px));
  top: calc(var(--portal-header-height, 72px) - 3px); width: min(410px, 82vw, calc(var(--remote-search-x) + 32px));
  padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-solid);
  box-shadow: var(--shadow-floating); transition: none;
}
.has-remote-dock .topbar .workspace-context { display: none; }
.remote-login-setting { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 13px; margin-top: 14px; border-top: 1px solid var(--border-subtle); }
.remote-login-setting span { display: grid; gap: 4px; }
.remote-login-setting small { color: var(--text-secondary); }
.remote-login-dialog { color: var(--text-primary); background: var(--surface-solid); border: 1px solid var(--border-subtle); border-radius: 15px; width: min(440px, calc(100vw - 32px)); margin: auto; padding: 0; }
.remote-login-dialog::backdrop { background: #09111a88; }
.remote-login-dialog form { display: grid; gap: 14px; padding: 24px; }
.remote-login-dialog p, .remote-login-dialog small { color: var(--text-secondary); line-height: 1.5; }
.remote-login-dialog select { width: 100%; }
.remote-login-dialog footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 5px; }
#remote-session-surface { position: fixed; z-index: 16; left: var(--remote-left,0px); right: var(--remote-right,0px); top: var(--remote-top,114px); bottom: 0; display: flex; background: var(--app-bg, #101822); }
#remote-session-surface[hidden], #remote-session-surface iframe[hidden] { display: none; }
#remote-session-surface iframe { border: 0; width: 100%; height: 100%; }
#remote-session-surface.remote-maximized { inset: 0; z-index: 900; }
#remote-session-surface:fullscreen { inset: 0; width: 100vw; height: 100vh; }
.remote-session-active { visibility: hidden; height: calc(100dvh - 56px); overflow: hidden; }
@media (max-width: 1050px) {
  .remote-dock { gap: 4px; }
  .remote-tab small { display: none; }
}
@media (max-width: 760px) {
  .remote-mode, .has-remote-dock .global-search .keycap { display: none; }
}
@media (max-width: 560px) {
  .has-remote-dock .topbar { height: auto; min-height: 56px; flex-wrap: wrap; padding-block: 6px; }
  .has-remote-dock .topbar .remote-dock { order: 10; flex-basis: 100%; min-height: 33px; }
  .has-remote-dock .topbar.remote-has-sessions .remote-dock { padding-bottom: 2px; }
  .remote-session-active { height: calc(100dvh - 92px); }
  .has-remote-dock .bc-messenger { height: calc(100dvh - 101px); }
}
@media (prefers-reduced-motion: reduce) {
  .has-remote-dock .topbar .global-search-wrap { transition: none; }
}
