.sync-workspace {
  --sync-ink: #253548;
  --sync-muted: #526272;
  --sync-accent: #245a8b;
  --sync-line: #dce3e9;
  padding: 24px;
  color: var(--sync-ink);
}
.sync-workspace [hidden] { display: none !important; }
.sync-workspace-header, .sync-filters, .sync-tool > summary {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sync-workspace-header { justify-content: space-between; }
.sync-workspace h2, .sync-workspace h3, .sync-workspace h4 { margin: 0; font-weight: 600; }
.sync-workspace-header h2 { font-size: 24px; }
.sync-workspace-header p { margin: 4px 0 0; color: var(--sync-muted); font-size: 14px; }
.sync-workspace-header p span { white-space: nowrap; }
.sync-workspace button, .sync-workspace input { font: inherit; }
.sync-workspace button { font-size: 14px; }
.sync-filters { gap: 4px; margin: 16px 0 20px; flex-wrap: wrap; }
.sync-filters button {
  min-height: 36px; padding: 4px 12px; border-radius: 6px; border: 1px solid transparent;
  background: transparent; color: var(--sync-muted); font-weight: 500;
}
.sync-filters button span { margin-left: 4px; font-variant-numeric: tabular-nums; }
.sync-filters button:hover, .sync-row-grid:hover, .sync-tool > summary:hover { background-color: #f4f7f9; }
.sync-filters button[aria-pressed="true"] { background: #eaf2fa; color: #1e4e7d; border-color: #c6d8e9; }
.sync-workspace :is(button, summary, input):focus-visible { outline: 2px solid var(--sync-accent); outline-offset: 2px; }
.sync-lane + .sync-lane, .sync-tools { margin-top: 24px; }
.sync-workspace h3 { font-size: 17px; margin: 0 0 8px; }
.sync-row-grid {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) minmax(70px, .65fr) minmax(144px, 1.2fr) minmax(112px, 1fr) 48px;
  align-items: center; gap: 12px; padding: 8px 12px;
}
.sync-column-labels, .sync-column-labels:hover { background: #f5f7f9; color: var(--sync-muted); font-size: 12px; }
.sync-service-row { border-bottom: 1px solid var(--sync-line); }
.sync-service-row > summary, .sync-tool > summary {
  cursor: pointer; list-style: none; min-height: 52px; font-size: 14px;
}
.sync-workspace summary::-webkit-details-marker { display: none; }
.sync-service-row[open] > summary, .sync-tool[open] > summary { background: #f4f7fa; }
.sync-service-name { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.sync-service-name strong { font-size: 15px; font-weight: 600; }
.sync-service-name small, .sync-time-cell small, .sync-mobile-label {
  font-size: 12px; color: var(--sync-muted);
}
.sync-service-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-service-name .sync-needs-attention, .sync-tool-alert { color: #914a13; }
.sync-mode { display: inline-flex; gap: 8px; align-items: center; color: var(--sync-muted); }
.sync-mode::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #929ba4; flex-shrink: 0; }
.sync-mode.is-on::before { background: var(--sync-accent); }
.sync-time-cell, .sync-next-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sync-edit-label, .sync-tool > summary::after { color: var(--sync-accent); }
.sync-edit-label { justify-self: end; font-size: 13px; }
.sync-edit-label::after, .sync-tool > summary::after {
  content: ""; display: inline-block; width: 7px; height: 7px; transform: rotate(45deg);
  border: solid currentColor; border-width: 0 1.5px 1.5px 0;
}
.sync-edit-label::after { margin: 0 3px 3px 8px; }
.sync-service-row[open] .sync-edit-label::after, .sync-tool[open] > summary::after { transform: rotate(225deg); }
.sync-mobile-label { display: none; }
.sync-service-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  padding: 16px 20px 20px; background: #fafbfc; border-left: 3px solid var(--sync-accent);
}
.sync-service-detail > div, .sync-service-detail label, .sync-service-detail input { min-width: 0; }
.sync-service-detail h4 { font-size: 15px; margin-bottom: 8px; }
.sync-workspace .sync-schedule-form { gap: 12px; margin: 0; padding: 0; border: 0; }
.sync-workspace .sync-schedule-toggle { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.sync-workspace .sync-schedule-toggle input { width: 18px; height: 18px; }
.sync-workspace .sync-schedule-fields { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.sync-workspace .sync-schedule-fields input { width: 100%; min-height: 36px; }
.sync-workspace .sync-schedule-fields input[readonly] { background: #f1f3f5; color: var(--sync-muted); }
.sync-workspace .sync-service-detail button { width: auto; justify-self: start; }
.sync-save-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sync-save-actions small { color: var(--sync-muted); }
.sync-service-detail p, .sync-service-record dl { margin: 4px 0 12px; font-size: 13px; }
.sync-service-record dl > div { display: grid; grid-template-columns: minmax(80px, .65fr) 1.5fr; gap: 8px; padding: 4px 0; }
.sync-service-record dt { color: var(--sync-muted); }
.sync-service-record dd { margin: 0; overflow-wrap: anywhere; }
.sync-workspace .sync-alert { padding: 8px 12px; background: #fff4e8; color: #733d15; overflow-wrap: anywhere; }
.sync-no-matches { margin: 16px 0; color: var(--sync-muted); }
.sync-tools { border-top: 1px solid var(--sync-line); padding-top: 20px; }
.sync-tool { border-bottom: 1px solid var(--sync-line); }
.sync-tool > summary { min-height: 44px; padding: 8px 12px; }
.sync-tool > summary > strong { font-weight: 500; }
.sync-tool > summary > span { color: var(--sync-muted); font-size: 13px; }
.sync-tool > summary::after { margin-left: auto; flex-shrink: 0; }
.sync-tool-alert { display: none; }
.sync-tool:has([data-wing-collector-panel] [role="alert"]) .sync-tool-alert { display: inline; }
.sync-tool-body { min-width: 0; padding: 16px 12px; }
.sync-tool-body .panel { box-shadow: none; }

@media (max-width: 800px) {
  .sync-workspace { padding: 16px; }
  .sync-column-labels { display: none; }
  .sync-service-row > summary {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name mode" "time next"; gap: 8px;
    padding: 12px 4px; border-top: 1px solid var(--sync-line);
  }
  .sync-service-row { border: 0; }
  .sync-service-name { grid-area: name; }
  .sync-mode { grid-area: mode; justify-self: end; font-size: 12px; white-space: nowrap; }
  .sync-time-cell { grid-area: time; }
  .sync-next-cell { grid-area: next; }
  .sync-time-cell, .sync-next-cell { font-size: 13px; }
  .sync-mobile-label { display: block; }
  .sync-edit-label { display: none; }
  .sync-mode::after {
    content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
  }
  .sync-service-row[open] .sync-mode::after { transform: rotate(225deg); }
  .sync-service-detail { grid-template-columns: minmax(0,1fr); gap: 16px; padding: 12px; }
  .sync-tool > summary { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .sync-workspace { padding: 12px; }
  .sync-workspace-header h2 { font-size: 20px; }
  .sync-workspace-header button { padding: 8px; }
  .sync-workspace .sync-schedule-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sync-filters { margin: 12px 0 16px; }
  .sync-filters button { padding-inline: 8px; min-height: 40px; }
}
