:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.page-bg {
  position: fixed;
  inset: 0 0 auto 0;
  height: 260px;
  background: linear-gradient(135deg, #2563eb, #60a5fa 55%, #dbeafe);
  z-index: -1;
}

.container {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hidden { display: none !important; }

.card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-card {
  width: min(470px, 100%);
  margin: 90px auto;
  padding: 34px;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #fff;
  border-radius: 16px;
  background: var(--primary);
  font-size: 26px;
  font-weight: 800;
}

.access-error-card {
  border-color: #fecaca;
}

.access-error-card .brand {
  margin-bottom: 18px;
}

.access-error-mark {
  background: var(--danger);
}

.access-error-tip {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fef2f2;
  color: #991b1b;
  line-height: 1.7;
}

h1, h2, p { margin: 0; }
.brand h1,
.topbar h1 { font-size: 28px; letter-spacing: -0.02em; }
.brand p,
.topbar p,
.tip { color: var(--muted); margin-top: 7px; line-height: 1.6; }

.login-form { display: grid; gap: 18px; }

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 650;
}

input, textarea, button, a.ghost {
  font: inherit;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

button, a.ghost {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px;
  font-weight: 700;
  white-space: nowrap;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .1s ease, transform .06s ease, box-shadow .1s ease, opacity .1s ease;
}
button:not(:disabled):active,
a.ghost:active,
button.instant-tap,
a.ghost.instant-tap {
  transform: translateY(1px) scale(.99);
}
button:disabled,
button.is-busy {
  cursor: not-allowed;
  opacity: .58;
}

.primary {
  background: var(--primary);
  color: white;
}
.primary:hover { background: var(--primary-dark); }

.primary-light {
  background: #e0f2fe;
  color: #075985;
}
.primary-light:hover { background: #bae6fd; }

.ghost, a.ghost {
  background: #eef2ff;
  color: #1e40af;
}
.ghost:hover, a.ghost:hover { background: #dbeafe; }

.danger-light {
  background: #fee2e2;
  color: #b91c1c;
}
.danger-light:hover { background: #fecaca; }

.full { width: 100%; }

.tip code {
  background: #eef2ff;
  color: #1d4ed8;
  padding: 2px 6px;
  border-radius: 6px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  color: white;
  margin-bottom: 22px;
}
.topbar p { color: rgba(255, 255, 255, 0.86); }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.message.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.stat-card span { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat-card strong { display: block; margin-top: 8px; font-size: 28px; }

.view-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.tab {
  background: rgba(255, 255, 255, 0.92);
  color: #1e40af;
  border: 1px solid rgba(226, 232, 240, 0.95);
}
.tab.active {
  background: var(--primary);
  color: white;
}

.score-card, .list-card, .history-card {
  padding: 22px;
  margin-bottom: 16px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.section-title h2 { font-size: 20px; }
.score-title { align-items: flex-start; }

.admin-count {
  display: grid;
  grid-template-columns: 140px auto;
  gap: 10px;
  align-items: end;
  min-width: 280px;
}
.admin-count input { text-align: center; font-size: 18px; font-weight: 800; }

.score-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.slide-status {
  text-align: center;
  display: grid;
  gap: 4px;
}
.slide-status strong { font-size: 18px; }
.slide-status span { color: var(--muted); font-size: 13px; }

.score-carousel {
  display: flex;
  overflow-x: hidden;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
  -webkit-overflow-scrolling: touch;
}
.score-carousel::-webkit-scrollbar { display: none; }
.score-carousel { scrollbar-width: none; overscroll-behavior-x: contain; }

.score-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  padding: 18px;
}
.slide-inner {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.slide-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.slide-header h3 { margin: 0; font-size: 20px; }
.slide-header p { color: var(--muted); margin-top: 4px; }
.edit-badge {
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.slide-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.slide-form label:nth-child(1),
.slide-form label:nth-child(2) { grid-column: span 2; }
.slide-form label:nth-child(3),
.slide-form label:nth-child(4),
.slide-form label:nth-child(5),
.slide-form label:nth-child(6) { grid-column: span 1; }
.wide { grid-column: 1 / -1; }
.required { color: var(--danger); }

.mobile-score-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 16px;
  margin: 0;
}
.mobile-score-panel legend {
  color: var(--muted);
  font-weight: 700;
  padding: 0 8px;
}
.score-row {
  display: grid;
  grid-template-columns: 110px 1fr 48px;
  gap: 12px;
  align-items: center;
  min-height: 46px;
}
.score-row span:first-child { color: #334155; font-weight: 750; }
.score-row output {
  display: grid;
  place-items: center;
  height: 36px;
  border-radius: 12px;
  background: #eef2ff;
  color: #1e40af;
  font-weight: 900;
  font-size: 18px;
}
.score-row input[type="range"] {
  padding: 0;
  height: 34px;
  accent-color: var(--primary);
}
.total-box {
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 13px 14px;
  display: grid;
  gap: 4px;
}
.total-box span { color: var(--muted); font-size: 13px; font-weight: 700; }
.total-box strong { font-size: 30px; line-height: 1; }
.total-box em { color: var(--primary); font-style: normal; font-weight: 800; }

.slide-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 14px 0 0;
}
.slide-dot {
  width: 10px;
  height: 10px;
  min-height: 10px;
  padding: 0;
  border-radius: 999px;
  background: #cbd5e1;
}
.slide-dot.active { background: var(--primary); width: 24px; }
.slide-dot.saved { box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18); }
.slide-dot:disabled { opacity: 0.35; cursor: not-allowed; }

.score-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 16px;
}

.search-title { align-items: flex-start; }
.search-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.search-form input { width: 210px; }
.search-form input[type="date"] { width: 155px; }
.search-form select {
  width: 220px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 36px 9px 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
.mobile-help {
  display: none;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.review-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  background: white;
}
.review-table th,
.review-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 10px 9px;
  text-align: center;
  vertical-align: middle;
  font-size: 14px;
}
.review-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}
.review-table tr:hover td { background: #f8fbff; }
.review-table td:last-child,
.review-table th:last-child { border-right: 0; }
.review-table tr:last-child td { border-bottom: 0; }

.photo {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f1f5f9;
}
.photo-placeholder {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
  font-size: 12px;
}

.score-cell { font-weight: 750; }
.total-cell { font-size: 18px !important; font-weight: 900; color: #1d4ed8; }
.remark-cell { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left !important; }
.actions { display: flex; gap: 8px; justify-content: center; }
.actions button { min-height: 34px; padding: 7px 10px; border-radius: 10px; }

.empty {
  padding: 34px !important;
  color: var(--muted);
}

.history-list { display: grid; gap: 12px; }
.history-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #f8fafc;
}
.history-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
}
.history-item pre {
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  font-size: 12px;
  color: #334155;
}

@media (max-width: 1060px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide-form label:nth-child(n) { grid-column: span 1; }
  .wide { grid-column: 1 / -1 !important; }
}

@media (max-width: 680px) {
  .container { width: min(100% - 20px, 1480px); padding-top: 18px; padding-bottom: 88px; }
  .login-card { margin: 36px auto; padding: 24px; }
  .brand h1, .topbar h1 { font-size: 23px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { padding: 14px; }
  .stat-card strong { font-size: 24px; }
  .view-tabs { position: sticky; top: 0; z-index: 3; padding: 8px 0; background: rgba(245, 247, 251, 0.92); backdrop-filter: blur(10px); }
  .view-tabs .tab { flex: 1; min-height: 40px; padding: 8px 10px; }
  .score-card, .list-card, .history-card { padding: 14px; border-radius: 16px; }
  .section-title, .search-title, .score-title { flex-direction: column; align-items: stretch; }
  .admin-count { grid-template-columns: 1fr auto; min-width: 0; }
  .score-toolbar { grid-template-columns: 1fr 1fr; }
  .slide-status { grid-column: 1 / -1; grid-row: 1; }
  #prevSlideBtn { grid-column: 1; grid-row: 2; }
  #nextSlideBtn { grid-column: 2; grid-row: 2; }
  .score-slide { padding: 10px; }
  .slide-inner { padding: 14px; }
  .slide-header { align-items: flex-start; flex-direction: column; }
  .slide-form { grid-template-columns: 1fr; gap: 14px; }
  .slide-form label:nth-child(n) { grid-column: 1 / -1; }
  input, textarea { font-size: 16px; }
  .score-row { grid-template-columns: 86px 1fr 44px; gap: 8px; }
  .score-row input[type="range"] { height: 40px; }
  .score-actions, .search-form, .top-actions { flex-direction: column; align-items: stretch; }
  .search-form input, .search-form input[type="date"], .search-form select { width: 100%; }
  .mobile-help { display: block; }
  .review-table { min-width: 980px; }
}

@media print {
  body { background: #fff; }
  .page-bg, .score-card, .top-actions, .stats-grid, .search-form, .no-print, .message, .view-tabs { display: none !important; }
  .container { width: 100%; padding: 0; }
  .topbar { color: #000; margin: 0 0 12px; }
  .topbar p { color: #333; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .table-wrap { overflow: visible; border: 1px solid #000; }
  .review-table { min-width: 0; }
  .review-table th,
  .review-table td { border-color: #000; font-size: 11px; padding: 5px; }
}

.public-card .tip + .tip { margin-top: 10px; }

.image-field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.image-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.file-input {
  max-width: 220px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
}

.image-preview-wrap {
  margin-top: 10px;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  color: var(--muted);
}

.image-preview {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  display: block;
}

@media (max-width: 720px) {
  .image-input-row {
    grid-template-columns: 1fr;
  }

  .file-input {
    max-width: none;
    width: 100%;
  }
}

button:disabled,
button.disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.page-bottom-nav {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr);
  gap: 10px;
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
}

.bottom-nav-btn {
  min-height: 48px;
  border-radius: 12px;
  background: #d1d5db;
  color: #ffffff;
  font-size: 15px;
}

.bottom-nav-btn:not(:disabled):hover {
  filter: brightness(0.96);
}

.primary-bottom {
  background: var(--primary);
  color: #ffffff;
}

@media (max-width: 680px) {
  .score-card {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .page-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    background: rgba(203, 213, 225, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
  }

  .bottom-nav-btn {
    min-height: 54px;
    font-size: 16px;
  }
}

/* 2026-06: 后台配置款式、前端直接评分流程 */
.public-container { max-width: 980px; }
.public-topbar { margin-bottom: 18px; }
.reviewer-pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1e40af;
  font-weight: 700;
}
.public-slide-inner { display: grid; gap: 16px; }
.public-style-header { margin-bottom: 0; }
.public-style-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.public-style-image {
  width: 100%;
  height: 210px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.public-style-image.placeholder {
  display: grid;
  place-items: center;
  color: #94a3b8;
  border-style: dashed;
}
.public-style-info {
  display: grid;
  align-content: center;
  gap: 12px;
}
.public-style-info div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.public-style-info span { color: var(--muted); font-size: 13px; font-weight: 700; }
.public-style-info strong { font-size: 22px; }
.public-style-info p {
  line-height: 1.7;
  color: #475569;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.public-remark { display: grid; gap: 8px; }
.empty-public {
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}
.saved-badge { background: #dcfce7; color: #166534; }
.admin-style-form,
.score-edit-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}
.admin-style-form .image-field { grid-column: 1 / -1; }
.admin-style-form .style-code-field { grid-column: span 6; }
.admin-style-form .season-field,
.admin-style-form .price-field { grid-column: span 3; }
.admin-style-form .switch-label { grid-column: span 2; }
.admin-style-form .wide { grid-column: 1 / -1; }
.score-edit-form label:nth-child(2),
.score-edit-form label:nth-child(3),
.score-edit-form label:nth-child(4) { grid-column: span 4; }
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.switch-label {
  align-content: center;
  justify-items: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: #fff;
}
.switch-label input { width: 24px; height: 24px; accent-color: var(--primary); }
.table-section-title { margin-top: 8px; }
.style-table { min-width: 900px; }
.status-on { color: var(--success); }
.status-off { color: var(--muted); }
.nested-card {
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: none;
}

@media (max-width: 960px) {
  .public-style-card { grid-template-columns: 1fr; }
  .public-style-image { height: 260px; }
  .admin-style-form,
  .score-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-style-form label:nth-child(n),
  .score-edit-form label:nth-child(n) { grid-column: span 1; }
  .admin-style-form .image-field,
  .admin-style-form .style-code-field,
  .admin-style-form .wide,
  .score-edit-form .wide { grid-column: 1 / -1 !important; }
}

@media (max-width: 680px) {
  .public-style-card { padding: 10px; }
  .public-style-image { height: 220px; }
  .public-style-info strong { font-size: 18px; }
  .reviewer-pill { width: 100%; }
  .admin-style-form,
  .score-edit-form { grid-template-columns: 1fr; padding: 12px; }
  .admin-style-form label:nth-child(n),
  .score-edit-form label:nth-child(n) { grid-column: 1 / -1 !important; }
  .form-actions { flex-direction: column; align-items: stretch; }
}

/* 2026-06: 后台拖拽上传图片 + 自定义评分项 */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.drop-zone {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 170px;
  border: 2px dashed #bfdbfe;
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}

.drop-zone:hover,
.drop-zone:focus,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: #dbeafe;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .12);
  outline: none;
}

.drop-zone.drag-over {
  transform: translateY(-1px);
}

.drop-zone.paste-success {
  border-color: #16a34a;
  background: linear-gradient(135deg, #dcfce7, #ffffff);
  box-shadow: 0 12px 28px rgba(22, 163, 74, .16);
}

.drop-preview {
  min-height: 138px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  color: var(--muted);
  text-align: center;
  padding: 12px;
}

.drop-preview .image-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.drop-text {
  display: grid;
  gap: 8px;
  color: #1e3a8a;
}

.drop-text strong { font-size: 20px; }
.drop-text span { line-height: 1.7; color: #475569; }

.url-details {
  margin-top: 10px;
  color: var(--muted);
}
.url-details summary {
  cursor: pointer;
  font-weight: 700;
  color: #1e40af;
}
.url-details input { margin-top: 8px; }

.score-field-list {
  display: grid;
  gap: 10px;
}

.score-field-editor-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.score-field-order {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 900;
}

@media (max-width: 720px) {
  .drop-zone { grid-template-columns: 1fr; }
  .score-field-editor-row { grid-template-columns: 36px minmax(0, 1fr); }
  .score-field-editor-row button { grid-column: 2; justify-self: stretch; }
}

/* 2026-06: 后台表单布局二次调整：图片独占一行，款式资料压缩到同一行 */
.admin-style-form {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
}
.admin-style-form .image-field { grid-column: 1 / -1 !important; }
.admin-style-form .style-code-field { grid-column: span 3 !important; }
.admin-style-form .season-field { grid-column: span 2 !important; }
.admin-style-form .price-field { grid-column: span 2 !important; }
.admin-style-form .switch-label { grid-column: span 2 !important; min-height: 78px; }
.admin-style-form .style-remark-field { grid-column: span 3 !important; }
.admin-style-form .form-actions.wide { grid-column: 1 / -1 !important; }
.admin-style-form .style-remark-field textarea { min-height: 78px; resize: vertical; }

/* 评分项配置压缩，并支持每项满分 */
.score-field-list { gap: 8px; }
.score-field-editor-row {
  grid-template-columns: 36px minmax(180px, 1fr) 128px auto;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
}
.score-field-editor-row input { min-height: 40px; }
.score-field-order { width: 30px; height: 30px; }
.score-max-editor {
  display: grid;
  grid-template-columns: auto minmax(56px, 1fr);
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.score-max-editor input { padding: 8px 10px; text-align: center; }

@media (max-width: 1080px) {
  .admin-style-form .style-code-field { grid-column: span 4 !important; }
  .admin-style-form .season-field,
  .admin-style-form .price-field,
  .admin-style-form .switch-label,
  .admin-style-form .style-remark-field { grid-column: span 4 !important; }
}

@media (max-width: 720px) {
  .admin-style-form .style-code-field,
  .admin-style-form .season-field,
  .admin-style-form .price-field,
  .admin-style-form .switch-label,
  .admin-style-form .style-remark-field { grid-column: 1 / -1 !important; }
  .score-field-editor-row { grid-template-columns: 32px minmax(0, 1fr); }
  .score-max-editor, .score-field-editor-row button { grid-column: 2; }
}

/* 2026-06: 已配置款式支持表格内直接编辑 */
.style-inline-edit-row td {
  background: #f8fbff !important;
  vertical-align: top;
}
.inline-style-input {
  width: 100%;
  min-width: 120px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  min-height: 40px;
  background: #fff;
  font-weight: 700;
  outline: none;
}
.inline-style-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.inline-remark {
  min-width: 180px;
  min-height: 68px;
  resize: vertical;
  line-height: 1.45;
}
.inline-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 800;
  white-space: nowrap;
}
.inline-switch input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}
.inline-image-editor {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-width: 150px;
}
.inline-photo,
.inline-image-editor .photo-placeholder {
  width: 72px;
  height: 72px;
}
.inline-image-editor .image-url-input {
  min-width: 150px;
  font-size: 12px;
  padding: 8px 9px;
}
.mini-btn {
  min-height: 30px !important;
  padding: 5px 9px !important;
  font-size: 12px;
}
.inline-actions {
  flex-wrap: wrap;
  min-width: 150px;
}

@media (max-width: 720px) {
  .inline-style-input { min-width: 140px; }
  .inline-image-editor { min-width: 160px; }
}

/* 评分结果按一次提交聚合展示 */

.review-link-group-cell {
  min-width: 180px;
}
.review-link-group-cell strong,
.review-link-group-cell span {
  display: block;
}
.review-link-inline-code {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: #1d4ed8;
  font-weight: 800;
  cursor: pointer;
}
.link-button:hover { text-decoration: underline; }
.group-count {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}
.score-group-row .select-col input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
}
.score-group-row.opened td { background: #f8fbff; }
.score-group-detail-row > td { padding: 0 !important; background: #f8fbff; }
.score-group-detail {
  margin: 10px;
  padding: 14px;
  border: 1px solid #dbe7ff;
  border-radius: 16px;
  background: #fff;
}
.compact-title { margin-bottom: 10px; }
.nested-table-wrap { border-radius: 14px; }
.detail-score-table th,
.detail-score-table td { white-space: nowrap; }
@media print {
  .score-group-detail-row { display: table-row; }
}


.secret-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.secret-input-wrap input { min-width: 0; }
.icon-btn.secret-toggle {
  width: 44px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  font-size: 18px;
}
.icon-btn.secret-toggle:hover {
  background: #f8fafc;
  border-color: #bfdbfe;
}

/* 图片存储页面配置 */
.image-settings-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}
.image-settings-form label,
.image-config-row label,
.s3-settings label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}
.image-settings-form input,
.image-settings-form select {
  width: 100%;
}
.image-driver-field {
  max-width: 520px;
}
.image-config-row {
  display: grid;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}
.image-config-row-three {
  grid-template-columns: minmax(180px, 1fr) minmax(150px, .75fr) minmax(180px, 1fr);
}
.image-config-row-two {
  grid-template-columns: minmax(320px, 2fr) minmax(180px, 1fr);
}
.image-pretty-select,
.image-settings-form select.pretty-select {
  min-height: 44px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background-color: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 16px rgba(37,99,235,.06);
}
.image-pretty-select:hover,
.image-settings-form select.pretty-select:hover {
  border-color: #93c5fd;
  background-color: #ffffff;
}
.s3-settings {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
}
.s3-settings > label { grid-column: span 4; }
.s3-settings > .switch-label { grid-column: span 4; }
.s3-dependent.hidden,
.s3-settings.hidden { display: none !important; }
@media (max-width: 900px) {
  .image-config-row-three,
  .image-config-row-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-config-row-two > label:first-child { grid-column: 1 / -1; }
  .s3-settings > label,
  .s3-settings > .switch-label { grid-column: span 6; }
}
@media (max-width: 640px) {
  .image-driver-field { max-width: none; }
  .image-config-row,
  .image-config-row-three,
  .image-config-row-two,
  .s3-settings { grid-template-columns: 1fr; }
  .image-config-row-two > label:first-child,
  .s3-settings > label,
  .s3-settings > .switch-label { grid-column: 1 / -1; }
}

/* 2026-06: 前端评分可临时调整款式信息；评分项支持综合/独立类型 */
.editable-style-info label {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.editable-style-info input {
  min-height: 42px;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  outline: none;
}
.editable-style-info small {
  color: #64748b;
  line-height: 1.6;
}
.independent-score-panel {
  border-style: dashed;
  background: #fbfdff;
}
.score-type-editor {
  display: grid;
  grid-template-columns: auto minmax(92px, 1fr);
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.score-type-editor select {
  min-height: 40px;
  padding: 8px 10px;
}
.score-field-editor-row {
  grid-template-columns: 36px minmax(180px, 1fr) 150px 128px auto;
}
.score-type-mini {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .score-type-editor { grid-column: 2; }
}

/* 2026-06: 自定义评分类型和评分项样式优化 */
.score-config-subtitle {
  margin: 18px 0 10px;
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 900;
}
.score-type-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.score-type-editor-row {
  display: grid;
  grid-template-columns: 36px minmax(180px, 1fr) 170px auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}
.score-type-count {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 0;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.score-type-count input { width: 18px; height: 18px; accent-color: var(--primary); }
.score-type-editor {
  display: grid;
  grid-template-columns: auto minmax(128px, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.score-type-editor select,
.pretty-select {
  min-height: 42px;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 38px 9px 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: #0f172a;
  font-weight: 800;
}
.score-type-editor select:focus,
.pretty-select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}
.score-field-editor-row {
  grid-template-columns: 36px minmax(180px, 1fr) minmax(220px, 260px) 128px auto;
}
.independent-score-panel {
  margin-top: 14px;
}
.public-remark {
  margin: 14px 0;
}
@media (max-width: 900px) {
  .score-type-editor-row,
  .score-field-editor-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .score-type-count,
  .score-type-editor,
  .score-max-editor,
  .score-type-editor-row button,
  .score-field-editor-row button {
    grid-column: 2;
    width: 100%;
  }
}

/* 2026-06: 评分类型改为独立评分体系 */
.score-type-editor-row.score-type-system-row {
  grid-template-columns: 36px minmax(220px, 1fr) 110px auto;
}
.score-system-hint {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.score-system-panel {
  margin-top: 14px;
}
.score-system-summary {
  display: grid;
  gap: 6px;
  min-width: 170px;
}
.score-system-summary span {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed #dbeafe;
}
.score-system-summary span:last-child { border-bottom: 0; }
.score-system-summary em {
  color: var(--primary);
  font-style: normal;
  font-weight: 900;
}
.system-total-cell {
  min-width: 190px;
  text-align: left;
}
@media (max-width: 900px) {
  .score-type-editor-row.score-type-system-row { grid-template-columns: 36px minmax(0, 1fr); }
  .score-system-hint { grid-column: 2; width: fit-content; }
}


.grade-rule-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grade-rule-form > label, .grade-rule-form > .wide { grid-column: 1 / -1; }
.grade-rule-form textarea { min-height: 72px; resize: vertical; }
.grade-rules-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.grade-rules-grid label { display: flex; flex-direction: column; gap: 8px; }
.grade-rules-grid input { width: 100%; }
@media (max-width: 860px) { .grade-rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grade-rule-form, .grade-rules-grid { grid-template-columns: 1fr; } }

.name-rule-tip { margin-top: 6px; line-height: 1.6; color: #5b6b86; }

.preview-note{display:block;margin-top:8px;color:#64748b;font-size:12px;text-align:center;}

/* 美化确认弹框与款式导入 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(8px);
  animation: modalFadeIn .14s ease-out;
}
.confirm-dialog {
  width: min(520px, 100%);
  max-height: min(84vh, 720px);
  overflow: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.25);
  transform-origin: center;
  animation: modalPopIn .16s ease-out;
}
.confirm-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-weight: 900;
  font-size: 18px;
  background: #e0f2fe;
  color: #0369a1;
}
.confirm-icon.danger {
  background: #fee2e2;
  color: #b91c1c;
}
.confirm-body h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.confirm-body p {
  margin-top: 8px;
  color: #475569;
  line-height: 1.65;
}
.confirm-detail-list {
  margin: 12px 0 0;
  padding: 12px 14px 12px 32px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  line-height: 1.65;
}
.confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}
.danger-solid {
  background: #dc2626;
  color: #fff;
}
.danger-solid:hover { background: #b91c1c; }
.import-preview-card {
  margin-top: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.import-preview-title {
  padding: 10px 12px;
  font-weight: 800;
  color: #334155;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.import-preview-table-wrap {
  max-height: 260px;
  overflow: auto;
}
.import-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.import-preview-table th,
.import-preview-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}
.import-preview-table th {
  background: #f8fafc;
  color: #475569;
}
.import-tip { padding: 0 12px 12px; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPopIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 640px) {
  .modal-backdrop { padding: 14px; place-items: end center; }
  .confirm-dialog { grid-template-columns: 1fr; gap: 12px; padding: 18px; border-radius: 20px 20px 16px 16px; }
  .confirm-icon { width: 44px; height: 44px; }
  .confirm-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .confirm-actions button { width: 100%; }
}

/* 2026-07: 导入款式弹框支持点击、拖拽、粘贴与模板下载 */
.import-dialog {
  width: min(760px, 100%);
  max-height: min(88vh, 780px);
}
.import-dialog-body {
  min-width: 0;
}
.import-drop-zone {
  margin-top: 14px;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  min-height: 150px;
  border-color: #93c5fd;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 56%, #f0fdf4 100%);
}
.import-file-preview {
  min-height: 116px;
  border-style: dashed;
}
.import-modal-preview {
  margin-top: 14px;
}
.import-ready-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  color: #166534;
  background: #f0fdf4;
}
.import-ready-card span {
  color: #64748b;
  font-size: 13px;
}
.import-actions {
  align-items: center;
}
.import-actions #styleImportTemplateBtn {
  margin-right: auto;
}
@media (max-width: 640px) {
  .import-drop-zone { grid-template-columns: 1fr; }
  .import-actions { grid-template-columns: 1fr; }
  .import-actions #styleImportTemplateBtn { margin-right: 0; }
}

/* 评分链接与款式勾选 */
.select-col { width: 84px; text-align: center; }
.select-col input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
}
.select-all-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
}
.select-all-toggle span {
  line-height: 1;
}
.link-table { min-width: 960px; }
.review-link-open {
  display: inline-block;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
}
.review-link-open:hover code,
.review-link-open:focus-visible code {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.review-link-open:focus-visible {
  outline: none;
}
.link-url-cell code {
  display: inline-block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  color: #334155;
}
.link-remark {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
}
.review-link-dialog {
  width: min(920px, calc(100vw - 40px));
  max-width: 920px;
  max-height: min(88vh, 820px);
}
.review-link-dialog-body {
  min-width: 0;
}
.review-link-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.review-link-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.review-link-form-grid input,
.review-link-form-grid textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  outline: none;
  background: #fff;
}
.review-link-form-grid input:focus,
.review-link-form-grid textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.review-link-form-grid .wide { grid-column: 1 / -1; }
.selected-style-preview {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  align-content: flex-start;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  max-height: 240px;
  overflow: auto;
}
.selected-style-preview span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e0ecff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}
.selected-style-preview em { color: var(--muted); font-style: normal; }

.review-link-style-selector-wrap {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}
.review-link-style-selector-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.review-link-style-selector-head span {
  color: var(--muted);
  font-size: 13px;
}
.review-link-style-selector-head em {
  color: #1d4ed8;
  font-style: normal;
  font-weight: 800;
}
.review-link-style-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  max-height: 280px;
  overflow: auto;
}
.review-link-style-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: 'check code' 'check meta';
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  padding: 10px 12px;
  border: 1px solid #dbe5f1;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.review-link-style-item input[type="checkbox"] {
  grid-area: check;
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}
.review-link-style-code {
  grid-area: code;
  font-weight: 800;
  color: #1e293b;
}
.review-link-style-item small {
  grid-area: meta;
  color: #64748b;
}
.review-link-style-empty {
  padding: 18px 14px;
  color: #64748b;
}
@media (max-width: 680px) {
  .review-link-dialog { width: min(100%, calc(100vw - 20px)); }
  .review-link-form-grid { grid-template-columns: 1fr; }
  .review-link-dialog-body { min-width: 0; }
  .review-link-style-selector-head { flex-direction: column; align-items: flex-start; }
  .review-link-style-list { grid-template-columns: 1fr; max-height: 220px; }
  .selected-style-preview { max-height: 180px; }
  .link-url-cell code { max-width: 220px; }
}

.link-table .select-col { width: 84px; }


/* V12 响应反馈与网络进度 */
.network-progress-bar {
  position: fixed;
  z-index: 20000;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #2563eb, #60a5fa, #2563eb);
  transition: opacity .12s ease, transform .18s ease;
}
body.network-busy .network-progress-bar {
  opacity: 1;
  animation: networkProgress 1s ease-in-out infinite;
}
@keyframes networkProgress {
  0% { transform: scaleX(.08); }
  55% { transform: scaleX(.72); }
  100% { transform: scaleX(.96); }
}
button.is-busy {
  position: relative;
  cursor: wait;
  opacity: .86;
}
button.is-busy::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  vertical-align: -1px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: busySpin .55s linear infinite;
}
@keyframes busySpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  body.network-busy .network-progress-bar,
  button.is-busy::before { animation: none; }
}


/* 评分结果导出方式选择 */
.export-mode-dialog {
  width: min(720px, 100%);
  max-height: min(88vh, 760px);
  overflow-x: hidden;
  overflow-y: auto;
}
.export-mode-body {
  min-width: 0;
  width: 100%;
}
.export-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
  width: 100%;
}
.export-mode-card {
  display: flex;
  min-width: 0;
  min-height: 150px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 20px;
  text-align: left;
  white-space: normal;
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 18px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.export-mode-card:hover,
.export-mode-card:focus-visible {
  transform: translateY(-2px);
  border-color: #94a3b8;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .10);
  outline: none;
}
.export-mode-card.primary-mode {
  border-color: rgba(37, 99, 235, .34);
  background: linear-gradient(145deg, #eff6ff 0%, #f8fbff 100%);
}
.export-mode-card.primary-mode:hover,
.export-mode-card.primary-mode:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 12px 30px rgba(37, 99, 235, .14);
}
.export-mode-card strong {
  display: block;
  width: 100%;
  font-size: 17px;
  line-height: 1.35;
  color: #0f172a;
  white-space: normal;
  overflow-wrap: anywhere;
}
.export-mode-card span {
  display: block;
  width: 100%;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.75;
  color: #64748b;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.export-mode-actions { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .export-mode-dialog { width: min(560px, 100%); }
  .export-mode-options { grid-template-columns: 1fr; }
  .export-mode-card { min-height: 0; padding: 18px; }
  .export-mode-actions { display: flex; justify-content: flex-end; }
  .export-mode-actions button { width: auto; min-width: 100px; }
}

/* V21 评分链接有效期日期时间选择器 */
.review-datetime-label { min-width: 0; }
.review-datetime-control {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 46px;
  border: 1px solid #d6e0ee;
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
  overflow: hidden;
}
.review-datetime-control:hover {
  border-color: #9fbcf5;
  background: #fbfdff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .07);
}
.review-datetime-control:focus-visible,
.review-datetime-control.picker-open {
  outline: none;
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.review-link-form-grid .review-datetime-input {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 0 !important;
  border-radius: 0;
  padding: 0 48px 0 14px;
  background: transparent;
  box-shadow: none !important;
  color: #172033;
  font-weight: 650;
  cursor: pointer;
  pointer-events: none;
  user-select: none;
}
.review-datetime-input::-webkit-calendar-picker-indicator {
  display: none;
  opacity: 0;
  pointer-events: none;
}
.review-datetime-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #2563eb;
  background: #edf4ff;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
  pointer-events: none;
}
.review-datetime-control:hover .review-datetime-icon,
.review-datetime-control.picker-open .review-datetime-icon {
  color: #fff;
  background: #2563eb;
  box-shadow: 0 5px 12px rgba(37, 99, 235, .24);
}
.review-datetime-popover {
  position: fixed;
  z-index: 30000;
  display: none;
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px;
  border: 1px solid #dbe5f1;
  border-radius: 18px;
  background: rgba(255,255,255,.99);
  box-shadow: 0 22px 55px rgba(15, 23, 42, .20), 0 5px 16px rgba(37, 99, 235, .08);
  opacity: 0;
  transform: translateY(-4px) scale(.99);
  transform-origin: top right;
  transition: opacity .13s ease, transform .13s ease;
  backdrop-filter: blur(12px);
}
.review-datetime-popover.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.review-datetime-popover-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.review-datetime-nav {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #f3f6fb;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, transform .14s ease;
}
.review-datetime-nav:hover {
  background: #eaf2ff;
  color: #1d4ed8;
  transform: translateY(-1px);
}
.review-datetime-title {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 132px;
  max-width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.review-datetime-title:hover {
  background: #f1f6ff;
  color: #1d4ed8;
}
.review-datetime-title-arrow {
  color: #7c8aa0;
  font-size: 13px;
  transform: translateY(-1px);
}
.review-datetime-calendar-body {
  min-height: 244px;
}
.review-datetime-weekdays,
.review-datetime-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.review-datetime-weekdays { margin-bottom: 4px; }
.review-datetime-weekdays span {
  display: grid;
  place-items: center;
  height: 24px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}
.review-datetime-weekdays span:nth-child(6),
.review-datetime-weekdays span:nth-child(7) { color: #7f91ad; }
.review-datetime-day {
  position: relative;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease, transform .12s ease, box-shadow .12s ease;
}
.review-datetime-day:hover {
  background: #edf4ff;
  color: #1d4ed8;
  transform: translateY(-1px);
}
.review-datetime-day.outside { color: #c4cedc; }
.review-datetime-day.today::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: #2563eb;
}
.review-datetime-day.selected {
  background: #2563eb;
  color: #fff;
  font-weight: 750;
  box-shadow: 0 5px 12px rgba(37, 99, 235, .26);
}
.review-datetime-day.selected.today::after { background: #fff; }
.review-datetime-month-grid,
.review-datetime-year-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 10px 2px 2px;
}
.review-datetime-choice {
  position: relative;
  height: 50px;
  border: 1px solid #e6edf6;
  border-radius: 12px;
  background: #fbfdff;
  color: #334155;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease, transform .14s ease, box-shadow .14s ease;
}
.review-datetime-choice:hover {
  border-color: #b8cdf6;
  background: #eef5ff;
  color: #1d4ed8;
  transform: translateY(-1px);
}
.review-datetime-choice.current::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: #2563eb;
}
.review-datetime-choice.selected {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 5px 14px rgba(37, 99, 235, .22);
}
.review-datetime-choice.selected.current::after { background: #fff; }
.review-datetime-year-choice { font-variant-numeric: tabular-nums; }
.review-datetime-time-row {
  display: grid;
  grid-template-columns: minmax(54px, 1fr) 74px 10px 74px;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid #e8eef6;
  border-radius: 12px;
  background: #f8fafc;
}
.review-datetime-time-label {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}
.review-datetime-time-row select {
  width: 100%;
  height: 34px;
  border: 1px solid #d6e0ee;
  border-radius: 9px;
  background: #fff;
  padding: 0 8px;
  color: #0f172a;
  font: inherit;
  outline: none;
}
.review-datetime-time-row select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .09);
}
.review-datetime-time-separator {
  text-align: center;
  color: #64748b;
  font-weight: 750;
}
.review-datetime-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf2f7;
}
.review-datetime-action-right { display: flex; gap: 7px; }
.review-datetime-actions button {
  min-height: 35px;
  padding: 7px 13px;
  border-radius: 10px;
}
@media (max-width: 520px) {
  .review-datetime-popover { padding: 11px; border-radius: 15px; }
  .review-datetime-calendar-body { min-height: 232px; }
  .review-datetime-day { height: 32px; }
  .review-datetime-month-grid,
  .review-datetime-year-grid { gap: 7px; }
  .review-datetime-choice { height: 46px; }
  .review-datetime-time-row { grid-template-columns: minmax(48px, 1fr) 68px 8px 68px; padding: 9px; }
}

/* V22 日期时间选择器：自定义小时 / 分钟下拉 */
.review-datetime-time-select {
  position: relative;
  min-width: 0;
}
.review-datetime-time-trigger {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 9px 0 11px;
  border: 1px solid #d6e0ee;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  outline: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.review-datetime-time-trigger svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #64748b;
  transition: transform .16s ease, color .16s ease;
}
.review-datetime-time-trigger:hover {
  border-color: #9dbbf5;
  background: #f8fbff;
}
.review-datetime-time-trigger:focus-visible,
.review-datetime-time-select.open .review-datetime-time-trigger {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}
.review-datetime-time-select.open .review-datetime-time-trigger svg {
  color: #2563eb;
  transform: rotate(180deg);
}
.review-datetime-time-menu {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: calc(100% + 7px);
  display: none;
  max-height: 210px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid #dbe5f1;
  border-radius: 12px;
  background: rgba(255,255,255,.995);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .16), 0 3px 9px rgba(37, 99, 235, .08);
}
.review-datetime-time-select.open .review-datetime-time-menu {
  display: grid;
  gap: 2px;
  animation: reviewTimeMenuIn .12s ease-out;
}
@keyframes reviewTimeMenuIn {
  from { opacity: 0; transform: translateY(4px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.review-datetime-time-option {
  width: 100%;
  min-height: 31px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  text-align: center;
  transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.review-datetime-time-option:hover {
  background: #eef5ff;
  color: #1d4ed8;
}
.review-datetime-time-option.selected {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .20);
}
.review-datetime-time-menu::-webkit-scrollbar { width: 6px; }
.review-datetime-time-menu::-webkit-scrollbar-track { background: transparent; }
.review-datetime-time-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}
.review-datetime-time-menu::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 旧原生 select 规则保留兼容，但 V22 主界面不再使用 */
@media (max-width: 520px) {
  .review-datetime-time-trigger { height: 34px; padding-inline: 9px 7px; }
  .review-datetime-time-menu { max-height: 190px; }
}


/* 评分结果筛选栏 v2：即时筛选 + 自定义评分链接下拉框 */
.score-search-form {
  align-items: center;
  gap: 10px;
}

.score-search-form .score-search-input {
  width: 250px;
  min-height: 42px;
  border-radius: 12px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.score-search-form .score-search-input:hover {
  border-color: #b8cdf0;
}

.score-search-form .score-search-input:focus {
  border-color: #6ea8ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
  background: #fff;
}

/* 隐藏原生 select，但保留在 form 内供 FormData / 导出使用 */
.score-link-filter-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.score-link-filter-shell {
  position: relative;
  width: 340px;
  min-width: 280px;
  z-index: 30;
}

.score-link-filter-trigger {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #cbdcf4;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #24324a;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .05);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .12s ease;
}

.score-link-filter-trigger:hover {
  border-color: #93baf3;
  background: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .10);
}

.score-link-filter-shell.open .score-link-filter-trigger {
  border-color: #5f9cf5;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .11), 0 8px 22px rgba(37, 99, 235, .10);
}

.score-link-filter-shell.loading .score-link-filter-trigger {
  cursor: progress;
  opacity: .72;
}

.score-link-filter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3678d6;
}

.score-link-filter-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-link-filter-caret {
  justify-self: end;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid #71829d;
  border-bottom: 2px solid #71829d;
  transform: rotate(45deg);
  transition: transform .18s ease, margin .18s ease;
}

.score-link-filter-shell.open .score-link-filter-caret {
  margin-top: 4px;
  transform: rotate(225deg);
}

.score-link-filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 330px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid #d8e4f5;
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 16px 38px rgba(24, 50, 89, .16);
  backdrop-filter: blur(12px);
  animation: scoreLinkMenuIn .14s ease-out;
}

.score-link-filter-menu.hidden {
  display: none !important;
}

@keyframes scoreLinkMenuIn {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.score-link-filter-option {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #27364f;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}

.score-link-filter-option:hover {
  background: #f0f6ff;
  color: #165ec7;
}

.score-link-filter-option.selected,
.score-link-filter-option[aria-selected="true"] {
  background: linear-gradient(135deg, #e9f3ff 0%, #eef8ff 100%);
  color: #135ebd;
  box-shadow: inset 0 0 0 1px #c6ddff;
}

.score-link-filter-option-main {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
  line-height: 1.35;
}

.score-link-filter-menu::-webkit-scrollbar {
  width: 7px;
}

.score-link-filter-menu::-webkit-scrollbar-track {
  background: transparent;
}

.score-link-filter-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd8e9;
}

.score-link-filter-menu::-webkit-scrollbar-thumb:hover {
  background: #a9bad0;
}

@media (max-width: 820px) {
  .score-search-form {
    width: 100%;
  }

  .score-link-filter-shell,
  .score-search-form .score-search-input {
    width: 100%;
    min-width: 0;
  }
}
