.workspace-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 20px;
  padding: 10px 22px;
  background: #17212b;
  color: #fff;
  border-bottom: 3px solid #be3b37;
  box-shadow: 0 5px 18px rgba(23, 33, 43, .16);
}

.workspace-home {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
}

.workspace-logo {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 900;
}

.workspace-home strong,
.workspace-home small,
.workspace-primary span,
.workspace-primary small,
.workspace-status span,
.workspace-status strong {
  display: block;
  letter-spacing: 0;
}

.workspace-home strong {
  font-size: 15px;
  line-height: 1.2;
}

.workspace-home small {
  margin-top: 3px;
  color: #aeb8bf;
  font-size: 10px;
  text-transform: uppercase;
}

.workspace-primary {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
}

.workspace-primary a {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 13px;
  border-radius: 6px;
  color: #c8d0d6;
  text-decoration: none;
  text-align: left;
}

.workspace-primary a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.workspace-primary a.active {
  color: #17212b;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}

.workspace-primary span {
  font-size: 14px;
  font-weight: 800;
}

.workspace-primary small {
  color: inherit;
  font-size: 10px;
  opacity: .68;
}

.workspace-status {
  min-width: 0;
  text-align: right;
}

.workspace-tools {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.workspace-notification-toggle {
  min-width: 122px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 5px 0 5px 12px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, .16);
  border-radius: 0;
  color: #d8dee3;
  background: transparent;
  cursor: pointer;
}

.workspace-notification-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.workspace-notification-toggle:disabled {
  cursor: wait;
  opacity: .72;
}

.workspace-notification-copy {
  min-width: 0;
  text-align: right;
}

.workspace-notification-copy strong,
.workspace-notification-copy small {
  display: block;
  letter-spacing: 0;
  white-space: nowrap;
}

.workspace-notification-copy strong {
  font-size: 11px;
  line-height: 1.2;
}

.workspace-notification-copy small {
  margin-top: 3px;
  color: #aeb8bf;
  font-size: 9px;
}

.workspace-switch-track {
  position: relative;
  width: 34px;
  height: 19px;
  flex: 0 0 34px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 10px;
  background: #44505b;
  transition: background-color .18s ease, border-color .18s ease;
}

.workspace-switch-track span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .28);
  transition: transform .18s ease;
}

.workspace-notification-toggle.is-on .workspace-switch-track {
  border-color: #e5534b;
  background: #be3b37;
}

.workspace-notification-toggle.is-on .workspace-switch-track span {
  transform: translateX(15px);
}

.workspace-notification-toggle.is-on .workspace-notification-copy small {
  color: #ffd4cf;
}

.workspace-notification-toggle.has-error .workspace-notification-copy small {
  color: #ffb7b1;
}

.workspace-status span,
.workspace-status strong {
  overflow-wrap: anywhere;
}

.workspace-status span {
  color: #aeb8bf;
  font-size: 10px;
  text-transform: uppercase;
}

.workspace-status strong {
  margin-top: 4px;
  color: #e7ebee;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .workspace-header {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 16px;
    padding: 10px 16px;
  }

  .workspace-primary {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .workspace-tools { min-width: 0; }
}

@media (max-width: 560px) {
  .workspace-header { padding: 9px 12px; }
  .workspace-logo { width: 34px; height: 34px; flex-basis: 34px; }
  .workspace-home small,
  .workspace-primary small,
  .workspace-status span { display: none; }
  .workspace-status strong { margin: 0; font-size: 11px; }
  .workspace-tools { gap: 9px; }
  .workspace-notification-toggle { min-width: 76px; min-height: 34px; padding-left: 8px; }
  .workspace-notification-copy strong { display: none; }
  .workspace-notification-copy small { margin: 0; }
  .workspace-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-primary a { min-height: 40px; padding: 7px 8px; text-align: center; }
}

/* 全局系统状态条（2026-08-04） */
.system-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
  padding: 6px 20px;
  background: #fff;
  border-bottom: 1px solid rgba(25, 28, 34, .08);
  font-size: 12.5px;
  color: #6b7280;
}
.system-status-bar strong {
  color: #1f2937;
  font-weight: 650;
  margin-left: 2px;
}
.system-status-bar .system-status-running {
  color: #a52323;
  font-weight: 650;
}
