/* 查询页 / 详情页专用 */
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.view-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 3px;
  background: #eef0f3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.view-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 4px;
  cursor: pointer;
}
.view-tab:hover { color: var(--text); }
.view-tab.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.filters { padding: 14px 16px; margin-bottom: 12px; }
.filter-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.filter-row[hidden],
.more-filters[hidden] { display: none !important; }
.filter-row + .filter-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.filter-row.primary {
  grid-template-columns: 2.4fr 1fr auto;
  align-items: end;
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.result-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
}
.result-main { flex: 1; min-width: 0; }
#resultCount { font-weight: 600; color: var(--text); margin-bottom: 6px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.result-tools { display: flex; align-items: center; gap: 10px; }
.pager { display: flex; gap: 8px; align-items: center; color: var(--text-secondary); }
.col-menu-wrap { position: relative; }
.col-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  min-width: 200px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.col-menu[hidden] { display: none !important; }
.col-menu-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px;
  cursor: pointer;
  color: var(--text);
}
.col-menu-item input { width: auto; }

.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 280px);
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}
.table-wrap th,
.table-wrap td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}
.table-wrap th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fafbfc;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
}
.table-wrap tbody tr { cursor: pointer; }
.table-wrap tbody tr:hover { background: #f7f8fa; }
.table-wrap tbody tr.row-catalog { background: #fff7e8; }
.name-cell { font-weight: 600; }
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  font-size: 12px;
}
.empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 48px 12px !important;
}
.empty-rich strong {
  display: block;
  color: var(--text);
  margin-bottom: 8px;
  font-size: 15px;
}
.empty-rich p {
  margin: 0 auto 12px;
  max-width: 420px;
  line-height: 1.5;
}

.check-col { width: 40px; text-align: center; }
.check-col input { width: 15px; height: 15px; cursor: pointer; }

.batch-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.batch-bar[hidden] { display: none; }
.batch-bar-info { font-size: 13px; color: var(--text-secondary); }
.batch-bar-info b { color: var(--text); }
.batch-bar-actions { display: flex; gap: 8px; }
body.has-batch-bar { padding-bottom: 80px; }

.job-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  border: 1px solid #bedaff;
  background: #e8f3ff;
}
.job-banner[hidden] { display: none; }
.job-banner-main { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.job-banner-main strong { color: var(--primary); }

/* 详情双栏 */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: 1fr; }
}
.detail-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 520px;
}
.detail-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.detail-col-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.detail-col-body {
  padding: 12px 14px 20px;
  overflow: auto;
  flex: 1;
  max-height: calc(100vh - 220px);
}
.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.detail-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.detail-tab.active {
  background: var(--primary-soft);
  border-color: transparent;
  color: var(--primary);
  font-weight: 600;
}
.detail-panel[hidden] { display: none !important; }
.kv {
  display: grid;
  grid-template-columns: 100px 1fr 100px 1fr;
  gap: 10px 12px;
  font-size: 13px;
}
@media (max-width: 700px) {
  .kv { grid-template-columns: 100px 1fr; }
}
.kv dt { color: var(--text-secondary); }
.kv dd { margin: 0; word-break: break-word; }
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.mini-table th,
.mini-table td {
  border: 1px solid var(--border);
  padding: 7px 8px;
}
.mini-table th {
  background: #fafbfc;
  color: var(--text-secondary);
  font-weight: 600;
}
.tab-empty {
  padding: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}
.verify-placeholder {
  padding: 24px 8px;
  text-align: center;
}
.verify-placeholder h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.verify-placeholder p {
  margin: 0 auto 16px;
  max-width: 360px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}
.detail-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.detail-top h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.detail-top .sub { margin: 4px 0 0; font-size: 13px; color: var(--text-secondary); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.pkg-banner {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: var(--bg);
  font-size: 13px;
}
.pkg-banner.ready { background: var(--success-bg); border-color: #7be188; }
.pkg-banner.partial { background: var(--warning-bg); border-color: #ffcf8b; }
.pkg-banner strong { display: block; margin-bottom: 4px; }
.pkg-banner p { margin: 0; color: var(--text-secondary); font-size: 12px; }

.btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.verify-modal[hidden] { display: none; }
.verify-modal { position: fixed; inset: 0; z-index: 50; }
.verify-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 33, 41, 0.45);
}
.verify-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.verify-head {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.verify-head h2 { margin: 0; font-size: 16px; }
.verify-stage {
  position: relative;
  background: #111;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.verify-stage img {
  max-width: 100%;
  max-height: min(62vh, 560px);
  object-fit: contain;
}
.verify-placeholder-frame {
  color: rgba(255, 255, 255, 0.45);
}
.verify-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.btns.row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
}
.actions-col {
  white-space: nowrap;
  min-width: 200px;
}
.table-wrap td.actions-col .btn {
  padding: 4px 8px;
  font-size: 12px;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.shot-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.shot-card:hover {
  border-color: var(--primary, #165dff);
}
.shot-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #f2f3f5;
  pointer-events: none;
}
.shot-card span {
  padding: 0 8px 8px;
  color: var(--text-secondary, #86909c);
}

.shot-lightbox[hidden] { display: none; }
.shot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
}
.shot-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 33, 41, 0.55);
}
.shot-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}
.shot-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.shot-lightbox-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shot-lightbox-stage {
  position: relative;
  background: #111;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 48px;
}
.shot-lightbox-stage img {
  max-width: 100%;
  max-height: min(72vh, 720px);
  object-fit: contain;
}
.shot-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.shot-nav:hover { background: rgba(255, 255, 255, 0.28); }
.shot-nav.prev { left: 8px; }
.shot-nav.next { right: 8px; }
.shot-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 640px) {
  .filter-row,
  .filter-row.primary { grid-template-columns: 1fr; }
}
