:root {
  --bg: #f6f8f6;
  --panel: #ffffff;
  --ink: #17201b;
  --muted: #68736c;
  --line: #e3e8e3;
  --green: #1f6f57;
  --green-2: #2f9272;
  --blue: #315c86;
  --yellow: #e8bd44;
  --orange: #d87836;
  --red: #b53232;
  --deep-red: #761f28;
  --shadow: 0 10px 28px rgba(33, 42, 37, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f6f8f6;
  color: #17201b;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px;
  background: #fff;
  color: #17201b;
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid #e3e8e3;
  box-shadow: none;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  color: #111711;
  font-weight: 800;
  border-radius: 14px;
}

.brand h1,
.brand p,
.topbar h2,
.hero-copy h3,
.section-header h3,
.standard-card h3 {
  margin: 0;
}

.brand h1 {
  font-size: 21px;
}

.brand p {
  margin-top: 3px;
  color: #68736c;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  border: 0;
  padding: 13px 14px;
  text-align: left;
  color: #17201b;
  background: transparent;
  border-left: 3px solid transparent;
}

.nav-item.is-active {
  background: #d1e8da;
  border-left-color: #1f6f57;
  border-left-width: 4px;
  color: #0d3b2a;
  font-weight: 700;
}

.version-panel {
  margin-top: auto;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #e3e8e3;
  background: #fbfcfb;
  color: #68736c;
  font-size: 12px;
}

.version-panel strong {
  color: #17201b;
  font-size: 13px;
}

.workspace {
  padding: 20px;
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  color: #1f6f57;
  font-weight: 800;
}

.topbar h2 {
  font-size: 28px;
}

.status-strip,
.action-row,
.capture-checks,
.source-row,
.tool-strip {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.status {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
}

.status-ai {
  color: #1a4a6e;
  background: #dbeafe;
  border-color: #93c5fd;
}

.status-review {
  color: #92400e;
  background: #fef3c7;
  border-color: #fcd34d;
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  gap: 20px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  box-shadow: none;
  border: 1px solid #e3e8e3;
}

.hero-copy h3 {
  max-width: 760px;
  font-size: 34px;
  line-height: 1.1;
  white-space: nowrap;
}

.hero-copy p {
  max-width: 720px;
  color: #68736c;
  line-height: 1.7;
}

.primary-action,
.secondary-action,
.text-button {
  border: 1px solid transparent;
  padding: 10px 12px;
  min-height: 40px;
}

.primary-action {
  background: #1f6f57;
  color: white;
}

.primary-action:hover {
  background: #2f9272;
}

.secondary-action {
  background: white;
  color: #17201b;
  border-color: #e3e8e3;
}

.secondary-action.danger-action {
  color: #b53232;
  border-color: rgba(206, 53, 39, 0.22);
  background: #fff7f6;
}

.secondary-action.danger-action:hover {
  border-color: rgba(206, 53, 39, 0.34);
  background: #ffecea;
}

.upload-panel {
  max-width: 620px;
  margin: 18px 0;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e3e8e3;
  background: #f2f5f1;
}

.upload-panel label {
  font-weight: 800;
}

.upload-panel input {
  width: 100%;
  min-height: 42px;
  padding: 8px;
  border: 1px solid #e3e8e3;
  background: white;
}

.upload-panel span {
  color: #68736c;
  font-size: 13px;
}

.text-button {
  background: transparent;
  color: #1f6f57;
  border-color: #e3e8e3;
}

.capture-card {
  display: grid;
  gap: 12px;
}

.camera-frame {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  background:
    linear-gradient(35deg, rgba(23, 32, 27, 0.65), rgba(23, 32, 27, 0.28)),
    url("https://static.wixstatic.com/media/c65670_5f33f1cec20b4a9cbb05b452c1887734~mv2.jpg/v1/fit/w_620,h_464,q_90,enc_avif,quality_auto/c65670_5f33f1cec20b4a9cbb05b452c1887734~mv2.jpg")
      center/cover;
  border: 1px solid #c7cec7;
}

.camera-grid {
  position: absolute;
  inset: 28px;
  border: 2px solid #e3e8e3;
  background:
    linear-gradient(to right, transparent 32%, rgba(255, 255, 255, 0.45) 33%, transparent 34%, transparent 65%, rgba(255, 255, 255, 0.45) 66%, transparent 67%),
    linear-gradient(to bottom, transparent 32%, rgba(255, 255, 255, 0.45) 33%, transparent 34%, transparent 65%, rgba(255, 255, 255, 0.45) 66%, transparent 67%);
}

.capture-chip {
  position: absolute;
  padding: 6px 10px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.top-left {
  left: 18px;
  top: 18px;
}

.bottom-right {
  right: 18px;
  bottom: 18px;
}

.capture-checks span {
  padding: 4px 12px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
}

.analysis-panel,
.defect-drawer,
.metric-card,
.score-panel,
.queue-panel,
.review-workspace,
.expert-panel,
.standard-card,
.photo-panel,
.support-panel,
.standard-detail-panel,
.official-samples,
.dataset-tools {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
}

.analysis-panel {
  margin-top: 18px;
  padding: 16px;
}

.analysis-header,
.section-header,
.photo-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.analysis-header h3 {
  margin: 0;
}

.analysis-steps {
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
  color: #68736c;
}

.analysis-steps li.is-done {
  color: #1f6f57;
  font-weight: 700;
}

/* ── 分析进度条 ── */

.analysis-progress-bar {
  margin: 12px 0 8px;
  height: 6px;
  background: #e3e8e3;
  border-radius: 3px;
  overflow: hidden;
}

.analysis-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1f6f57, #2f9272);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.analysis-status-text {
  margin: 8px 0 4px;
  font-size: 13px;
  color: #68736c;
  font-style: italic;
}

/* ── 上传缩略图 ── */

.upload-thumbnail-container {
  margin-top: 10px;
}

.upload-thumbnail {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #f2f5f1;
  border: 1px solid #e3e8e3;
  border-radius: 6px;
}

.upload-thumbnail-img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e3e8e3;
}

.upload-thumbnail-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.upload-thumbnail-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-thumbnail-size {
  font-size: 11px;
  color: #68736c;
}

.upload-thumbnail-clear {
  width: 28px;
  height: 28px;
  border: 1px solid #e3e8e3;
  background: #fff;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #b53232;
  flex-shrink: 0;
}

.upload-thumbnail-clear:hover {
  background: #ffecea;
  border-color: #b53232;
}

/* ── 拖拽上传 ── */

.capture-card.drag-over .camera-frame {
  border-color: #2f9272;
  box-shadow: inset 0 0 0 2px #2f9272;
}

.capture-card.drag-over .camera-grid {
  border-color: #2f9272;
}

/* ── 评分历史 ── */

.history-panel {
  margin-top: 18px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
  padding: 16px;
}

.history-panel .analysis-header {
  margin-bottom: 12px;
}

.history-empty {
  color: #68736c;
  font-size: 13px;
  padding: 12px 0;
  text-align: center;
}

.history-list {
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 1px solid #e3e8e3;
  background: #fbfcfb;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.history-item:hover {
  background: #edf6f1;
}

.history-item-img {
  width: 48px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #e3e8e3;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.history-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-item-info strong {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-info small {
  font-size: 11px;
  color: #68736c;
}

.history-item-score {
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.metric-card {
  min-width: 0;
  word-break: break-word;
}

.metric-card strong {
  font-size: 20px;
  display: block;
  margin: 4px 0;
}

.metric-card {
  padding: 16px;
}

.metric-card span {
  color: #68736c;
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 26px;
}

.metric-card p {
  margin: 8px 0 0;
  color: #68736c;
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 10px;
}

.photo-panel {
  overflow: hidden;
  border: 1px solid #e3e8e3;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
}

.photo-toolbar {
  padding: 6px 10px;
  border-bottom: 1px solid #e3e8e3;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  color: #68736c;
  font-size: 12px;
}

.photo-toolbar .text-button {
  background: #f6f8f6;
  color: #3b82f6;
  border: 1px solid #e3e8e3;
}

.photo-toolbar .text-button:hover {
  background: #e3e8e3;
}

.inspection-photo,
.annotation-canvas {
  position: relative;
  background: #f6f8f6;
  overflow: hidden;
}

.inspection-photo {
  min-height: 380px;
}

.inspection-photo img,
.annotation-canvas img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: contain;
  display: block;
}
.route-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.route-overlay path {
  fill: none;
  stroke: #38d39a;
  stroke-width: 0.8;
  stroke-linecap: round;
}

.route-overlay .bad-route {
  stroke: #b53232;
  stroke-dasharray: 2 1.6;
}

.defect-marker {
  position: absolute;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  color: white;
  font-weight: 800;
  transform: translate(-50%, -50%);
}

.marker-critical {
  background: #761f28;
}

.marker-major {
  background: #b53232;
}

.marker-moderate {
  background: #d87836;
}

.score-panel {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
  border-radius: 10px;
}

.score-panel .primary-action {
  background: #22c55e;
  color: white;
  border: 1px solid transparent;
}

.score-panel .primary-action:hover {
  background: #16a34a;
}

.score-panel .secondary-action {
  background: #f6f8f6;
  color: #17201b;
  border: 1px solid #e3e8e3;
}

.score-panel .secondary-action:hover {
  background: #e3e8e3;
  border-color: #315c86;
}

.score-summary {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
  border-radius: 10px;
  text-align: center;
}

.score-summary span {
  color: #68736c;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.score-summary strong {
  font-size: 44px;
  color: #1f6f57;
}

.critical-banner {
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-left: 4px solid #ef4444;
  border-radius: 8px;
}

.critical-banner strong {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.critical-banner span {
  color: #68736c;
  font-size: 13px;
  line-height: 1.45;
}

.level-banner {
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  background: rgba(34, 197, 94, 0.08);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-left: 4px solid #22c55e;
  border-radius: 8px;
}

.level-banner strong {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.level-banner span {
  color: #68736c;
  font-size: 13px;
  line-height: 1.45;
}

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

/* ---- Category row (dark theme, judge style) ---- */
.category-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 14px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
  border-radius: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  cursor: default;
}

.category-row:hover {
  background: #f6f8f6;
  border-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

.category-row > span {
  color: #17201b;
  font-size: 13px;
  font-weight: 600;
  align-self: center;
}

.category-row > strong {
  color: #17201b;
  font-size: 14px;
  justify-self: end;
  align-self: center;
}

.category-row > small {
  grid-column: 1 / -1;
  color: #68736c;
  font-size: 12px;
  line-height: 1.45;
  margin-top: -4px;
}

.category-bar-bg {
  grid-column: 1 / -1;
  height: 6px;
  background: #f6f8f6;
  border-radius: 3px;
  overflow: hidden;
}

.category-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-bar-fill.low {
  background: linear-gradient(90deg, #ef4444, #eab308);
}

.category-bar-fill.mid {
  background: linear-gradient(90deg, #eab308, #22c55e);
}

.category-bar-fill.high {
  background: linear-gradient(90deg, #3b82f6, #22c55e);
}

.category-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.bar {
  height: 8px;
  background: #e0e4df;
}

.bar span {
  display: block;
  height: 100%;
  background: #1f6f57;
}

.bar .warn {
  background: #d87836;
}

.bar .bad {
  background: #b53232;
}

.vertical {
  flex-direction: column;
  align-items: stretch;
}

.defect-drawer {
  margin-top: 18px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
  border-radius: 10px;
}

.defect-drawer h3 {
  margin: 0;
  color: #17201b;
}

.defect-drawer p {
  margin: 0;
  color: #68736c;
  line-height: 1.6;
}

.source-pill {
  align-self: start;
  padding: 9px 11px;
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.report-support-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.support-panel {
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
  border-radius: 10px;
}

.support-panel .section-header h3 {
  color: #17201b;
}

.support-panel .section-header span {
  color: #68736c;
}

.defect-list,
.correction-list,
.judge-notes {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

/* ---- Defect row (dark theme, judge style) ---- */
.defect-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
  border-left: 3px solid #ef4444;
  border-radius: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.defect-row:hover {
  background: #f6f8f6;
  border-color: #315c86;
  transform: translateX(2px);
}

.defect-marker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.defect-row > span:nth-child(2) {
  color: #17201b;
  font-size: 13px;
  line-height: 1.45;
}

.defect-severity-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.severity-critical {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.severity-major {
  background: rgba(234, 179, 8, 0.18);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.severity-minor {
  background: rgba(59, 130, 246, 0.18);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ---- Judge note (dark theme) ---- */
.judge-note {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
  border-left: 4px solid #22c55e;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.judge-note:hover {
  background: #f6f8f6;
}

.judge-note strong {
  color: #17201b;
  font-size: 14px;
}

.judge-note span {
  color: #68736c;
  font-size: 13px;
  line-height: 1.45;
}

/* ---- AI Engine source pill ---- */
.source-pill-engine {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 999px;
  color: #3b82f6;
  font-size: 12px;
  font-weight: 600;
}

.source-pill-engine::before {
  content: "⚡";
  font-size: 14px;
}

/* ---- SVG score ring ---- */
.score-ring-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.score-ring-svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.score-ring-bg {
  fill: none;
  stroke: #e3e8e3;
  stroke-width: 8;
}

.score-ring-fill {
  fill: none;
  stroke: #22c55e;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              stroke 0.4s ease;
}

.score-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-ring-number {
  font-size: 32px;
  font-weight: 800;
  color: #17201b;
  line-height: 1;
}

.score-ring-label {
  font-size: 11px;
  color: #68736c;
  margin-top: 2px;
}

/* ---- Inline score emoji indicators ---- */
.score-emoji {
  font-size: 14px;
  margin-right: 4px;
}

.defect-item,
.correction-item,
.judge-note {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #e3e8e3;
  background: white;
  text-align: left;
}

.defect-item {
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.severity-dot {
  width: 12px;
  height: 12px;
  background: #d87836;
}

.severity-critical {
  background: #761f28;
}

.severity-major {
  background: #b53232;
}

.severity-moderate {
  background: #d87836;
}

.severity-minor {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
}

.defect-item strong,
.correction-item strong {
  font-size: 14px;
}

.defect-item span,
.correction-item span,
.judge-note span {
  color: #68736c;
  font-size: 13px;
  line-height: 1.45;
}

.defect-score {
  color: #b53232;
  font-weight: 800;
}

.scoring-language {
  margin-top: 18px;
}

.scoring-language .section-header h3 {
  color: #17201b;
}

.scoring-language .section-header span {
  color: #68736c;
}

.judge-note {
  border-left: 4px solid #1f6f57;
}

.standards-archive {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #e3e8e3;
  background: #fff;
}

.standards-archive summary {
  cursor: pointer;
  color: #1f6f57;
  font-weight: 800;
}

.review-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.review-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  align-self: start;
}

.review-sidebar-card {
  padding: 14px;
  border: 1px solid #e3e8e3;
  background: white;
  box-shadow: none;
  display: grid;
  gap: 6px;
}

.review-sidebar-card h3 {
  margin: 0;
  font-size: 18px;
}

.review-sidebar-card p,
.review-sidebar-card small {
  margin: 0;
  color: #68736c;
  line-height: 1.5;
}

.review-sidebar-card.muted {
  background: #f8fbf7;
}

.review-section-nav {
  display: grid;
  gap: 8px;
}

.review-section-nav-item {
  padding: 12px 14px;
  border: 1px solid #e3e8e3;
  background: white;
  color: #17201b;
  text-align: left;
  font-weight: 700;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.review-section-nav-item:hover {
  transform: translateY(-1px);
  border-color: rgba(74, 153, 84, 0.32);
  background: #f4fbf5;
}

.review-section-nav-item.is-active {
  border-color: #1f6f57;
  background: #edf7f1;
  color: #1f6f57;
  box-shadow: 0 10px 20px rgba(74, 153, 84, 0.12);
}

.review-content {
  min-width: 0;
  display: grid;
}

.review-pane {
  display: none;
  min-width: 0;
}

.review-pane.is-visible {
  display: grid;
  gap: 16px;
  align-content: start;
}

.review-overview {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.88fr);
  gap: 14px;
  align-items: start;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
  box-shadow: none;
}

.review-overview-main {
  display: grid;
  gap: 10px;
}

.review-overview h3 {
  margin: 0;
  font-size: 22px;
}

.review-overview-copy,
.review-overview-note p {
  max-width: 680px;
  margin: 0;
  color: #68736c;
  line-height: 1.6;
}

.review-overview-note {
  padding: 10px 12px;
  border: 1px dashed #e3e8e3;
  background: #fff;
}

.review-overview-note summary {
  cursor: pointer;
  color: #1f6f57;
  font-weight: 700;
}

.review-overview-panel {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.training-monitoring-panel {
  padding: 12px 14px;
  border: 1px solid #e3e8e3;
  background: #fff;
  box-shadow: none;
}

.training-monitoring-header {
  align-items: baseline;
}

.training-monitoring-header span {
  color: #68736c;
  font-size: 12px;
}

.training-monitoring-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(460px, 1.42fr);
  gap: 12px;
  align-items: start;
}

.training-compare-panel,
.training-status-panel {
  min-width: 0;
}

.training-monitoring-grid > * {
  min-width: 0;
}

.training-monitoring-grid .training-history-panel {
  grid-column: 1 / -1;
}

.training-status-panel {
  padding: 14px;
  border: 1px solid #e3e8e3;
  background: #fafcf9;
  display: grid;
  gap: 10px;
  border-radius: 10px;
  box-shadow: none;
  align-self: stretch;
}

.training-controls {
  display: grid;
  gap: 8px;
}

.training-control {
  display: grid;
  gap: 5px;
  color: #68736c;
  font-size: 12px;
}

.training-control select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #e3e8e3;
  background: white;
}

.training-control-hint {
  color: #68736c;
  font-size: 12px;
  line-height: 1.45;
}

.training-status-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.training-status-pill {
  padding: 6px 8px;
  border: 1px solid #e3e8e3;
  background: white;
  display: flex;
  gap: 8px;
  align-items: center;
}

.training-status-pill span {
  color: #68736c;
  font-size: 12px;
}

.training-status-pill strong {
  color: #1f6f57;
  font-size: 13px;
  white-space: nowrap;
}

.training-flow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 10px;
  align-items: start;
  align-content: start;
}

.training-flow-box {
  padding: 8px;
  border: 1px solid #e3e8e3;
  background: white;
  align-self: start;
}

.training-flow-panel {
  display: grid;
  gap: 10px;
}

.training-flow-panel .section-header.compact {
  margin-bottom: 0;
}

.training-status-panel {
  gap: 6px;
  padding-top: 10px;
  padding-bottom: 8px;
}

.automation-report-panel {
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.03), rgba(15, 118, 110, 0.07));
  border-left: 4px solid #1f6f57;
}

.training-monitoring-grid .training-status-panel,
.training-monitoring-grid .training-history-panel {
  box-shadow: none;
}

.training-monitoring-grid .training-history-panel {
  padding: 0;
}

.training-package-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.training-status-panel .training-package-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.training-flow-box .training-package-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.training-package-note.compact-empty {
  min-height: 40px;
  display: flex;
  align-items: center;
}

.training-monitoring-grid .training-history-list {
  max-height: 180px;
  overflow: auto;
  padding-right: 4px;
}

.training-history-item {
  word-break: break-all;
  overflow-wrap: break-word;
}
.training-history-item strong {
  word-break: break-word;
  max-width: 100%;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.history-inline-actions .secondary-action {
  min-height: 38px;
  padding: 9px 12px;
}

.training-history-details {
  display: grid;
  gap: 10px;
}

.training-history-details summary {
  cursor: pointer;
  color: #1f6f57;
  font-weight: 700;
  list-style: none;
}

.training-history-details summary::-webkit-details-marker {
  display: none;
}

.training-history-details[open] summary {
  margin-bottom: 2px;
}

.review-filter-row.compact {
  margin-top: 0;
}

.review-overview-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.review-overview-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: stretch;
}

.review-overview-actions.compact {
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
}

.review-overview-actions.review-overview-actions-inline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.review-overview-actions.review-overview-actions-inline .export-status {
  grid-column: 1 / -1;
  white-space: normal;
  padding: 8px 10px;
  border: 1px solid #e3e8e3;
  background: white;
  color: #68736c;
  font-size: 12px;
}

.review-section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-chip {
  padding: 8px 11px;
  border: 1px solid #e3e8e3;
  border-radius: 999px;
  background: white;
  color: #1f6f57;
  font-size: 12px;
  font-weight: 700;
}

.link-chip:hover {
  border-color: rgba(74, 153, 84, 0.4);
  background: #eef8f1;
}

.review-overview-card {
  padding: 12px 13px;
  border: 1px solid #e3e8e3;
  background: white;
  display: grid;
  gap: 4px;
}

.review-overview-card span,
.review-overview-card small {
  color: #68736c;
  font-size: 12px;
}

.review-overview-card strong {
  font-size: 22px;
  color: #1f6f57;
}

.standards-layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.standard-catalog-panel {
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
  box-shadow: none;
}

.standard-catalog {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.standard-link {
  padding: 10px 12px;
  text-align: left;
  display: grid;
  gap: 4px;
  border: 1px solid #e3e8e3;
  background: white;
}

.standard-link strong {
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.standard-link span {
  color: #68736c;
  font-size: 12px;
  line-height: 1.45;
}

.standard-link.is-selected {
  border-color: #1f6f57;
  box-shadow: none;
}

.standards-archive .reference-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.standards-archive .evidence-matrix {
  margin-top: 12px;
}

.section-header.compact h4 {
  margin: 0;
  font-size: 15px;
}

.training-package-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
}

.automation-report-panel .training-package-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.training-package-card {
  padding: 9px 10px;
  border: 1px solid #e3e8e3;
  background: white;
  display: grid;
  gap: 3px;
  word-break: break-all;
  overflow-wrap: break-word;
  max-width: 100%;
}

.training-package-card strong {
  font-size: 17px;
  color: #1f6f57;
  word-break: break-all;
  overflow-wrap: break-word;
}

.training-package-card span,
.training-package-note {
  color: #68736c;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
  overflow-wrap: break-word;
}

.training-package-note {
  grid-column: 1 / -1;
  padding: 9px 10px;
  border: 1px dashed #e3e8e3;
  background: white;
}

.automation-report-panel .training-package-note {
  padding: 8px 10px;
  font-size: 11px;
}

.automation-report-panel .training-package-card strong {
  font-size: 16px;
}

.training-history-panel {
  display: grid;
  gap: 10px;
}

.training-history-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
}

.training-history-stat {
  padding: 9px 10px;
  border: 1px solid #e3e8e3;
  background: white;
  display: grid;
  gap: 3px;
}

.training-history-stat strong {
  font-size: 18px;
  color: #1f6f57;
}

.training-history-stat span {
  color: #68736c;
  font-size: 12px;
  line-height: 1.45;
}

.training-history-list {
  display: grid;
  gap: 8px;
}

.training-history-item {
  padding: 9px 10px;
  border: 1px solid #e3e8e3;
  background: white;
  display: grid;
  gap: 3px;
}

.training-history-item strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
}

.training-history-item span,
.training-history-item small {
  color: #68736c;
  font-size: 12px;
  line-height: 1.45;
}

.training-trend-card {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid #e3e8e3;
  background: #eff8f0;
  display: grid;
  gap: 10px;
}

.training-trend-header,
.training-trend-delta,
.training-trend-grid {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.training-trend-header span {
  color: #1f6f57;
  font-weight: 700;
}

.training-trend-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.training-trend-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #1f6f57;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.training-trend-badge.muted {
  background: rgba(148, 163, 184, 0.16);
  color: #68736c;
}

.training-trend-grid > div {
  flex: 1 1 180px;
  padding: 10px 11px;
  border: 1px solid #e3e8e3;
  background: white;
  display: grid;
  gap: 3px;
}

.training-trend-grid span,
.training-trend-grid small,
.training-trend-delta span {
  color: #68736c;
  font-size: 12px;
  line-height: 1.45;
}

.training-trend-grid strong {
  color: #17201b;
  font-size: 14px;
}

.training-trend-grid small {
  display: block;
}

.training-trend-sparklines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.training-sparkline {
  padding: 10px 11px;
  border: 1px solid #e3e8e3;
  background: white;
  display: grid;
  gap: 5px;
}

.training-sparkline span,
.training-sparkline small {
  color: #68736c;
  font-size: 12px;
  line-height: 1.45;
}

.training-sparkline svg {
  width: 100%;
  height: 36px;
}

.training-sparkline path {
  fill: none;
  stroke: #1f6f57;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.training-sparkline:last-child path {
  stroke: #4b7bec;
}

.export-status {
  color: #68736c;
  font-size: 13px;
}

.queue-panel,
.expert-panel {
  padding: 16px;
  border-radius: 10px;
  box-shadow: none;
}

.queue-panel,
.expert-panel {
  align-self: stretch;
  position: relative;
  top: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.review-workspace {
  padding: 16px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
  box-shadow: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.queue-control {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
  color: #68736c;
}

.queue-control select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #e3e8e3;
  background: white;
}

.queue-filter-row {
  margin-top: 10px;
}

.queue-filter-row:first-of-type {
  margin-top: 8px;
}

.queue-tools {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1.35fr) minmax(160px, 0.75fr);
  margin-top: 10px;
}

.queue-control {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #68736c;
}

.queue-control input,
.queue-control select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #e3e8e3;
  background: white;
}

.queue-stats {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
}

.queue-summary {
  margin-top: 10px;
  color: #68736c;
  font-size: 12px;
}

.queue-selection-summary {
  margin-top: 6px;
  color: #1f6f57;
  font-size: 12px;
}

.queue-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.queue-empty {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed #e3e8e3;
  background: white;
  color: #68736c;
  font-size: 13px;
}

.queue-stat {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid #e3e8e3;
  background: white;
}

.queue-stat strong {
  font-size: 16px;
}

.queue-stat span {
  color: #68736c;
  font-size: 12px;
}

.queue-card {
  margin-top: 10px;
  border: 1px solid #e3e8e3;
  background: white;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.queue-card-main {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.queue-card-open {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 2px 0;
  display: grid;
  gap: 5px;
}

.queue-card-select {
  min-width: 72px;
  align-self: start;
  border: 1px solid #e3e8e3;
  background: #f6f8f6;
  color: #1f6f57;
  padding: 8px 10px;
}

.queue-card.is-checked {
  border-color: #1f6f57;
  background: #edf7f1;
}

.queue-card.is-selected .queue-card-open strong {
  color: #1f6f57;
}

.queue-card.is-selected {
  border-color: #1f6f57;
  background: #edf7f1;
}

.queue-card span {
  color: #68736c;
  font-size: 13px;
}

.annotation-canvas {
  height: 440px;
}

.annotation-workbench {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.annotation-workbench-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.annotation-context-panel {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e3e8e3;
  background: #fff;
  box-shadow: none;
}

.annotation-context-card {
  padding: 10px 11px;
  border: 1px solid #e3e8e3;
  background: #f9fbf8;
  display: grid;
  gap: 4px;
}

.annotation-context-card strong,
.annotation-context-card span,
.annotation-context-card small {
  line-height: 1.45;
}

.annotation-context-adjacent {
  display: grid;
  gap: 8px;
}

.annotation-history-panel {
  display: grid;
  gap: 10px;
}

.annotation-history-tree {
  max-height: 180px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 2px;
}

.annotation-history-step {
  width: 100%;
  text-align: left;
  border: 1px solid #e3e8e3;
  background: white;
  padding: 10px 11px;
  display: grid;
  gap: 4px;
}

.annotation-history-step.is-active {
  border-color: #1f6f57;
  background: #edf7f1;
}

.annotation-history-step strong {
  font-size: 13px;
}

.annotation-history-step span,
.annotation-history-step small {
  color: #68736c;
  font-size: 12px;
}

.annotation-toolbar {
  margin: 10px 0;
  padding: 12px 13px;
  border: 1px solid #e3e8e3;
  background: #fbfcfa;
  display: grid;
  gap: 10px;
}

.annotation-toolbar-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr) minmax(0, 1.18fr);
  gap: 8px;
  align-items: start;
}

.annotation-toolbar label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: #68736c;
}

.annotation-toolbar select,
.annotation-toolbar input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e3e8e3;
  background: white;
}

.annotation-toolbar-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.annotation-toolbar-toprow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}

.annotation-save-action {
  width: fit-content;
  min-width: 0;
  padding-inline: 16px;
  justify-self: start;
}

.annotation-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.annotation-action-grid > * {
  min-width: 0;
}

.annotation-action-grid .secondary-action,
.annotation-action-grid .annotation-more-actions {
  width: 100%;
}

.annotation-quick-action {
  width: 100%;
}

.annotation-more-actions {
  display: contents;
}

.annotation-more-actions .secondary-action {
  width: 100%;
}

.annotation-status {
  color: #68736c;
  font-size: 13px;
  padding-top: 2px;
}

.annotation-status-inline {
  padding-top: 0;
  white-space: nowrap;
}

.annotation-status.is-flash {
  color: #1f6f57;
}

.annotation-overlay {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

.tool-strip {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tool-strip button,
.tool-chip {
  border: 1px solid #e3e8e3;
  background: white;
  padding: 7px 9px;
}

.tool-strip .danger-action {
  border-color: rgba(206, 53, 39, 0.22);
  background: #fff7f6;
  color: #b53232;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
}

.tool-chip-active {
  border-color: #1f6f57;
  background: #edf7f1;
  color: #1f6f57;
  font-weight: 700;
}

.annotation-canvas-footer {
  display: grid;
  gap: 10px;
}

.context-frame-card {
  width: 100%;
  text-align: left;
  border: 1px solid #e3e8e3;
  background: white;
  padding: 10px 11px;
  display: grid;
  gap: 4px;
}

.context-frame-card.is-current {
  border-color: #1f6f57;
  background: #edf7f1;
}

.context-frame-card strong {
  font-size: 13px;
}

.context-frame-card span {
  color: #68736c;
  font-size: 12px;
}

.guideline-snapshot {
  display: grid;
  gap: 4px;
}

.guideline-snapshot strong {
  font-size: 13px;
}

.guideline-snapshot span,
.guideline-snapshot small,
.annotation-shortcuts {
  color: #68736c;
  font-size: 12px;
  line-height: 1.5;
}

.annotation-shortcuts {
  display: grid;
  gap: 4px;
}

.annotation-utility-details {
  border: 1px solid #e3e8e3;
  background: #fbfcfa;
  padding: 0 11px 10px;
}

.annotation-utility-details summary {
  cursor: pointer;
  padding: 10px 0;
  font-weight: 700;
  color: #17201b;
}

.annotation-utility-body {
  display: grid;
  gap: 10px;
}

.annotation-rect {
  position: absolute;
  border: 2px solid #b53232;
  background: rgba(206, 53, 39, 0.15);
  box-sizing: border-box;
}

.annotation-rect.is-preview {
  border-style: dashed;
  background: rgba(206, 53, 39, 0.08);
}

.annotation-rect[data-label="cable_crossing"] {
  border-color: #b53232;
}

.annotation-rect[data-label="optical_bend_radius_bad"] {
  border-color: #761f28;
}

.annotation-rect[data-label="label_missing"] {
  border-color: #d87836;
}

.annotation-rect .annotation-tag {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(-100%);
  background: rgba(16, 20, 18, 0.9);
  color: white;
  font-size: 11px;
  padding: 3px 6px;
  white-space: nowrap;
}

.annotation-list-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #e3e8e3;
  background: white;
}

.annotation-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.annotation-item {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid #e3e8e3;
  background: #f9fbf8;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.annotation-item.is-selected {
  border-color: #1f6f57;
  background: #edf7f1;
}

.annotation-item strong {
  font-size: 13px;
}

.annotation-rect.is-selected {
  border-style: solid;
  box-shadow: 0 0 0 2px rgba(74, 153, 84, 0.22);
}

.annotation-rect.is-selected .annotation-tag {
  background: rgba(74, 153, 84, 0.95);
}

.expert-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.recent-review-panel {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid #e3e8e3;
  display: grid;
  gap: 10px;
}

.recent-review-panel > summary {
  list-style: none;
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.recent-review-panel > summary::-webkit-details-marker {
  display: none;
}

.recent-review-panel .review-filter-row {
  margin-top: 0;
}

.recent-review-panel h4 {
  margin: 0;
  font-size: 14px;
}

.recent-review-summary {
  display: grid;
  gap: 6px;
}

.recent-review-summary-item {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #e3e8e3;
  background: #f8fbf8;
}

.recent-review-summary-item strong {
  font-size: 13px;
}

.recent-review-summary-item span {
  color: #68736c;
  font-size: 12px;
}

#recentReviewList {
  display: grid;
  gap: 6px;
  max-height: 156px;
  overflow: auto;
  padding-right: 4px;
}

.recent-review-item,
.recent-review-empty {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid #e3e8e3;
  background: white;
}

.recent-review-item {
  text-align: left;
  cursor: pointer;
}

.recent-review-item strong {
  font-size: 13px;
}

.recent-review-item span,
.recent-review-item small,
.recent-review-empty {
  color: #68736c;
  font-size: 12px;
}

.expert-panel h3 {
  margin: 0;
}

.expert-panel label {
  display: grid;
  gap: 6px;
  color: #68736c;
  font-size: 13px;
}

.expert-panel input,
.expert-panel select,
.expert-panel textarea {
  width: 100%;
  border: 1px solid #e3e8e3;
  padding: 10px;
  background: white;
  color: #17201b;
}

.expert-panel textarea {
  min-height: 100px;
  resize: vertical;
}

.review-result {
  padding: 12px;
  background: #f1f4ef;
  border-left: 4px solid #315c86;
  color: #315c86;
  font-weight: 700;
}

.review-result.is-approved {
  background: #e7f3ec;
  border-left-color: #1f6f57;
  color: #1f6f57;
}

.review-result.is-uncertain {
  background: #fff4df;
  border-left-color: #d87836;
  color: #d87836;
}

.review-result.is-rejected {
  background: #ffe8e5;
  border-left-color: #b53232;
  color: #b53232;
}

.standards-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.standards-reference-panel {
  padding: 18px;
}

.reference-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.reference-card {
  padding: 10px;
  min-height: 136px;
  display: grid;
  align-content: start;
  gap: 8px;
  background: #fff;
  border: 1px solid #e3e8e3;
}

.reference-card span,
.reference-card small {
  color: #1f6f57;
  font-size: 12px;
  font-weight: 800;
}

.reference-card strong {
  font-size: 16px;
  line-height: 1.35;
}

.reference-card p,
.reference-card em {
  margin: 0;
  color: #68736c;
  line-height: 1.55;
  font-style: normal;
  font-size: 13px;
}

.evidence-matrix {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #e3e8e3;
  background: #fff;
}

.evidence-row {
  display: grid;
  grid-template-columns: 0.8fr 1.5fr 1.1fr 1.1fr;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid #e3e8e3;
  align-items: center;
}

.evidence-row:first-child,
#standardsEvidenceMatrix .evidence-row:first-child {
  border-top: 0;
}

.evidence-row span {
  color: #68736c;
  font-size: 13px;
  line-height: 1.5;
}

.evidence-head {
  background: #edf3ee;
}

.evidence-head span,
.evidence-head strong {
  color: #17201b;
  font-weight: 800;
}

.standard-card {
  padding: 18px;
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 10px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.standard-card:hover,
.standard-card.is-selected {
  transform: translateY(-2px);
  border-color: #1f6f57;
  box-shadow: 0 12px 30px rgba(33, 42, 37, 0.12);
}

.standard-featured {
  grid-column: span 2;
  background: #17201b;
  color: white;
}

.standard-card p {
  margin: 0;
  color: #68736c;
  line-height: 1.6;
}

.standard-featured p {
  color: #c8d4cc;
}

.source-row span,
.standard-score {
  display: inline-block;
  padding: 7px 9px;
  background: rgba(31, 111, 87, 0.12);
  color: #1f6f57;
  font-size: 12px;
}

.standard-featured .source-row span {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.standard-detail-panel {
  position: sticky;
  top: 24px;
  margin-top: 0;
  padding: 14px;
  display: grid;
  gap: 10px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
}

.standard-detail-panel h3,
.standard-detail-panel p {
  margin: 0;
}

.standard-detail-panel p {
  color: #68736c;
  line-height: 1.45;
}

.official-samples {
  margin-top: 18px;
  padding: 12px;
}

.sample-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.action-row button {
  height: 44px;
  line-height: 1;
  padding: 0 20px;
  font-size: 14px;
  border-radius: 8px;
  white-space: nowrap;
}

.dataset-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.summary-chip {
  display: grid;
  gap: 2px;
  min-width: 92px;
  padding: 10px 12px;
  border: 1px solid #e3e8e3;
  background: white;
}

.summary-chip strong {
  font-size: 18px;
}

.summary-chip span {
  color: #68736c;
  font-size: 11px;
}

.dataset-tools h3,
.dataset-tools p {
  margin: 0;
}

.dataset-tools p {
  color: #68736c;
  line-height: 1.6;
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-button {
  border: 1px solid #e3e8e3;
  background: white;
  padding: 10px 12px;
}

.filter-button.is-active {
  background: #1f6f57;
  color: white;
  border-color: #1f6f57;
}

.dataset-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.dataset-card {
  background: white;
  border: 1px solid #e3e8e3;
  overflow: hidden;
  display: grid;
}

.dataset-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #dfe5df;
}

.dataset-meta {
  padding: 9px;
  display: grid;
  gap: 5px;
}

.dataset-meta strong {
  font-size: 12px;
}

.dataset-meta span {
  font-size: 11px;
  color: #68736c;
}

.dataset-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #e3e8e3;
}

.dataset-actions button {
  border: 0;
  padding: 9px 6px;
  background: #f4f6f3;
  font-size: 12px;
}

.dataset-actions button:first-child {
  border-right: 1px solid #e3e8e3;
}

.dataset-card.is-approved {
  border-color: #1f6f57;
}

.dataset-card.is-uncertain {
  border-color: #d87836;
}



.sample-info {
  display: grid;
  gap: 4px;
  padding: 7px 8px;
}

.sample-info strong {
  font-size: 13px;
  line-height: 1.35;
}

.sample-info span {
  color: #68736c;
  font-size: 11px;
  line-height: 1.35;
}

.quality-badge {
  justify-self: start;
  padding: 5px 7px;
  color: white;
  background: #b53232;
  font-size: 11px;
}

.quality-badge.good {
  background: #1f6f57;
}

.mobile-tabs {
  display: none;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    padding-bottom: 86px;
  }

  .hero-panel,
  .report-layout,
  .review-shell,
  .standards-layout {
    grid-template-columns: 1fr;
  }

  .training-monitoring-grid {
    grid-template-columns: 1fr;
  }

  .training-flow-grid {
    grid-template-columns: 1fr;
  }

  .annotation-workbench {
    grid-template-columns: 1fr;
  }

  .annotation-context-panel {
    position: static;
  }

  .annotation-toolbar-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .annotation-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-overview {
    grid-template-columns: 1fr;
  }

  .review-overview-actions.review-overview-actions-inline {
    grid-template-columns: 1fr;
  }

  .review-sidebar {
    position: static;
  }

  .training-monitoring-grid {
    grid-template-columns: 1fr;
  }

  .reference-grid,
  .quick-grid,
  .report-support-grid,
  .sample-grid,
  .dataset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dataset-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #17201b;
    color: white;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .mobile-tabs .nav-item {
    text-align: center;
    border-left: 0;
    border-top: 3px solid transparent;
  }

  .mobile-tabs .nav-item.is-active {
    border-top-color: #e8bd44;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 16px 16px 82px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar h2 {
    font-size: 25px;
  }

  .hero-panel {
    padding: 18px;
  }

  .hero-copy h3 {
    font-size: 29px;
  }

  .review-overview {
    padding: 16px;
  }

  .review-overview-actions.review-overview-actions-inline {
    grid-template-columns: 1fr;
  }

  .review-sidebar-card h3 {
    font-size: 18px;
  }

  .reference-grid,
  .quick-grid,
  .report-support-grid,
  .sample-grid,
  .dataset-grid {
    grid-template-columns: 1fr;
  }

  .queue-tools {
    grid-template-columns: 1fr;
  }

  .annotation-toolbar {
    padding: 12px;
  }

  .annotation-toolbar-fields {
    grid-template-columns: 1fr;
  }

  .annotation-toolbar-actions {
    grid-template-columns: 1fr;
  }

  .annotation-more-actions {
    width: 100%;
  }

  .annotation-workbench {
    gap: 12px;
  }

  .annotation-action-grid {
    grid-template-columns: 1fr;
  }

  .annotation-quick-action {
    grid-column: auto;
  }

  .training-monitoring-grid .training-history-panel {
    grid-column: auto;
  }

  .inspection-photo {
    min-height: 360px;
  }

  .defect-drawer {
    flex-direction: column;
  }

  .standard-detail-panel {
    flex-direction: column;
  }

  .evidence-row {
    grid-template-columns: 1fr;
  }
}

/* ── 批量评分面板 ── */
.batch-score-panel {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid #e8e8e8;
  border: 1px solid #e3e8e3;
  border-radius: 8px;
  padding: 20px;
  margin-top: 16px;
}
.batch-score-panel .analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.batch-score-panel .analysis-header h4 {
  margin: 0;
  font-size: 16px;
}
.batch-score-panel .analysis-header span {
  font-size: 13px;
  color: #68736c;
}
.batch-score-desc {
  font-size: 13px;
  color: #68736c;
  margin: 0 0 12px 0;
  line-height: 1.5;
}
.batch-score-actions {
  margin-bottom: 12px;
}
.batch-score-results {
  margin-top: 8px;
}
.batch-score-stats {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #1f6f57;
  margin-bottom: 8px;
}
.batch-score-fail {
  color: #b53232;
}
.batch-score-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.batch-score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e3e8e3;
  border-radius: 6px;
  background: #fbfcfb;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  min-width: 110px;
  text-align: center;
}
.batch-score-item:hover {
  background: #edf6f1;
  border-color: #2f9272;
}
.batch-score-item-icon {
  font-size: 20px;
}
.batch-score-item-score {
  font-weight: 600;
  font-size: 14px;
  color: #17201b;
}
.batch-score-item-name {
  font-size: 12px;
  color: #68736c;
}
.batch-score-item small {
  font-size: 11px;
  color: #68736c;
}
.batch-score-empty {
  font-size: 13px;
  color: #68736c;
  padding: 12px;
  text-align: center;
}
.batch-score-error {
  font-size: 13px;
  color: #b53232;
  padding: 12px;
  text-align: center;
  background: #fff5f5;
  border-radius: 6px;
}

/* 训练状态卡片文本溢出修复 */
.training-package-card,
.training-package-card strong,
.training-package-card span,
.training-package-card small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.training-package-card {
  min-width: 0;
  word-break: break-all;
}
.training-run .run-name,
.training-run .run-status,
.training-run .badge,
.training-run .badge-list {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.training-run:hover .run-name,
.training-run:hover .run-status {
  overflow: visible;
  white-space: normal;
  word-break: break-all;
  background: #121825;
  position: relative;
  z-index: 10;
  padding: 2px 4px;
  border-radius: 3px;
}

/* ═══════════════════════════════════
   Gemini 优化：微批次进度 + 三栏布局
   ═══════════════════════════════════ */
.micro-batch-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #121825;
  border-bottom: 1px solid #252f44;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.micro-batch-bar .batch-label {
  font-size: 11px;
  color: #68736c;
  white-space: nowrap;
}
.micro-batch-bar .batch-progress {
  flex: 1;
  height: 6px;
  background: #252f44;
  border-radius: 3px;
  overflow: hidden;
}
.micro-batch-bar .batch-progress-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.micro-batch-bar .batch-cta {
  padding: 4px 12px;
  border-radius: 4px;
  border: none;
  background: #3b82f6;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  font-weight: 600;
}
.micro-batch-bar .batch-cta:hover {
  background: #2563eb;
}
.annotation-panel-footer {
  position: sticky;
  bottom: 0;
  background: #121825;
  border-top: 1px solid #252f44;
  padding: 8px;
}


/* ── Utility Classes ───────────────────────────── */

/* ── Layout: Gallery Grid (image grid) ──── */



/* ── Tabs ──────────────────────────── */



/* ── Status Badge ─────────────────── */

/* ── Card Actions ─────────────────── */


.sample-card {
  border: 1px solid #e3e8e3;
  background: white;
  padding: 0;
  text-align: left;
  overflow: hidden;
}

.sample-card img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  display: block;
  background: #dfe5df;
}

.sample-info {
  display: grid;
  gap: 4px;
  padding: 7px 8px;
}

.sample-info strong {
  font-size: 14px;
}

.sample-info span {
  font-size: 11px;
  color: #68736c;
}


/* ── Dataset page layout ────────────────────── */
#datasetView .dataset-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  padding: 16px;
  align-items: start;
}

#datasetView #datasetSummary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

#datasetView .filter-row {
  grid-column: 1 / -1;
  margin-top: 4px;
}

/* ── Standards page layout ──────────────────── */
#standardsView .standards-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  align-items: stretch;
}

#standardsView .standard-detail-panel {
  align-content: start;
  gap: 14px;
}

#standardsView .standard-detail-panel p {
  line-height: 1.65;
}

#standardsView .source-pill {
  margin-top: 4px;
}

/* ── Standards catalog: horizontal layout ──── */
#standardsView .standard-catalog {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

#standardsView .standard-link {
  flex: 1 1 calc(50% - 3px);
  min-width: 0;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  border: 1px solid #e3e8e3;
  background: white;
  text-align: left;
}

#standardsView .standard-link strong {
  font-size: 12px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#standardsView .standard-link span {
  font-size: 10px;
  color: #68736c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#standardsView .standard-link.is-selected {
  border-color: #1f6f57;
}

#standardsView .standard-catalog-panel {
  padding: 12px;
}

/* ── Standards archive: compact grid ──────── */
.standards-archive .reference-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.standards-archive .reference-card {
  padding: 8px 10px;
  min-height: auto;
  gap: 4px;
}

.standards-archive .reference-card strong {
  font-size: 13px;
}

.standards-archive .reference-card p {
  font-size: 12px;
  margin: 0;
}

.standards-archive .evidence-matrix {
  margin-top: 12px;
  overflow-x: auto;
}

.standards-archive .evidence-row {
  grid-template-columns: 120px 1fr 1fr 1fr;
  gap: 8px;
  padding: 7px 10px;
  font-size: 12px;
}

/* ── App Footer ─────────────────────────── */


/* ── Inspect view: optimized UI ────────── */
.hero-copy .description-label {
  margin: 0 0 8px;
  color: #68736c;
  font-size: 14px;
}

.hero-copy .feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.hero-copy .feature-tags span {
  padding: 4px 12px;
  background: #edf7f1;
  color: #1f6f57;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* ── Standards header: one line ────────── */
#standardsView .standard-catalog-panel .section-header {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

#standardsView .standard-catalog-panel .section-header h4 {
  margin: 0;
  white-space: nowrap;
}

#standardsView .standard-catalog-panel .section-header span {
  color: #68736c;
  font-size: 12px;
  white-space: nowrap;
}

.version-panel .app-footer {
  font-size: 11px;
  color: #8892a0;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid #e3e8e3;
  display: block;
}
