/* input: _shared/tokens.css, _shared/components.css
 * output: 推荐条 v5 私有样式（左 ctrl + 中 biz-sidebar + 右 rlv 三列）
 * pos: 本原型独有视觉层
 *
 * 一旦本原型变化，更新此注释 + 父目录 README
 */

/* ============ 全局 ============ */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  font-family: var(--ql-font-family);
  background: var(--ql-bg);
  color: var(--ql-text);
}

body {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

/* ============ 左侧 ctrl 控制台 ============ */
.ctrl {
  background: var(--ql-surface);
  border-right: 1px solid var(--ql-border);
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100vh;
}

.ctrl__header {
  padding-bottom: 12px;
  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;
  color: var(--ql-text);
}

.ctrl__sub {
  margin: 0;
  font-size: var(--ql-font-xs);
  color: var(--ql-text-muted);
}

.ctrl h3 {
  margin: 0 0 10px;
  font-size: var(--ql-font-xs);
  font-weight: 600;
  color: var(--ql-text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ctrl__section-label { margin-bottom: 10px; }

.ctrl__guide ul,
.ctrl__hints {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--ql-font-xs);
  color: var(--ql-text-secondary);
  line-height: 1.6;
}

.ctrl__guide li,
.ctrl__hints li {
  padding: 4px 0 4px 12px;
  position: relative;
}

.ctrl__guide li::before,
.ctrl__hints li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ql-action);
  position: absolute;
  left: 0;
  top: 11px;
}

.ctrl__guide b { color: var(--ql-text); font-weight: 600; }

.ctrl__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ctrl__radio {
  display: block;
  padding: 10px 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: rgba(107, 58, 93, 0.04);
}

.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);
}

/* ============ 右侧 .app: biz-sidebar (240px) + rlv (1fr) ============ */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  overflow: hidden;
  height: 100vh;
  position: relative;
  background: var(--ql-bg);
}

/* ============ 业务侧边栏 biz-sidebar ============ */
.biz-sidebar {
  background: var(--ql-surface);
  border-right: 1px solid var(--ql-border-light);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.biz-logo {
  font-size: 16px;
  font-weight: 700;
  padding: 6px 10px;
  letter-spacing: -0.2px;
  color: var(--ql-text);
}

.biz-logo em {
  font-style: normal;
  color: var(--ql-primary);
}

.biz-search {
  height: 30px;
  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: 12px;
  cursor: pointer;
}

.biz-search .ico { font-size: 13px; opacity: 0.6; }

.biz-new-task {
  height: 32px;
  background: var(--ql-action);
  color: #fff;
  border: none;
  border-radius: var(--ql-radius-control);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  cursor: pointer;
  font-family: inherit;
  transition: var(--ql-transition-fast);
}

.biz-new-task:hover { background: var(--ql-action-hover); }

.biz-new-task .plus {
  font-size: 14px;
  font-weight: 600;
}

.biz-sec-label {
  font-size: 10px;
  color: var(--ql-text-muted);
  letter-spacing: 0.6px;
  padding: 8px 10px 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.biz-task-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.biz-task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--ql-radius-sm);
  font-size: 12.5px;
  color: var(--ql-text-secondary);
  cursor: pointer;
  transition: var(--ql-transition-fast);
  position: relative;
}

.biz-task-item:hover {
  background: var(--ql-surface-hover);
  color: var(--ql-text);
}

.biz-task-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ql-text-tertiary);
  flex-shrink: 0;
}

.biz-task-item .dot--mute { background: var(--ql-text-tertiary); opacity: 0.5; }

.biz-task-item .dot--running {
  background: var(--ql-success);
  animation: pulseDot 1.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50%      { box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}

.biz-task-item .name {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.biz-task-item__count {
  font-size: 10.5px;
  color: var(--ql-text-muted);
  background: rgba(15,23,42,0.05);
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 600;
  flex-shrink: 0;
}

.biz-task-item--active {
  background: rgba(232,76,136,0.08);
  color: var(--ql-text);
  font-weight: 600;
}

.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--active .dot { background: var(--ql-primary); }

.biz-task-item--active .biz-task-item__count {
  background: var(--ql-primary);
  color: #fff;
}

.biz-task-item--plain {
  padding-left: 12px;
  font-size: 12px;
  color: var(--ql-text-secondary);
}

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

.biz-footer-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.biz-footer-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ql-text);
}

.biz-footer-sub {
  font-size: 10.5px;
  color: var(--ql-text-muted);
}

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

/* ============ 结果列表区域 .rlv ============ */
.rlv {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--ql-surface);
  overflow: hidden;
  position: relative;
}

/* mode-panel 时隐藏列表/分页 */
.rlv.mode-panel .rt-condition-strip,
.rlv.mode-panel .rlv-thead,
.rlv.mode-panel .rlv-body,
.rlv.mode-panel .rp-pag { display: none !important; }

/* 默认隐藏 filter-panel，仅 mode-panel 时显示 */
.filter-panel { display: none; }
.rlv.mode-panel .filter-panel { display: flex; }

/* ============ 顶部成功气泡 success-toast ============ */
.success-toast {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--ql-success), oklch(0.58 0.18 145));
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(34,197,94,0.25), 0 2px 6px rgba(34,197,94,0.18);
  z-index: 95;
  opacity: 0;
  transition: top 320ms var(--ql-ease-bounce, cubic-bezier(0.34, 1.56, 0.64, 1)), opacity 240ms;
  white-space: nowrap;
  pointer-events: none;
}

.success-toast.show {
  top: 16px;
  opacity: 1;
}

.success-toast__icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.success-toast__text b {
  font-weight: 800;
  margin: 0 1px;
  font-size: 14px;
}

/* ============ ResultToolbar ============ */
.rt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  min-height: 44px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(14px) saturate(145%);
  border-bottom: 1px solid rgba(15,23,42,0.06);
  flex-shrink: 0;
}

.rt-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--ql-text-secondary);
  cursor: pointer;
  transition: var(--ql-transition-fast);
  border: 1px solid transparent;
}

.rt-filter-trigger:hover { background: rgba(255,255,255,0.76); }

.rt-filter-trigger.active {
  background: rgba(232,76,136,0.06);
  border-color: rgba(232,76,136,0.15);
  color: var(--ql-primary);
}

.rt-filter-edit-zone { font-weight: 500; }

.rt-filter-count {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
  height: 18px;
  background: var(--ql-primary);
  color: #fff;
  border-radius: 999px;
}

.rt-count-num {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.rt-count-chevron {
  font-size: 9px;
  transition: transform 200ms;
}

/* 面板打开时 chevron 翻转 */
.rlv.mode-panel .rt-count-chevron { transform: rotate(180deg); }

.rt-divider {
  width: 1px;
  height: 18px;
  background: rgba(15,23,42,0.1);
}

.rt-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.rt-tab {
  height: 28px;
  padding: 0 12px;
  border: none;
  background: transparent;
  color: var(--ql-text-tertiary);
  font-size: 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--ql-transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.rt-tab:hover { color: var(--ql-text); }

.rt-tab.active {
  background: rgba(255,255,255,0.92);
  color: var(--ql-text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
}

.rt-tab-n {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ql-text-muted);
}

.rt-tab.active .rt-tab-n { color: var(--ql-primary); }

.rt-tab[data-tab="submitted"].active .rt-tab-n { color: var(--ql-success); }
.rt-tab[data-tab="rejected"].active .rt-tab-n { color: var(--ql-text-muted); }

.rt-ctrls {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.rt-tool-btn {
  width: 30px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--ql-text-secondary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: var(--ql-transition-fast);
}

.rt-tool-btn:hover {
  background: rgba(15,23,42,0.05);
  color: var(--ql-text);
}

/* ============ 条件 Strip ============ */
.rt-condition-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  height: 36px;
  overflow: hidden;
  background: rgba(255,255,255,0.9);
  border-bottom: 1px solid rgba(15,23,42,0.06);
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.rt-condition-strip::-webkit-scrollbar { display: none; }

.rt-strip-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--ql-transition-fast);
  user-select: none;
}

.rt-strip-chip b { font-weight: 600; }

.rt-strip-chip--data {
  background: rgba(107,58,93,0.08);
  color: var(--ql-action);
  border: 1px solid rgba(107,58,93,0.18);
}

.rt-strip-chip--portrait {
  background: rgba(15,23,42,0.05);
  color: var(--ql-text-secondary);
  border: 1px solid rgba(15,23,42,0.08);
}

.rt-strip-chip.deleted {
  text-decoration: line-through;
  opacity: 0.5;
}

.rt-strip-x {
  font-size: 13px;
  cursor: pointer;
  opacity: 0.55;
  margin-left: 1px;
  line-height: 1;
}

.rt-strip-x:hover { opacity: 1; color: var(--ql-error); }

.rt-strip-sep {
  width: 1px;
  height: 14px;
  background: rgba(15,23,42,0.1);
  margin: 0 2px;
  flex-shrink: 0;
}

/* ============ 筛选面板 filter-panel（v2，参考 edit.png） ============ */
.filter-panel {
  flex: 1;
  flex-direction: column;
  background: var(--ql-bg);
  overflow-y: auto;
  scrollbar-width: thin;
}

.filter-panel::-webkit-scrollbar { width: 6px; }
.filter-panel::-webkit-scrollbar-thumb { background: var(--ql-border); border-radius: 3px; }

/* 通用行（项目索引等） */
.fp-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  background: var(--ql-surface);
  border-bottom: 1px solid var(--ql-border-light);
  flex-shrink: 0;
}

.fp-row__label {
  flex-shrink: 0;
  width: 64px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ql-text-secondary);
}

.fp-input {
  flex: 1;
  height: 32px;
  padding: 0 12px;
  background: var(--ql-bg);
  border: 1px solid var(--ql-border);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--ql-text);
  display: inline-flex;
  align-items: center;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

/* 例子搜索框（带 ✦） */
.fp-prompt {
  padding: 12px 24px;
  background: var(--ql-surface);
  border-bottom: 1px solid var(--ql-border-light);
  flex-shrink: 0;
}

.fp-prompt__box {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  background: var(--ql-bg);
  border: 1px solid var(--ql-border);
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ql-text-muted);
  font-family: inherit;
  cursor: text;
}

.fp-prompt__icon {
  color: var(--ql-action);
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* 已选 chip + 按钮组 行 */
.fp-chiprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  background: var(--ql-surface);
  border-bottom: 1px solid var(--ql-border-light);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.fp-applied-chips {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fp-applied-chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
}

.fp-applied-chip--portrait {
  background: rgba(107,58,93,0.06);
  color: var(--ql-action);
  border-color: rgba(107,58,93,0.20);
}

.fp-applied-chip--data {
  background: rgba(232,76,136,0.06);
  color: var(--ql-primary-text);
  border-color: rgba(232,76,136,0.22);
}

.fp-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fp-btn {
  height: 32px;
  padding: 0 14px;
  background: var(--ql-surface);
  border: 1px solid var(--ql-border);
  color: var(--ql-text-secondary);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: var(--ql-transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.fp-btn:hover {
  border-color: var(--ql-text-tertiary);
  color: var(--ql-text);
  background: rgba(15,23,42,0.03);
}

.fp-btn--primary {
  background: var(--ql-action);
  color: #fff;
  border-color: var(--ql-action);
}

.fp-btn--primary:hover {
  background: var(--ql-action-hover);
  color: #fff;
  border-color: var(--ql-action-hover);
}

.fp-btn__icon {
  font-size: 12px;
}

/* 推荐条容器：margin 让它对齐其他 row 的边距 */
.filter-panel .rec-bar--inline {
  margin: 12px 24px;
  flex-shrink: 0;
}

/* 字段区 section（左 label + 右字段网格） */
.fp-section {
  display: flex;
  align-items: stretch;
  background: var(--ql-surface);
  border-bottom: 1px solid var(--ql-border-light);
  flex-shrink: 0;
}

.fp-section__label {
  flex-shrink: 0;
  width: 92px;
  padding: 16px 0 16px 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ql-text-secondary);
  background: var(--ql-bg);
}

.fp-section__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 24px 14px 16px;
  min-width: 0;
}

.fp-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.fp-field__name {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 0 6px 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ql-action);
  margin-right: 4px;
  white-space: nowrap;
}

.fp-field__name::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 12px;
  background: var(--ql-primary);
  border-radius: 1px;
}

.fp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  background: var(--ql-surface);
  border: 1px solid var(--ql-border);
  color: var(--ql-text-secondary);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--ql-transition-fast);
  white-space: nowrap;
  font-family: inherit;
}

.fp-chip:hover {
  border-color: var(--ql-primary);
  color: var(--ql-primary);
}

.fp-chip--active {
  background: rgba(232,76,136,0.06);
  color: var(--ql-primary);
  border-color: rgba(232,76,136,0.32);
  font-weight: 500;
}

.fp-chip--solid {
  background: var(--ql-primary);
  color: #fff;
  border-color: var(--ql-primary);
  font-weight: 500;
}

.fp-chip--solid:hover {
  background: oklch(0.58 0.21 350);
  color: #fff;
  border-color: oklch(0.58 0.21 350);
}

.fp-chip__caret {
  font-size: 9px;
  opacity: 0.6;
  margin-left: 1px;
}

.fp-field-divider {
  width: 1px;
  height: 16px;
  background: var(--ql-border);
  margin: 0 4px;
  flex-shrink: 0;
}

/* ============ 表头 + 行：共享 grid ============ */
.rlv-thead {
  flex-shrink: 0;
  background: var(--ql-surface);
  border-bottom: 1px solid var(--ql-border-light);
  position: sticky;
  top: 0;
  z-index: 5;
}

.rlv-th,
.rlv-row {
  display: grid;
  grid-template-columns:
    36px
    minmax(180px, 1.4fr)
    minmax(160px, 1.2fr)
    78px 78px 78px 78px
    100px;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
}

.rlv-th {
  min-height: 38px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ql-text-muted);
  letter-spacing: 0.03em;
  background: var(--ql-surface-alt);
}

.th-chk { display: flex; align-items: center; }
.th-info,
.th-vid {
  display: flex;
  align-items: center;
  padding-left: 4px;
}
.th-col {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
}
.th-act {
  display: flex;
  align-items: center;
  justify-content: center;
}

.th-sort-icon {
  font-size: 11px;
  color: var(--ql-primary);
  font-weight: 700;
}

.th-sort-icon--idle {
  color: var(--ql-text-tertiary);
  font-weight: 400;
  opacity: 0.6;
}

.th-col.sortable {
  cursor: pointer;
  border-radius: 6px;
  transition: var(--ql-transition-fast);
}

.th-col.sortable:hover {
  background: rgba(232,76,136,0.06);
  color: var(--ql-primary);
}

.th-col.sortable:hover .th-sort-icon--idle {
  opacity: 1;
  color: var(--ql-primary);
}

.th-col.sorted {
  color: var(--ql-primary);
  font-weight: 700;
}

.rlv-th input[type="checkbox"],
.rlv-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--ql-primary);
  cursor: pointer;
}

/* ============ 列表 body ============ */
.rlv-body {
  flex: 1;
  overflow-y: auto;
  background: var(--ql-surface);
  scrollbar-width: thin;
}

.rlv-body::-webkit-scrollbar { width: 6px; }
.rlv-body::-webkit-scrollbar-thumb { background: var(--ql-border); border-radius: 3px; }

.rlv-rows { display: flex; flex-direction: column; }

.rlv-row {
  min-height: 84px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ql-border-light);
  background: var(--ql-surface);
  transition: background var(--ql-motion-fast);
  position: relative;
}

.rlv-row:hover { background: var(--ql-surface-hover); }

.rlv-row.passed {
  background: linear-gradient(90deg, rgba(34,197,94,0.05), transparent 60%);
  border-left: 3px solid var(--ql-success);
  padding-left: 13px;
}

.rlv-row.rejected { opacity: 0.45; }

.rlv-row__info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 4px;
  min-width: 0;
}

.rlv-row__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFDEE9, #E8EAED);
  color: var(--ql-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
}

.rlv-row__avatar-platform {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ql-dark-surface);
  border: 1.5px solid #fff;
  color: #fff;
  font-size: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.rlv-row__info-main { flex: 1; min-width: 0; }

.rlv-row__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ql-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rlv-row__id {
  font-size: 10.5px;
  color: var(--ql-text-muted);
  margin-bottom: 4px;
}

.rlv-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.row-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.row-tag--type { background: var(--ql-primary-bg); color: var(--ql-primary-text); }
.row-tag--region { background: rgba(15,23,42,0.05); color: var(--ql-text-secondary); }
.row-tag--gender { background: rgba(15,23,42,0.05); color: var(--ql-text-secondary); }

.rlv-row__videos {
  display: flex;
  gap: 6px;
  padding-left: 4px;
}

.rlv-row__vid {
  width: 50px;
  height: 68px;
  border-radius: 6px;
  background: linear-gradient(135deg, #E8EAED, #D0D3DA);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 200ms;
}

.rlv-row__vid:hover { transform: scale(1.04); }

.rlv-row__vid::after {
  content: '▶';
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 12px;
  height: 12px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border-radius: 50%;
  font-size: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rlv-row__metric {
  font-size: 13px;
  font-weight: 600;
  color: var(--ql-text);
  text-align: center;
}

.rlv-row__actions {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.row-act-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--ql-surface);
  border: 1px solid var(--ql-border);
  color: var(--ql-text-secondary);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--ql-transition-fast);
}

.row-act-btn:hover {
  border-color: var(--ql-primary);
  color: var(--ql-primary);
  transform: scale(1.05);
}

.row-status-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.row-status-badge--pass { background: var(--ql-success-bg); color: var(--ql-success-text); }
.row-status-badge--reject { background: rgba(15,23,42,0.06); color: var(--ql-text-muted); }

/* ============ 分页栏 rp-pag ============ */
.rp-pag {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 2px;
  padding: 8px 20px;
  flex-shrink: 0;
  background: var(--ql-surface-alt);
  border-top: 1px solid var(--ql-border-light);
}

.pg-pages {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.pg-btn {
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 450;
  color: var(--ql-text-tertiary);
  cursor: pointer;
  transition: var(--ql-transition-fast);
  padding: 0 8px;
}

.pg-btn:hover {
  color: var(--ql-text);
  background: rgba(0,0,0,0.04);
}

.pg-btn.cur {
  min-width: 30px;
  height: 30px;
  background: var(--ql-surface);
  color: var(--ql-text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15,23,42,0.06), inset 0 0 0 1px rgba(15,23,42,0.06);
}

.pg-btn.off {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.pg-info {
  margin: 0 8px;
  font-size: 12px;
  color: var(--ql-text-muted);
}

.pg-info-cur {
  color: var(--ql-text);
  font-weight: 600;
}

.pg-actions {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.pg-auto-reject {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ql-text-muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.pg-auto-reject:hover { color: var(--ql-text-secondary); }

.pg-switch {
  width: 28px;
  height: 16px;
  border-radius: 999px;
  position: relative;
  background: rgba(0,0,0,0.12);
  transition: background 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.pg-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.pg-switch.on {
  background: var(--ql-primary);
}

.pg-switch.on::after { transform: translateX(12px); }

/* ============================================
 *  推荐条 rec-bar （v5：双位置、共享内核）
 * ============================================ */

/* 共享：item 行（栅格对齐：勾选 / 字段名 / 当前值 / 箭头 / 目标值 / +N人） */
.rec-item {
  display: grid;
  grid-template-columns: 24px 100px 1fr 18px 1fr 78px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background var(--ql-motion-fast), border-color var(--ql-motion-fast);
  border: 1px solid transparent;
  user-select: none;
}

.rec-item:hover {
  background: rgba(232,76,136,0.05);
  border-color: rgba(232,76,136,0.18);
}

.rec-item__check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--ql-border);
  background: var(--ql-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--ql-transition-fast);
  flex-shrink: 0;
  padding: 0;
  color: transparent;
}

.rec-item__check:hover {
  border-color: var(--ql-primary);
}

.rec-item.checked .rec-item__check {
  background: var(--ql-primary);
  border-color: var(--ql-primary);
  color: #fff;
}

.rec-item.checked {
  background: rgba(232,76,136,0.08);
  border-color: rgba(232,76,136,0.32);
}

.rec-item__field {
  font-weight: 600;
  color: var(--ql-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-item__from {
  color: var(--ql-text-muted);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-item__arrow {
  color: var(--ql-text-tertiary);
  font-size: 13px;
  text-align: center;
}

.rec-item__to {
  color: var(--ql-action);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-item.rec-item--single .rec-item__to {
  color: var(--ql-error-text);
  font-weight: 600;
}

.rec-item__gain {
  color: var(--ql-success-text);
  font-weight: 700;
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============ 位置1：rec-bar--bottom（结果末页底部多行卡） ============ */
.rec-bar--bottom {
  margin: 16px 18px 24px;
  padding: 14px 16px 12px;
  background: linear-gradient(135deg, rgba(107,58,93,0.05), rgba(107,58,93,0.015));
  border: 1.5px dashed rgba(107,58,93,0.32);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: recBarFadeIn 0.45s var(--ql-ease-glass);
}

@keyframes recBarFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rec-bar__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 8px;
  border-bottom: 1px dashed var(--ql-border-light);
}

.rec-bar__icon {
  font-size: 16px;
  flex-shrink: 0;
}

.rec-bar__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ql-text);
}

.rec-bar__hint {
  margin-left: auto;
  font-size: 11px;
  color: var(--ql-text-muted);
  font-weight: 500;
}

.rec-bar__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rec-bar__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px 0;
  border-top: 1px dashed var(--ql-border-light);
}

.rec-bar__summary {
  font-size: 12px;
  color: var(--ql-text-muted);
}

.rec-bar__summary b {
  color: var(--ql-action);
  font-weight: 700;
  margin: 0 1px;
}

.rec-bar__summary.ready { color: var(--ql-text-secondary); }

.rec-bar__rebuild {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 16px;
  background: var(--ql-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ql-transition-fast);
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(232,76,136,0.25);
}

.rec-bar__rebuild:hover:not(:disabled) {
  background: oklch(0.58 0.21 350);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232,76,136,0.35);
}

.rec-bar__rebuild:active { transform: translateY(0); }

.rec-bar__rebuild:disabled {
  background: var(--ql-action-disabled-bg);
  color: var(--ql-action-disabled-text);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.7;
}

.rec-bar__rebuild-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ============ 位置2：rec-bar--inline（筛选面板嵌入） ============ */
.rec-bar--inline {
  flex-shrink: 0;
}

/* 默认隐藏 expanded，仅展示 capsule */
.rec-bar--inline .rec-bar__expanded { display: none; }
.rec-bar--inline .rec-bar__capsule { display: inline-flex; }

/* 展开态 */
.rec-bar--inline.expanded .rec-bar__capsule { display: none; }
.rec-bar--inline.expanded .rec-bar__expanded {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(107,58,93,0.05), rgba(107,58,93,0.015));
  border: 1.5px dashed rgba(107,58,93,0.32);
  border-radius: 12px;
  animation: recBarFadeIn 0.3s var(--ql-ease-glass);
}

.rec-bar--inline .rec-bar__head {
  padding: 6px 8px;
  margin: -4px -4px 4px;
  border-bottom: 1px dashed var(--ql-border-light);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: background var(--ql-motion-fast);
}

.rec-bar--inline .rec-bar__head:hover {
  background: rgba(107,58,93,0.05);
}

.rec-bar--inline .rec-bar__head .rec-bar__title {
  flex: 1;
  font-size: 12.5px;
}

/* 胶囊态 */
.rec-bar__capsule {
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 6px 0 14px;
  background: linear-gradient(90deg, rgba(107,58,93,0.08), rgba(107,58,93,0.04));
  border: 1px solid rgba(107,58,93,0.30);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ql-text-secondary);
  width: 100%;
  cursor: pointer;
  transition: background var(--ql-motion-fast), border-color var(--ql-motion-fast);
  animation: recBarFadeIn 0.3s var(--ql-ease-glass);
}

.rec-bar__capsule:hover {
  background: linear-gradient(90deg, rgba(107,58,93,0.14), rgba(107,58,93,0.06));
  border-color: rgba(107,58,93,0.45);
}

.rec-bar__capsule-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-bar__capsule-text b {
  color: var(--ql-text);
  font-weight: 700;
}

.rec-bar__capsule-from {
  color: var(--ql-text-muted);
  font-weight: 500;
  margin-left: 2px;
}

.rec-bar__capsule-arrow {
  color: var(--ql-text-tertiary);
  font-size: 11px;
}

.rec-bar__capsule-to {
  color: var(--ql-action);
  font-weight: 700;
}

.rec-bar__capsule-gain {
  color: var(--ql-success-text);
  font-weight: 700;
  font-size: 11.5px;
  font-style: normal;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

/* toggle 按钮（胶囊右侧 / 展开态右上） */
.rec-bar__toggle {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--ql-action);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  border-radius: 4px;
  transition: background var(--ql-motion-fast), color var(--ql-motion-fast);
}

.rec-bar__toggle:hover {
  background: rgba(15,23,42,0.06);
  color: var(--ql-text);
}

.rec-bar__toggle--up {
  border: none;
  background: transparent;
  color: var(--ql-text-muted);
  width: 22px;
  height: 22px;
}

.rec-bar__toggle--up:hover {
  background: rgba(15,23,42,0.06);
  color: var(--ql-text);
  transform: none;
}

/* inline 模式下：item 不显示勾选格 */
.rec-bar--inline .rec-item {
  grid-template-columns: 100px 1fr 18px 1fr 78px;
  cursor: default;
  padding: 7px 12px;
}

.rec-bar--inline .rec-item__check { display: none; }

.rec-bar--inline .rec-item:hover {
  background: rgba(232,76,136,0.04);
  border-color: transparent;
}

/* ============ 全局 Tooltip ============ */
.relax-tooltip {
  position: fixed;
  display: none;
  padding: 6px 10px;
  background: rgba(30,22,28,0.94);
  color: #fff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  pointer-events: none;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  white-space: nowrap;
}

.relax-tooltip.show { display: block; }

.relax-tooltip b { color: #9AE6B4; font-weight: 700; }

/* ============ 响应式 ============ */
@media (max-width: 1280px) {
  body { grid-template-columns: 260px 1fr; }
  .app { grid-template-columns: 220px 1fr; }
  .rlv-th,
  .rlv-row {
    grid-template-columns:
      32px
      minmax(160px, 1.2fr)
      minmax(140px, 1fr)
      64px 64px 64px 64px
      90px;
    gap: 4px;
    padding: 0 12px;
  }
  .rlv-row { padding: 12px 12px; }
  .rlv-row__vid { width: 40px; height: 56px; }

  .rec-item {
    grid-template-columns: 22px 90px 1fr 16px 1fr 70px;
    gap: 8px;
    font-size: 12px;
  }
  .rec-bar--inline .rec-item {
    grid-template-columns: 90px 1fr 16px 1fr 70px;
  }

  .filter-grid { grid-template-columns: 1fr; }
}
