/*
 * 产品预览的样式：照商家站（web/src）的达人库、达人池抽屉和达人档案编辑框画，配色沿用商家站。
 * 预览只是插图，整块对读屏软件隐藏；页面本身的样式在 site.css。
 */

.shot {
  margin: 0;
}

.shot-library {
  margin-top: clamp(40px, 6vw, 80px);
}

.shot-caption {
  margin-top: 12px;
  color: var(--slate);
  font-size: 13px;
  text-align: right;
}

.feature-visual .shot-caption {
  margin-top: 10px;
}

.app {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(16, 22, 58, 0.08);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  cursor: default;
  user-select: none;
}

.shot-library .app {
  box-shadow: 0 1px 2px rgba(16, 22, 58, 0.06), 0 40px 80px -36px rgba(16, 22, 58, 0.42);
}

.app .icon {
  font-size: 16px;
}

/* 侧栏 */
.app-side {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 212px;
  padding: 20px 12px 18px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 14px;
  color: var(--white);
  font-size: 16px;
  font-weight: 800;
}

.app-brand img {
  width: 28px;
  height: 28px;
}

.app-group {
  padding: 14px 12px 6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
}

.app-link.is-active {
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
}

.app-foot {
  margin-top: auto;
  padding: 18px 8px 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

/* 内容区 */
.app-main {
  flex: 1;
  min-width: 0;
  padding: 22px 24px 24px;
  background: var(--mist);
}

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

.app-title {
  display: block;
  color: var(--navy);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.app-sub {
  display: block;
  margin-top: 3px;
  color: var(--slate);
  font-size: 13px;
}

.app-head-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.app-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 650;
}

.app-panel {
  padding: 16px 18px 8px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 6px 24px rgba(16, 22, 58, 0.05);
}

.app-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 999px;
  background: var(--sky);
}

.app-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.app-tab.is-active {
  background: var(--blue);
  color: var(--white);
}

.app-tab.is-disabled {
  color: #9aa3bf;
}

.app-soon {
  padding: 0 5px;
  border-radius: 4px;
  background: var(--gray-bg);
  box-shadow: inset 0 0 0 1px #d5dbe8;
  color: var(--slate);
  font-size: 10.5px;
  font-weight: 500;
}

.app-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.app-field {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 132px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  background: var(--white);
  color: #8a93ad;
  font-size: 12.5px;
  white-space: nowrap;
}

.app-field .icon {
  font-size: 13px;
  color: #a8b0c6;
}

.app-field.is-search {
  justify-content: flex-start;
  min-width: 210px;
}

.app-field.is-set {
  color: var(--ink-soft);
}

.app-spacer {
  flex: 1;
}

.app-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
}

.app-btn .icon {
  font-size: 14px;
  stroke-width: 2.25;
}

.app-btn-ghost {
  border: 1px solid #dcdfe6;
  background: var(--white);
  color: var(--ink-soft);
}

/* 表格：用网格画，窄屏下改成两行一条 */
.app-tr {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 0.8fr) minmax(0, 1.5fr) minmax(0, 0.9fr) minmax(0, 1.8fr);
  gap: 14px;
  align-items: center;
  padding: 11px 8px;
  border-top: 1px solid #ebeef5;
}

.app-thead {
  padding-top: 8px;
  padding-bottom: 8px;
  border-top: 0;
  color: #909399;
  font-size: 12px;
  font-weight: 650;
}

/* 表头单元格不吃各列自己的颜色和字号 */
.app-thead > .app-td {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.app-td {
  min-width: 0;
}

.app-num {
  text-align: right;
}

.app-mlabel,
.app-owner .icon {
  display: none;
}

.app-creator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-creator-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-name {
  overflow: hidden;
  color: var(--blue);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-accounts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  margin-top: 1px;
  color: var(--slate);
  font-size: 12px;
}

.app-wa {
  color: var(--slate);
}

.app-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.app-note {
  overflow: hidden;
  color: var(--slate);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.4;
  white-space: nowrap;
}

.app-pill-platform {
  padding: 0 6px;
  border-radius: 4px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px #cfd8ec;
  color: var(--navy);
  font-size: 10.5px;
}

.app-pill-gray {
  background: var(--gray-bg);
  color: var(--slate);
}

.app-accounts .app-pill-gray,
.app-accounts .app-pill-green {
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10.5px;
}

.app-pill-green {
  background: var(--green-bg);
  color: var(--green);
}

/* 头像：颜色取自商家站的头像调色板 */
.av {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--av, var(--blue));
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.av-xs {
  width: 20px;
  height: 20px;
  font-size: 9px;
}

.av-lg {
  width: 44px;
  height: 44px;
  font-size: 15px;
}

.av-coral { --av: #f26a4b; }
.av-deep { --av: #1f4e5f; }
.av-green { --av: #2ba97a; }
.av-amber { --av: #e0a21b; }
.av-violet { --av: #8b5cf6; }
.av-blue { --av: #2f6fdb; }
.av-pink { --av: #e0457b; }
.av-teal { --av: #0ea5a4; }

/* 抽屉和弹窗外形 */
.app-sheet {
  display: block;
  padding: 20px 22px 18px;
  box-shadow: 0 1px 2px rgba(16, 22, 58, 0.05), 0 24px 48px -28px rgba(16, 22, 58, 0.3);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--navy);
  font-size: 16px;
  font-weight: 750;
}

.sheet-head .icon {
  color: #909399;
  font-size: 18px;
}

.sheet-status {
  display: block;
  margin: 4px 0 14px;
  color: var(--slate);
  font-size: 12.5px;
}

.sheet-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #ebeef5;
}

/* 抽屉里的筛选框按内容宽度排，放得下一行 */
.app-sheet .app-field {
  min-width: 0;
}

.app-sheet .app-field.is-search {
  min-width: 170px;
}

/* 达人池表格 */
.pool-table .app-tr {
  grid-template-columns: 18px minmax(0, 2.2fr) minmax(0, 0.7fr) minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 12px;
}

.app-gmv {
  white-space: nowrap;
}

.pool-table .app-tr.is-checked {
  background: #f5f8ff;
}

.app-check {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #c0c4cc;
  border-radius: 4px;
  background: var(--white);
  color: var(--white);
}

.app-check .icon {
  font-size: 12px;
  stroke-width: 3;
}

.app-check.is-on {
  border-color: var(--blue);
  background: var(--blue);
}

.app-check.is-partial {
  position: relative;
  border-color: var(--blue);
  background: var(--blue);
}

.app-check.is-partial::after {
  content: "";
  width: 8px;
  height: 2px;
  border-radius: 1px;
  background: var(--white);
}

.app-check.is-locked {
  border-color: #e0e4ec;
  background: #f2f4f8;
}

.app-category {
  color: var(--slate);
  font-size: 12.5px;
}

.app-gmv {
  color: var(--navy);
  font-weight: 600;
}

/* 达人档案编辑框 */
.rec-who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--mist);
}

.rec-name {
  color: var(--navy);
  font-size: 15px;
  font-weight: 750;
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.rec-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.rec-field.is-wide {
  grid-column: 1 / -1;
}

.rec-label {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 650;
}

.rec-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  color: var(--ink-soft);
  font-size: 13px;
}

.is-select .rec-input {
  justify-content: space-between;
}

.is-select .rec-input .icon {
  color: #a8b0c6;
  font-size: 13px;
}

.is-tags .rec-input {
  padding: 4px 6px;
}

.rec-tag {
  gap: 4px;
}

.rec-tag .icon {
  font-size: 10px;
  stroke-width: 2.5;
}

.is-area .rec-input {
  align-items: flex-start;
  min-height: 74px;
  padding: 8px 10px;
  line-height: 1.55;
}

/* ---------- 入场编排：首屏预览接在文字后面浮上来，表格各行依次淡入 ---------- */

@media (prefers-reduced-motion: no-preference) {
  .shot-library .app {
    animation: rise-far 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.18s both;
  }

  .shot-library .app-tbody .app-tr {
    animation: fade-in 0.5s ease both;
  }

  .shot-library .app-tbody .app-tr:nth-child(1) { animation-delay: 0.5s; }
  .shot-library .app-tbody .app-tr:nth-child(2) { animation-delay: 0.56s; }
  .shot-library .app-tbody .app-tr:nth-child(3) { animation-delay: 0.62s; }
  .shot-library .app-tbody .app-tr:nth-child(4) { animation-delay: 0.68s; }
  .shot-library .app-tbody .app-tr:nth-child(5) { animation-delay: 0.74s; }
}

@keyframes rise-far {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ---------- 响应式 ---------- */

/* 窄桌面：达人库去掉备注列 */
@media (max-width: 1099px) {
  .shot-library .app-tr {
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 0.8fr) minmax(0, 1.5fr) minmax(0, 0.9fr);
  }

  .shot-library .app-note {
    display: none;
  }
}

/* 平板：侧栏收成图标条（和商家站一致），筛选栏只留搜索和按钮 */
@media (max-width: 959px) {
  .app-side {
    align-items: center;
    width: 64px;
    padding: 18px 10px;
  }

  .app-brand {
    padding: 0 0 12px;
  }

  .app-brand span,
  .app-group,
  .app-link span,
  .app-foot {
    display: none;
  }

  .app-link {
    justify-content: center;
    width: 44px;
    padding: 10px 0;
  }

  .app-link + .app-group + .app-link {
    margin-top: 14px;
  }

  .app-link .icon {
    font-size: 18px;
  }

  .app-field.is-filter {
    display: none;
  }
}

@media (max-width: 767px) {
  .app-side {
    display: none;
  }

  .app-main {
    padding: 16px;
  }

  .app-head-actions {
    display: none;
  }

  .app-toolbar .app-field.is-search {
    flex: 1 1 200px;
    min-width: 0;
  }
}

/* 手机：表格改成两行一条，表头藏起来，粉丝和负责人靠小标签和图标说明 */
@media (max-width: 599px) {
  .shot-caption {
    text-align: left;
  }

  .app-thead {
    display: none;
  }

  /* 标签切换收紧到一行：去掉「站外」，圆角改小，换行时也不会变成一团 */
  .app-tabs {
    border-radius: 12px;
  }

  .app-tab {
    padding: 4px 10px;
    font-size: 12px;
  }

  .app-tab:nth-child(4) {
    display: none;
  }

  .app-sheet .app-spacer {
    display: none;
  }

  .app-sheet .app-field.is-search {
    flex: 1 1 140px;
    min-width: 0;
  }

  .app-tr,
  .shot-library .app-tr {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "creator num"
      "tags owner";
    gap: 8px 12px;
    padding: 12px 4px;
  }

  .app-tbody .app-tr:first-child {
    border-top: 0;
  }

  .shot-library .app-creator { grid-area: creator; }
  .shot-library .app-num { grid-area: num; }
  .shot-library .app-tags { grid-area: tags; }
  .shot-library .app-owner { grid-area: owner; }

  .app-mlabel {
    display: block;
    color: var(--slate);
    font-size: 10.5px;
    line-height: 1.2;
  }

  .app-num {
    color: var(--navy);
    font-weight: 650;
  }

  .app-owner {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    color: var(--slate);
    font-size: 12.5px;
  }

  .app-owner .icon {
    display: block;
    font-size: 13px;
  }

  .pool-table .app-tr {
    grid-template-columns: 18px minmax(0, 1fr) auto;
    grid-template-areas:
      "check creator num"
      "check creator gmv";
    gap: 2px 10px;
  }

  .pool-table .app-check-cell { grid-area: check; }
  .pool-table .app-creator { grid-area: creator; }
  .pool-table .app-num { grid-area: num; }

  .pool-table .app-gmv {
    grid-area: gmv;
    color: var(--slate);
    font-size: 12px;
    font-weight: 500;
  }

  .pool-table .app-category {
    display: none;
  }

  .app-field.is-set:not(.is-sort) {
    display: none;
  }

  .app-sheet {
    padding: 16px 14px 14px;
  }

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

/* 很窄的手机（320 左右）：标签切换只留前两个 */
@media (max-width: 359px) {
  .app-tab:nth-child(n + 3) {
    display: none;
  }
}
