:root {
  /* 颜色系统 */
  --bg-body: #0a0a0c;
  --bg-card: rgba(18, 18, 20, 0.75);
  --bg-input: rgba(255, 255, 255, 0.04);
  --bg-input-hover: rgba(255, 255, 255, 0.08);
  --bg-input-focus: rgba(255, 255, 255, 0.12);

  --border-light: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.2);
  --border-accent: #0ea5e9;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-accent: #38bdf8;

  --btn-primary: #0284c7;
  --btn-primary-hover: #0369a1;
  --btn-danger: #ef4444;
  --btn-danger-hover: #dc2626;
  --btn-success: #10b981;
  --btn-success-hover: #059669;

  --error-bg: rgba(239, 68, 68, 0.15);
  --error-text: #fca5a5;

  /* 阴影和光效 */
  --shadow-card: 0 24px 80px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.15);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 增加微妙的背景渐变网格或纹理（这里用极其隐约的径向渐变） */
  background-image: radial-gradient(circle at 50% 0%, rgba(30, 30, 40, 0.5) 0%, var(--bg-body) 100%);
  background-attachment: fixed;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

button,
select,
input {
  font: inherit;
}

/* 通用容器与卡片 */
.wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
}

.hub {
  max-width: 1024px;
  padding: 40px;
}

/* 排版 */
h1 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

h3 {
  margin: 24px 0 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}

p.sub {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.panel-sub {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* 等宽字体块 */
.mono {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  word-break: break-all;
  color: var(--text-main);
}

code,
.model-value,
.restart-log {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.vpn-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
  padding: 6px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.2);
}

.vpn-option {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
}

.vpn-option:hover {
  background: var(--bg-input-hover);
  color: var(--text-main);
}

.vpn-option.is-selected {
  border-color: rgba(14, 165, 233, 0.45);
  background: rgba(14, 165, 233, 0.16);
  color: #e0f2fe;
}

.vpn-actions {
  margin-top: 16px;
}

.service-actions {
  margin-top: 16px;
}

code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* 表单与输入框 */
.field {
  margin-bottom: 20px;
}

.field label,
.field span {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.field input,
.field select,
.model-form select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background-color: var(--bg-input);
  color: var(--text-main);
  font-size: 16px;
  transition: all 0.2s ease;
  outline: none;
}

.field select,
.model-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 40px;
}

option {
  background-color: var(--bg-body);
  color: var(--text-main);
}

.field input:hover,
.field select:hover,
.model-form select:hover {
  background-color: var(--bg-input-hover);
}

.field input:focus,
.field select:focus,
.model-form select:focus {
  background-color: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--btn-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--btn-primary-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.btn-inline {
  width: auto;
  min-width: 220px;
}

/* 错误提示 */
.error {
  margin: 0 0 20px;
  color: var(--error-text);
  background: var(--error-bg);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 主页服务网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.service {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* 添加一个微妙的渐变发光遮罩效果 */
.service::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.1), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-glow);
}

.service:hover::before {
  opacity: 1;
}

.service-icon {
  margin-bottom: 16px;
  color: var(--text-accent);
  width: 32px;
  height: 32px;
}

.service h3 {
  margin: 0 0 8px;
  font-size: 20px;
  position: relative;
  z-index: 1;
}

.service p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* 顶部导航与操作 */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 12px;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.logout {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.logout:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.panel {
  margin-top: 20px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.03);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.model-meta {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.label {
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.model-value {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-main);
  word-break: break-all;
}

.model-form {
  margin-top: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-end;
}

.field-inline {
  flex: 1;
  margin-bottom: 0;
}

.status {
  margin-top: 16px;
  min-height: 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.status[data-tone="success"] {
  color: #86efac;
}

.status[data-tone="error"] {
  color: var(--error-text);
}

.restart-log {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 设备列表 */
.device-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease;
}

.device-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.device-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.device-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
}

.device-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-capabilities {
  font-size: 13px;
  color: #93c5fd;
  line-height: 1.5;
}

.device-actions {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-success {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
  background: var(--btn-success);
  color: #fff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: var(--btn-danger);
  color: #fff;
}

.badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.badge-current {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .card {
    padding: 28px 24px;
    border-radius: var(--radius-lg);
  }

  .hub {
    padding: 24px 20px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 20px;
  }

  .topbar,
  .panel-head,
  .model-form {
    flex-direction: column;
    gap: 16px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .btn-inline,
  .logout {
    width: 100%;
    justify-content: center;
  }

  .device-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .device-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .device-meta .meta-sep {
    display: none;
  }

  .device-meta span {
    word-break: break-all;
  }

  .device-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* 键盘焦点可访问性样式 */
*:focus-visible {
  outline: 2px solid var(--border-accent);
  outline-offset: 2px;
}

/* JOJO 工作台。面板和控件 8px、语义状态使用胶囊形。 */
.work-document {
  scroll-behavior: smooth;
}

.work-page {
  --work-bg: #090b0e;
  --work-surface: #11151a;
  --work-surface-raised: #171c22;
  --work-border: #29313a;
  --work-border-soft: #20272f;
  --work-text: #edf2f7;
  --work-muted: #9aa7b4;
  --work-accent: #52a9d3;
  --work-accent-strong: #187fac;
  --work-success: #5fc994;
  --work-warning: #d8b45c;
  --work-error: #ee8888;
  --border-accent: var(--work-accent);
  min-height: 100dvh;
  background: var(--work-bg);
  background-image: none;
  color: var(--work-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.work-page a,
.work-page button,
.work-page select {
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--work-text);
  color: var(--work-bg);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.work-shell {
  width: min(100%, 1500px);
  min-height: 100dvh;
  margin: 0 auto;
}

.work-appbar {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid var(--work-border-soft);
  background: rgba(9, 11, 14, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.work-brand,
.work-brand-copy,
.work-nav,
.work-refresh-control,
.work-task-heading,
.work-task-time,
.work-report-meta,
.merge-record-meta {
  display: flex;
  align-items: center;
}

.work-brand {
  gap: 12px;
  min-width: 0;
}

.work-brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--work-accent-strong);
  color: #f7fbfd;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
}

.work-brand-copy {
  gap: 10px;
  min-width: 0;
  font-size: 14px;
}

.work-brand-copy strong {
  font-weight: 680;
  white-space: nowrap;
}

.work-brand-context {
  padding-left: 10px;
  border-left: 1px solid var(--work-border);
  color: var(--work-muted);
  white-space: nowrap;
}

.work-nav {
  gap: 4px;
  white-space: nowrap;
}

.work-nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--work-muted);
  font-size: 13px;
  font-weight: 600;
}

.work-nav-link:hover {
  background: var(--work-surface-raised);
  color: var(--work-text);
}

.work-nav-link-danger:hover {
  color: var(--work-error);
}

.work-layout {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 32px;
  padding: 28px 32px 64px;
}

.work-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.work-sidebar-label {
  display: block;
  margin: 0 12px 8px;
  color: #768391;
  font-size: 12px;
  font-weight: 650;
}

.work-module-nav {
  display: grid;
  gap: 3px;
}

.work-module-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--work-muted);
  font-size: 14px;
  font-weight: 560;
}

.work-module-nav a:hover {
  background: var(--work-surface);
  color: var(--work-text);
}

.work-module-nav a.is-active {
  background: #14232c;
  color: #bfe7f8;
}

.work-main {
  min-width: 0;
}

.work-intro {
  min-height: 128px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 12px 0 28px;
  scroll-margin-top: 96px;
}

.work-intro h1 {
  margin: 0 0 8px;
  color: var(--work-text);
  font-size: 42px;
  font-weight: 720;
  line-height: 1.1;
  letter-spacing: 0;
  text-wrap: balance;
}

.work-intro p,
.work-list-heading p {
  max-width: 62ch;
  color: var(--work-muted);
  font-size: 14px;
  line-height: 1.65;
  text-wrap: pretty;
}

.work-refresh-control {
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  flex: 0 0 auto;
}

.work-refresh-control span {
  color: #7f8b98;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.work-refresh-button,
.work-filter-reset {
  min-height: 44px;
  border: 1px solid var(--work-border);
  border-radius: 8px;
  background: var(--work-surface-raised);
  color: var(--work-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.work-refresh-button {
  min-width: 92px;
  padding: 0 16px;
}

.work-refresh-button:hover,
.work-filter-reset:hover:not(:disabled) {
  border-color: #3c4a56;
  background: #1d242c;
}

.work-refresh-button:active,
.work-filter-reset:active:not(:disabled),
.btn-sm:active {
  transform: translateY(1px);
}

.work-refresh-button:disabled,
.work-filter-reset:disabled {
  cursor: wait;
  opacity: 0.55;
}

.work-filter-reset:disabled {
  cursor: not-allowed;
}

.work-module {
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--work-border);
  border-radius: 8px;
  background: var(--work-surface);
  scroll-margin-top: 96px;
}

.work-module-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px 20px;
}

.work-module h2,
.work-module h3 {
  color: var(--work-text);
  letter-spacing: 0;
}

.work-module h2 {
  margin: 0 0 5px;
  font-size: 21px;
  font-weight: 680;
}

.work-module h3 {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 660;
}

.work-surface-status {
  color: var(--work-muted);
  font-size: 13px;
  line-height: 1.55;
}

.work-surface-status[data-tone="success"] {
  color: var(--work-success);
}

.work-surface-status[data-tone="active"] {
  color: var(--work-accent);
}

.work-surface-status[data-tone="error"] {
  color: var(--work-error);
}

.work-summary {
  min-height: 76px;
}

.work-stats,
.work-skeleton-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--work-border-soft);
  border-bottom: 1px solid var(--work-border-soft);
}

.work-stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border-left: 1px solid var(--work-border-soft);
}

.work-stat:nth-child(4n + 1) {
  border-left: 0;
}

.work-stat:nth-child(n + 5) {
  border-top: 1px solid var(--work-border-soft);
}

.work-stat-label {
  overflow: hidden;
  color: var(--work-muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-stat-value {
  color: var(--work-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 21px;
  font-weight: 660;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.work-stat-value.tone-success { color: var(--work-success); }
.work-stat-value.tone-error { color: var(--work-error); }
.work-stat-value.tone-warn { color: var(--work-warning); }
.work-stat-value.tone-info { color: #83bde0; }
.work-stat-value.tone-active { color: var(--work-accent); }

.work-module-content {
  padding: 24px 28px 28px;
}

.work-list-header {
  display: grid;
  gap: 20px;
}

.work-filters {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  border: 0;
}

.work-filter-field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.work-filter-field > span {
  color: var(--work-muted);
  font-size: 12px;
  font-weight: 600;
}

.work-filter-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--work-border);
  border-radius: 8px;
  background-color: #0d1115;
  color: var(--work-text);
  outline: none;
  font-size: 13px;
}

.work-filter-field select:hover {
  border-color: #3c4a56;
}

.work-filter-field select:focus-visible {
  border-color: var(--work-accent);
}

.work-filter-reset {
  padding: 0 13px;
}

.work-list-meta {
  margin-top: 18px;
  color: #7f8b98;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.work-tasks,
.merge-records {
  margin-top: 10px;
  border-top: 1px solid var(--work-border-soft);
}

.work-empty {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 24px;
  color: var(--work-muted);
  text-align: center;
}

.work-empty strong {
  color: var(--work-text);
  font-size: 14px;
  font-weight: 630;
}

.work-empty span,
.work-summary > .work-empty {
  font-size: 13px;
}

.work-task,
.merge-record {
  border-bottom: 1px solid var(--work-border-soft);
}

.work-task-header {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border: 0;
  background: transparent;
  color: var(--work-text);
  cursor: pointer;
  text-align: left;
}

.work-task-header:hover {
  color: #ffffff;
}

.work-task-chevron {
  color: #788594;
  font-size: 22px;
  line-height: 1;
  transform: rotate(0deg);
}

.work-task-header[aria-expanded="true"] .work-task-chevron {
  transform: rotate(90deg);
}

.work-task-heading {
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.work-task-code {
  color: var(--work-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.work-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.work-badge.tone-pending { background: #302a19; color: #e4c36d; }
.work-badge.tone-active { background: #142d3a; color: #73c3e7; }
.work-badge.tone-success { background: #172d23; color: #77d2a5; }
.work-badge.tone-error { background: #351f22; color: #f19b9b; }

.work-spinner {
  width: 13px;
  height: 13px;
  display: inline-block;
  border: 2px solid #2f3a44;
  border-top-color: var(--work-accent);
  border-radius: 50%;
}

.work-meta,
.work-task-time,
.work-report-meta,
.merge-record-meta,
.merge-record-time,
.merge-detail {
  color: var(--work-muted);
  font-size: 12px;
  line-height: 1.55;
}

.work-task-time {
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: -5px 0 12px 30px;
  font-variant-numeric: tabular-nums;
}

.work-task-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 16px 30px;
  padding: 16px;
  border-radius: 8px;
  background: #0d1115;
}

.work-task-body[hidden] {
  display: none;
}

.work-error {
  padding: 11px 12px;
  border-left: 3px solid #9e4e54;
  border-radius: 8px;
  background: #26181b;
  color: #f1aaaa;
  font-size: 13px;
  line-height: 1.55;
}

.work-trimmed {
  color: var(--work-muted);
  font-size: 13px;
  font-style: italic;
  line-height: 1.6;
}

.work-report-meta,
.merge-record-meta {
  flex-wrap: wrap;
  gap: 4px 16px;
}

.work-violations {
  display: grid;
  gap: 14px;
}

.work-endpoint + .work-endpoint {
  padding-top: 14px;
  border-top: 1px solid var(--work-border-soft);
}

.work-endpoint-path {
  margin-bottom: 7px;
  color: var(--work-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
}

.work-violation {
  display: grid;
  grid-template-columns: 54px minmax(100px, 150px) minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}

.work-severity {
  font-weight: 700;
}

.severity-error { color: var(--work-error); }
.severity-warn { color: var(--work-warning); }
.severity-info { color: #83bde0; }

.work-ruleid {
  color: var(--work-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  word-break: break-all;
}

.work-message {
  color: var(--work-text);
  line-height: 1.55;
  word-break: break-word;
}

.work-link {
  width: fit-content;
  color: #78c4e5;
  font-size: 13px;
  font-weight: 600;
}

.work-link:hover {
  color: #b2e2f5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.work-page .btn-sm {
  min-height: 44px;
  align-self: flex-start;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 650;
}

.work-page .btn-success {
  border-color: #295440;
  background: #173326;
  color: #8bdbb1;
}

.work-page .btn-success:hover {
  border-color: #397258;
  background: #214934;
  color: #bcf0d3;
}

.merge-records {
  margin: 0 28px 28px;
}

.merge-record {
  display: grid;
  gap: 7px;
  padding: 16px 4px;
}

.merge-record-head,
.merge-record-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.merge-record-head {
  justify-content: space-between;
}

.merge-record-name {
  color: var(--work-text);
  font-size: 14px;
  font-weight: 580;
  line-height: 1.5;
  word-break: break-word;
}

.merge-detail code {
  color: var(--work-accent);
}

.work-skeleton-stats {
  min-height: 76px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.work-skeleton-stats span {
  margin: 16px 20px;
  border-radius: 8px;
  background: #1c232a;
}

.work-skeleton-row {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--work-border-soft);
}

.work-skeleton-row span {
  width: min(42%, 260px);
  height: 12px;
  border-radius: 8px;
  background: #1c232a;
}

.work-skeleton-row span + span {
  width: min(68%, 520px);
  height: 9px;
}

@media (prefers-reduced-motion: no-preference) {
  .work-spinner {
    animation: work-spin 0.8s linear infinite;
  }

  .work-skeleton-row span,
  .work-skeleton-stats span {
    animation: work-pulse 1.4s ease-in-out infinite alternate;
  }
}

@keyframes work-spin {
  to { transform: rotate(360deg); }
}

@keyframes work-pulse {
  to { opacity: 0.48; }
}

@media (max-width: 900px) {
  .work-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-top: 0;
  }

  .work-sidebar {
    position: sticky;
    top: 72px;
    z-index: 1;
    margin: 0 -32px;
    border-bottom: 1px solid var(--work-border-soft);
    background: rgba(9, 11, 14, 0.96);
  }

  .work-sidebar-label {
    display: none;
  }

  .work-module-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 8px 32px;
    scrollbar-width: none;
  }

  .work-module-nav::-webkit-scrollbar {
    display: none;
  }

  .work-module-nav a {
    flex: 0 0 auto;
  }

  .work-intro,
  .work-module {
    scroll-margin-top: 132px;
  }

  .work-intro {
    padding-top: 16px;
  }
}

@media (max-width: 700px) {
  .work-appbar {
    min-height: 64px;
    padding: 0 16px;
  }

  .work-brand-context {
    display: none;
  }

  .work-layout {
    padding: 0 16px 40px;
  }

  .work-sidebar {
    top: 64px;
    margin: 0 -16px;
  }

  .work-module-nav {
    padding-right: 16px;
    padding-left: 16px;
  }

  .work-intro {
    min-height: 0;
    flex-direction: column;
    gap: 20px;
    padding: 16px 0 24px;
  }

  .work-intro h1 {
    font-size: 32px;
  }

  .work-refresh-control {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .work-module-header,
  .work-module-content {
    padding-right: 18px;
    padding-left: 18px;
  }

  .work-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-filter-reset {
    width: 100%;
  }

  .work-stats,
  .work-skeleton-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-stat:nth-child(odd) {
    border-left: 0;
  }

  .work-stat:nth-child(n + 3) {
    border-top: 1px solid var(--work-border-soft);
  }

  .work-task-body {
    margin-left: 0;
  }

  .work-task-time {
    margin-left: 30px;
  }

  .work-violation {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .work-message {
    grid-column: 1 / -1;
  }

  .merge-records {
    margin-right: 18px;
    margin-left: 18px;
  }

  .merge-record-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .work-brand-copy strong {
    font-size: 13px;
  }

  .work-nav-link {
    padding: 0 9px;
  }

  .work-refresh-control {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-document {
    scroll-behavior: auto;
  }

  .work-page *,
  .work-page *::before,
  .work-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* 待办处理概览 */
.work-overview {
  width: min(100% - 64px, 760px);
  margin: 0 auto;
  padding: 84px 0 72px;
}

.work-overview-header {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--work-border-soft);
}

.work-overview-label {
  margin: 0 0 14px;
  color: var(--work-muted);
  font-size: 13px;
  line-height: 1.5;
}

.work-overview h1 {
  margin: 0;
  color: var(--work-text);
  font-size: 40px;
  font-weight: 680;
  line-height: 1.2;
  letter-spacing: 0;
  text-wrap: balance;
}

.work-overview h1 strong {
  color: var(--work-success);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.25em;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.work-overview-status {
  margin: 16px 0 0;
  color: var(--work-muted);
  font-size: 13px;
  line-height: 1.5;
}

.work-overview-status[data-tone="active"] { color: var(--work-accent); }
.work-overview-status[data-tone="error"] { color: var(--work-error); }

.work-overview-list {
  padding-top: 36px;
}

.work-overview-list h2 {
  margin: 0 0 14px;
  color: var(--work-text);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.4;
}

.work-processed-tasks {
  border-top: 1px solid var(--work-border-soft);
}

.work-processed-task {
  min-width: 0;
  padding: 18px 4px;
  border-bottom: 1px solid var(--work-border-soft);
}

.work-processed-task[data-failed] {
  border-left: 2px solid var(--work-error);
  padding-left: 12px;
}

.work-processed-task[data-failed] .work-processed-kind {
  color: var(--work-error);
}

.work-processed-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.work-processed-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.work-processed-kind {
  color: var(--work-muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

.work-processed-link,
.work-processed-code {
  min-width: 0;
  overflow: hidden;
  color: var(--work-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-processed-detail {
  overflow: hidden;
  color: var(--work-muted);
  font-size: 13px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-processed-link:hover {
  color: #b2e2f5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.work-processed-task time {
  flex: 0 0 auto;
  color: var(--work-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.work-violations {
  margin-top: 14px;
}

.work-violations summary {
  width: fit-content;
  cursor: pointer;
  color: var(--work-accent);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.work-violations summary:hover {
  color: #b2e2f5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.work-violation-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.work-violation {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--work-border-soft);
}

.work-violation-severity {
  min-width: 42px;
  padding-top: 1px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.work-violation-severity-error { color: var(--work-error); }
.work-violation-severity-warn { color: #e7b14c; }
.work-violation-severity-info { color: var(--work-accent); }

.work-violation-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  color: var(--work-text);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.work-violation-copy small {
  color: var(--work-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .work-overview {
    width: min(100% - 32px, 760px);
    padding: 56px 0 48px;
  }

  .work-overview-header {
    padding-bottom: 36px;
  }

  .work-overview h1 {
    font-size: 31px;
  }

  .work-overview-list {
    padding-top: 28px;
  }

  .work-processed-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .work-processed-task {
    padding: 16px 0;
  }

  .work-processed-link,
  .work-processed-code {
    max-width: 100%;
  }
}
