:root { --workspace-tabs-height: 46px; --wt-border: #dde4ec; --wt-muted: #52647a; --wt-ink: #20334c; --wt-blue: #145eac; --wt-selected: #eef5ff; }
.workspace-shell { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.workspace-shell > .workspace { height: auto; min-height: 0; flex: 1; }
.workspace-tabbar { height: var(--workspace-tabs-height); flex: 0 0 var(--workspace-tabs-height); position: relative; display: flex; align-items: stretch; min-width: 0; padding-left: 8px; border-bottom: 1px solid var(--wt-border); background: #f7f9fc; color: var(--wt-muted); z-index: 5; }
.wt-icon { flex: 0 0 16px; width: 16px; height: 16px; }
.wt-strip { display: flex; align-items: stretch; flex: 1; min-width: 0; position: relative; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; padding-top: 6px; }
.wt-strip::-webkit-scrollbar { display: none; }
.wt-tab { flex: 0 0 auto; display: flex; align-items: center; position: relative; margin-right: 3px; max-width: 240px; border: 1px solid transparent; border-bottom: 0; border-radius: 5px 5px 0 0; cursor: grab; }
.wt-tab + .wt-tab::before { content: ''; position: absolute; top: 10px; bottom: 10px; left: -3px; width: 1px; background: var(--wt-border); pointer-events: none; }
.wt-tab.is-active { color: var(--wt-blue); background: #fff; border-color: var(--wt-border); box-shadow: inset 0 2px var(--wt-blue); }
.wt-tab.is-active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 1px; background: #fff; }
.wt-tab-select { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 38px; padding: 7px 6px 7px 12px; color: inherit; background: transparent; font-size: 13px; line-height: 22px; white-space: nowrap; cursor: inherit; }
.wt-tab-select > span:not(.sr-only) { overflow: hidden; text-overflow: ellipsis; }
.wt-tab.is-active .wt-tab-select { font-weight: 600; }
.wt-tab-dot { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: #a8b6c7; }
.is-active .wt-tab-dot { background: var(--wt-blue); }
.wt-tab.is-pinned .wt-tab-select { padding-right: 12px; }
.wt-tab.is-pinned .wt-icon { width: 14px; height: 14px; flex-basis: 14px; }
.wt-tab-close { display: grid; place-items: center; width: 26px; height: 28px; flex: 0 0 26px; margin-right: 4px; border-radius: 4px; background: transparent; color: var(--wt-muted); }
.wt-tab-close .wt-icon { width: 13px; height: 13px; }
.wt-tab-more { display: none; width: 26px; height: 28px; padding: 0; place-items: center; flex: 0 0 26px; background: transparent; color: var(--wt-muted); border-radius: 4px; }
.wt-tab-more .wt-icon { width: 14px; height: 14px; }
.wt-scroll, .wt-refresh { flex: 0 0 34px; width: 34px; display: grid; place-items: center; background: transparent; color: var(--wt-muted); }
.wt-scroll { display: none; }
.has-overflow .wt-scroll { display: grid; }
.wt-tools { display: flex; flex-shrink: 0; margin-left: 5px; padding: 5px; border-left: 1px solid var(--wt-border); background: #f7f9fc; }
.wt-refresh { border-radius: 4px; }
.wt-empty { flex: 1; min-width: 0; align-self: center; padding-left: 10px; font-size: 12px; }
.workspace-tabbar:has(.wt-empty:not([hidden])) .wt-strip { flex: 0; }
.wt-manager[popover] { position: fixed; inset: auto; margin: 0; width: min(250px, calc(100vw - 88px)); max-height: calc(100dvh - 66px); overflow-y: auto; background: #fff; color: var(--wt-ink); border: 1px solid var(--wt-border); border-radius: 7px; box-shadow: 0 10px 32px rgb(12 27 48 / 15%); padding: 6px; font-family: var(--font-body); }
.wt-manager::backdrop { background: transparent; }
.wt-manager-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 8px 11px; color: var(--wt-ink); font-size: 13px; font-weight: 600; }
.wt-manager-heading > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-manager-heading small { flex-shrink: 0; color: var(--wt-muted); font-size: 12px; font-weight: 400; }
.wt-manager-actions { border-top: 1px solid var(--wt-border); padding: 4px 0; }
.wt-manager-actions > button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 6px 9px; text-align: left; background: transparent; color: var(--wt-ink); border-radius: 4px; font-size: 13px; line-height: 22px; }
.wt-manager-grid { display: grid; grid-template-columns: 1fr 1fr; }
.wt-manager button:focus-visible { outline: 2px solid var(--wt-blue); outline-offset: -2px; }
.workspace-tabbar button:focus-visible { outline: 2px solid var(--wt-blue); outline-offset: -3px; }
.wt-tab.is-dragging { opacity: .45; }
.wt-tab.drop-before::before, .wt-tab.drop-after::before { content: ''; position: absolute; left: -3px; top: 3px; bottom: 3px; width: 2px; background: var(--wt-blue); }
.wt-tab.drop-after::before { left: auto; right: -2px; }
@media (hover: hover) {
  .wt-tab:not(.is-active):hover { background: #eaf0f7; color: var(--wt-ink); }
  .wt-tab-close:hover, .wt-scroll:not(:disabled):hover, .wt-refresh:not(:disabled):hover, .wt-manager-actions > button:not(:disabled):hover { background: #e8eff8; color: var(--wt-blue); }
}
@media (max-width: 640px) {
  .workspace-tabbar { padding-left: 2px; }
  .wt-tab { max-width: 180px; }
  .wt-tools { padding-inline: 2px; margin-left: 1px; }
  .wt-refresh, .wt-scroll { width: 28px; flex-basis: 28px; }
  .wt-empty { padding-left: 6px; }
}
@media (hover: none), (pointer: coarse) { .wt-tab-more { display: grid; } }
