:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #f1f5f9;
  --panel: #ffffff;
  --indigo: #4f46e5;
  --indigo-2: #7c3aed;
  --indigo-soft: #eef2ff;
  --violet: #764ba2;
  --sky: #667eea;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --bad: #dc2626;
  --bad-soft: #fef2f2;
  --side: #0f172a;
  --side-2: #1e1b4b;
  --radius: 1rem;
  --radius-sm: .75rem;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, .25);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { color: #3730a3; }

/* ===== Shell ===== */
.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns .28s var(--ease);
}
.shell.side-collapsed { grid-template-columns: 76px minmax(0, 1fr); }

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 55%, #111827 100%);
  color: #cbd5e1;
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 8px 0 30px rgba(15, 23, 42, .12);
}
.side-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0 4px;
}
.brand { min-width: 0; flex: 1; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(102,126,234,.35), rgba(124,58,237,.45));
  color: #fff;
  font-size: 18px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.brand-name {
  display: block;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.brand-sub {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}
.brand-short { display: none; }
.side-toggle {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  flex: 0 0 auto;
}
.side-toggle:hover { background: rgba(255,255,255,.12); }

.side nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
  padding: 0 2px;
}
.nav-label {
  margin: 14px 12px 6px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}
.side nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  color: #cbd5e1;
  border-radius: 12px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background .18s, color .18s, transform .18s var(--ease);
}
.side nav a i {
  width: 18px;
  text-align: center;
  opacity: .85;
}
.side nav a:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
  text-decoration: none;
}
.side nav a.active {
  background: linear-gradient(135deg, rgba(79,70,229,.45), rgba(124,58,237,.35));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.side nav a.active i { opacity: 1; }

.side-foot {
  margin-top: auto;
  padding: 14px 10px 4px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: #94a3b8;
  position: relative;
}
.side-foot strong { color: #f8fafc; font-weight: 600; }
.side-logout-form { margin-top: 10px; }
.side-foot .side-logout-form button {
  width: 100%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: #e2e8f0;
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
}
.side-foot .side-logout-form button:hover { background: rgba(255,255,255,.12); }

.side-user {
  position: relative;
}
.side-user-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}
.side-user.has-switch .side-user-btn {
  cursor: pointer;
}
.side-user.has-switch .side-user-btn:hover,
.side-user.is-open .side-user-btn {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.1);
}
.side-user.is-impersonating .side-user-btn {
  background: rgba(234, 88, 12, .16);
  border-color: rgba(251, 146, 60, .35);
}
.side-user-avatar {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.side-user.is-impersonating .side-user-avatar {
  background: linear-gradient(135deg, #ea580c, #c2410c);
}
.side-user-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.side-user-name {
  color: #f8fafc;
  font-weight: 650;
  font-size: 13px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-user-role {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.2;
}
.side-user.is-impersonating .side-user-role { color: #fdba74; }
.side-user-caret { opacity: .7; margin-left: 2px; font-size: 10px; }

.side-user-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  max-height: min(360px, 55vh);
  overflow: auto;
  padding: 8px;
  border-radius: 14px;
  background: #0f172a;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 16px 40px rgba(2, 6, 23, .55);
}
.side-user-menu-hd {
  padding: 4px 8px 8px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .02em;
  color: #94a3b8;
  text-transform: none;
}
.side-user-menu-sep {
  height: 1px;
  margin: 6px 4px;
  background: rgba(255,255,255,.08);
}
.side-user-menu form { margin: 0; }
.side-user-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #e2e8f0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
button.side-user-item:hover {
  background: rgba(255,255,255,.08);
}
.side-user-item.is-current {
  background: rgba(99, 102, 241, .18);
  cursor: default;
}
.side-user-item.is-self {
  background: rgba(16, 185, 129, .12);
}
button.side-user-item.is-self:hover {
  background: rgba(16, 185, 129, .2);
}
.side-user-item-av {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.1);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}
.side-user-item-txt {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.side-user-item-txt strong {
  font-size: 12.5px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-user-item-txt span {
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-user-empty {
  margin: 0;
  padding: 8px;
  font-size: 12px;
}

.shell.side-collapsed .brand-name,
.shell.side-collapsed .brand-sub,
.shell.side-collapsed .nav-label,
.shell.side-collapsed .nav-txt,
.shell.side-collapsed .side-foot-text { display: none; }
.shell.side-collapsed .side-user-btn { justify-content: center; padding: 8px 0; }
.shell.side-collapsed .side-user-menu {
  left: calc(100% + 10px);
  right: auto;
  bottom: 0;
  width: 240px;
}
.shell.side-collapsed .side-logout-form button {
  padding: 9px 0;
  font-size: 0;
}
.shell.side-collapsed .side-logout-form button i {
  font-size: 14px;
}
.shell.side-collapsed .brand-mark { margin: 0 auto; }
.shell.side-collapsed .brand-short {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-weight: 800;
}
.shell.side-collapsed .side nav a { justify-content: center; padding: 12px 0; }
.shell.side-collapsed .side-top { justify-content: center; flex-direction: column; align-items: center; }
.shell.side-collapsed .side-toggle { margin-top: 8px; }

.main {
  min-width: 0;
  padding: 24px 28px 48px;
  background:
    radial-gradient(700px 280px at 100% 0%, rgba(102,126,234,.10), transparent 55%),
    radial-gradient(560px 240px at 0% 0%, rgba(124,58,237,.07), transparent 50%),
    var(--paper);
  /* 只用透明度，避免 transform 让内部 fixed 相对 .main 定位 */
  animation: rise .4s var(--ease) both;
}
@keyframes rise {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 18px;
}
.page-head h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: #0f172a;
}
.page-head .lede {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  max-width: 54ch;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn,
button,
input[type=submit] {
  appearance: none;
  border: 0;
  background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-2) 100%);
  color: #fff;
  padding: 9px 16px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .55);
  transition: transform .18s var(--ease), box-shadow .18s, filter .15s;
}
.btn:hover, button:hover, input[type=submit]:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px -8px rgba(79, 70, 229, .55);
  filter: brightness(1.03);
}
.btn:active, button:active { transform: translateY(0); }
.btn.secondary, button.secondary {
  background: #1e293b;
  box-shadow: none;
}
.btn.ghost, button.ghost {
  background: #fff;
  color: #334155;
  border: 1px solid var(--line);
  box-shadow: none;
  font-weight: 600;
}
.btn.ghost:hover, button.ghost:hover {
  background: #f8fafc;
  color: #0f172a;
  filter: none;
  box-shadow: none;
}
.btn.danger:not(.ghost), button.danger:not(.ghost) {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(220, 38, 38, .45);
}
.btn.sm, button.sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: end;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.toolbar .field { min-width: 140px; flex: 1; }
.toolbar .field.grow { flex: 2.2; min-width: 200px; }
.toolbar label {
  display: block;
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.toolbar .actions { flex: 0 0 auto; display: flex; gap: 8px; align-items: center; }
.jobs-filter-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 12px;
  padding: 10px 14px;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius, 12px);
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.jobs-filter-bar .jf-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.jobs-filter-bar .jf-k {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  line-height: 1;
}
.jobs-filter-bar .jf-sep {
  flex: 0 0 1px;
  align-self: stretch;
  width: 1px;
  min-height: 28px;
  background: var(--line);
  margin: 0 2px;
}
.jobs-filter-bar .filter-chips {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
}
.jobs-filter-bar .filter-chip {
  height: 34px;
  padding: 0 10px;
  font-size: 12.5px;
  white-space: nowrap;
}
.jobs-filter-bar .jf-form {
  display: flex;
  flex: 1 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 0 auto;
  min-width: 0;
}
.jobs-filter-bar .jf-field {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.jobs-filter-bar .jf-field.jf-search {
  flex: 0 0 auto;
  min-width: 0;
}
.jobs-filter-bar .jf-field select,
.jobs-filter-bar .jf-field input {
  box-sizing: border-box;
  width: auto;
  height: 34px;
  margin: 0;
  padding: 0 10px;
  font-size: 12.5px;
  line-height: 32px;
  border-radius: 10px;
  vertical-align: middle;
}
.jobs-filter-bar .jf-field select {
  width: 120px;
  max-width: 100%;
  padding-right: 26px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 13px) 14px,
    calc(100% - 8px) 14px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.jobs-filter-bar .jf-field select[name="workflow"] {
  width: 168px;
}
.jobs-filter-bar .jf-field input[name="tag"] {
  width: 120px;
  max-width: 140px;
}
.jobs-filter-bar .jf-field.jf-search input {
  width: 160px;
  max-width: 160px;
  line-height: normal;
}
.jobs-filter-bar .jf-form > button,
.jobs-filter-bar .jf-form > a.btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
  margin: 0;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  transform: none;
  text-decoration: none;
  white-space: nowrap;
}
.jobs-filter-bar .jf-form > button:hover,
.jobs-filter-bar .jf-form > a.btn:hover {
  transform: none;
  box-shadow: none;
}
.jobs-filter-bar .jf-form > a.btn.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
}
.filter-flat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px 14px;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius, 12px);
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.filter-k {
  flex: 0 0 42px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
  transition: background .15s, border-color .15s, color .15s;
}
.filter-chip:hover {
  border-color: #c7d2fe;
  color: #4338ca;
  background: #f8fafc;
}
.filter-chip.active {
  border-color: transparent;
  background: #4f46e5;
  color: #fff;
}
.toolbar .field.field-sm {
  flex: 0 0 96px;
  min-width: 96px;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin: 12px 0 4px;
  padding: 10px 12px;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.pager-meta {
  font-size: 13px;
  color: var(--muted);
}
.pager-meta strong { color: #0f172a; font-weight: 700; }
.pager-size,
.pager-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.pager-k {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-right: 2px;
}
.pager-chip,
.pager-btn,
.pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
}
.pager-chip:hover,
.pager-btn:hover,
.pager-num:hover {
  border-color: #c7d2fe;
  color: #4338ca;
  background: #f8fafc;
}
.pager-chip.active,
.pager-num.active {
  border-color: transparent;
  background: #4f46e5;
  color: #fff;
}
.pager-btn.disabled {
  opacity: .45;
  pointer-events: none;
}
.pager-ellipsis {
  color: var(--muted);
  padding: 0 2px;
  font-weight: 700;
}
.batch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.batch-bar .batch-check-all {
  margin: 0 !important;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
}
.batch-bar .batch-page-size {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.batch-bar .batch-page-size .pager-chip {
  height: 28px;
  min-width: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12.5px;
}
.batch-bar > button[disabled],
.batch-bar > button:disabled {
  opacity: .42;
  filter: none;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
  pointer-events: none;
  transition: none;
}
.batch-bar > button#btnBatchXml,
.batch-bar > button#btnBatchDel {
  transition: none;
  transform: none;
  filter: none;
  box-shadow: none;
}
.batch-bar > button#btnBatchXml:hover,
.batch-bar > button#btnBatchDel:hover {
  transform: none;
  filter: none;
  box-shadow: none;
}
.jobs-table .col-created-by {
  width: 96px;
  max-width: 110px;
  white-space: nowrap;
}
.jobs-table .job-cb-form select {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  max-width: 104px;
  height: 28px;
  margin: 0;
  padding: 0 22px 0 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 26px;
  color: #0f172a;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 12px) 11px,
    calc(100% - 7px) 11px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-sizing: border-box;
  box-shadow: none;
  cursor: pointer;
}
.jobs-table .job-cb-form select:hover {
  border-color: #cbd5e1;
  background-color: #f8fafc;
}
.jobs-table .job-cb-form select:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, .25);
}
.jobs-table .job-cb-form select.is-empty {
  color: #94a3b8;
  font-weight: 500;
}
.jobs-table .cell-wf {
  max-width: 340px;
  min-width: 220px;
}
.jobs-table .wf-name {
  display: block;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  line-height: 1.35;
}
.jobs-table .cell-sid {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jobs-table .cell-step {
  max-width: 120px;
}
.jobs-table .step-name {
  display: block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  color: #475569;
}
.jobs-table .lang-pill {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.jobs-table .col-tags {
  max-width: 140px;
}
.jobs-table .job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.jobs-table .tag-pill {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  text-decoration: none;
}
.jobs-table .tag-pill:hover {
  border-color: #a78bfa;
  color: #5b21b6;
}
.jobs-table .tag-pill.is-active {
  background: #6d28d9;
  border-color: #6d28d9;
  color: #fff;
}
.jobs-table .cell-cost-tok {
  white-space: nowrap;
  line-height: 1.25;
}
.jobs-table .cell-cost-tok .ct-cost,
.jobs-table .cell-cost-tok .ct-tok {
  display: block;
  font-size: 12px;
}
.jobs-table .cell-cost-tok .ct-tok {
  color: #64748b;
  font-size: 11.5px;
  margin-top: 2px;
}
table.data.jobs-table > thead > tr > th,
table.data.jobs-table > tbody > tr > td {
  padding-left: 10px;
  padding-right: 10px;
}
.jobs-table .col-check input[type="checkbox"],
.batch-bar input[type="checkbox"],
label.check input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  margin: 0;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
  cursor: pointer;
  accent-color: #4f46e5;
  vertical-align: middle;
}
.jobs-table .col-check input[type="checkbox"]:focus,
.jobs-table .col-check input[type="checkbox"]:focus-visible,
.batch-bar input[type="checkbox"]:focus,
.batch-bar input[type="checkbox"]:focus-visible,
label.check input[type="checkbox"]:focus,
label.check input[type="checkbox"]:focus-visible {
  outline: 2px solid transparent;
  box-shadow: none !important;
  border: none !important;
}
table.data.jobs-table > tbody > tr {
  transition: none;
}

input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .28);
}
textarea {
  min-height: 180px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  resize: vertical;
}
label.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13.5px;
  margin: 8px 0;
  cursor: pointer;
}
label.check input { width: auto; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.metric-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px;
}
.jobs-overview-row {
  display: flex;
  align-items: center;
  gap: 16px 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.jobs-overview-row > .metric-grid {
  margin-bottom: 0;
  flex: 0 1 420px;
  max-width: 480px;
}
.jobs-day-bar {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.jobs-day-bar > .jf-k {
  flex: 0 0 auto;
  margin-top: 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted, #64748b);
  white-space: nowrap;
}
.jobs-day-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.jobs-day-custom {
  position: relative;
}
.jobs-day-custom > summary {
  list-style: none;
  cursor: pointer;
}
.jobs-day-custom > summary::-webkit-details-marker { display: none; }
.jobs-day-custom-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 260px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 28px -16px rgba(15, 23, 42, 0.35);
}
.jobs-day-custom-panel label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  margin: 0;
}
.jobs-day-custom-panel input[type="date"] {
  font: inherit;
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}
@media (max-width: 900px) {
  .jobs-overview-row > .metric-grid {
    flex: 1 1 100%;
    max-width: none;
  }
}
.daily-cost-today {
  max-width: none;
  margin-bottom: 12px;
}
.daily-cost-today .metric {
  cursor: default;
}
.daily-cost-today .metric:hover {
  transform: none;
}
.daily-cost table.data {
  margin: 0;
}
.daily-cost tr.is-today td {
  font-weight: 700;
  background: #f8fafc;
}
@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shell { grid-template-columns: 1fr; }
  .side { position: relative; height: auto; }
  .main { padding: 16px; }
}
.metric {
  display: block;
  padding: 16px 16px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
  animation: rise .45s var(--ease) both;
}
.metric:nth-child(1) { animation-delay: .02s; }
.metric:nth-child(2) { animation-delay: .05s; }
.metric:nth-child(3) { animation-delay: .08s; }
.metric:nth-child(4) { animation-delay: .11s; }
.metric:nth-child(5) { animation-delay: .14s; }
.metric:nth-child(6) { animation-delay: .17s; }
.metric:hover {
  transform: translateY(-3px);
  border-color: #c7d2fe;
  box-shadow: 0 16px 30px -14px rgba(79, 70, 229, .35);
  text-decoration: none;
  color: inherit;
}
.metric .k {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}
.metric .k i { color: var(--indigo); opacity: .85; }
.metric .v {
  display: block;
  margin-top: 8px;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.metric.warn .v { color: var(--warn); }
.metric.bad .v { color: var(--bad); }
.metric.ok .v { color: var(--ok); }
.metric.run .v { color: var(--indigo); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.panel h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
}
.config-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 16px;
  align-items: start;
}
.config-layout .config-main {
  margin-bottom: 0;
  min-width: 0;
}
.config-layout .config-side {
  margin-bottom: 0;
  position: sticky;
  top: 16px;
}
.config-side-stats {
  display: grid;
  gap: 10px;
}
.config-side-stats > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.config-side-stats > div:last-child { border-bottom: 0; padding-bottom: 0; }
.config-side-stats .k { color: var(--muted); }
.config-side-stats b {
  color: var(--ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1100px) {
  .config-layout {
    grid-template-columns: 1fr;
  }
  .config-layout .config-side { position: static; }
}
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 13px;
}
.meta-line b { color: var(--ink); font-weight: 700; }

.job-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin: 0 0 12px;
  padding: 7px 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.job-stats-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  font-size: 13px;
  color: #475569;
  min-width: 0;
  flex: 1 1 auto;
}
.job-stats-line b {
  color: #0f172a;
  font-weight: 700;
}
.job-stats-line i {
  font-style: normal;
  font-size: 12px;
  margin-left: 2px;
}
.prio-flat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  flex: 0 0 auto;
}
.prio-flat > .muted {
  font-size: 12px;
  margin-right: 2px;
}
.prio-btn {
  margin: 0;
  padding: 3px 10px;
  height: 28px;
  font-size: 12px;
  font-weight: 650;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  box-shadow: none;
  cursor: pointer;
}
.prio-btn:hover {
  background: #f8fafc;
  color: #334155;
}
.prio-btn.active {
  background: var(--indigo-soft);
  border-color: #c7d2fe;
  color: var(--indigo);
}
.job-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: -4px 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.job-tabs a {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  color: #64748b;
  text-decoration: none;
}
.job-tabs a:hover { background: #f1f5f9; color: #334155; }
.job-tabs a.active {
  background: var(--indigo-soft);
  color: var(--indigo);
}
.job-main-panel > h2 { display: none; }

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: var(--shadow);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th,
table.data td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #f1f5f9;
}
/* 任务列表：整行各列垂直居中 */
table.data.jobs-table > thead > tr > th,
table.data.jobs-table > tbody > tr > td {
  vertical-align: middle !important;
  padding-top: 10px;
  padding-bottom: 10px;
}
table.data.jobs-table > tbody > tr > td .st {
  vertical-align: middle;
  margin: 0;
}
table.data.jobs-table > tbody > tr > td .truncate {
  max-width: 280px;
  margin: 0;
  line-height: 1.35;
}
table.data.jobs-table > tbody > tr > td.job-acts {
  width: 1%;
  min-width: 168px;
  max-width: 196px;
  white-space: normal;
  padding-left: 8px;
  padding-right: 10px;
  vertical-align: middle !important;
}
table.data.jobs-table .job-acts-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  width: 168px;
}
table.data.jobs-table .job-acts-inner > a.btn.ghost.sm,
table.data.jobs-table .job-acts-inner > form {
  display: block;
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
  position: relative;
  z-index: 1;
  min-width: 0;
}
table.data.jobs-table .job-acts-inner a.btn.ghost.sm,
table.data.jobs-table .job-acts-inner button.ghost.sm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 2px;
  font-size: 11.5px;
  line-height: 1.2;
  border-radius: 7px;
  box-shadow: none;
  transform: none;
  margin: 0;
  text-decoration: none;
  white-space: nowrap;
}
table.data.jobs-table .job-acts-inner a.btn.ghost.sm:hover,
table.data.jobs-table .job-acts-inner button.ghost.sm:hover {
  transform: none;
}
table.data th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  z-index: 1;
}
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #f8fafc; }
table.data tbody tr.clickable { cursor: pointer; }
table.data td.mono { font-family: var(--mono); font-size: 12px; }
table.data .empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 12px;
}

.st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}
.st::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.st.queued { background: #f1f5f9; color: #475569; }
.st.running { background: var(--indigo-soft); color: var(--indigo); }
.st.succeeded { background: var(--ok-soft); color: var(--ok); }
.st.failed { background: var(--bad-soft); color: var(--bad); }
.st.cancelled { background: #f1f5f9; color: #94a3b8; }

.flash {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 14px;
  background: var(--ok-soft);
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 13.5px;
  font-weight: 600;
  animation: rise .35s var(--ease) both;
}
.err {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 14px;
  background: var(--bad-soft);
  border: 1px solid #fecaca;
  color: var(--bad);
  font-size: 13.5px;
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
@media (max-width: 860px) {
  .form-grid { grid-template-columns: 1fr; }
}
.form-grid .full { grid-column: 1 / -1; }
.field label, .form-grid label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.editor-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
@media (max-width: 980px) {
  .editor-layout { grid-template-columns: 1fr; }
}
.editor-side, .editor-main {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.prompt-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.prompt-tabs button {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: none;
  font-weight: 600;
}
.prompt-tabs button.active {
  background: var(--indigo-soft);
  color: var(--indigo);
  box-shadow: none;
}
.prompt-pane { display: none; }
.prompt-pane.active { display: block; animation: rise .25s var(--ease) both; }
.prompt-pane textarea { min-height: 380px; }

.job-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
@media (max-width: 900px) {
  .job-layout { grid-template-columns: 1fr; }
}
.live-banner {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: #475569;
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.live-stale {
  color: #b45309;
  font-size: 12px;
  font-weight: 650;
}
button.th-sort,
a.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
button.th-sort:hover,
a.th-sort:hover { color: var(--indigo); }
button.th-sort i::before,
a.th-sort i::before {
  content: "↕";
  font-style: normal;
  font-size: 11px;
  opacity: 0.45;
}
button.th-sort.is-active[data-dir="asc"] i::before,
a.th-sort.is-active[data-dir="asc"] i::before { content: "↑"; opacity: 1; color: var(--indigo); }
button.th-sort.is-active[data-dir="desc"] i::before,
a.th-sort.is-active[data-dir="desc"] i::before { content: "↓"; opacity: 1; color: var(--indigo); }
.step-rail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
}
.step-rail a,
.step-rail a.step-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
}
.step-rail a:hover { background: #f8fafc; }
.step-rail a.overview-item {
  margin-bottom: 10px;
  background: #fffbeb;
  border-color: #fde68a;
  border-left-color: #d97706;
}
.step-rail a.overview-item .n {
  background: #f59e0b;
  color: #fff;
  width: 36px;
  text-align: center;
  border-radius: 6px;
  padding: 2px 0;
  font-size: 11px;
}
.step-rail a.state-done {
  border-left-color: #059669;
}
.step-rail a.state-running {
  background: #eef2ff;
  border-color: #c7d2fe;
  border-left-color: #4f46e5;
}
.step-rail a.state-pending {
  border-left-color: #cbd5e1;
  color: #64748b;
}
.step-rail a.state-failed {
  background: #fef2f2;
  border-color: #fecaca;
  border-left-color: #dc2626;
}
.step-rail a.active {
  background: #eef2ff;
  border-color: #a5b4fc;
  font-weight: 650;
}
.step-rail a.state-done.active {
  background: #ecfdf5;
  border-color: #6ee7b7;
}
.step-rail .n {
  flex: 0 0 auto;
  min-width: 22px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
  margin-top: 1px;
}
.overview-panel { margin-top: 2px; }
.ov-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f7;
}
.ov-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ov-hd a.btn {
  text-decoration: none;
}
.ov-hd-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ov-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.ov-sec {
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid #f1f5f9;
}
.ov-sec:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.ov-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
}
.ov-hd h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  color: #334155;
}
.ov-hd h3 .muted,
.ov-hd h4 .muted {
  font-weight: 500;
  margin-left: 6px;
}
.ov-hd.sub {
  margin: 10px 0 6px;
}
.ov-hd h4 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
}
.ov-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
}
.ov-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.65;
  color: #1e293b;
  background: #fafbfc;
  border: 1px solid #e8eef5;
  border-radius: 8px;
  padding: 12px 14px;
  max-height: 280px;
  overflow: auto;
}
.ov-body.tall { max-height: 420px; }
.ov-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}
.ov-compare.single {
  grid-template-columns: 1fr;
}
.ov-compare-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.ov-compare-col .ov-body.tall {
  flex: 1 1 auto;
  max-height: min(62vh, 560px);
  min-height: 280px;
}
@media (max-width: 1100px) {
  .ov-compare { grid-template-columns: 1fr; }
  .ov-compare-col .ov-body.tall { max-height: 360px; }
}
.ov-trio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 1100px) {
  .ov-trio-grid { grid-template-columns: 1fr; }
}
.ov-trio-grid .k {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
}
.ov-ch + .ov-ch { margin-top: 4px; }
.ov-product-block { margin-top: 10px; }
.ov-product-block + .ov-product-block {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}
.ov-copy.copied,
#ovCopyAll.copied {
  color: #047857 !important;
}

/* —— 成品阅读页 —— */
.reader-page {
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 48px;
}
.reader-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  margin: -4px 0 16px;
  background: color-mix(in srgb, var(--bg, #f6f7f9) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e8ecf1;
}
.reader-top-left,
.reader-top-right,
.reader-top-mid {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.reader-lang {
  display: inline-flex;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.reader-lang-btn {
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
}
.reader-lang-btn + .reader-lang-btn {
  border-left: 1px solid #d8dee8;
}
.reader-lang-btn.active {
  background: #1e293b;
  color: #fff;
}
.reader-size .ghost.sm {
  min-width: 36px;
}
#readerPhoneToggle.active {
  background: #1e293b;
  color: #fff;
  border-color: #1e293b;
}
.reader-preview-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 600;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reader-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.reader-main-col {
  min-width: 0;
}
.reader-phone-wrap {
  min-width: 0;
}
.reader-phone-device {
  min-width: 0;
}
.reader-phone-notch,
.reader-phone-home {
  display: none;
}
.reader-phone-screen {
  min-width: 0;
}
.reader-toc {
  position: sticky;
  top: 64px;
  max-height: calc(100vh - 80px);
  overflow: auto;
  padding: 4px 2px 12px 0;
  border-right: 1px solid #e8ecf1;
}
.reader-toc-hd {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.reader-toc-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  margin: 0 0 2px;
  border-radius: 8px;
  color: #334155;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.35;
}
.reader-toc-item:hover {
  background: #eef2f7;
}
.reader-toc-item.active {
  background: #1e293b;
  color: #fff;
}
.reader-toc-item.active .muted {
  color: #cbd5e1 !important;
}
.reader-toc-meta {
  margin-top: 12px;
  padding: 0 10px;
  font-size: 12px;
}
.reader-article {
  --reader-font: 18px;
  max-width: 42rem;
  padding: 8px 8px 40px;
}
.reader-hero {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e8ecf1;
}
.reader-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  color: #64748b;
}
.reader-hero h1 {
  margin: 0 0 10px;
  font-family: "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  letter-spacing: 0.01em;
}
.reader-meta {
  margin: 0;
  font-size: 13px;
}
.reader-chapter {
  margin: 0 0 2.2rem;
  scroll-margin-top: 72px;
}
.reader-chapter h2 {
  margin: 0 0 1rem;
  font-family: "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}
.reader-chapter h2 .muted {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 500;
  margin-left: 6px;
}
.reader-article[data-lang="en"] .reader-chapter p,
.reader-page[data-lang="en"] .reader-chapter p {
  font-family: Georgia, "Times New Roman", "Literata", serif;
}
.reader-page[data-lang="zh"] .reader-chapter p {
  font-family: "Songti SC", "Noto Serif SC", "SimSun", serif;
}
.reader-chapter p {
  margin: 0 0 1em;
  font-size: var(--reader-font);
  line-height: 1.75;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
}
.reader-foot {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px dashed #d8dee8;
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
}
.reader-empty {
  padding: 48px 12px;
  text-align: center;
}
.reader-empty h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

/* Desktop phone-frame preview for /read */
.reader-page.is-phone {
  max-width: 1200px;
}
.reader-page.is-phone .reader-phone-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 12px 36px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #dfe7f1 0%, transparent 55%),
    linear-gradient(180deg, #e8edf3 0%, #d5dde8 100%);
  border-radius: 18px;
  border: 1px solid #d0d8e4;
  min-height: calc(100vh - 110px);
}
.reader-page.is-phone .reader-phone-device {
  width: 375px;
  max-width: 100%;
  height: min(780px, calc(100vh - 130px));
  background: #0f172a;
  border-radius: 40px;
  padding: 14px 12px 16px;
  box-shadow:
    0 0 0 2px #334155,
    0 24px 48px rgba(15, 23, 42, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
}
.reader-page.is-phone .reader-phone-notch {
  display: block;
  width: 118px;
  height: 22px;
  margin: 0 auto 8px;
  background: #020617;
  border-radius: 0 0 14px 14px;
  position: relative;
  flex: 0 0 auto;
}
.reader-page.is-phone .reader-phone-notch::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  transform: translateX(-50%);
  width: 54px;
  height: 5px;
  border-radius: 4px;
  background: #1e293b;
}
.reader-page.is-phone .reader-phone-screen {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  border-radius: 28px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.reader-page.is-phone .reader-phone-home {
  display: block;
  width: 108px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 4px;
  background: #475569;
  flex: 0 0 auto;
}
.reader-page.is-phone .reader-article {
  max-width: none;
  padding: 18px 16px 40px;
}
.reader-page.is-phone .reader-hero h1 {
  font-size: 1.45rem;
}
.reader-page.is-phone .reader-chapter {
  scroll-margin-top: 12px;
}
.reader-page.is-phone .reader-chapter h2 {
  font-size: 1.1rem;
}
.reader-page.is-phone .reader-toc {
  top: 64px;
  max-height: calc(100vh - 90px);
}
.reader-ad-slot {
  display: none;
}
.reader-page.is-phone .reader-ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 300px;
  max-width: calc(100% - 8px);
  margin: 22px auto;
  border-radius: 10px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  color: rgba(15, 23, 42, 0.45);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.4;
  user-select: none;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .reader-layout {
    grid-template-columns: 1fr;
  }
  .reader-toc {
    position: static;
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-right: 0;
    border-bottom: 1px solid #e8ecf1;
    padding-bottom: 12px;
    margin-bottom: 8px;
  }
  .reader-toc-hd,
  .reader-toc-meta {
    width: 100%;
  }
  .reader-toc-item {
    flex: 0 0 auto;
  }
  .reader-top {
    flex-wrap: wrap;
  }
  .reader-page.is-phone .reader-phone-device {
    height: min(720px, calc(100vh - 160px));
  }
}
.ch-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.ch-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}
.ch-hd {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.io-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.io-tabs-row .io-tabs {
  margin-bottom: 0;
}
.io-tabs-row .io-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}
.io-tabs-row .io-stats {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.io-tabs-row .io-copy.copied {
  color: #15803d;
  border-color: #86efac;
}
.io-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.io-tabs a {
  background: #f8fafc;
  color: var(--muted);
  border: 1px solid transparent;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}
.io-tabs a.active {
  background: #fff;
  border-color: #c7d2fe;
  color: var(--indigo);
}
.chapter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 8px;
}
.chapter-tabs a {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid transparent;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.chapter-tabs a.active {
  background: #ffedd5;
  border-color: #fdba74;
  color: #c2410c;
}
table.data tr.is-active-call td {
  background: rgba(37, 99, 235, 0.08);
}
.artifact-source {
  margin: 0 0 10px;
  font-size: 12px;
}
.artifact-source .mono {
  font-family: var(--mono);
  color: #475569;
}
pre.code {
  margin: 0;
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 14px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12.2px;
  line-height: 1.45;
  max-height: 480px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ===== Login (align 智能中枢) ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-page .login-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  width: 100%;
}
.login-wrap { width: min(420px, 100%); }
.login-hero {
  text-align: center;
  margin-bottom: 28px;
  animation: rise .5s var(--ease) both;
}
.login-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.login-hero h1 {
  margin: 0;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -.02em;
}
.login-hero p {
  margin: 6px 0 0;
  color: rgba(255,255,255,.72);
  font-size: 13.5px;
}
.login-card {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 2rem;
  box-shadow: var(--shadow-lg);
  padding: 32px 28px 28px;
  animation: rise .55s var(--ease) .05s both;
}
.login-card h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: #1e293b;
}
.login-card .sub {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13.5px;
}
.input-group {
  position: relative;
  margin-top: 16px;
  transition: transform .2s;
}
.input-group:focus-within { transform: translateY(-1px); }
.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}
.input-group input {
  padding-left: 42px;
  padding-right: 14px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-radius: 12px;
}
.login-btn {
  width: 100%;
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  box-shadow: 0 10px 20px -5px rgba(79, 70, 229, .4);
  transition: transform .2s, box-shadow .2s;
}
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px -5px rgba(79, 70, 229, .45);
}
.login-foot {
  padding: 14px;
  text-align: center;
  color: rgba(255,255,255,.6);
  font-size: 11px;
}

.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.truncate {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inline-forms { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.inline-forms form { display: flex; gap: 8px; align-items: end; margin: 0; }
.h-stack { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sep { color: #cbd5e1; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; font-weight: 500; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--indigo); }

/* —— 三栏工作流编辑器 —— */
.editor-shell { margin: -4px 0 0; }
.editor-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.editor-top-actions {
  position: relative;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.wf-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wf-search input[type=search] {
  width: min(260px, 42vw);
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  background: #fff;
}
.wf-search-status {
  font-size: 12px;
  font-weight: 700;
  color: #b91c1c;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prompt-field-hit > label,
.prompt-field-hit .label-row label {
  color: #b91c1c !important;
  font-weight: 800;
}
.prompt-field-hit textarea {
  border-color: #f87171 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}
.prompt-tabs button.prompt-field-hit {
  color: #b91c1c !important;
  border-color: #f87171 !important;
  background: #fef2f2 !important;
  font-weight: 800;
}
.wf-prompt-hit-nav {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 10px;
  border-radius: 999px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 12px;
  font-weight: 700;
}
.wf-prompt-hit-nav button {
  min-width: 28px;
  padding: 2px 6px;
  font-weight: 800;
}
.prompt-tabs { flex-wrap: wrap; }
/* 指令检索高亮：不改 textarea 文本色，避免无法编辑/中文输入法失效 */
textarea.prompt-searching {
  border-color: #f87171 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}
textarea.prompt-searching::selection {
  background: #fb923c;
  color: #111;
}
.wf3 {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) 260px;
  gap: 12px;
  min-height: calc(100vh - 160px);
  align-items: stretch;
}
.wf3-left, .wf3-right, .wf3-mid > .panel {
  max-height: calc(100vh - 160px);
  overflow: auto;
}
.wf3-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.wf3-steps { display: flex; flex-direction: column; gap: 3px; }
.wf3-step {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px 8px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
  min-width: 0;
}
.wf3-step:hover { background: #f1f5f9; }
.wf3-step-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 10px;
}
.wf3-step-row.active {
  background: linear-gradient(135deg, rgba(79,70,229,.08), rgba(124,58,237,.06));
  border: 1px solid rgba(79,70,229,.25);
}
.wf3-step-row.off { opacity: .55; }
.wf3-step-row .wf3-step { flex: 1; border: 0; min-width: 0; }
.wf3-step-row.active .wf3-step:hover { background: transparent; }
.wf3-step-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
  padding: 4px 6px 4px 0;
  border-left: 1px solid transparent;
}
.wf3-step-row.in-loop .wf3-step-actions {
  border-left-color: rgba(16, 185, 129, 0.22);
}
.wf3-mini { margin: 0; display: flex; align-items: center; }
.wf3-mini button {
  min-width: 0;
  width: 28px;
  height: 24px;
  padding: 0;
  font-size: 11px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wf3-icon-btn {
  color: #047857 !important;
  border-color: #a7f3d0 !important;
  background: #fff !important;
}
.wf3-icon-btn:hover {
  background: #ecfdf5 !important;
}
.wf3-copy-btn {
  color: #4338ca !important;
  border-color: #c7d2fe !important;
  background: #fff !important;
  font-weight: 700;
}
.wf3-copy-btn:hover {
  background: #eef2ff !important;
}
.wf3-toggle-btn.is-on {
  color: #047857 !important;
  font-weight: 700;
}
.wf3-toggle-btn.is-off {
  color: #94a3b8 !important;
}
.wf-list-toggle {
  padding: 2px 10px !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  min-width: 3.2em;
}
.wf-list-toggle.is-on {
  color: #047857 !important;
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
}
.wf-list-toggle.is-off {
  color: #64748b !important;
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}
.wf-list-toggle.is-test {
  color: #b45309 !important;
  background: #fffbeb !important;
  border-color: #fde68a !important;
}
.wf-list-toggle:hover {
  filter: brightness(0.97);
}
.editor-step-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.wf-vars-block {
  margin-top: 4px;
  padding: 14px 16px 16px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: linear-gradient(180deg, #eef2ff 0%, #fff 48%);
}
.wf-vars-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #312e81;
}
.wf-vars-sub {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: #4338ca;
}
.wf-vars-map {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.wf-vars-map th,
.wf-vars-map td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.wf-vars-map th {
  background: #f8fafc;
  font-size: 12px;
  color: #475569;
  font-weight: 700;
}
.wf-vars-map tr:last-child td { border-bottom: 0; }
.wf-vars-map code {
  font-size: 12px;
  background: #eef2ff;
  color: #3730a3;
  padding: 1px 6px;
  border-radius: 4px;
}
.wf-vars-map .muted { color: var(--muted); }
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.contract-box {
  margin-top: 14px;
  border: 1px solid #bfd4ea;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f4f8fc;
}
.contract-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.contract-head strong {
  font-size: 14px;
  color: #0f172a;
}
.repair-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #c5d4e3;
}
.repair-block .check {
  font-weight: 700;
  color: #0f172a;
}
#repairPane.is-off,
#repeatPane.is-off {
  opacity: 0.45;
  pointer-events: none;
}
.step-usage-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 13px;
  color: #334155;
}
.step-usage-bar b { color: #0f172a; }
.step-rail a .body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.step-rail a .body b {
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-rail a .body em {
  font-style: normal;
  font-size: 11px;
  color: #64748b;
}
.table.data.compact th,
.table.data.compact td {
  padding: 6px 8px;
  font-size: 12px;
}

/* —— 模型列表 —— */
.llm-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}
.llm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 14px;
  width: 100%;
  margin-bottom: 16px;
}
.llm-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
.llm-tile:hover {
  border-color: #c7d2fe;
}
.llm-tile.off {
  opacity: .62;
}
.llm-tile-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.llm-tile-order {
  display: flex;
  gap: 4px;
  margin-right: auto;
}
.llm-tile-order .ghost.sm {
  padding: 2px 8px;
  min-width: 0;
}
.llm-en {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}
.llm-lab {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  min-width: 0;
}
.llm-lab input,
.llm-lab select {
  width: 100%;
  font-weight: 500;
  color: var(--ink);
}
.llm-row2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
}
.llm-empty {
  max-width: none !important;
  text-align: center;
  color: var(--muted);
  padding: 28px !important;
  margin-bottom: 16px;
}
.llm-new {
  max-width: none !important;
  width: 100%;
}
.llm-new-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.llm-new-ft {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.llm-param-flags {
  margin-top: 4px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.llm-param-flags-title {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}
.llm-param-flags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.llm-param-flags-row .check {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}
.step-model-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: nowrap;
  margin: 28px 0 32px;
  min-width: 0;
  min-height: 42px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  overflow: hidden;
}
.step-model-bar > .smb-select {
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 340px;
  height: auto;
  min-height: 42px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none !important;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.step-model-bar > .smb-select:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(99, 102, 241, .35) !important;
}
.step-llm-params {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  border-left: 1px solid var(--line);
}
.step-llm-params[hidden] { display: none !important; }
.smb-inline {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  padding: 0 12px;
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
}
.smb-inline:last-child { border-right: 0; }
.smb-inline[hidden] { display: none !important; }
.smb-inline > span {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  letter-spacing: .02em;
}
.smb-inline input {
  width: 68px;
  height: 28px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  font-size: 13.5px !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  -moz-appearance: textfield;
}
.smb-inline input::-webkit-outer-spin-button,
.smb-inline input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.smb-inline input::placeholder { color: #94a3b8; font-weight: 500; }
.smb-inline input:focus { outline: none; }
.smb-inline:focus-within:not(.smb-off) {
  background: #f8fafc;
}
.smb-inline.smb-off,
.smb-effort.smb-off {
  opacity: .45;
  background: #f1f5f9;
  pointer-events: none;
}
.smb-inline.smb-off > span {
  color: #94a3b8;
}
.smb-inline.smb-off input,
.smb-inline.smb-off input::placeholder {
  color: #94a3b8;
}
.smb-think {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: #fafbfc;
}
.smb-think[hidden] { display: none !important; }
.smb-toggle {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.smb-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 1;
}
.smb-toggle-ui {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  flex: 0 0 auto;
  pointer-events: none;
  transition: background .18s var(--ease);
}
.smb-toggle-ui::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,.22);
  transition: transform .18s var(--ease);
}
.smb-toggle input:checked + .smb-toggle-ui {
  background: #4f46e5;
}
.smb-toggle input:checked + .smb-toggle-ui::after {
  transform: translateX(14px);
}
.smb-toggle-txt {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  line-height: 1;
}
.smb-toggle input:checked ~ .smb-toggle-txt { color: #4338ca; }
.smb-effort { display: flex; align-items: center; }
.smb-effort[hidden] { display: none !important; }
.smb-effort select {
  height: 28px;
  border: 0 !important;
  background: #eef2ff;
  border-radius: 8px;
  box-shadow: none !important;
  padding: 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #4338ca;
  cursor: pointer;
}
.smb-effort select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, .28) !important;
}
@media (max-width: 900px) {
  .step-model-bar { flex-wrap: wrap; }
  .step-model-bar > .smb-select {
    max-width: none;
    flex: 1 1 100%;
    border-bottom: 1px solid var(--line) !important;
  }
  .step-llm-params { border-left: 0; flex: 1 1 auto; }
  .smb-think { border-left: 0; border-top: 1px solid var(--line); margin-left: auto; }
}

@media (max-width: 1100px) {
  .llm-grid { grid-template-columns: 1fr; }
  .llm-new-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .llm-metrics { grid-template-columns: 1fr 1fr; }
  .llm-row2,
  .llm-new-grid { grid-template-columns: 1fr; }
}

.adv-box {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
}
.adv-box summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: #475569;
}
button.ghost.danger, .ghost.danger {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
  box-shadow: none;
}
button.ghost.danger:hover, .ghost.danger:hover {
  background: #fef2f2;
  color: #991b1b;
  filter: none;
  box-shadow: none;
}
.wf3-step .n {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wf3-step-row.active .n {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
}
.wf3-step .body { min-width: 0; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.wf3-step .body b {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wf3-step-row.in-loop .body b {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  line-height: 1.2;
}
.step-type {
  font-size: 11px;
  color: var(--muted);
}
.wf3-step .body em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.prompt-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.prompt-tabs button {
  border: 1px solid var(--border);
  background: #fff;
  color: #64748b;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.prompt-tabs button.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
.prompt-pane { display: none; }
.prompt-pane.active { display: block; }
.asset-list { display: flex; flex-direction: column; gap: 4px; }
.asset-g {
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
  color: #64748b;
  letter-spacing: .02em;
}
.asset-g:first-child { margin-top: 0; }
.asset-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.asset-item:hover {
  border-color: rgba(79,70,229,.35);
  background: rgba(79,70,229,.04);
}
.asset-item span { font-size: 12.5px; font-weight: 600; color: #334155; }
.asset-item code {
  font-size: 11px;
  color: #6366f1;
  background: transparent;
  padding: 0;
}
@media (max-width: 1100px) {
  .wf3 { grid-template-columns: 1fr; }
  .wf3-left, .wf3-right, .wf3-mid > .panel { max-height: none; }
}

.loop-legend {
  margin: 0 0 10px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}
.pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  vertical-align: middle;
}
.pill.loop {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.pill.sm {
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
}
.pill.off {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.pill.retry {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.lock-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}
.lock-mode-opt {
  margin: 0 !important;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  gap: 6px;
}
.lock-mode-opt input {
  accent-color: #4f46e5;
}
.loop-band-label {
  margin: 8px 0 2px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #047857;
  background: linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 100%);
  border-radius: 8px;
  border: 1px solid #a7f3d0;
  border-left: 3px solid #10b981;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.loop-band-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}
.loop-band-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #10b981;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.loop-band-text {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  color: #065f46;
}
.loop-band-nos {
  font-size: 10.5px;
  font-weight: 600;
  color: #047857;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  word-break: break-all;
  line-height: 1.35;
}
.loop-band-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 600;
}
.loop-band-actions .ghost.sm,
.loop-band-btn {
  flex: 1;
  padding: 4px 8px !important;
  font-size: 11px !important;
  min-height: 0;
  text-align: center;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
  background: #fff !important;
}
.loop-band-btn:hover {
  background: #d1fae5 !important;
}
/* 查→改 成对循环：整带包在一个框里 */
.repeat-pair-wrap {
  margin: 8px 0 10px;
  padding: 0 0 6px;
  border: 2px solid #0d9488;
  border-radius: 12px;
  background: linear-gradient(180deg, #f0fdfa 0%, #ecfeff 100%);
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.12);
}
.repeat-pair-card {
  margin: 0;
  padding: 10px 12px 8px;
  border: 0;
  background: transparent;
}
.repeat-pair-card.is-panel {
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 2px solid #0d9488;
  border-radius: 12px;
  background: linear-gradient(180deg, #f0fdfa 0%, #ecfeff 100%);
}
.repeat-pair-head {
  font-size: 12px;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.repeat-pair-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 2px;
  margin-bottom: 4px;
}
.repeat-pair-flow.compact {
  font-size: 11px;
}
.repeat-pair-round {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #99f6e4;
  color: #115e59;
  font-size: 11px;
  font-weight: 600;
}
.repeat-pair-round b {
  color: #0d9488;
  font-weight: 800;
}
.repeat-pair-sep {
  color: #14b8a6;
  font-weight: 800;
  padding: 0 2px;
}
.repeat-pair-steps {
  font-size: 11px;
  color: #0f766e;
  opacity: 0.9;
  line-height: 1.4;
}
.wf3-step-row.in-repeat-pair {
  margin: 0 6px 4px;
  padding-left: 6px;
  border-left: 3px solid #14b8a6;
  border-radius: 0 10px 10px 0;
  background: rgba(255, 255, 255, 0.72);
}
.wf3-step-row.in-repeat-pair.pair-last {
  margin-bottom: 6px;
}
.wf3-step-row.in-repeat-pair.active {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.25);
}
.pair-role-tag {
  display: inline-block;
  min-width: 1.4em;
  padding: 0 5px;
  margin-right: 2px;
  border-radius: 4px;
  background: #0d9488;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  vertical-align: 1px;
}
.wf3-step-row .n.role-查,
.step-item .n.role-查 {
  background: #0d9488;
  color: #fff;
}
.wf3-step-row .n.role-改,
.step-item .n.role-改 {
  background: #0369a1;
  color: #fff;
}
.rail-pair-wrap {
  margin: 8px 6px 10px;
  padding-bottom: 4px;
}
.rail-pair-wrap .step-item.in-repeat-pair {
  margin: 0 6px 4px;
  border-left: 3px solid #14b8a6;
  border-radius: 0 10px 10px 0;
  background: rgba(255, 255, 255, 0.65);
}
.pair-round-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pair-round-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #99f6e4;
}
.pair-round-row.is-active {
  border-color: #0d9488;
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.2);
  background: #f0fdfa;
}
.pair-round-label {
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  min-width: 3.5em;
}
.pair-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #99f6e4;
  background: #fff;
  color: #0f766e;
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
}
.pair-chip:hover {
  border-color: #0d9488;
  background: #ccfbf1;
}
.pair-chip.on {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.pair-arrow {
  color: #14b8a6;
  font-weight: 800;
}
.wf3-step-row.in-loop {
  margin-left: 0;
  padding-left: 6px;
  border-left: 3px solid #34d399;
  border-radius: 0 10px 10px 0;
  background: rgba(16, 185, 129, 0.05);
}
.wf3-step-row.in-loop.loop-first {
  margin-top: 2px;
  border-top-left-radius: 0;
}
.wf3-step-row.in-loop.loop-last { margin-bottom: 8px; }
.wf3-step-row.in-loop.active {
  background: rgba(16, 185, 129, 0.14);
  border-color: #10b981;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.15);
}
.wf3-step-row.in-loop.active .n {
  background: #059669;
  color: #fff;
}
/* 检索命中必须压过循环带/选中态 */
.wf3-steps.is-filtering .wf3-step-row:not(.has-search-hit) {
  opacity: 0.32;
  filter: grayscale(0.25);
}
.wf3-step-row.has-search-hit,
.wf3-step-row.in-loop.has-search-hit,
.wf3-step-row.active.has-search-hit,
.wf3-step-row.in-loop.active.has-search-hit {
  opacity: 1 !important;
  filter: none !important;
  background: #fef2f2 !important;
  border: 1px solid #fca5a5 !important;
  border-left: 4px solid #dc2626 !important;
  box-shadow: 0 0 0 1px #fecaca inset;
  border-radius: 10px;
}
.wf3-step-row.has-search-hit > .wf3-step,
.wf3-step-row.in-loop.has-search-hit > .wf3-step,
.wf3-step-row.active.has-search-hit > .wf3-step {
  background: #fef2f2 !important;
}
.wf3-step-row.has-search-hit .n,
.wf3-step-row.active.has-search-hit .n,
.wf3-step-row.in-loop.has-search-hit .n {
  background: #dc2626 !important;
  color: #fff !important;
  box-shadow: none;
}
.wf3-step-row.has-search-hit .body b {
  color: #b91c1c !important;
}
.wf3-step-row.has-search-hit .search-hit {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: #dc2626;
  border-radius: 999px;
  padding: 1px 7px;
  vertical-align: middle;
}
.wf-search-rail-hint {
  display: none;
  margin: 0 0 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.wf-search-rail-hint.is-on { display: block; }
.loop-card {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #a7f3d0;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 60%, #fff 100%);
}
.loop-card.hidden { display: none; }
.loop-card-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.loop-card-hd strong { font-size: 13.5px; color: #065f46; }
.loop-flow {
  margin: 0 0 8px;
  padding-left: 18px;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.55;
}
.loop-flow li { margin: 2px 0; }
.loop-flow code {
  font-size: 11px;
  background: #fff;
  border: 1px solid #d1fae5;
  padding: 0 4px;
  border-radius: 4px;
  color: #047857;
}
.loop-band-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #047857;
  line-height: 1.45;
}
.loop-mini-diagram {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.loop-mini-row {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #065f46;
  background: #fff;
  border: 1px dashed #a7f3d0;
  border-radius: 8px;
  padding: 6px 10px;
}
.loop-mini-row.muted {
  display: block;
  text-align: center;
  color: #64748b;
  font-weight: 500;
  border-style: solid;
  border-color: #e2e8f0;
}
.loop-asset-tip {
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
}
.asset-g.loop-g { color: #047857; }
.asset-item.loop-asset {
  border-color: #a7f3d0;
  background: #f0fdf4;
}
.asset-item.loop-asset code { color: #047857; }

/* —— fbapi 对接页 —— */
.fbapi-summary { margin-bottom: 16px; }
.fbapi-sum-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 18px;
  align-items: start;
}
.fbapi-sum-wide { grid-column: 1 / -1; }
.fbapi-sum-grid .st { margin-left: 6px; vertical-align: middle; }
.fbapi-auth-hint { margin: 12px 0 0; font-size: 13px; line-height: 1.5; }
.fbapi-sec { margin-bottom: 16px; }
.fbapi-sec-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.fbapi-sec-hd h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
}
.fbapi-sec-hd p { margin: 4px 0 0; font-size: 13px; }
.fbapi-sec-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.fbapi-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  font-size: 13px;
  line-height: 1.55;
  color: #166534;
}
.fbapi-label { display: block; margin-bottom: 6px; }
textarea.fbapi-doc {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 12px;
  line-height: 1.5;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  resize: vertical;
  white-space: pre;
}
.fbapi-map { margin-top: 14px; }
.fbapi-map-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.fbapi-map-cheat {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.fbapi-row-zh { background: rgba(34, 197, 94, 0.08); }
.fbapi-steps {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.tiny { font-size: 12px; }
@media (max-width: 900px) {
  .fbapi-sum-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .fbapi-sum-grid { grid-template-columns: 1fr; }
}

.st.paused { background: #fff7ed; color: #c2410c; }
dialog.nw-dialog {
  border: none;
  border-radius: 14px;
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: min(90vh, 720px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.28);
  background: #fff;
}
dialog.nw-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}
.nw-dialog-form { padding: 16px 18px 18px; }
.nw-dialog-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.nw-dialog-hd h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.nw-dialog-hd .ghost {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}
.nw-dialog-ft {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.nw-dialog textarea { min-height: 140px; }

/* 一键删除弹框 */
dialog.nw-dialog.nw-dialog-lg {
  width: min(940px, calc(100vw - 32px));
  max-height: min(94vh, 960px);
}
.purge-warn {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin: 10px 0 14px;
  background: #fef2f2;
  border: 1px solid #fecdca;
  border-radius: 10px;
  color: #991b1b;
  font-size: 12.5px;
  line-height: 1.6;
}
.purge-warn i { color: #dc2626; margin-top: 2px; }
.purge-warn strong { color: #b91c1c; }
.purge-days-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.purge-days-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.purge-days-opt input[type="number"] {
  width: 104px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.purge-days-opt input[type="number"]:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}
.purge-days-opt input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #dc2626;
  cursor: pointer;
}
.purge-days-opt.purge-days-all { font-weight: 600; }
.purge-fit-hd { padding-top: 6px; border-top: 1px solid #eef2f7; }
.purge-fit-hd label { font-size: 13.5px; font-weight: 700; color: #1e293b; }
.purge-confirm-box {
  margin-top: 4px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.purge-confirm-box .check { gap: 8px; font-size: 13px; color: #334155; }
.purge-confirm-box .check input { margin: 0; }
.purge-preview-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
}
.purge-preview-ico { color: #2563eb; margin-top: 1px; }
.purge-preview-txt { display: flex; flex-direction: column; gap: 2px; }
.purge-preview-main { font-size: 14px; color: #1e3a8a; }
.purge-preview-main strong { font-size: 16px; }
.purge-preview-sub { font-size: 12px; color: #64748b; }

.save-hint {
  font-size: 12px;
  font-weight: 700;
  color: #c2410c;
  align-self: center;
}
.editor-dirty .editor-top {
  border-bottom: 2px solid #fdba74;
  padding-bottom: 10px;
}
.editor-fab-save {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  margin-top: -8px;
}
.editor-fab-save[hidden] { display: none !important; }
.editor-fab-save .btn {
  pointer-events: auto;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}
.editor-save-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* —— 创作者（created_by）管理 —— */
.cb-add-card {
  margin: 0 0 18px;
  padding: 16px 18px;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius, 12px);
  box-shadow: var(--shadow);
}
.cb-add-hd h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
}
.cb-add-hd p {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.cb-add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.cb-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  min-width: 160px;
  flex: 1;
}
.cb-field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.cb-field input {
  height: 36px;
  margin: 0;
  padding: 0 12px;
  border-radius: 10px;
}
.cb-add-form > button {
  height: 36px;
  padding: 0 18px;
  border-radius: 10px;
  box-shadow: none;
}
.cb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.cb-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 20px -14px rgba(15, 23, 42, .25);
  transition: border-color .15s, box-shadow .15s;
}
.cb-tile:hover {
  border-color: #c7d2fe;
  box-shadow: 0 12px 24px -14px rgba(79, 70, 229, .28);
}
.cb-tile.is-off {
  opacity: .62;
  background: #f8fafc;
}
.cb-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cb-avatar {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.cb-tile-id {
  font-size: 11.5px;
  color: var(--muted);
}
.cb-code {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: .01em;
  word-break: break-all;
}
.cb-tile .cb-field input {
  height: 32px;
  font-size: 13px;
}
.cb-tile-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}
.cb-en {
  margin: 0 !important;
  font-size: 12.5px;
  font-weight: 600;
}
.cb-tile-acts {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cb-tile-acts form { margin: 0; }
.cb-empty {
  padding: 48px 20px;
  text-align: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
}
.cb-field select {
  height: 36px;
  margin: 0;
  padding: 0 10px;
  border-radius: 10px;
}
.cb-tile .cb-field select {
  height: 32px;
  font-size: 13px;
}
.role-add-form .role-perm-grid {
  margin-top: 12px;
}
.role-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px 12px;
}
.role-perm-grid .check {
  margin: 2px 0;
  font-size: 12.5px;
  font-weight: 600;
}
.role-wf-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.role-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 18px;
}
.role-card {
  padding: 14px 16px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 20px -14px rgba(15, 23, 42, .25);
}
.role-card.is-admin {
  border-color: #c7d2fe;
  background: #fafafe;
}
.role-card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.role-card-name input {
  height: 34px;
  margin: 0;
  padding: 0 10px;
  font-size: 15px;
  font-weight: 800;
  min-width: 180px;
}
.role-card-meta {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
}
.role-card .cb-tile-ft {
  margin-top: 10px;
}

/* —— 工作流指令全屏编辑 —— */
.prompt-field-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
}
.prompt-field-hd > span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
body.prompt-fs-open {
  overflow: hidden;
}
.prompt-fs-page {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--panel);
  color: var(--ink);
  overflow: hidden;
}
.prompt-fs-page[hidden] {
  display: none !important;
}
.prompt-fs-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #f8fafc;
}
.prompt-fs-side-hd {
  flex: 0 0 auto;
  padding: 16px 14px 12px;
  border-bottom: 1px solid var(--line);
}
.prompt-fs-side-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: .02em;
}
.prompt-fs-side-sub {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}
.prompt-fs-side-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 8px;
}
.prompt-fs-side-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  margin: 0 0 4px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}
.prompt-fs-side-item:hover {
  background: #fff;
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}
.prompt-fs-side-item.active {
  background: #fff;
  border-color: #c7d2fe;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.prompt-fs-side-item.off {
  opacity: .55;
}
.prompt-fs-side-item .n {
  flex: 0 0 auto;
  min-width: 22px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  line-height: 1.4;
}
.prompt-fs-side-item.active .n {
  color: var(--indigo);
}
.prompt-fs-side-item .nm {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
  word-break: break-word;
}
.prompt-fs-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #fff;
}
.prompt-fs-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.prompt-fs-titles { min-width: 0; flex: 1 1 auto; }
.prompt-fs-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.prompt-fs-wf {
  font-family: var(--mono);
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
}
.prompt-fs-sep { opacity: .5; }
.prompt-fs-hd h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
}
.prompt-fs-no {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 800;
  color: var(--indigo);
  background: var(--indigo-soft);
  border-radius: 8px;
  padding: 2px 8px;
}
.prompt-fs-name {
  min-width: 0;
  word-break: break-word;
}
.prompt-fs-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 8px;
}
.prompt-fs-tabs {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.prompt-fs-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 9px;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}
.prompt-fs-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, .7);
  box-shadow: none;
  transform: none;
}
.prompt-fs-tab.active {
  color: var(--indigo);
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.prompt-fs-kind {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--indigo);
  background: var(--indigo-soft);
  border: 1px solid #c7d2fe;
}
.prompt-fs-stat {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.prompt-fs-toolbar {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.prompt-fs-goto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.prompt-fs-goto input {
  width: 72px;
  height: 28px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 26px;
}
.prompt-fs-goto input:focus {
  border-color: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
.prompt-fs-goto .ghost {
  height: 28px;
  min-height: 28px;
  padding: 0 10px;
}
.prompt-fs-toolbar .btn,
.prompt-fs-toolbar > .ghost {
  min-height: 34px;
}
.prompt-fs-x {
  width: 34px;
  padding: 0 !important;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
}
.prompt-fs-editor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.prompt-fs-ta-wrap {
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.prompt-fs-gutter {
  overflow: hidden;
  padding: 16px 0;
  min-width: 52px;
  max-width: 80px;
  text-align: right;
  background: #f8fafc;
  border-right: 1px solid var(--line);
  color: #94a3b8;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  user-select: none;
  cursor: default;
  contain: strict;
}
.prompt-fs-gutter span {
  display: block;
  box-sizing: border-box;
  padding: 0 12px 0 14px;
  height: calc(13px * 1.65);
  line-height: 1.65;
  overflow: hidden;
}
.prompt-fs-gutter span.is-active {
  color: var(--indigo);
  font-weight: 800;
  background: #eef2ff;
}
#promptFsText {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  min-width: 0 !important;
  margin: 0;
  padding: 16px 18px;
  border: 0;
  border-radius: 0;
  resize: none;
  overflow-x: auto !important;
  overflow-y: auto;
  background: #fff;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  /* pre (no wrap): keeps gutter cheap & in sync; long lines scroll horizontally */
  white-space: pre !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  tab-size: 2;
  box-shadow: none;
  box-sizing: border-box;
  contain: content;
}
#promptFsText:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(79, 70, 229, .18);
}
.prompt-fs-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 9px 18px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 900px) {
  .prompt-fs-page {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .prompt-fs-page {
    grid-template-columns: 1fr;
    grid-template-rows: 148px minmax(0, 1fr);
  }
  .prompt-fs-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .prompt-fs-side-list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px 12px;
  }
  .prompt-fs-side-item {
    flex: 0 0 auto;
    width: auto;
    max-width: 160px;
    margin: 0;
  }
  .prompt-fs-hd { flex-direction: column; }
  .prompt-fs-toolbar { width: 100%; justify-content: flex-start; }
}

/* —— Analytics —— */
.an-page { max-width: 100%; }

.an-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.an-strip-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
  position: relative;
  overflow: hidden;
}
.an-strip-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #cbd5e1;
}
.an-strip-item.is-accent::before { background: linear-gradient(180deg, #6366f1, #8b5cf6); }
.an-strip-item.is-ok::before { background: var(--ok); }
.an-strip-item.is-warn::before { background: var(--warn); }
.an-strip-item.is-run::before { background: linear-gradient(180deg, #4f46e5, #6366f1); }
.an-strip-item b {
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  color: var(--ink);
  line-height: 1.1;
}
.an-strip-item span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 550;
}
@media (max-width: 1100px) {
  .an-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .an-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.an-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  justify-content: space-between;
  margin: 0 0 14px;
}
.an-search,
.an-translate {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.an-search {
  flex: 1 1 560px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 8px 24px -18px rgba(15, 23, 42, .35);
}
.an-search-main {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}
.an-search-main i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
  pointer-events: none;
}
.an-search-main input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font: inherit;
  color: var(--ink);
}
.an-search-main input:focus {
  outline: none;
  background: #fff;
  border-color: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .14);
}
.an-search select,
.an-translate select {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  max-width: 168px;
  height: 38px;
}
.an-views-filter,
.an-per-page {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.an-views-filter select {
  max-width: 120px;
}
.an-per-page select {
  max-width: 128px;
}
.an-views-filter input[type="number"],
.an-per-page input[type="number"] {
  width: 96px;
  height: 38px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
}
.an-views-filter input[type="number"]:focus,
.an-per-page input[type="number"]:focus {
  outline: none;
  border-color: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .14);
}
.an-search button[type="submit"] {
  border: 0;
  background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-2) 100%);
  color: #fff;
  border-radius: 10px;
  padding: 8px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 16px -10px rgba(79, 70, 229, .55);
}
.an-search button[type="submit"]:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.an-translate {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
}

.an-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 32px -22px rgba(15, 23, 42, .45);
  overflow: hidden;
}
.an-panel-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #fbfcfe 0%, #f8fafc 100%);
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}
.an-panel-hd .muted { font-weight: 500; }

.an-table-scroll {
  overflow: auto;
  max-width: 100%;
}
.an-table {
  min-width: 1220px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.an-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  border-bottom: 1px solid #e2e8f0;
  padding: 11px 12px;
  white-space: nowrap;
}
.an-table tbody td {
  padding: 13px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  background: #fff;
}
.an-table tbody tr:hover td { background: #f8faff; }
.an-table tbody tr:last-child td { border-bottom: 0; }
.an-table th.an-th a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  border-radius: 6px;
  padding: 2px 4px;
  margin: -2px -4px;
}
.an-table th.an-th a:hover {
  color: var(--indigo);
  background: #eef2ff;
}
.an-table th.an-th.is-sorted a {
  color: var(--indigo);
  background: #eef2ff;
}
.an-table th.an-th.is-sorted.desc a::after { content: "↓"; font-size: 10px; }
.an-table th.an-th.is-sorted.asc a::after { content: "↑"; font-size: 10px; }
.an-table th.num,
.an-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #475569;
}
.an-table td.an-eng {
  color: #4338ca;
  font-weight: 750;
}
.an-table td.an-excerpt {
  max-width: 220px;
  min-width: 160px;
}
.an-table th.an-col-body { min-width: 160px; max-width: 220px; }
.an-table th.an-th-ctag,
.an-table td.an-ctag-cell {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}
.an-ctag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2em;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
}
.an-ctag-hard {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.an-ctag-edge {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
.an-ctag-affair {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}
.an-ctag-clean {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}
.an-date {
  color: #64748b;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  white-space: nowrap;
}
.an-body-link {
  color: #0f172a;
  font-weight: 650;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  text-decoration: none;
}
.an-body-link:hover { color: var(--indigo); }
.an-page-link {
  display: inline-flex;
  align-items: center;
  max-width: 148px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 650;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  border: 1px solid transparent;
}
.an-page-link:hover {
  background: #eef2ff;
  color: var(--indigo);
  border-color: #c7d2fe;
}
.an-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 11.5px;
  white-space: nowrap;
}
.an-act { white-space: nowrap; }
.an-act .btn.sm { padding: 5px 10px; font-size: 12px; }

.an-st {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  letter-spacing: .02em;
  white-space: nowrap;
}
.an-st-done { background: var(--ok-soft); color: var(--ok); }
.an-st-pending { background: var(--warn-soft); color: var(--warn); }
.an-st-failed { background: var(--bad-soft); color: var(--bad); }
.an-st-skipped { background: #f1f5f9; color: #64748b; }

.an-active-filter {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
  padding: 7px 12px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  font-size: 12.5px;
  color: #4338ca;
}
.an-active-filter i { font-size: 11px; opacity: .8; }
.an-active-filter strong { color: #312e81; }
.an-active-filter a {
  margin-left: 4px;
  font-weight: 700;
  color: var(--indigo);
}

.an-empty {
  text-align: center;
  padding: 64px 20px;
  background: var(--panel);
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
}
.an-empty-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f8fafc, #eef2ff);
  color: #818cf8;
  font-size: 18px;
  border: 1px solid #e0e7ff;
}
.an-empty p { margin: 0 0 6px; font-size: 16px; font-weight: 750; }
.an-empty span {
  display: block;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

.an-import-card {
  max-width: 520px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  background: var(--panel);
  box-shadow: 0 8px 24px -18px rgba(15, 23, 42, .35);
}
.an-import-form { display: flex; flex-direction: column; gap: 12px; }
.an-hint { margin-top: 14px; font-size: 13px; }
.an-bilingual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 900px) {
  .an-bilingual { grid-template-columns: 1fr; }
}
.an-col {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--panel);
  min-width: 0;
}
.an-col h2 {
  margin: 0 0 10px;
  font-size: 15px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.an-body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
  font-size: 14px;
  color: #1e293b;
}
.an-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 13px;
  margin-bottom: 8px;
}
.an-chart-block { margin: 0 0 28px; }
.an-chart-block h2 { font-size: 16px; margin: 0 0 12px; }
.an-bars { display: flex; flex-direction: column; gap: 6px; }
.an-bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 64px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.an-bar-label { color: var(--muted); font-variant-numeric: tabular-nums; }
.an-bar-track {
  height: 12px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.an-bar-fill {
  height: 100%;
  border-radius: 999px;
  min-width: 2px;
}
.an-bar-fill.eng { background: linear-gradient(90deg, #0f766e, #14b8a6); }
.an-bar-fill.imp { background: linear-gradient(90deg, #1d4ed8, #6366f1); }
.an-bar-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.nowrap { white-space: nowrap; }
.an-pager {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 16px 0 4px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.an-imports-fold {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}
.an-imports-fold summary {
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  color: #475569;
}
.an-imports-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.an-imports-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 10px;
}
.an-imports-list li > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.an-imports-acts {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.an-alias-list li > div:first-child {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.an-alias-list li strong {
  color: var(--indigo, #4f46e5);
  min-width: 3.5em;
}

.an-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
@media (max-width: 1100px) {
  .an-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.an-kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  min-width: 0;
}
.an-kpi-v {
  font-size: 1.35rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: #0f172a;
}
.an-kpi-l { font-size: 12px; color: var(--muted); }
.an-wc {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.35;
}
.an-wc .an-wc-zh {
  display: block;
  font-size: 12px;
  margin-top: 2px;
}
.an-wc-tag {
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}
.an-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  font-size: 13px;
  margin: 0 0 16px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.an-post-meta code {
  font-size: 12px;
}
.an-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: end;
  margin: 0 0 16px;
  justify-content: space-between;
}
.an-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.an-batch-hd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.an-batch-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.an-batch-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}
.an-batch-right .an-per-page select {
  height: 32px;
  max-width: 110px;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 8px;
}
.an-batch-right .an-per-page input[type="number"] {
  width: 72px;
  height: 32px;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 8px;
}
.an-batch-right .an-per-page .ghost.sm {
  height: 32px;
  padding: 0 10px;
}
.an-check-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  color: #334155;
  cursor: pointer;
  user-select: none;
}
.an-th-check {
  width: 36px;
  text-align: center !important;
  padding-left: 10px !important;
  padding-right: 6px !important;
}
.an-th-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--indigo);
  cursor: pointer;
}
#anBtnTranslate:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.an-st-queued { background: #dbeafe; color: #1d4ed8; }
.an-st-translating { background: #e0e7ff; color: #3730a3; }
.an-st-pending { background: #fff7ed; color: #c2410c; }
.an-queue-flash a { margin-left: 8px; font-weight: 700; }

.an-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.an-tabs a {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: #475569;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}
.an-tabs a:hover { background: #f8fafc; color: var(--ink); }
.an-tabs a.active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}
.an-tr-table td.an-err {
  max-width: 160px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* —— Eagle Eye —— */
.eg-shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding-bottom: 40px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: .01em;
}
.eg-shell h1,
.eg-shell h2,
.eg-shell h3 {
  font-family: inherit;
}

/* Compact top bar — title + count + actions, no big hero card */
.eg-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 4px 0 14px;
}
.eg-topbar-l {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.eg-topbar-l h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #1f2328;
  line-height: 1.2;
}
.eg-topbar-count {
  font-size: 13px;
  font-weight: 500;
  color: #8c939e;
  white-space: nowrap;
}
.eg-topbar-r {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Tool strip — one row: search + filters */
.eg-toolstrip {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.eg-toolstrip-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  width: 100%;
  min-width: 0;
}
.eg-toolstrip-form .eg-search-box {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
  max-width: none;
  margin: 0;
}
.eg-toolstrip-form .eg-search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa3af;
  font-size: 13px;
  pointer-events: none;
}
.eg-toolstrip-form .eg-search-box input {
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 0 12px 0 36px;
  border-radius: 10px;
  background: #f5f6f8;
  border-color: transparent;
  font-size: 13.5px;
}
.eg-toolstrip-form .eg-search-box input:focus {
  background: #fff;
  border-color: #c7d2fe;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}
.eg-toolstrip-form select {
  box-sizing: border-box;
  width: auto;
  min-width: 118px;
  max-width: 180px;
  height: 38px;
  margin: 0;
  padding: 0 30px 0 12px;
  flex: 0 0 auto;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 16px,
    calc(100% - 9px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.eg-toolstrip-form > .btn,
.eg-toolstrip-form > button {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: auto;
  height: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

/* Batch line — single row, only meaningful when something is checked */
.eg-batchline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #e3e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.eg-batchline-check {
  margin: 0 !important;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
}
.eg-batchline-sep {
  flex: 1;
  min-width: 8px;
}
.eg-batchline-input {
  box-sizing: border-box;
  flex: 1 1 200px;
  max-width: 280px;
  height: 36px;
  margin: 0;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
}
.eg-batchline-select {
  box-sizing: border-box;
  flex: 0 1 160px;
  min-width: 130px;
  max-width: 220px;
  height: 36px;
  margin: 0;
  padding: 0 30px 0 12px;
  border-radius: 10px;
  font-size: 13px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 15px,
    calc(100% - 9px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.eg-batchline .btn,
.eg-batchline > button {
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
  box-shadow: none;
  transform: none;
  border-radius: 10px;
}
.eg-batchline .btn:hover,
.eg-batchline > button:hover {
  transform: none;
}
.eg-batchline > button[disabled] {
  opacity: .45;
  pointer-events: none;
}

.eg-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.eg-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.3;
}
.eg-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.eg-badge-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.eg-badge-off {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.eg-mono-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: #64748b;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 600;
}
.eg-meta-item {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* Content library — Facebook-style post cards */
.eg-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  align-items: start;
}
.eg-post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e4e7eb;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.eg-post-card:hover {
  border-color: #ccd2d9;
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .12);
}
.eg-post-card.is-selected {
  border-color: #1877f2;
  box-shadow: 0 0 0 2px rgba(24, 119, 242, .22);
}

/* header — avatar + name + time + checkbox */
.eg-fb-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 6px;
}
.eg-fb-avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #5b5fef;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.eg-fb-head-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.eg-fb-page {
  font-size: 14px;
  font-weight: 600;
  color: #050505;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eg-fb-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #8c939e;
  font-variant-numeric: tabular-nums;
}
.eg-card-check {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 8px;
  cursor: pointer;
}
.eg-card-check:hover { background: #f0f2f5; }
.eg-card-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: #1877f2;
}

/* post body text — no title, FB-style */
.eg-fb-text {
  margin: 5px 14px 0;
  font-size: 14px;
  line-height: 1.55;
  color: #1f2328;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* media — edge-to-edge, FB feed style */
.eg-fb-media {
  position: relative;
  display: block;
  margin-top: 10px;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #e4e6eb;
  overflow: hidden;
  text-decoration: none;
}
.eg-fb-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.eg-fb-media-ph {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #98a0a8;
  background: linear-gradient(160deg, #f2f4f7, #e4e6eb);
}
.eg-fb-media-ph i { font-size: 24px; }
.eg-fb-media-ph span { font-size: 12px; font-weight: 600; }
.eg-fb-multi {
  position: absolute;
  right: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* engagement — one compact pill row: icon + count, click opens source */
.eg-engage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 2px 14px 6px;
}
.eg-engage-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f0f2f5;
  color: #57606f;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.eg-engage-item i {
  font-size: 11.5px;
  color: #98a0a8;
  transition: color .15s;
}
.eg-engage-item span {
  font-variant-numeric: tabular-nums;
}
.eg-engage-item:hover {
  background: #e7f0fe;
  color: #1877f2;
}
.eg-engage-item:hover i { color: #1877f2; }
.eg-engage-item[aria-disabled="true"] {
  pointer-events: none;
  opacity: .55;
}

/* footer — tags + tools */
.eg-fb-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  padding: 10px 14px 12px;
}
.eg-fb-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.eg-fb-tools form { margin: 0; }
.eg-fb-tools .btn.sm {
  height: 28px;
  min-height: 28px;
  padding: 0 9px;
  font-size: 11.5px;
  box-shadow: none;
  border-radius: 8px;
}
.eg-fb-tools .btn.sm:hover { transform: none; }
.eg-tag {
  font-size: 11px;
  padding: 2px 8px;
  color: #57606f;
  background: #f0f2f5;
}

/* Page list — card grid */
.eg-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.eg-page-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.eg-page-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 8px 24px -16px rgba(79, 70, 229, .28);
}
.eg-page-card.is-off {
  opacity: .78;
  background: linear-gradient(180deg, #fff, #fafafa);
}
.eg-page-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.eg-page-card-title {
  flex: 1;
  min-width: 0;
}
.eg-page-card-title h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 780;
  line-height: 1.35;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eg-page-card-url {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  color: #4f46e5;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eg-page-card-url i {
  margin-right: 6px;
  color: #94a3b8;
  font-size: 11px;
}
.eg-page-card-url:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}
.eg-page-card-notes {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.eg-page-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.eg-page-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.eg-page-card-foot form { margin: 0; }

.eg-td-check {
  width: 36px;
  text-align: center;
  vertical-align: middle;
}
.eg-td-check input {
  width: 15px;
  height: 15px;
  margin: 0;
}
.eg-td-name-inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.eg-td-name-inner > div {
  min-width: 0;
}
.eg-td-name-inner strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}
.eg-avatar.sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 14px;
}
.eg-td-notes-inline {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
.eg-table .eg-td-url {
  max-width: 280px;
}
.eg-table .eg-td-tags {
  max-width: 180px;
}

.eg-cta {
  font-weight: 700 !important;
  box-shadow: 0 8px 20px -10px rgba(79, 70, 229, .65);
}
.eg-cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 55%, #fff 100%);
  border: 1px solid #c7d2fe;
}
.eg-cta-banner strong {
  display: block;
  font-size: 15px;
  color: #312e81;
  margin-bottom: 2px;
}
.eg-cta-banner span {
  font-size: 13px;
  color: #6366f1;
}
.eg-panel {
  margin: 0 0 18px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}
.eg-panel-hd {
  margin-bottom: 14px;
}
.eg-panel-hd h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
}
.eg-panel-hd p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.eg-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.eg-form-compact { margin-top: 10px; }
.eg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.eg-field > span {
  font-size: 12px;
  font-weight: 650;
  color: #475569;
}
.eg-field > span em {
  color: #dc2626;
  font-style: normal;
}
.eg-field input,
.eg-field select,
.eg-field textarea {
  width: 100%;
  margin: 0;
}
.eg-field-wide { grid-column: 1 / -1; }
.eg-field textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.5;
}
.eg-form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 4px;
}
.eg-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  grid-column: 1 / -1;
}
@media (max-width: 720px) {
  .eg-form { grid-template-columns: 1fr; }
}

.eg-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 0 0 14px;
}
.eg-search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.eg-search-main {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.eg-search-main i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}
.eg-search-main input {
  width: 100%;
  padding-left: 34px;
}
.eg-search select { min-width: 120px; }
.eg-count {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.eg-page-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.eg-page-item {
  padding: 16px 16px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.eg-page-item.is-off { opacity: .72; }
.eg-page-item-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}
.eg-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}
.eg-page-item-id { flex: 1; min-width: 160px; }
.eg-page-name {
  font-size: 16px;
  font-weight: 750;
  color: #0f172a;
  line-height: 1.3;
}
.eg-page-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.eg-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11.5px;
  font-weight: 650;
}
.eg-chip.is-tag {
  background: #eef2ff;
  color: #4338ca;
}
.eg-chip.is-off {
  background: #fef2f2;
  color: #b91c1c;
}
.eg-page-item-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}
.eg-page-notes {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: #334155;
  line-height: 1.45;
}
.eg-page-url {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eg-edit {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.eg-edit > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  color: #4f46e5;
  list-style: none;
}
.eg-edit > summary::-webkit-details-marker { display: none; }
.eg-edit[open] > summary { margin-bottom: 8px; }
.eg-edit form + form { margin-top: 8px; }

.eg-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.eg-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.eg-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.eg-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #e2e8f0;
  overflow: hidden;
}
.eg-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.eg-card-ph {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #64748b;
  background: linear-gradient(160deg, #f8fafc, #e2e8f0);
}
.eg-card-ph i { font-size: 26px; opacity: .7; }
.eg-card-ph span { font-size: 12px; font-weight: 650; }
.eg-card-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .75);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.eg-card-body {
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.eg-card-body h3 {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.35;
  font-weight: 750;
}
.eg-card-body h3 a {
  color: inherit;
  text-decoration: none;
}
.eg-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.eg-eng {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  font-size: 12px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.eg-eng span {
  white-space: nowrap;
}
.eg-card-time {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.eg-card-text {
  margin: 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.eg-card-ft {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.eg-card-ft form { margin: 0; }

.eg-empty {
  margin-top: 8px;
  padding: 56px 20px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.eg-empty-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  font-size: 24px;
  box-shadow: 0 10px 24px -14px rgba(79, 70, 229, .5);
}
.eg-empty h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}
.eg-empty p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.eg-edit-panel { max-width: 820px; }
.eg-images-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.eg-keep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}
.eg-keep-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #475569;
}
.eg-keep-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
}
.eg-upload {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 120px;
  padding: 20px;
  border: 1.5px dashed #a5b4fc;
  border-radius: 14px;
  background: #f8fafc;
  color: #4338ca;
  text-align: center;
  cursor: pointer;
}
.eg-upload:hover { background: #eef2ff; }
.eg-upload i { font-size: 22px; }
.eg-upload strong { font-size: 14px; }
.eg-upload span { font-size: 12px; color: #64748b; font-weight: 500; }
.eg-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.eg-edit-actions { margin-top: 16px; }

.eg-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.eg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.eg-table th,
.eg-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.eg-table th {
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  white-space: nowrap;
}
.eg-table tbody tr:last-child td { border-bottom: 0; }
.eg-table tbody tr:hover td { background: #fafbff; }
.eg-table tr.is-off { opacity: .65; }
.eg-td-name { font-weight: 700; color: #0f172a; min-width: 180px; }
.eg-td-url {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
}
.eg-td-url a { color: #4f46e5; }
.eg-td-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 160px;
}
.eg-td-notes {
  max-width: 200px;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eg-row-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.eg-row-acts form { margin: 0; }
.eg-chip.is-ok {
  background: #ecfdf5;
  color: #047857;
}

.eg-dialog {
  border: 0;
  padding: 0;
  border-radius: 18px;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, .35);
  background: #fff;
}
.eg-dialog.eg-dialog-lg {
  width: min(640px, calc(100vw - 32px));
}
.wf-dict-dialog {
  width: min(720px, calc(100vw - 24px));
}
.wf-dict-body {
  padding: 14px 18px 18px;
  overflow: auto;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.wf-dict-lede {
  margin: 0;
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.5;
}
.wf-dict-section {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px 14px;
  background: #f8fafc;
}
.wf-dict-section-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.wf-dict-section-hd h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}
.wf-dict-section-hd .muted {
  margin: 2px 0 0;
  font-size: 12px;
}
.wf-dict-section .table-wrap {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.wf-dict-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.wf-import-dialog {
  width: min(560px, calc(100vw - 24px));
}
.wf-import-body {
  padding: 14px 18px 18px;
}
.wf-import-body .wf-dict-lede {
  margin-bottom: 12px;
}
.wf-import-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.wf-import-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #334155;
  cursor: pointer;
  font-size: 13px;
  background: #f8fafc;
  transition: border-color .15s, background .15s, color .15s;
}
.wf-import-file:hover {
  border-color: #6366f1;
  color: #4f46e5;
  background: #eef2ff;
}
.wf-import-file input[type="file"] {
  display: none;
}
.wf-import-or {
  color: #94a3b8;
  font-size: 12.5px;
}
.wf-import-payload {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: #0f172a;
  background: #f8fafc;
  box-sizing: border-box;
  outline: none;
}
.wf-import-payload:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
.wf-import-hint {
  font-size: 12px;
  color: #64748b;
}
.eg-hub-btn.sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}
.eg-dialog::backdrop {
  background: rgba(15, 23, 42, .45);
}
.eg-dialog-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
}
.eg-dialog-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.eg-dialog-hd h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 750;
}
.eg-dialog-form .eg-form {
  padding: 14px 18px;
  overflow: auto;
}
.eg-dialog-ft {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
  border-radius: 0 0 18px 18px;
}
.eg-steps {
  margin: 0;
  padding-left: 1.25rem;
  color: #334155;
  font-size: 14px;
  line-height: 1.7;
}
.eg-steps li { margin: 4px 0; }
.eg-bookmark-drag {
  display: inline-flex !important;
  cursor: grab;
  user-select: none;
}
.eg-page kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 12px;
  font-family: var(--mono);
}

@media (max-width: 900px) {
  .eg-topbar-r .btn {
    flex: 1 1 auto;
  }
  .eg-toolstrip-form select {
    flex: 1 1 calc(50% - 6px);
    max-width: none;
  }
  .eg-batchline .eg-batchline-input {
    flex: 1 1 100%;
    max-width: none;
  }
  .eg-batchline .eg-batchline-select {
    flex: 1 1 calc(50% - 6px);
    max-width: none;
  }
}
@media (max-width: 640px) {
  .eg-masonry {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .eg-batchline .btn {
    flex: 1 1 auto;
  }
  .eg-pages-grid {
    grid-template-columns: 1fr;
  }
}

/* —— Content Hub (clean_content_hub style) —— */
.main:has(.eg-hub) {
  padding: 0;
  background: #f8fafc;
}

.eg-hub {
  font-family: "Plus Jakarta Sans", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.eg-hub-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  height: 64px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.eg-hub-header-l {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.eg-hub-header-l h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #0f172a;
}
.eg-hub-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #6d28d9;
  background: #f5f3ff;
  border: 1px solid rgba(196, 181, 253, .8);
  white-space: nowrap;
}
.eg-hub-header-r {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.eg-hub-tabs {
  display: flex;
  gap: 4px;
  padding: 0 4px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  margin: 0 0 4px;
}
.eg-hub-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px 12px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom: none;
}
.eg-hub-tab:hover { color: #0f172a; background: rgba(15, 23, 42, .04); }
.eg-hub-tab.is-active {
  color: #0f172a;
  background: #fff;
  border-color: rgba(15, 23, 42, .08);
  box-shadow: 0 -1px 0 #fff;
}
.eg-hub-tab-n {
  display: inline-flex;
  min-width: 1.5em;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}
.eg-hub-tab.is-active .eg-hub-tab-n {
  background: #ecfdf5;
  color: #047857;
}
.eg-pending-fbid {
  font-size: 12px;
  margin: 0 0 8px;
}
.eg-pending-fbid code {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11px;
  color: #64748b;
}
.eg-pending-go {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(4px);
}
.eg-pending-card .eg-hub-media { position: relative; }

.eg-hub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, box-shadow .15s, transform .15s;
  box-shadow: none;
  transform: none;
}
.eg-hub-btn i { font-size: 11px; }
.eg-hub-btn-ghost {
  color: #475569;
  background: #f1f5f9;
}
.eg-hub-btn-ghost:hover {
  background: #e2e8f0;
  color: #334155;
  transform: none;
}
.eg-hub-btn-primary {
  color: #fff;
  background: #7c3aed;
  box-shadow: 0 1px 2px rgba(124, 58, 237, .25);
}
.eg-hub-btn-primary:hover {
  background: #6d28d9;
  transform: none;
}
.eg-hub-btn-dark {
  color: #fff;
  background: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .15);
}
.eg-hub-btn-dark:hover {
  background: #1e293b;
  transform: none;
}
.eg-hub-btn-danger {
  color: #e11d48;
  background: #fff1f2;
  border: 1px solid rgba(254, 205, 211, .8);
}
.eg-hub-btn-danger:hover:not(:disabled) {
  background: #ffe4e6;
  transform: none;
}
.eg-hub-btn:disabled,
.eg-hub-input-btn:disabled {
  opacity: .45;
  pointer-events: none;
  cursor: not-allowed;
}

.eg-hub-main {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.eg-hub-main .flash {
  margin: 0;
}

.eg-hub-filter {
  padding: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.eg-hub-filter-chips {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.eg-hub-filter-chips-label {
  flex: 0 0 36px;
  padding-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #94a3b8;
  text-transform: uppercase;
}
.eg-hub-filter-chips-inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  row-gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}
.eg-hub-filter-row-primary {
  margin-top: 2px;
}
.eg-hub-filter-row-tags {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.eg-hub-filter-row-tags .eg-hub-filter-chips-label {
  flex: 0 0 auto;
  padding-top: 0;
}
.eg-hub-filter-row-tags .filter-chips {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.eg-hub-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding-right: 14px;
  margin-right: 14px;
  border-right: 1px solid #e2e8f0;
}
.eg-hub-filter-group:last-child {
  padding-right: 0;
  margin-right: 0;
  border-right: none;
}
.eg-hub-filter-group-lang .filter-chips {
  flex-wrap: nowrap;
}
.eg-hub-filter-sync {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
}
.eg-hub-filter-sync-btn {
  white-space: nowrap;
  font-size: 12px;
  padding: 6px 10px;
}
.eg-hub-filter-chips-inline .eg-hub-filter-chips-label {
  flex: 0 0 auto;
  padding-top: 0;
  white-space: nowrap;
}
.eg-hub-filter-chips-inline .filter-chips {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  gap: 6px;
}
.eg-hub-filter-chips .filter-chips {
  flex: 1;
  min-width: 0;
}
.eg-hub-batch.eg-hub-batch-pages {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 10px 12px;
  grid-template-columns: none;
}
.eg-hub-batch.eg-hub-batch-pages .eg-hub-batch-l {
  flex: 0 0 auto;
  white-space: nowrap;
}
.eg-hub-batch.eg-hub-batch-pages .eg-hub-batch-mid {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.eg-hub-batch.eg-hub-batch-pages .eg-hub-batch-mid .eg-hub-input-group,
.eg-hub-batch.eg-hub-batch-pages .eg-hub-batch-mid .eg-hub-btn,
.eg-hub-batch.eg-hub-batch-pages .eg-hub-batch-mid .eg-hub-batch-sep {
  flex: 0 0 auto;
}
.eg-hub-batch.eg-hub-batch-pages .eg-hub-input-group input {
  width: 72px;
  padding: 0 8px;
}
.eg-hub-batch.eg-hub-batch-pages .eg-hub-input-group select {
  width: 88px;
  padding: 0 22px 0 8px;
}
.eg-hub-batch.eg-hub-batch-pages .eg-hub-input-btn {
  padding: 0 8px;
  white-space: nowrap;
}
.eg-hub-batch.eg-hub-batch-pages .eg-hub-batch-r {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}

.eg-pl-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  min-width: 0;
}
.eg-pl-th-sort:hover {
  color: #475569;
}
.eg-pl-th-sort.is-active {
  color: #7c3aed;
}
.eg-pl-th-sort i {
  font-size: 9px;
  opacity: .85;
}
.eg-hub-active-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #64748b;
}

/* Content library: filtered page banner (compact single row) */
.eg-fp {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  padding: 8px 10px;
  overflow: visible;
  transition: background .35s ease, box-shadow .2s;
}
.eg-fp.is-off { opacity: .78; }
.eg-fp.is-saved {
  background: #f5f3ff;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, .18);
}
.eg-fp-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 1 200px;
}
.eg-fp-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  background: #e2e8f0;
}
.eg-fp-avatar-letter {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #7c3aed, #4f46e5);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.eg-fp-meta { min-width: 0; }
.eg-fp-name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eg-fp-pill {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 650;
  background: #f1f5f9;
  color: #64748b;
}
.eg-fp-pill.is-off { background: #fef2f2; color: #b91c1c; }
.eg-fp-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 1px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.2;
}
.eg-fp-acts {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.eg-fp-acts .eg-fp-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  justify-content: center;
}
.eg-fp-fields {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}
.eg-fp-input {
  box-sizing: border-box;
  width: 88px;
  height: 26px;
  margin: 0;
  padding: 0 7px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
  font: inherit;
  font-size: 11px;
  color: #334155;
}
.eg-fp-input.eg-fp-notes {
  width: 120px;
  flex: 1 1 100px;
  min-width: 72px;
  max-width: 200px;
}
.eg-fp-input:hover { background: #fff; }
.eg-fp-input:focus {
  outline: none;
  border-color: #8b5cf6;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, .12);
}
.eg-fp .eg-pl-lang {
  height: 24px;
  font-size: 11px;
  padding: 0 8px;
}
.eg-fp .eg-pl-lang-wrap { z-index: 2; flex-shrink: 0; }
.eg-fp.is-pop-open { z-index: 30; position: relative; }
.eg-hub-pager-top {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 10px;
  padding-bottom: 10px;
}
.eg-hub-btn.is-disabled {
  opacity: .38;
  pointer-events: none;
}
@media (max-width: 960px) {
  .eg-fp {
    flex-wrap: wrap;
  }
  .eg-fp-identity { flex: 1 1 160px; }
  .eg-fp-fields {
    flex: 1 1 100%;
    order: 3;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .eg-fp-acts { margin-left: 0; }
}
.eg-hub-active-tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f5f3ff;
  color: #6d28d9;
  font-size: 12px;
  font-weight: 600;
}
.eg-hub-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.eg-hub-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 120px;
  margin: 0;
}
.eg-hub-filter-select {
  box-sizing: border-box;
  width: auto !important;
  min-width: 0;
  height: 36px;
  margin: 0;
  padding: 0 28px 0 12px !important;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  appearance: none;
  cursor: pointer;
}
.eg-hub-filter-select:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .15);
}
.eg-hub-filter-submit {
  white-space: nowrap;
  flex: 0 0 auto;
  height: 36px;
  padding: 0 14px;
}
.eg-hub-ps-custom {
  box-sizing: border-box;
  width: 88px !important;
  height: 36px;
  margin: 0;
  padding: 0 10px !important;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.eg-hub-ps-custom:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .15);
}
.eg-hub-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}
.eg-hub-search input {
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 14px 0 38px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  font-family: inherit;
  font-size: 12px;
  color: #1e293b;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.eg-hub-search input::placeholder { color: #94a3b8; }
.eg-hub-search input:focus {
  outline: none;
  border-color: #8b5cf6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .15);
}

.eg-hub-batch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  font-size: 12px;
}
.eg-hub-batch-mid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}
.eg-hub-sort-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin-right: 2px;
  white-space: nowrap;
}
.eg-hub-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.eg-hub-sort-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}
.eg-hub-sort-btn.is-active {
  color: #7c3aed;
  background: #f5f3ff;
  border-color: #c4b5fd;
}
.eg-hub-sort-btn i:first-child { font-size: 11px; }
.eg-hub-sort-arrow { font-size: 9px; opacity: .85; }
.eg-hub-sort-btn.is-active.is-desc .eg-hub-sort-arrow,
.eg-hub-sort-btn.is-active.is-desc > .fa-arrow-down { color: #7c3aed; }
.eg-hub-sort-btn.is-active.is-asc .eg-hub-sort-arrow,
.eg-hub-sort-btn.is-active.is-asc > .fa-arrow-up { color: #7c3aed; }
.eg-hub-batch-l {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.eg-hub-checkall {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
}
.eg-hub-checkall input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #7c3aed;
  cursor: pointer;
}
.eg-hub-sel-badge {
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.eg-hub-sel-badge strong {
  color: #7c3aed;
  font-weight: 700;
}
.eg-hub-batch-r {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.eg-hub-input-group select {
  width: auto !important;
  min-width: 130px;
  max-width: 180px;
}
.eg-hub-batch-sep {
  width: 1px;
  height: 14px;
  background: #e2e8f0;
  flex-shrink: 0;
}
.eg-hub-input-group {
  display: flex;
  align-items: stretch;
}
.eg-hub-input-group input,
.eg-hub-input-group select {
  box-sizing: border-box;
  height: 32px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-right: none;
  border-radius: 12px 0 0 12px;
  background: #f8fafc;
  font-family: inherit;
  font-size: 12px;
  color: #334155;
  min-width: 0;
}
.eg-hub-input-group input { width: 160px; }
.eg-hub-input-group select {
  width: 150px;
  padding-right: 24px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-color: #f8fafc;
  cursor: pointer;
}
.eg-hub-input-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 0 12px 12px 0;
  background: #f1f5f9;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: background .15s;
  box-shadow: none;
  transform: none;
}
.eg-hub-input-btn:hover:not(:disabled) {
  background: #e2e8f0;
  transform: none;
}

.eg-hub-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.eg-hub-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: box-shadow .2s, border-color .2s;
}
.eg-hub-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 10px 24px -12px rgba(124, 58, 237, .25);
}
.eg-hub-card.is-selected {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, .22);
}

.eg-hub-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 8px;
  border-bottom: 1px solid #f8fafc;
}
.eg-hub-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.eg-hub-avatar {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #4f46e5;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(79, 70, 229, .25);
}
.eg-hub-card-id { min-width: 0; }
.eg-hub-page {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .15s;
}
.eg-hub-page-filter {
  display: block;
  text-decoration: none;
  color: #1e293b;
  cursor: pointer;
}
.eg-hub-page-filter:hover,
.eg-hub-card:hover .eg-hub-page-filter {
  color: #7c3aed;
  text-decoration: underline;
}
.eg-hub-page-filter.is-active {
  color: #7c3aed;
}
.eg-hub-card:hover .eg-hub-page { color: #7c3aed; }
.eg-hub-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 10px;
}
.eg-hub-card-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: #6d28d9;
  background: #f5f3ff;
  border: 1px solid rgba(196, 181, 253, .75);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eg-hub-card-genre {
  color: #0f766e;
  background: #f0fdfa;
  border-color: rgba(45, 212, 191, .55);
  text-decoration: none;
  max-width: 100%;
}
.eg-hub-card-genre:hover {
  background: #ccfbf1;
  border-color: #2dd4bf;
}
.eg-hub-card-genre.is-active {
  color: #fff;
  background: #0f766e;
  border-color: #0f766e;
}
.eg-hub-filter-genre {
  min-width: 11rem;
  max-width: 16rem;
}
.eg-hub-genre-toolbar {
  margin: 0;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.eg-hub-genre-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.eg-lg-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.eg-lg-title i { color: #2563eb; }
.eg-lg-sub {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}
.eg-hub-genre-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.eg-hub-btn-danger {
  background: #fff;
  border: 1px solid #fca5a5;
  color: #dc2626;
}
.eg-hub-btn-danger:hover { background: #fef2f2; color: #b91c1c; }
.eg-lg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
}
@media (max-width: 900px) {
  .eg-lg-grid { grid-template-columns: 1fr; }
}
.eg-lg-item {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) 40% 3.2rem 3.4rem;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: #0f172a;
  cursor: pointer;
  transition: background 0.12s;
}
.eg-lg-item:hover { background: #f1f5f9; }
.eg-lg-rank { width: 1.4rem; }
.eg-lg-name {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eg-lg-bar {
  display: inline-block;
  height: 8px;
  border-radius: 6px;
  background: #eef2f7;
  overflow: hidden;
}
.eg-lg-bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.eg-lg-n {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  text-align: right;
}
.eg-lg-pct {
  font-size: 11px;
  color: #94a3b8;
  text-align: right;
}
.eg-lg-item-none .eg-lg-bar i { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }
.eg-lg-item-none .eg-lg-name { color: #64748b; }
.eg-lg-item-all .eg-lg-bar i { background: linear-gradient(90deg, #10b981, #34d399); }
.eg-lg-item.is-active {
  background: #f5f3ff;
  box-shadow: inset 0 0 0 1px #c4b5fd;
}
.eg-lg-item.is-active .eg-lg-name { color: #5b21b6; }
.eg-lg-item.is-active .eg-lg-n { color: #5b21b6; }
.eg-lg-item.is-active .eg-lg-pct { color: #8b5cf6; }
.eg-lg-item.is-active .eg-lg-bar i { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

/* One-click classify modal */
.eg-lg-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 3500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.44);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.eg-lg-modal-mask.is-open { opacity: 1; pointer-events: auto; }
.eg-lg-modal {
  width: min(520px, calc(100vw - 32px));
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
  padding: 20px 22px 18px;
  transform: translateY(8px);
  transition: transform 0.15s;
}
.eg-lg-modal-mask.is-open .eg-lg-modal { transform: none; }
.eg-lg-modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}
.eg-lg-modal-x {
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
}
.eg-lg-modal-x:hover { color: #0f172a; }
.eg-lg-modal-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 16px;
}
.eg-lg-field { margin-bottom: 16px; }
.eg-lg-field > label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}
.eg-lg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.eg-lg-chips button {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s;
}
.eg-lg-chips button:hover { border-color: #93c5fd; color: #2563eb; }
.eg-lg-chips button.is-on {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.eg-lg-custom-range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.eg-lg-custom-range input {
  width: 90px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
}
.eg-lg-custom-range span { color: #94a3b8; }
.eg-lg-mini {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}
.eg-lg-mini:hover { border-color: #93c5fd; color: #2563eb; }
.eg-lg-estimate {
  padding: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
  color: #475569;
  margin-bottom: 16px;
}
.eg-lg-estimate b { color: #2563eb; }
.eg-lg-modal-ft {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
/* Data-analysis card (independent, sibling of filter/search cards) */
.eg-metric-card {
  padding: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.eg-metric-card-hd {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}
.eg-metric-card-hd h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eg-metric-card-hd h2 i { color: #8b5cf6; }
.eg-metric-card-sub {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
}
.eg-hub-metric-form {
  margin: 0;
}
.eg-hub-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.eg-hub-metric-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  min-height: 36px;
  padding: 12px;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  background: #fbfcfe;
}
.eg-hub-metric-name { grid-column: 1; grid-row: 1; white-space: nowrap; }
.eg-hub-metric-range { grid-column: 3; grid-row: 1; justify-self: end; white-space: nowrap; }
.eg-hub-metric-opts { grid-column: 2; grid-row: 1; }
.eg-hub-metric-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}
.eg-hub-metric-name i {
  color: #8b5cf6;
  font-size: 12px;
}
.eg-hub-metric-opts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.eg-hub-metric-opts .filter-chip {
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
}
.eg-hub-metric-opts .filter-chip.active {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #c4b5fd;
}
.eg-hub-metric-range {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px;
  background: #eef2f7;
  border-radius: 8px;
  white-space: nowrap;
}
.eg-hub-metric-min,
.eg-hub-metric-max {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.eg-hub-metric-sep {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 0 2px;
}
.eg-hub-metric-num {
  box-sizing: border-box;
  display: inline-block;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 22px !important;
  margin: 0 !important;
  padding: 0 4px !important;
  border: none !important;
  border-radius: 5px !important;
  background: #fff !important;
  font-family: inherit;
  font-size: 11.5px !important;
  font-weight: 600;
  color: #0f172a;
  box-shadow: none !important;
  vertical-align: middle;
  text-align: center;
}
.eg-hub-metric-num:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, .35) !important;
  background: #fff !important;
}
.eg-hub-metric-foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.eg-hub-metric-apply {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.eg-hub-metric-reset {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .eg-hub-metric-grid { grid-template-columns: 1fr; }
  .eg-hub-metric-row {
    grid-template-columns: 1fr;
    row-gap: 6px;
  }
  .eg-hub-metric-range { justify-self: start; }
  .eg-hub-metric-opts { flex-wrap: wrap; }
}
.eg-hub-card-tag-more {
  color: #64748b;
  background: #f8fafc;
  border-color: #e2e8f0;
}
.eg-hub-active-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
}
.eg-hub-time {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.eg-hub-time-sub {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.eg-hub-card-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.eg-hub-card-acts form { margin: 0; }
.eg-hub-icon-btn {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: color .15s, background .15s;
  box-shadow: none;
  transform: none;
}
.eg-hub-icon-btn:hover {
  color: #e11d48;
  background: #fff1f2;
  transform: none;
}
.eg-hub-icon-btn i { font-size: 12px; }
.eg-hub-card-check {
  display: flex;
  margin: 0;
  cursor: pointer;
}
.eg-hub-card-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #7c3aed;
  cursor: pointer;
}

.eg-hub-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 8px 12px 12px;
}
.eg-hub-text {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.625;
  color: #334155;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.eg-hub-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  margin-bottom: 8px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #f1f5f9;
  text-decoration: none;
}
.eg-hub-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.eg-hub-card:hover .eg-hub-media img {
  transform: scale(1.05);
}
.eg-hub-media-ph {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, #f8fafc, rgba(241, 245, 249, .8));
  border: 1px dashed #e2e8f0;
  transition: background .2s, border-color .2s;
}
.eg-hub-card:hover .eg-hub-media-ph {
  background: rgba(245, 243, 255, .35);
  border-color: #ddd6fe;
}
.eg-hub-media-ph-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #94a3b8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
  transition: color .2s;
}
.eg-hub-card:hover .eg-hub-media-ph-icon { color: #7c3aed; }
.eg-hub-media-ph-icon i { font-size: 14px; }
.eg-hub-media-ph-title {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}
.eg-hub-media-ph-sub {
  font-size: 9px;
  color: #94a3b8;
}
.eg-hub-multi {
  position: absolute;
  right: 8px;
  top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.eg-hub-card-foot {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 10px 12px;
  background: rgba(248, 250, 252, .7);
  border-top: 1px solid #f1f5f9;
  font-size: 11px;
}
.eg-hub-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  white-space: nowrap;
}
.eg-hub-stat-like { justify-self: start; }
.eg-hub-stat-comment { justify-self: center; }
.eg-hub-stat-share { justify-self: end; }
.eg-hub-stat i { font-size: 11px; }
.eg-hub-stat-like i { color: #3b82f6; }
.eg-hub-stat-comment i { color: #10b981; }
.eg-hub-stat-share i { color: #f59e0b; }

.eg-hub-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 24px;
  text-align: center;
  background: #fff;
  border: 1px dashed #e2e8f0;
  border-radius: 16px;
}
.eg-hub-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #f5f3ff;
  color: #7c3aed;
  font-size: 22px;
}
.eg-hub-empty h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.eg-hub-empty p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.eg-hub-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  margin-top: 20px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}
.eg-hub-pager-info {
  font-size: 13px;
  color: #64748b;
}
.eg-hub-pager-info strong {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.eg-hub-ps-chips {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}
.eg-hub-ps-chips-unit {
  font-size: 12px;
  color: #94a3b8;
  margin-left: 2px;
  white-space: nowrap;
}

@media (max-width: 1536px) {
  .eg-hub-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1280px) {
  .eg-hub-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .eg-hub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .eg-hub-filter-form {
    flex-wrap: wrap;
  }
  .eg-hub-search {
    flex: 1 1 100%;
  }
  .eg-hub-batch:not(.eg-hub-batch-pages) {
    grid-template-columns: 1fr;
  }
  .eg-hub-batch-mid { justify-content: flex-start; }
  .eg-hub-batch-r { justify-content: flex-start; }
  .eg-hub-batch-sep { display: none; }
}
@media (max-width: 768px) {
  .eg-hub-header {
    height: auto;
    min-height: 64px;
    padding: 12px 16px;
  }
  .eg-hub-main { padding: 16px; }
  .eg-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eg-hub-filter-form {
    flex-wrap: wrap;
  }
  .eg-hub-filter-select { width: 100% !important; }
  .eg-hub-input-group { flex: 1; min-width: 0; }
  .eg-hub-input-group input { flex: 1; width: auto; }
  .eg-hub-input-group select { flex: 1; width: auto; }
}
@media (max-width: 480px) {
  .eg-hub-grid { grid-template-columns: 1fr; }
  .eg-hub-header-r { width: 100%; }
  .eg-hub-header-r .eg-hub-btn { flex: 1; }
}

/* ── Eagle content detail (eg-hub) ── */
.eg-hub-detail {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.eg-hub-detail-preview {
  position: sticky;
  top: 16px;
}
.eg-hub-detail-card {
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
}
.eg-hub-detail-card .eg-hub-avatar-link,
.eg-hub-detail-card .eg-hub-page-link,
.eg-hub-detail-card .eg-fb-post-text,
.eg-hub-detail-card .eg-fb-see-more {
  pointer-events: auto;
}
.eg-hub-avatar-link {
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.eg-hub-avatar-link:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #7c3aed;
}
.eg-hub-page-link {
  display: block;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eg-hub-page-link:hover {
  color: #7c3aed;
  text-decoration: underline;
}
.eg-hub-detail-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.eg-hub-detail-open-btn {
  flex: 1;
  justify-content: center;
  min-width: 0;
}
.eg-hub-detail-card-body {
  padding-top: 4px;
}
.eg-fb-post-text {
  position: relative;
  margin: 0 0 10px;
  pointer-events: auto;
}
.eg-fb-post-text-clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.eg-fb-post-text.is-expanded .eg-fb-post-text-clamp {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.eg-fb-post-text-inner {
  margin: 0;
  font-size: 14px;
  line-height: 1.3333;
  color: #050505;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.eg-fb-see-more {
  display: inline-block;
  margin: 4px 0 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3333;
  color: #65676b;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}
.eg-fb-see-more:hover {
  text-decoration: underline;
  color: #050505;
  background: transparent;
  transform: none;
}
.eg-fb-see-more[hidden] {
  display: none;
}
.eg-hub-detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.eg-hub-detail-media {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #f1f5f9;
}
.eg-hub-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.eg-hub-detail-media-ph {
  pointer-events: none;
}
.eg-hub-detail-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.eg-hub-detail-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.eg-hub-detail-panel-hd {
  margin-bottom: 14px;
}
.eg-hub-detail-panel-hd h2 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eg-hub-detail-panel-hd h2 i {
  font-size: 12px;
  color: #7c3aed;
}
.eg-hub-detail-panel-hd p {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}
.eg-hub-detail-muted {
  margin: 0 0 12px;
  font-size: 12px;
  color: #94a3b8;
}
.eg-hub-detail-tag-form { margin: 0; }
.eg-hub-detail-tag-bar { margin-top: 4px; }
.eg-hub-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.eg-hub-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #6d28d9;
  background: #f5f3ff;
  border: 1px solid rgba(196, 181, 253, .8);
}
.eg-hub-tag-rm-form { margin: 0; display: inline; }
.eg-hub-tag-rm {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #a78bfa;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}
.eg-hub-tag-rm:hover {
  color: #7c3aed;
  background: rgba(124, 58, 237, .12);
  transform: none;
}
.eg-hub-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.eg-hub-detail-fields-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.eg-hub-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.eg-hub-field-wide {
  grid-column: 1 / -1;
}
.eg-hub-field > span {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: .02em;
}
.eg-hub-field input,
.eg-hub-field select,
.eg-hub-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  color: #0f172a;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.eg-hub-field input:focus,
.eg-hub-field select:focus,
.eg-hub-field textarea:focus {
  outline: none;
  border-color: #c4b5fd;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}
.eg-hub-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}
.eg-hub-detail-advanced summary {
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.eg-hub-detail-advanced summary::-webkit-details-marker { display: none; }
.eg-hub-detail-advanced summary i { font-size: 12px; color: #7c3aed; }
.eg-hub-detail-advanced[open] summary { margin-bottom: 14px; }
.eg-hub-detail-keep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.eg-hub-detail-keep-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  cursor: pointer;
}
.eg-hub-detail-keep-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.eg-hub-detail-keep-item span {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.eg-hub-detail-keep-item input { accent-color: #7c3aed; }
.eg-hub-detail-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 24px 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.eg-hub-detail-upload:hover {
  border-color: #c4b5fd;
  background: #f5f3ff;
}
.eg-hub-detail-upload i {
  font-size: 20px;
  color: #7c3aed;
  margin-bottom: 4px;
}
.eg-hub-detail-upload strong {
  font-size: 13px;
  color: #334155;
}
.eg-hub-detail-upload span {
  font-size: 11px;
  color: #94a3b8;
}
.eg-hub-detail-upload input {
  display: none;
}
.eg-hub-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 8px;
}
.eg-hub-detail-new {
  max-width: 720px;
}
@media (max-width: 1024px) {
  .eg-hub-detail {
    grid-template-columns: 1fr;
  }
  .eg-hub-detail-preview {
    position: static;
  }
  .eg-hub-detail-fields-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .eg-hub-detail-fields,
  .eg-hub-detail-fields-4 {
    grid-template-columns: 1fr;
  }
}

/* ── Eagle pages list — clean table panel ── */
.eg-pl {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  /* visible so inline edit popovers are not clipped after filter/search */
  overflow: visible;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.eg-pl-head,
.eg-pl-row {
  display: grid;
  grid-template-columns: 40px minmax(130px, 1.1fr) 68px 64px 72px 72px 72px minmax(110px, 1fr) minmax(90px, 0.9fr) 44px 84px;
  align-items: center;
  gap: 8px 12px;
  padding: 0 16px;
}
.eg-pl-head {
  height: 40px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 16px 16px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.eg-pl-row {
  position: relative;
  min-height: 64px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  transition: background .12s;
}
.eg-pl-row:last-child {
  border-bottom: none;
  border-radius: 0 0 16px 16px;
}
.eg-pl-row:hover {
  background: #fafbff;
}
.eg-pl-row.is-selected {
  background: #f5f3ff;
}
.eg-pl-row.is-off {
  opacity: .62;
}
.eg-pl-row.is-saved {
  background: #f5f3ff;
  transition: background .35s ease;
}
.eg-pl-row.is-pop-open {
  z-index: 20;
}
.eg-pl-c-check {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}
.eg-pl-c-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #7c3aed;
  cursor: pointer;
}
.eg-pl-c-page {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.eg-pl-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #7c3aed, #4f46e5);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(124, 58, 237, .22);
  object-fit: cover;
}
.eg-pl-avatar-img {
  padding: 0;
  background: #e2e8f0;
  box-shadow: none;
}
.eg-pl-c-fans {
  font-size: 13px;
  font-weight: 650;
  color: #334155;
  font-variant-numeric: tabular-nums;
}
.eg-pl-fans {
  display: inline-block;
}
.eg-pl-meta {
  min-width: 0;
}
.eg-pl-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eg-pl-note,
.eg-pl-notes-input {
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eg-pl-notes-form {
  margin: 0;
  min-width: 0;
}
.eg-pl-notes-input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  cursor: text;
}
.eg-pl-notes-input:hover,
.eg-pl-notes-input:focus {
  outline: none;
  color: #64748b;
  background: transparent;
  box-shadow: none;
}
.eg-pl-notes-input::placeholder {
  color: #cbd5e1;
}
.eg-pl-c-group {
  min-width: 0;
}
.eg-pl-group-input {
  box-sizing: border-box;
  width: 100%;
  height: 26px;
  margin: 0;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  color: #475569;
}
.eg-pl-group-input:hover {
  border-color: #e2e8f0;
  background: #f8fafc;
}
.eg-pl-group-input:focus {
  outline: none;
  border-color: #c4b5fd;
  background: #fff;
}
.eg-pl-c-lang {
  min-width: 0;
  position: relative;
}
.eg-pl-c-region {
  min-width: 0;
  position: relative;
}
.eg-pl-c-importance {
  min-width: 0;
  position: relative;
}
.eg-pl-c-notes {
  min-width: 0;
}
.eg-pl-c-notes .eg-pl-notes-input {
  width: 100%;
}
.eg-pl-importance-btn {
  cursor: pointer;
  border: none;
  font-family: inherit;
  max-width: 100%;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
}
.eg-pl-importance-key { background: #fef2f2; color: #b91c1c; }
.eg-pl-importance-good { background: #ecfdf5; color: #047857; }
.eg-pl-importance-normal { background: #f1f5f9; color: #475569; }
.eg-pl-importance-junk { background: #f8fafc; color: #94a3b8; text-decoration: line-through; }
.eg-pl-importance-none { background: #f8fafc; color: #94a3b8; }
.eg-pl-importance-btn:hover { filter: brightness(0.97); }
.eg-pl-region-btn {
  cursor: pointer;
  border: none;
  font-family: inherit;
  max-width: 100%;
}
.eg-pl-region-btn:hover {
  background: #ede9fe;
  color: #6d28d9;
}
.eg-pl-lang-wrap {
  position: relative;
  display: inline-block;
}
.eg-pl-lang-btn {
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.eg-pl-lang-btn:hover {
  background: #ede9fe;
  color: #6d28d9;
}
.eg-pl-lang-pop {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  min-width: 140px;
  max-height: min(280px, 50vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
}
.eg-pl-lang-pop.is-flip-up {
  top: auto;
  bottom: calc(100% + 4px);
}
.eg-pl-lang-opt-form,
.eg-pl-lang-custom-form {
  margin: 0;
}
.eg-pl-lang-opt {
  display: block;
  width: 100%;
  margin: 0;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.eg-pl-lang-opt:hover {
  background: #f5f3ff;
  color: #6d28d9;
}
.eg-pl-lang-opt.is-active {
  background: #ede9fe;
  color: #6d28d9;
}
.eg-pl-lang-custom-form {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}
.eg-pl-lang-custom {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 11px;
}
.eg-pl-lang-opt-save {
  flex: 0 0 auto;
  width: auto;
  padding: 0 8px;
}
.eg-pl-c-group,
.eg-pl-c-notes {
  min-width: 0;
}
.eg-pl-inline-form {
  margin: 0;
  min-width: 0;
}
.eg-pl-group-input,
.eg-pl-notes-input {
  box-sizing: border-box;
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  color: #475569;
}
.eg-pl-group-input:hover,
.eg-pl-notes-input:hover {
  border-color: #e2e8f0;
  background: #f8fafc;
}
.eg-pl-group-input:focus,
.eg-pl-notes-input:focus {
  outline: none;
  border-color: #8b5cf6;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, .12);
}
.eg-pl-notes-input::placeholder {
  color: #cbd5e1;
}
.eg-pl-lang {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
}
.eg-pl-c-time {
  min-width: 0;
  font-size: 11px;
  line-height: 1.5;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.eg-pl-c-time .eg-pl-time-k {
  color: #94a3b8;
  margin-right: 4px;
}
.eg-pl-c-time .eg-pl-time-val {
  color: #475569;
  font-weight: 600;
}
.eg-pl-c-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.eg-pl-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  padding: 0 4px 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #6d28d9;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
}
.eg-pl-tag-x {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #a78bfa;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}
.eg-pl-tag-x:hover {
  color: #7c3aed;
  background: rgba(124, 58, 237, .1);
  transform: none;
}
.eg-pl-tag-add-btn {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px dashed #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transform: none;
}
.eg-pl-tag-add-btn:hover {
  color: #7c3aed;
  border-color: #c4b5fd;
  background: #f5f3ff;
  transform: none;
}
.eg-pl-tag-input {
  width: 96px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid #c4b5fd;
  border-radius: 999px;
  font: inherit;
  font-size: 11px;
  color: #0f172a;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}
.eg-pl-c-count {
  display: flex;
  justify-content: center;
}
.eg-pl-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #6d28d9;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  text-decoration: none;
  transition: background .12s, border-color .12s, color .12s;
}
.eg-pl-count:hover {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #5b21b6;
}
.eg-pl-c-acts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.eg-pl-act {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #94a3b8;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, color .12s;
  box-shadow: none;
  transform: none;
}
.eg-pl-act i { font-size: 12px; }
.eg-pl-act:hover {
  background: #f1f5f9;
  color: #334155;
  transform: none;
}
.eg-pl-act.is-danger:hover {
  background: #fff1f2;
  color: #e11d48;
}
.eg-pl-act.is-off {
  opacity: .35;
  pointer-events: none;
}
@media (max-width: 1100px) {
  .eg-pl-head,
  .eg-pl-row {
    grid-template-columns: 36px minmax(100px, 1fr) 60px 56px 64px 64px 64px minmax(90px, 1fr) minmax(80px, 0.8fr) 40px 80px;
  }
}
@media (max-width: 860px) {
  .eg-pl-head { display: none; }
  .eg-pl-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px 8px;
    padding: 12px 14px;
  }
  .eg-pl-c-lang,
  .eg-pl-c-region,
  .eg-pl-c-importance,
  .eg-pl-c-notes,
  .eg-pl-c-tags,
  .eg-pl-c-fans,
  .eg-pl-c-group {
    grid-column: 2 / 3;
  }
  .eg-pl-c-count,
  .eg-pl-c-acts {
    grid-row: 1;
  }
  .eg-pl-c-count { grid-column: 3; justify-content: flex-end; }
  .eg-pl-c-acts { grid-column: 2 / 4; justify-content: flex-start; }
}

/* ── Eagle FB profiles (page intel) ── */
.eg-prof-install {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 18px 20px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border-radius: 16px;
  color: #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
}
.eg-prof-install-l h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.eg-prof-install-l p {
  margin: 0 0 10px;
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
}
.eg-prof-install-l ol {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.7;
}
.eg-prof-install-l code {
  font-size: 11px;
  color: #c4b5fd;
}
.eg-prof-install-r {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.eg-prof-drag {
  height: 42px !important;
  padding: 0 20px !important;
  font-size: 13px !important;
  box-shadow: 0 8px 20px rgba(124, 58, 237, .35) !important;
}
.eg-prof-len {
  font-size: 11px;
  color: #64748b;
}
.eg-prof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.eg-prof-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: border-color .15s, box-shadow .15s;
}
.eg-prof-card:hover {
  border-color: #ddd6fe;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}
.eg-prof-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.eg-prof-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.eg-prof-avatar-ph {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #7c3aed, #4f46e5);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border: none;
}
.eg-prof-info { min-width: 0; flex: 1; }
.eg-prof-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eg-prof-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.eg-prof-cat {
  font-size: 11px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}
.eg-prof-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.eg-prof-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}
.eg-prof-stat strong {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  line-height: 1.1;
}
.eg-prof-stat span {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}
.eg-prof-about {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.eg-prof-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.eg-prof-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid #f1f5f9;
}
.eg-prof-time {
  font-size: 11px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.eg-prof-acts {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Eagle dict settings (lang / region) */
.eg-settings-lede {
  margin: 0 0 20px;
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
}
.eg-settings-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.eg-settings-panel-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.eg-settings-panel-hd h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
}
.eg-settings-panel-hd p {
  margin: 0;
  font-size: 12px;
}
.eg-settings-table input {
  width: 100%;
  box-sizing: border-box;
}
.eg-settings-fixed {
  font-size: 13px;
  color: #94a3b8;
}
.eg-settings-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.eg-settings-del {
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  padding: 2px 8px;
}
.eg-settings-del:hover {
  color: #ef4444;
}
@media (max-width: 640px) {
  .eg-prof-install-r { width: 100%; }
  .eg-prof-drag { width: 100%; }
}

/* ── Workflow list (eg-hub / eg-pl style) ── */
.wf-pl {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  /* visible so sticky header can pin while scrolling the page */
  overflow: visible;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.wf-pl-head,
.wf-pl-row {
  display: grid;
  grid-template-columns:
    44px
    minmax(140px, 1.25fr)
    minmax(72px, 0.55fr)
    minmax(104px, 0.7fr)
    78px
    64px
    48px
    56px
    96px
    minmax(110px, 1fr)
    148px;
  align-items: center;
  column-gap: 10px;
  row-gap: 8px;
  padding: 0 16px;
}
.wf-pl-head > *,
.wf-pl-row > * {
  min-width: 0;
  max-width: 100%;
}
.wf-pl-c-id,
.wf-pl-c-ch {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.wf-pl-c-on,
.wf-pl-c-lang,
.wf-pl-c-importance,
.wf-pl-c-type {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.wf-pl-c-path {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
}
.wf-pl-head {
  position: sticky;
  top: 0;
  z-index: 6;
  height: 40px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 16px 16px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #94a3b8;
  box-shadow: 0 1px 0 rgba(226, 232, 240, .95);
}
.wf-pl-row {
  min-height: 64px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  transition: background .12s;
}
.wf-pl-row:last-child {
  border-bottom: none;
  border-radius: 0 0 16px 16px;
}
.wf-pl-row:hover { background: #fafbff; }
.wf-pl-row.is-off { opacity: .62; }
.wf-pl-row.is-test { background: #fffdf5; }
.wf-pl-row.is-saved {
  background: #f5f3ff;
  transition: background .35s ease;
}
.wf-pl-c-creator {
  min-width: 0;
}
.wf-pl-creator-select,
.wf-pl-status-select {
  width: 100%;
  max-width: 100%;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
}
.wf-pl-creator-select.is-empty {
  color: #94a3b8;
}
.wf-pl-status-select.is-on {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
  font-weight: 700;
}
.wf-pl-status-select.is-test {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
  font-weight: 700;
}
.wf-pl-status-select.is-off {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.wf-pl-c-id {
  font-size: 12px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.wf-pl-c-name {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wf-pl-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-pl-name:hover { color: #7c3aed; }
.wf-pl-key {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}
.wf-pl-c-group,
.wf-pl-c-importance {
  min-width: 0;
  position: relative;
}
.wf-pl-group-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}
.wf-pl-group-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding-right: 28px !important;
}
.wf-pl-group-caret {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}
.wf-pl-group-caret:hover {
  background: #f1f5f9;
  color: #475569;
}
.wf-pl-group-caret i { font-size: 11px; }
.wf-pl-group-pop {
  left: 0;
  right: 0;
  min-width: 100%;
  z-index: 20;
}
.wf-pl-c-group .eg-pl-group-input {
  width: 100%;
  max-width: 100%;
}
.wf-pl-c-importance .eg-pl-importance-btn {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wf-pl-c-on form,
.wf-pl-c-type form,
.wf-pl-c-creator form,
.wf-pl-c-acts form {
  margin: 0;
  display: inline-flex;
  max-width: 100%;
}
.wf-pl-c-ch {
  font-weight: 600;
  color: #475569;
}
.wf-pl-type-select {
  max-width: 100%;
}
.wf-pl-c-path .wf-pl-slug {
  max-width: 100%;
}
.wf-pl-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}
.wf-pl-type-select {
  height: 30px;
  min-width: 88px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.wf-pl-type-select:hover,
.wf-pl-type-select:focus {
  outline: none;
  border-color: #c4b5fd;
  background: #fff;
}
.wf-pl-c-path {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wf-pl-slug {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: #475569;
}
.wf-pl-slug.muted { color: #94a3b8; }
.wf-pl-c-acts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}
.wf-pl .wf-list-toggle {
  height: 28px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
}
@media (max-width: 1100px) {
  .wf-pl-head,
  .wf-pl-row {
    grid-template-columns:
      40px
      minmax(110px, 1.1fr)
      minmax(64px, 0.5fr)
      minmax(88px, 0.65fr)
      70px
      58px
      40px
      48px
      88px
      minmax(90px, 1fr)
      132px;
  }
}
@media (max-width: 860px) {
  .wf-pl-head { display: none; }
  .wf-pl-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 12px 14px;
  }
  .wf-pl-c-creator,
  .wf-pl-c-group,
  .wf-pl-c-importance,
  .wf-pl-c-on,
  .wf-pl-c-ch,
  .wf-pl-c-lang,
  .wf-pl-c-type,
  .wf-pl-c-path {
    grid-column: 2 / 3;
  }
  .wf-pl-c-acts {
    grid-column: 2 / 4;
    justify-content: flex-start;
  }
}



/* —— 鹰眼巡航队列配置页 —— */
.egq-page .egq-badge {
  color: #0f766e;
  background: #f0fdfa;
  border-color: #99f6e4;
}
.egq-main {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* 采集任务：宽版工作台 */
.egq-wide .egq-main {
  max-width: 1320px;
  padding: 16px 24px 56px;
}
.egq-wide .egq-card-hd p {
  max-width: 52em;
}
.egq-wide .egq-board {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.egq-create-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
}
.egq-create-row > input[name="title"] {
  flex: 1 1 280px;
  min-width: 200px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font: inherit;
}
.egq-create-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
}
.egq-create-row label input {
  width: 64px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font: inherit;
}
.egq-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.egq-toolbar-search {
  flex: 1 1 220px;
  min-width: 160px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font: inherit;
}
.egq-toolbar select {
  height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  background: #fff;
}
.egq-pick-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 12px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 10px;
  font-size: 13px;
}
.egq-pick-bar-r {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.egq-pick-bar-r label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #334155;
}
.egq-card-accent {
  border-color: #99f6e4;
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.06);
}
.egq-prog-card {
  padding-top: 14px;
  padding-bottom: 14px;
}
.egq-prog-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.egq-prog-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: #64748b;
}
.egq-prog-stats b {
  color: #0f172a;
  font-size: 16px;
}
.egq-status-chips {
  margin-top: 12px;
}
.egq-empty-hero {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}
.egq-empty-hero p {
  margin: 0 0 16px;
  font-size: 15px;
  color: #64748b;
}
.egq-empty {
  margin: 16px 0 4px;
  padding: 16px;
  color: #64748b;
  font-size: 13px;
  background: #f8fafc;
  border-radius: 10px;
}
.egq-details {
  padding-top: 8px;
}
.egq-details > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  padding: 8px 0 4px;
  font-size: 14px;
  color: #0f172a;
}
.egq-details > summary::-webkit-details-marker { display: none; }
.egq-details > summary::before {
  content: "▸";
  color: #94a3b8;
  font-size: 12px;
}
.egq-details[open] > summary::before { content: "▾"; }
.egq-muted {
  color: #94a3b8;
  font-weight: 500;
  font-size: 12px;
}

/* 采集任务详情视觉 + 大弹窗 */
.egq-task .egq-task-hd {
  margin-bottom: 4px;
}
.egq-task .egq-task-main {
  border-color: #e2e8f0;
}
.egq-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  height: 1.4em;
  padding: 0 7px;
  margin-left: 6px;
  border-radius: 999px;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}
.egq-empty-ico {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ecfeff, #f0fdfa);
  color: #0d9488;
  font-size: 22px;
}
.egq-page-cell {
  min-width: 180px;
}
.egq-page-link {
  color: #0f766e;
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}
.egq-page-link:hover {
  color: #115e59;
  text-decoration: underline;
}
.egq-page-link i {
  font-size: 10px;
  opacity: .7;
  margin-left: 2px;
}
.egq-num {
  font-variant-numeric: tabular-nums;
  color: #475569;
  white-space: nowrap;
}
.egq-cell-num {
  width: 72px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: #0f172a;
  transition: border-color .15s ease, box-shadow .2s ease, background .25s ease;
}
.egq-cell-num:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.egq-cell-num.is-saving {
  opacity: 0.7;
}
.egq-cell-num.is-saved {
  border-color: #10b981;
  background: #ecfdf5;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: egqPulse 0.55s ease;
}
.egq-cell-num.is-err {
  border-color: #f43f5e;
  background: #fff1f2;
}
@keyframes egqPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.egq-collect {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.egq-c-new,
.egq-c-upd,
.egq-c-dup {
  display: inline-block;
  margin-right: 6px;
  font-weight: 650;
}
.egq-c-new { color: #059669; }
.egq-c-upd { color: #0284c7; }
.egq-c-dup { color: #94a3b8; }
.egq-tag.egq-st-pending { background: #f1f5f9; color: #64748b; }
.egq-tag.egq-st-claimed { background: #ecfeff; color: #0e7490; }
.egq-tag.egq-st-done,
.egq-tag.ok { background: #ecfdf5; color: #047857; }
.egq-tag.egq-st-failed,
.egq-tag.egq-st-skipped { background: #fff1f2; color: #be123c; }
.egq-table-roomy td,
.egq-table-roomy th {
  padding-top: 12px;
  padding-bottom: 12px;
}
.egq-modal[hidden] { display: none !important; }
.egq-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.egq-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
}
.egq-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1180px, 96vw);
  height: min(860px, 92vh);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.egq-modal-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #f8fffe 0%, #fff 100%);
  flex-shrink: 0;
}
.egq-modal-hd h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 750;
  color: #0f172a;
}
.egq-modal-hd p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}
.egq-modal-x {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.egq-modal-x:hover { background: #e2e8f0; }
.egq-modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.egq-modal-table-wrap {
  flex: 1;
  min-height: 240px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.egq-modal-table-wrap .egq-table {
  margin: 0;
}
.egq-modal .egq-pick-bar {
  position: sticky;
  top: 0;
  z-index: 2;
}
.egq-wide .egq-prog-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.egq-wide .egq-board-card {
  transition: border-color .15s ease, box-shadow .15s ease;
}
.egq-wide .egq-board-card:hover {
  border-color: #99f6e4;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.08);
}
.egq-settings-top {
  border-color: #99f6e4;
  background: linear-gradient(180deg, #f7fffe 0%, #fff 48%);
}
.egq-settings-top .egq-card-hd {
  align-items: center;
}
.egq-settings-compact {
  padding: 12px 16px !important;
}
.egq-set-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.egq-set-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.egq-set-title-row {
  justify-content: flex-start;
  gap: 12px 16px;
}
.egq-set-title-row .egq-set-inline {
  flex: 1 1 auto;
  min-width: 240px;
}
.egq-set-title-row input[name="title"],
.egq-set-title-row .egq-set-inline input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 200px;
  max-width: none;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font: inherit;
}
.egq-set-params {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 18px;
  align-items: center;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 10px;
}
.egq-set-params .egq-set-inline {
  width: 100%;
  justify-content: flex-start;
}
.egq-set-params .egq-set-inline input[type="number"] {
  width: 72px;
  flex: 0 0 auto;
}
.egq-set-sched {
  justify-content: flex-start;
  gap: 10px 14px;
  padding-top: 2px;
}
.egq-set-sched .egq-set-chips {
  flex: 0 0 auto;
}
.egq-set-weekdays {
  margin-left: auto !important;
}
.egq-set-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}
.egq-set-inline > span:first-child {
  font-weight: 600;
  color: #475569;
}
.egq-set-inline input[type="number"],
.egq-set-inline input[type="text"] {
  width: 64px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: #0f172a;
}
.egq-set-sep,
.egq-set-unit {
  color: #94a3b8;
  font-size: 12px;
}
.egq-set-k {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.egq-set-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 !important;
}
.egq-set-chips .filter-chip {
  padding: 3px 9px;
  font-size: 12px;
  border-radius: 999px;
}
.egq-set-weekdays.is-dim {
  opacity: 0.35;
  pointer-events: none;
}
.egq-switch-sm {
  padding: 4px 8px !important;
  gap: 6px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  flex-shrink: 0;
}
.egq-switch-sm .egq-switch-txt small { display: none; }
.egq-switch-sm .egq-switch-txt strong {
  font-size: 12px;
  font-weight: 650;
}
.egq-switch-sm .egq-switch-ui {
  width: 28px;
  height: 16px;
}
.egq-switch-sm .egq-switch-ui::after {
  width: 12px;
  height: 12px;
  top: 2px;
  left: 2px;
}
.egq-switch-sm input:checked + .egq-switch-ui::after {
  transform: translateX(12px);
}
@media (max-width: 1100px) {
  .egq-set-params {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .egq-set-weekdays {
    margin-left: 0 !important;
  }
}
@media (max-width: 720px) {
  .egq-set-params {
    grid-template-columns: 1fr;
  }
  .egq-set-title-row .egq-set-inline {
    min-width: 0;
    width: 100%;
  }
}
.egq-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 20px 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.egq-card-hd {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}
.egq-card-hd h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -.02em;
  color: #0f172a;
}
.egq-card-hd p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  max-width: 36em;
}
.egq-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.egq-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: #64748b;
}
.egq-stats b {
  font-size: 14px;
  font-weight: 750;
  color: #0f766e;
}
.egq-connect,
.egq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.egq-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.egq-field-full { grid-column: 1 / -1; }
.egq-label {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.egq-hint {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
  margin-bottom: 2px;
}
.egq-field input,
.egq-field textarea {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: #0f172a;
  transition: border-color .15s, box-shadow .15s;
}
.egq-field input:focus,
.egq-field textarea:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .18);
}
.egq-field textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  resize: vertical;
  min-height: 64px;
  line-height: 1.45;
}
.egq-switches {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.egq-switch {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
}
.egq-switch:hover { border-color: #99f6e4; background: #f0fdfa; }
.egq-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.egq-switch-ui {
  flex: none;
  width: 40px;
  height: 24px;
  margin-top: 1px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background .15s;
}
.egq-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .2);
  transition: transform .15s;
}
.egq-switch input:checked + .egq-switch-ui {
  background: #0d9488;
}
.egq-switch input:checked + .egq-switch-ui::after {
  transform: translateX(16px);
}
.egq-switch-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.egq-switch-txt strong {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.egq-switch-txt small {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}
.egq-switch-txt small b { color: #0f766e; font-weight: 700; }
.egq-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}
.egq-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: #0d9488;
  color: #fff;
  font: inherit;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}
.egq-save:hover { background: #0f766e; color: #fff; }
.egq-reset {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.egq-reset .eg-hub-btn {
  align-self: flex-start;
  margin-top: 4px;
}
.egq-list-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}
.egq-list-block h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}
.egq-list-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.egq-list-block li {
  font-size: 13px;
  color: #334155;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.egq-list-block code {
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #0f766e;
}
.egq-tag {
  display: inline-flex;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background: #f1f5f9;
  color: #64748b;
}
.egq-tag.ok {
  background: #ccfbf1;
  color: #0f766e;
}
.egq-admin-panel .egq-claim-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.egq-admin-panel .egq-claim-hd h3 { margin: 0; }
.egq-muted {
  color: #64748b;
  font-size: 13px;
  margin: 0;
}
.egq-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.egq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.egq-table th,
.egq-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.egq-table th {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
}
.egq-table tr:last-child td { border-bottom: 0; }
.egq-token-cell { min-width: 220px; }
.egq-token-input {
  width: 100%;
  min-width: 180px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #fff;
  color: #0f172a;
}
.egq-copy-btn { height: 34px; padding: 0 12px; white-space: nowrap; }
.egq-prog-bar {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 8px;
}
.egq-prog-fill {
  height: 100%;
  background: #0d9488;
  border-radius: 999px;
  transition: width .35s ease;
}
.egq-inline-form {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.egq-pick-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 13px;
  color: #475569;
}
.egq-batch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  color: #475569;
}
.egq-ord {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.egq-ord button {
  height: 22px;
  min-width: 28px;
  padding: 0 6px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}
.egq-ord button:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}
.egq-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.egq-board-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.egq-board-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.egq-board-meta,
.egq-board-claimers,
.egq-board-strat {
  margin: 8px 0 0;
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
}
.egq-board-strat {
  color: #0f766e;
  font-variant-numeric: tabular-nums;
}
.egq-dual-brief {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
}
.egq-dual-brief-hd {
  font-size: 13px;
  font-weight: 700;
  color: #0f766e;
  margin-bottom: 6px;
}
.egq-dual-brief-ol {
  margin: 0;
  padding-left: 1.25em;
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
}
.egq-dual-brief-ol li {
  margin: 0.15em 0;
}
.egq-dual-brief-foot {
  margin: 8px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}
.egq-batch-lab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #475569;
}
.egq-board-actions {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.egq-board-ctrls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.egq-board-ctrls form,
.egq-board-actions > form {
  margin: 0;
  flex: 0 0 auto;
}
.egq-board-actions > form {
  margin-left: auto;
}
.egq-board-actions .egq-save {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
  border-radius: 12px;
}
.egq-tag.egq-task-st-draft { background: #f1f5f9; color: #64748b; }
.egq-tag.egq-task-st-running { background: #ecfdf5; color: #047857; }
.egq-tag.egq-task-st-paused { background: #fff7ed; color: #c2410c; }
.egq-tag.egq-task-st-done { background: #eff6ff; color: #1d4ed8; }
.egq-tag.egq-task-st-cancelled { background: #fff1f2; color: #be123c; }
.egq-sched {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 11px;
  font-weight: 600;
}
.egq-sched-box {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.egq-sticky-prog {
  position: sticky;
  top: 8px;
  z-index: 5;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.egq-list-block em {
  font-style: normal;
  font-size: 12px;
  color: #94a3b8;
}
@media (max-width: 720px) {
  .egq-connect,
  .egq-grid { grid-template-columns: 1fr; }
  .egq-main { padding: 14px 12px 36px; }
}

/* ── 题材分析 Dashboard (eg-genre) ── */
.eg-genre-dash .eg-hub-header {
  margin-bottom: 16px;
}
.eg-genre-dash-sub {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}
.eg-genre-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1024px) {
  .eg-genre-layout { grid-template-columns: 1fr; }
}
.eg-genre-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.eg-genre-side {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (max-width: 1024px) {
  .eg-genre-side { position: static; }
}
.eg-genre-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.eg-genre-card-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.eg-genre-card-hd h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -.01em;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eg-genre-card-hd h2 i {
  font-size: 12px;
  color: #7c3aed;
}
.eg-genre-card-sub {
  font-size: 11px;
  color: #94a3b8;
}
.eg-genre-card-run .eg-genre-card-hd h2 i { color: #2563eb; }
.eg-genre-run-desc {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #64748b;
}
.eg-genre-run-status {
  min-height: 24px;
  margin-bottom: 10px;
}
.eg-genre-run-status-idle,
.eg-genre-run-status-run,
.eg-genre-run-status-ok,
.eg-genre-run-status-err,
.eg-genre-run-status-off {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.2;
}
.eg-genre-run-status-idle { background: #f8fafc; color: #94a3b8; }
.eg-genre-run-status-run { background: #eff6ff; color: #1d4ed8; }
.eg-genre-run-status-ok { background: #ecfdf5; color: #047857; }
.eg-genre-run-status-err { background: #fef2f2; color: #b91c1c; }
.eg-genre-run-status-off { background: #f1f5f9; color: #64748b; }
.eg-genre-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.eg-genre-progress-bar {
  flex: 1;
  height: 10px;
  border-radius: 6px;
  background: #eef2f7;
  overflow: hidden;
}
.eg-genre-progress-bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transition: width .3s ease;
}
.eg-genre-progress-num {
  font-size: 12px;
  font-weight: 700;
  color: #1d4ed8;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.eg-genre-run-meta {
  font-size: 12px;
  color: #475569;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
}
.eg-genre-legend {
  font-size: 12.5px;
  color: #475569;
}
.eg-genre-legend ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}
@media (max-width: 720px) {
  .eg-genre-legend ul { grid-template-columns: 1fr; }
}
.eg-genre-legend li {
  line-height: 1.5;
  padding-left: 12px;
  position: relative;
}
.eg-genre-legend li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #c4b5fd;
}
.eg-genre-legend b {
  color: #0f172a;
  font-weight: 700;
}

/* Recent classify jobs */
.eg-genre-jobs { min-height: 40px; }
.eg-genre-job-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}
.eg-genre-job-item {
  padding: 9px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
}
.eg-genre-job-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.eg-genre-job-range {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}
.eg-genre-job-meta {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
  word-break: break-all;
}
