/**
 * input: _shared/tokens.css, _shared/components.css
 * output: AI 找人 + 星图融合 原型独有样式
 * pos: 本原型私有样式层
 */

body {
  margin: 0;
  font-family: var(--ql-font-family);
  background: var(--ql-bg);
  color: var(--ql-text);
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
  font-size: var(--ql-font-base);
}

/* ========== 左侧 ctrl 面板 ========== */
.ctrl {
  background: var(--ql-surface);
  border-right: 1px solid var(--ql-border);
  padding: var(--ql-space-xl);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--ql-space-xl);
}
.ctrl__header { padding-bottom: var(--ql-space-md); border-bottom: 1px solid var(--ql-border-light); }
.ctrl__title { margin: 0 0 4px; font-size: var(--ql-font-lg); font-weight: 700; letter-spacing: -0.3px; }
.ctrl__sub { margin: 0; font-size: var(--ql-font-xs); color: var(--ql-text-muted); }
.ctrl h3 {
  margin: 0 0 var(--ql-space-md);
  font-size: var(--ql-font-sm);
  font-weight: 600;
  color: var(--ql-text-secondary);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.ctrl__section-label {
  font-size: var(--ql-font-xs) !important;
  color: var(--ql-text-muted) !important;
  margin-bottom: 10px !important;
}
.ctrl__guide ul {
  margin: 0;
  padding-left: var(--ql-space-lg);
  list-style: disc;
  color: var(--ql-text-secondary);
  font-size: var(--ql-font-sm);
  line-height: var(--ql-leading-relaxed);
}
.ctrl__guide li { margin-bottom: 6px; }
.ctrl__guide li b { color: var(--ql-text); font-weight: 600; }

.ctrl__options { display: flex; flex-direction: column; gap: 8px; }
.ctrl__radio {
  display: block;
  padding: 12px;
  border: 1.5px solid var(--ql-border);
  border-radius: var(--ql-radius-sm);
  cursor: pointer;
  transition: var(--ql-transition-fast);
  position: relative;
}
.ctrl__radio:hover {
  border-color: var(--ql-text-tertiary);
  background: var(--ql-surface-hover);
}
.ctrl__radio input { position: absolute; opacity: 0; pointer-events: none; }
.ctrl__radio[data-active="true"] {
  border-color: var(--ql-action);
  background: var(--ql-primary-50);
}
.ctrl__radio[data-active="true"]::after {
  content: '';
  position: absolute;
  top: 14px; right: 14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ql-action);
}
.ctrl__radio-title { display: block; font-size: var(--ql-font-sm); font-weight: 600; color: var(--ql-text); margin-bottom: 2px; }
.ctrl__radio-desc { display: block; font-size: var(--ql-font-xs); color: var(--ql-text-muted); }

.ctrl__tip {
  padding: var(--ql-space-md);
  background: var(--ql-primary-50);
  border-radius: var(--ql-radius-sm);
  font-size: var(--ql-font-xs);
  color: var(--ql-primary-text);
  line-height: 1.5;
}
.ctrl__tip p { margin: 0; }

/* ========== 右侧 app 区 ========== */
.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  overflow: hidden;
  height: 100vh;
  position: relative;
}

/* 场景切换 */
.scene { display: none; flex-direction: column; overflow: hidden; min-height: 0; position: relative; }
.scene[data-active="true"] { display: flex; }

/* 星图 tab 场景：占满整个 app 区（盖住 sidebar） */
.scene--xingtu-tab[data-active="true"] {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: var(--ql-bg);
}

/* ========== 业务 Sidebar ========== */
.biz-sidebar {
  background: var(--ql-surface);
  border-right: 1px solid var(--ql-border-light);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}
.biz-logo { font-size: 16px; font-weight: 700; padding: 8px 10px; letter-spacing: -0.2px; }
.biz-logo em { font-style: normal; color: var(--ql-primary); }
.biz-search {
  height: 32px;
  background: var(--ql-bg);
  border-radius: var(--ql-radius-control);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--ql-text-muted);
  font-size: var(--ql-font-sm);
}
.biz-search .ico { font-size: 14px; opacity: 0.6; }

.biz-new-task {
  height: 36px;
  background: var(--ql-surface);
  border: 1px solid var(--ql-border);
  border-radius: var(--ql-radius-control);
  font-size: 13px; font-weight: 500; color: var(--ql-text);
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px; cursor: pointer; font-family: inherit;
  transition: var(--ql-transition-fast);
}
.biz-new-task:hover { background: var(--ql-surface-hover); }
.biz-new-task .plus {
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ql-primary); font-weight: 600; font-size: 14px;
}

.biz-sec-label {
  font-size: 11px; color: var(--ql-text-muted);
  letter-spacing: 0.5px; padding: 8px 10px 4px;
  text-transform: uppercase;
}
.biz-task-list { display: flex; flex-direction: column; gap: 2px; }
.biz-task-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--ql-radius-sm);
  font-size: 13px; color: var(--ql-text-secondary);
  cursor: pointer;
  transition: var(--ql-transition-fast);
}
.biz-task-item:hover { background: var(--ql-surface-hover); }
.biz-task-item .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ql-primary); flex-shrink: 0;
}
.biz-task-item .dot--mute { background: var(--ql-text-tertiary); }
.biz-task-item .name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.biz-task-item--active {
  background: var(--ql-primary-50);
  color: var(--ql-text);
  position: relative;
}
.biz-task-item--active::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 2px;
  background: var(--ql-primary);
}
.biz-task-item--plain { padding-left: 18px; }

.biz-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--ql-border-light);
  display: flex; align-items: center; gap: 10px;
  font-size: var(--ql-font-sm); color: var(--ql-text-secondary);
}

.ql-avatar--sm { width: 28px; height: 28px; font-size: 12px; }
.ql-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff; font-weight: 600; font-size: 13px;
  background: linear-gradient(135deg, var(--ql-primary-300), var(--ql-primary));
  flex-shrink: 0;
}

/* ========== 结果列表页（场景 ①②③⑤ 共用） ========== */

.page-header {
  height: 52px;
  background: var(--ql-surface);
  border-bottom: 1px solid var(--ql-border-light);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  flex-shrink: 0;
}
.page-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ql-text);
  letter-spacing: -0.2px;
}
.page-sep { width: 1px; height: 14px; background: var(--ql-border); }
.page-task {
  font-size: 13px;
  color: var(--ql-text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.page-task .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ql-primary);
}
.page-task .dot--mute { background: var(--ql-text-tertiary); }
.page-task .dot--success { background: var(--ql-success); }
.page-task .dot--warn { background: var(--ql-warning); }
.page-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ql-text-muted);
}
.page-meta .sep-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ql-text-tertiary);
  opacity: 0.6;
}
.page-meta .meta-pink { color: var(--ql-primary-text); font-weight: 500; }
.page-meta .meta-success { color: var(--ql-success-text); font-weight: 500; }
.page-meta .meta-warn { color: var(--ql-warning-text); font-weight: 500; }
.page-meta .meta-muted { color: var(--ql-text-muted); font-weight: 500; }

.topbar-tabs {
  height: 48px;
  background: var(--ql-surface);
  border-bottom: 1px solid var(--ql-border-light);
  display: flex;
  padding: 0 24px;
  flex-shrink: 0;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--ql-text-secondary);
  cursor: pointer;
  position: relative;
  transition: var(--ql-transition-fast);
  user-select: none;
}
.tab:hover { color: var(--ql-text); }
.tab .tab-count {
  font-size: 12px;
  color: var(--ql-text-muted);
  padding: 2px 6px;
  background: var(--ql-bg-alt);
  border-radius: var(--ql-radius-xs);
  line-height: 1;
}
.tab--active { color: var(--ql-text); font-weight: 600; }
.tab--active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 14px; right: 14px;
  height: 2px;
  background: var(--ql-primary);
  border-radius: 1px 1px 0 0;
}
.tab--active .tab-count {
  background: var(--ql-primary-50);
  color: var(--ql-primary-text);
}

.topbar-tools {
  height: 56px;
  background: var(--ql-surface);
  border-bottom: 1px solid var(--ql-border-light);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
}
.tools-left, .tools-right { display: flex; align-items: center; gap: 8px; }
.tools-center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 8px;
}
.tools-right { margin-left: auto; }
.btn-ico { font-size: 14px; color: var(--ql-text-muted); }
.caret {
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  opacity: 0.55;
}

.wrap-rel { position: relative; }

/* ========== 气泡 ========== */
.bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 28px;
  border-radius: var(--ql-radius-pill);
  background: var(--ql-primary-50);
  color: var(--ql-primary-text);
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid oklch(0.92 0.05 350);
  line-height: 1;
  white-space: nowrap;
}
.bubble b { font-weight: 700; color: var(--ql-primary-text); }
.bubble-ico { font-size: 12px; }

.bubble--success {
  background: var(--ql-success-bg);
  color: var(--ql-success-text);
  border-color: oklch(0.85 0.15 145);
}
.bubble--success b { color: var(--ql-success-text); }
.bubble-check {
  font-size: 13px;
  font-weight: 700;
  color: var(--ql-success-text);
}

.bubble--warn {
  background: var(--ql-warning-bg);
  color: var(--ql-warning-text);
  border-color: oklch(0.85 0.15 85);
}
.bubble--warn b { color: var(--ql-warning-text); }

.bubble--muted {
  background: var(--ql-bg-alt);
  color: var(--ql-text-muted);
  border-color: var(--ql-border);
}
.bubble--muted b { color: var(--ql-text-secondary); }

.bubble-pause {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ql-primary-100);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ql-primary-text);
  padding: 0;
  flex-shrink: 0;
  transition: var(--ql-transition-fast);
}
.bubble-pause:hover { background: var(--ql-primary-200); }
.bubble-pause svg { width: 8px; height: 8px; }
.bubble-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ql-primary);
  position: relative;
  flex-shrink: 0;
}
.bubble-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--ql-primary);
  opacity: 0.3;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.4; }
  70% { transform: scale(1.4); opacity: 0; }
  100% { opacity: 0; }
}

/* ========== 修改条件 Popover ========== */
.cond-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 640px;
  max-height: 60vh;
  display: none;
  flex-direction: column;
  padding: 0;
  background: var(--ql-surface);
  border: 1px solid var(--ql-border-light);
  box-shadow: var(--ql-shadow-lg);
  border-radius: var(--ql-radius-panel);
  overflow: hidden;
  z-index: var(--z-popover);
}
.cond-popover.ql-popover--open {
  display: flex;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.cond-popover__header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ql-border-light);
  flex-shrink: 0;
}
.cond-popover__title { font-size: 14px; font-weight: 600; color: var(--ql-text); }
.cond-popover__enter {
  font-size: 12.5px;
  color: var(--ql-primary);
  cursor: pointer;
  font-weight: 500;
}
.cond-popover__enter:hover { color: var(--ql-primary-700); }

.cond-popover__body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}
.cond-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  min-height: 36px;
}
.cond-row + .cond-row { border-top: 1px dashed var(--ql-border-light); }
.cond-key {
  width: 88px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--ql-text-secondary);
  padding-top: 4px;
}
.cond-div {
  width: 1px;
  align-self: stretch;
  background: var(--ql-border-light);
  flex-shrink: 0;
}
.cond-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

/* 条件气泡：默认激活态（粉底） */
.cond-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 10px;
  background: var(--ql-primary-50);
  color: var(--ql-primary-text);
  border-radius: var(--ql-radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid oklch(0.92 0.05 350);
  line-height: 1;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
/* 删除态：置灰 + 删除线（不消失，可还原） */
.cond-chip--deleted {
  background: var(--ql-bg-alt);
  color: var(--ql-text-muted);
  border-color: var(--ql-border);
  text-decoration: line-through;
  text-decoration-color: var(--ql-text-muted);
  text-decoration-thickness: 1.5px;
}
.cond-chip--deleted .cond-chip__x {
  color: var(--ql-text-muted);
  opacity: 0.7;
}
.cond-chip--deleted .cond-chip__x:hover {
  background: var(--ql-border);
  color: var(--ql-text-secondary);
}

.cond-chip__x {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--ql-primary-600);
  cursor: pointer;
  padding: 0;
  opacity: 0.6;
  transition: var(--ql-transition-fast);
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cond-chip__x:hover {
  background: var(--ql-primary-100);
  opacity: 1;
}

.cond-popover__footer {
  padding: 14px 20px;
  border-top: 1px solid var(--ql-border-light);
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

/* ========== 结果列表 ========== */
.result-list {
  flex: 1;
  overflow: auto;
  padding: 16px 24px 24px;
  background: var(--ql-bg);
}
.result-table {
  background: var(--ql-surface);
  border-radius: var(--ql-radius-panel);
  box-shadow: var(--ql-shadow);
  border: 1px solid var(--ql-border-light);
  overflow: hidden;
  transition: opacity 0.3s ease;
}
.result-table--dimmed {
  opacity: 0.65;
  pointer-events: none;
}
.result-table table { width: 100%; border-collapse: collapse; }
.result-table thead th {
  background: var(--ql-surface-alt);
  text-align: left;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ql-text-muted);
  border-bottom: 1px solid var(--ql-border-light);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.result-table tbody td {
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--ql-text);
  border-bottom: 1px solid var(--ql-border-light);
  vertical-align: middle;
}
.result-table tbody tr:last-child td { border-bottom: none; }
.result-table tbody tr:hover { background: var(--ql-surface-hover); }

.col-cb { width: 40px; }
.col-act { width: 150px; }

.cb {
  width: 16px; height: 16px;
  border: 1.5px solid var(--ql-border);
  border-radius: 4px;
  background: var(--ql-surface);
  cursor: pointer;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  position: relative;
}
.cb--checked {
  background: var(--ql-primary);
  border-color: var(--ql-primary);
}
.cb--checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid white;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.daren { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.daren-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.daren-name { font-weight: 600; font-size: 13.5px; color: var(--ql-text); }
.daren-handle { font-size: 11.5px; color: var(--ql-text-muted); }

.src-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--ql-radius-xs);
  font-weight: 500;
  white-space: nowrap;
}
.src-badge--ai {
  background: var(--ql-bg-alt);
  color: var(--ql-text-secondary);
}
.src-badge--xingtu {
  background: var(--ql-primary-50);
  color: var(--ql-primary-text);
}
.src-badge--xingtu-load {
  background: var(--ql-primary-50);
  color: var(--ql-primary-text);
  position: relative;
  padding-left: 16px;
}
.src-badge--xingtu-load::before {
  content: '';
  position: absolute;
  left: 6px; top: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ql-primary);
  animation: badge-pulse 1.2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { opacity: 0.3; transform: translateY(-50%) scale(0.8); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

.tagchip {
  display: inline-flex;
  padding: 2px 8px;
  background: var(--ql-bg-alt);
  border-radius: var(--ql-radius-xs);
  font-size: 11.5px;
  color: var(--ql-text-secondary);
  margin-right: 4px;
  line-height: 1.4;
}
.tagchip--pink {
  background: var(--ql-primary-50);
  color: var(--ql-primary-text);
}

.score { display: inline-flex; align-items: center; gap: 6px; min-width: 70px; }
.score-bar {
  width: 48px; height: 4px; border-radius: 2px;
  background: var(--ql-bg-alt);
  overflow: hidden;
}
.score-fill {
  display: block;
  height: 100%;
  background: var(--ql-primary);
  border-radius: 2px;
}

.rowactions { display: inline-flex; gap: 4px; }
.rowbtn {
  height: 24px;
  padding: 0 8px;
  font-size: 11.5px;
  border-radius: var(--ql-radius-xs);
  border: 1px solid var(--ql-border);
  background: var(--ql-surface);
  color: var(--ql-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: var(--ql-transition-fast);
}
.rowbtn:hover:not(:disabled) { background: var(--ql-surface-hover); color: var(--ql-text); }
.rowbtn:disabled { opacity: 0.4; cursor: not-allowed; }
.rowbtn--pass {
  background: var(--ql-success-bg);
  color: var(--ql-success-text);
  border-color: oklch(0.88 0.10 145);
}
.rowbtn--passed {
  background: var(--ql-success);
  color: #fff;
  border-color: var(--ql-success);
}
.rowbtn--pend {
  background: var(--ql-warning-bg);
  color: var(--ql-warning-text);
  border-color: oklch(0.88 0.10 85);
}

.row-new td { background: oklch(0.985 0.012 350) !important; }
.row-new td:first-child { position: relative; }
.row-new td:first-child::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ql-primary);
}
.row-new { animation: row-highlight 0.6s ease-out; }
@keyframes row-highlight {
  0% { transform: translateY(-4px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.skeleton-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  height: 14px;
}
.skeleton-dots i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ql-text-tertiary);
  opacity: 0.4;
  animation: dots 1.4s ease-in-out infinite;
}
.skeleton-dots i:nth-child(2) { animation-delay: 0.2s; }
.skeleton-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes dots {
  0%, 100% { opacity: 0.2; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

.field-filled { animation: fade-in 0.4s ease-out; }
@keyframes fade-in {
  0% { opacity: 0; transform: translateY(2px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ========== 小弹窗（alert modal，结果页上） ========== */
.alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 24, 27, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  animation: fade-in-bg 0.25s ease-out;
}
@keyframes fade-in-bg {
  from { opacity: 0; }
  to { opacity: 1; }
}
.alert-modal {
  width: 420px;
  padding: 28px 28px 24px;
  background: var(--ql-surface);
  border-radius: var(--ql-radius-xl);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: alert-enter 0.3s var(--ql-ease-bounce);
}
@keyframes alert-enter {
  0% { opacity: 0; transform: translateY(12px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.alert-modal__icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.alert-modal__icon svg { width: 28px; height: 28px; }
.alert-modal__icon--warn {
  background: var(--ql-warning-bg);
  color: var(--ql-warning-text);
}
.alert-modal__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ql-text);
  letter-spacing: -0.2px;
  margin-bottom: 2px;
}
.alert-modal__desc {
  font-size: 13px;
  color: var(--ql-text-secondary);
  line-height: 1.55;
  margin-bottom: 18px;
  padding: 0 8px;
}
.alert-modal__actions {
  display: flex;
  gap: 12px;
}
.alert-modal__actions .ql-btn {
  padding-left: 28px;
  padding-right: 24px;
  gap: 6px;
}

/* ========== 星图 tab 场景 ========== */

/* 顶部系统 tab bar */
.sys-tabbar {
  height: 40px;
  background: var(--ql-bg-alt);
  border-bottom: 1px solid var(--ql-border-light);
  display: flex;
  padding: 6px 12px 0;
  gap: 2px;
  flex-shrink: 0;
}
.sys-tab {
  padding: 0 14px 0 12px;
  height: 34px;
  background: var(--ql-surface-alt);
  border: 1px solid var(--ql-border-light);
  border-bottom: none;
  border-radius: var(--ql-radius-sm) var(--ql-radius-sm) 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ql-text-secondary);
  cursor: pointer;
  max-width: 220px;
  transition: var(--ql-transition-fast);
}
.sys-tab:hover {
  background: var(--ql-surface-hover);
  color: var(--ql-text);
}
.sys-tab--active {
  background: var(--ql-surface);
  color: var(--ql-text);
  font-weight: 500;
  border-color: var(--ql-border-light);
  border-bottom: 1px solid var(--ql-surface);
  margin-bottom: -1px;
  position: relative;
  z-index: 2;
}
.sys-tab-ico {
  width: 18px; height: 18px;
  border-radius: 4px;
  background: var(--ql-bg-alt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--ql-text-muted);
  font-weight: 600;
  flex-shrink: 0;
}
.sys-tab--active .sys-tab-ico {
  background: linear-gradient(135deg, #5b8def, #2d6cdf);
  color: #fff;
}
.sys-tab-close {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--ql-text-muted);
  cursor: pointer;
  margin-left: 2px;
}
.sys-tab-close:hover {
  background: var(--ql-surface-hover);
  color: var(--ql-text);
}

/* 顶部通知气泡 */
.top-toast {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: var(--ql-surface);
  border: 1px solid var(--ql-border-light);
  border-radius: var(--ql-radius-pill);
  padding: 8px 16px 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ql-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
  animation: toast-drop 0.4s var(--ql-ease-bounce);
  white-space: nowrap;
}
@keyframes toast-drop {
  0% { opacity: 0; transform: translateX(-50%) translateY(-16px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.top-toast--success {
  border-color: oklch(0.85 0.15 145);
  background: linear-gradient(180deg, var(--ql-success-bg), var(--ql-surface));
}
.top-toast-ico {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--ql-success);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.top-toast-text {
  font-weight: 600;
  color: var(--ql-success-text);
}
.top-toast-link {
  color: var(--ql-primary);
  font-weight: 600;
  cursor: pointer;
  padding: 2px 10px;
  border-radius: var(--ql-radius-pill);
  transition: var(--ql-transition-fast);
}
.top-toast-link:hover {
  background: var(--ql-primary-50);
  color: var(--ql-primary-700);
}
.top-toast-hint {
  font-size: 11px;
  color: var(--ql-text-muted);
  padding-left: 6px;
  border-left: 1px solid var(--ql-border-light);
}

/* 星图内嵌页面 */
.xingtu-frame {
  flex: 1;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.xingtu-header {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 28px;
}
.xingtu-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.xingtu-brand-icon {
  width: 28px; height: 28px;
  border-radius: var(--ql-radius-sm);
  background: linear-gradient(135deg, #5b8def, #2d6cdf);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.xingtu-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.2px;
}
.xingtu-brand-name em { font-style: normal; color: #2d6cdf; }
.xingtu-nav {
  display: flex;
  gap: 24px;
  flex: 1;
}
.xingtu-nav-item {
  font-size: 13px;
  color: #666;
  cursor: pointer;
  padding: 6px 0;
  position: relative;
  font-weight: 500;
}
.xingtu-nav-item:hover { color: #1a1a1a; }
.xingtu-nav-item--active {
  color: #1a1a1a;
  font-weight: 600;
}
.xingtu-nav-item--active::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 0; right: 0;
  height: 2px;
  background: #2d6cdf;
  border-radius: 1px;
}
.xingtu-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #333;
}

.xingtu-body {
  flex: 1;
  padding: 60px 40px;
  background: #f7f8fb;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 星图登录成功后的 hero */
.xingtu-hero {
  max-width: 520px;
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border-radius: var(--ql-radius-xl);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid #eef0f5;
}
.xingtu-hero-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.xingtu-hero-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 24px;
}
.xingtu-hero-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ql-success-text);
  padding: 8px 16px;
  background: var(--ql-success-bg);
  border-radius: var(--ql-radius-pill);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ql-success);
}
.status-dot--success { background: var(--ql-success); }

/* 星图验证成功后的滑块（已完成态） */
.captcha-done-wrap {
  max-width: 420px;
  width: 100%;
  padding: 36px 30px;
  background: #fff;
  border-radius: var(--ql-radius-xl);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid #eef0f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.captcha-image {
  width: 320px;
  height: 160px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.captcha-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #8da0d8, #e5a8c7, #f2c7d6, #f5e8d0);
}
.captcha-piece {
  position: absolute;
  top: 52px;
  left: 60px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #fff;
  border-radius: 6px;
}
.captcha-piece--done {
  left: auto;
  right: 60px;
  background: rgba(134, 239, 172, 0.75);
  border-color: #22c55e;
}
.captcha-check {
  position: absolute;
  top: 50%; right: 76px;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ql-success);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
  animation: check-pop 0.5s var(--ql-ease-bounce);
}
@keyframes check-pop {
  0% { transform: translateY(-50%) scale(0); }
  100% { transform: translateY(-50%) scale(1); }
}

.captcha-slider {
  width: 320px;
  height: 40px;
  background: #f0f3f8;
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: center;
}
.captcha-slider--done { background: var(--ql-success-bg); }
.slider-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 100%;
  background: linear-gradient(90deg, oklch(0.9 0.15 145), var(--ql-success-bg));
  border-radius: 6px;
}
.slider-handle {
  position: absolute;
  left: calc(100% - 44px); top: 0;
  width: 44px; height: 40px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 1;
}
.slider-handle--done {
  color: var(--ql-success);
  background: #fff;
}

.captcha-done-tip {
  font-size: 13px;
  color: var(--ql-success-text);
  font-weight: 500;
}

/* Toast 容器（base.js 用） */
.ql-toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: var(--z-toast);
  padding: 12px 18px;
  background: rgba(24, 24, 27, 0.92);
  color: #fff;
  border-radius: var(--ql-radius-sm);
  font-size: var(--ql-font-sm);
  box-shadow: var(--ql-shadow-float);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ql-toast--info { border-left: 3px solid var(--ql-primary); }
.ql-toast--success { border-left: 3px solid var(--ql-success); }
.ql-toast--warn { border-left: 3px solid var(--ql-warning); }
.ql-toast--error { border-left: 3px solid var(--ql-error); }

/* 滚动条 */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: oklch(0.87 0.005 286); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: var(--ql-text-tertiary); }
