.workspace-sync { position: relative; flex: 0 0 auto; }
.workspace-sync-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 9px 12px; border: 1px solid var(--workspace-line); border-radius: 8px; background: var(--workspace-surface); color: var(--workspace-muted); cursor: pointer; white-space: nowrap; }
.workspace-sync-trigger:hover, .workspace-sync-trigger[aria-expanded="true"] { background: var(--workspace-soft); }
.workspace-sync-trigger:disabled { cursor: wait; }
.workspace-sync-word { color: var(--workspace-text); font-size: 11px; font-weight: 650; letter-spacing: .65px; }
.workspace-sync-icon { width: 17px; height: 17px; flex: 0 0 auto; }
.workspace-sync-chevron { width: 13px; height: 13px; }
.workspace-sync-summary { font-size: 11px; }
.workspace-sync-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; padding: 2px 5px; border-radius: 5px; background: var(--workspace-good-soft); color: var(--workspace-good); font-size: 11px; line-height: 1.4; font-weight: 650; font-variant-numeric: tabular-nums; }
.workspace-sync[data-state="syncing"] .workspace-sync-icon, .workspace-sync[data-state="queued"] .workspace-sync-icon { color: var(--workspace-accent); }
.workspace-sync[data-state="failed"] .workspace-sync-icon, .workspace-sync[data-state="unavailable"] .workspace-sync-icon { color: var(--workspace-warning); }
.workspace-sync-panel { position: fixed; z-index: 35; display: flex; flex-direction: column; width: 370px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 96px); border: 1px solid var(--workspace-line); border-radius: 12px; background: var(--workspace-surface); color: var(--workspace-text); box-shadow: 0 15px 45px -12px light-dark(#19243a38, #000a); overflow-y: auto; overscroll-behavior: contain; }
.workspace-sync-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 20px 16px; }
.workspace-sync-eyebrow { margin-bottom: 4px; color: var(--workspace-muted); text-transform: uppercase; letter-spacing: 1px; font-size: 10px; font-weight: 600; }
.workspace-sync-header h2 { font-size: 19px; line-height: 1.3; font-weight: 650; letter-spacing: -.5px; }
.workspace-sync-header .workspace-icon-button { width: 32px; height: 32px; }
.workspace-sync-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--workspace-line); border-bottom: 1px solid var(--workspace-line); background: var(--workspace-soft); padding: 11px 20px; }
.workspace-sync-toolbar p { color: var(--workspace-muted); font-size: 11px; }
.workspace-sync-all { border-radius: 6px; background: var(--workspace-selected); color: var(--workspace-accent); padding: 7px 11px; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.workspace-sync-all:disabled, .workspace-sync-channel-action:disabled { opacity: .65; cursor: default; }
.workspace-sync-notice { padding: 12px 20px; background: var(--workspace-selected); color: var(--workspace-accent); font-size: 12px; line-height: 1.6; }
.workspace-sync-notice[data-tone="warning"] { background: var(--workspace-warning-soft); color: var(--workspace-warning); }
.workspace-sync-channels { flex: 0 0 auto; }
.workspace-sync-channel { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--workspace-line); }
.workspace-sync-channel:last-child { border-bottom: 0; }
.workspace-sync-channel-info { display: flex; align-items: center; gap: 11px; min-width: 0; }
.workspace-sync-channel-name { font-size: 13px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.workspace-sync-channel-status { margin-top: 5px; color: var(--workspace-muted); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.workspace-sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--workspace-muted); flex: 0 0 auto; }
.workspace-sync-dot[data-state="completed"] { background: var(--workspace-good); }
.workspace-sync-dot[data-state="syncing"], .workspace-sync-dot[data-state="queued"] { background: var(--workspace-accent); }
.workspace-sync-dot[data-state="failed"] { background: var(--workspace-warning); }
.workspace-sync-channel-action { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 32px; min-width: 49px; padding: 7px 9px; border: 1px solid var(--workspace-line); border-radius: 6px; color: var(--workspace-accent); font-size: 11px; font-weight: 500; cursor: pointer; }
.workspace-sync-channel-action:not(:disabled):hover { background: var(--workspace-soft); }
.workspace-sync-empty { padding: 24px 20px; color: var(--workspace-muted); font-size: 12px; line-height: 1.6; }
.workspace-sync-count-note { padding: 12px 20px 16px; font-size: 11px; line-height: 1.6; color: var(--workspace-muted); }
.workspace-sync-footer { border-top: 1px solid var(--workspace-line); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 15px 20px; }
.workspace-sync-footer a, .workspace-sync-fallback { color: var(--workspace-accent); font-size: 12px; font-weight: 500; }
.workspace-sync-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
@keyframes workspace-sync-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
  .workspace-sync[data-state="syncing"] .workspace-sync-icon { animation: workspace-sync-spin 1.1s linear infinite; }
}
@media (max-width: 639px) {
  .workspace-sync-summary { display: none; }
  .workspace-sync-trigger { gap: 6px; padding: 9px; }
  .workspace-sync-chevron { display: none; }
  .workspace-sync-header, .workspace-sync-channel { padding-left: 16px; padding-right: 16px; }
}
@media (pointer: coarse) {
  .workspace-sync-trigger, .workspace-sync-all, .workspace-sync-channel-action, .workspace-sync-footer a { min-height: 44px; }
  .workspace-sync-footer a { display: inline-flex; align-items: center; }
}
