*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --canvas: #f0f4f8;
  --card: #ffffff;
  --accent: #005BA0;
  --accent-hover: #004a82;
  --accent-light: rgba(0, 91, 160, 0.08);
  --accent-glow: rgba(0, 91, 160, 0.15);
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #556270;
  --border: #dce4ed;
  --border-light: #e8eef5;
  --danger: #c0392b;
  --danger-light: rgba(192, 57, 43, 0.08);
  --success: #27ae60;
  --success-light: rgba(39, 174, 96, 0.08);
  --sidebar-width: 290px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.10);
  --shadow-elevated: 0 12px 40px rgba(0,0,0,0.12);
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'DM Sans', system-ui, -apple-system, sans-serif;
  --transition: 0.2s ease;
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html { font-size: 15px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); color: var(--text-primary); background: var(--canvas); min-height: 100vh; }

/* --- Layout --- */
.app { display: grid; grid-template-columns: var(--sidebar-width) 1fr; min-height: 100vh; }

/* --- Sidebar --- */
.sidebar {
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.2;
}
.sidebar-brand span { color: var(--accent); }
.phase-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--accent-light);
  color: var(--accent);
  margin-bottom: 22px;
}
.phase-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.sidebar-section { margin-bottom: 18px; }
.sidebar-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.sidebar-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--card);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.sidebar-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.sidebar-input:disabled { background: var(--canvas); color: var(--text-secondary); cursor: not-allowed; opacity: 0.7; }
.sidebar-input.error { border-color: var(--danger); }
.sidebar-error { font-size: 0.75rem; color: var(--danger); margin-top: 4px; display: none; }
.sidebar-error.visible { display: block; }

.sidebar-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--card);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b6b6b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color var(--transition);
}
.sidebar-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.sidebar-select:disabled { background: var(--canvas); color: var(--text-secondary); cursor: not-allowed; opacity: 0.7; }

.sidebar-divider { height: 1px; background: var(--border-light); margin: 16px 0; }

/* Geo tags */
.geo-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.geo-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 12px; font-size: 0.72rem; font-weight: 500;
  background: var(--accent-glow); color: var(--accent); border: 1px solid var(--accent);
  cursor: default; white-space: nowrap;
}
.geo-tag-remove {
  cursor: pointer; font-size: 0.8rem; line-height: 1; opacity: 0.7;
  margin-left: 2px; border: none; background: none; color: inherit; padding: 0;
}
.geo-tag-remove:hover { opacity: 1; }

.sidebar-annotations-header {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sidebar-annotations-count {
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
}

.sidebar-annotations-list { flex: 1; overflow-y: auto; margin-bottom: 14px; }
.sidebar-annotation-item {
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 6px;
  transition: background var(--transition);
  border: 1px solid transparent;
}
.sidebar-annotation-item:hover { background: var(--canvas); border-color: var(--border-light); }
.sidebar-annotation-query {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-annotation-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.sidebar-annotation-duration {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.sidebar-annotation-actions { display: flex; gap: 6px; }
.btn-sm {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--card);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.btn-sm:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-sm.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }

.btn-export {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: white;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-export:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-export:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-export svg { width: 16px; height: 16px; }

.sidebar-empty {
  text-align: center;
  padding: 20px 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* --- Main Content --- */
.main {
  padding: 36px 48px;
  max-width: 1200px;
  min-height: 100vh;
}

.phase-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 8px;
  animation: fadeUp 0.4s var(--transition-slow) both;
}
.phase-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 640px;
  animation: fadeUp 0.4s 0.05s var(--transition-slow) both;
}
.timer-display {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--accent-light, #f0f4f8);
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 16px;
}

/* --- Search Bar --- */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  animation: fadeUp 0.4s 0.1s var(--transition-slow) both;
}
.search-input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--card);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.search-input::placeholder { color: var(--text-muted); }
.btn-search {
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: white;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-search:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-search:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* --- Result Cards --- */
.results-header {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.results-count-badge {
  background: var(--accent-light);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.result-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  animation: fadeUp 0.4s var(--transition-slow) both;
  border: 1px solid transparent;
}
.result-card:hover { box-shadow: var(--shadow-hover); border-color: var(--border-light); }

.result-card-header {
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  user-select: none;
}
.result-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  line-height: 1.4;
}
.result-card-chevron {
  width: 20px; height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.result-card.expanded .result-card-chevron { transform: rotate(180deg); }

.result-card-body {
  display: none;
  padding: 0 22px 22px;
  border-top: 1px solid var(--border-light);
}
.result-card.expanded .result-card-body { display: block; }

.result-card-content {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding-top: 18px;
}
.result-chart-container { min-height: 280px; }
.result-chart-container .js-plotly-plot { width: 100% !important; }

.result-metadata { font-size: 0.82rem; overflow: hidden; }
.meta-item { margin-top: 14px; }
.meta-item:first-child { margin-top: 0; }
.result-metadata-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.result-metadata-value {
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-word;
}
.result-metadata-value a { color: var(--accent); text-decoration: none; }
.result-metadata-value a:hover { text-decoration: underline; }

/* MI multi-geo layout: full-width chart, metadata below in compact grid */
.result-card-content.mi-layout { grid-template-columns: 1fr; gap: 16px; }
.result-card-content.mi-layout .result-chart-container { min-height: 340px; }
.result-card-content.mi-layout .result-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2px 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.mi-layout .meta-item .result-metadata-label { margin-top: 0; }

.result-card-select {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 0;
  border-top: 1px solid var(--border-light);
  margin-top: 16px;
}
.result-card-select label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.result-card-select input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* --- Bottom Action Bar --- */
.action-bar {
  position: sticky;
  bottom: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px -48px -36px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
  z-index: 10;
}
.action-bar-count {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.action-bar-count strong { color: var(--accent); }
.btn-proceed {
  padding: 12px 32px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: white;
  transition: all var(--transition);
}
.btn-proceed:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-proceed:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* --- Phase 2 --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 20px;
  cursor: pointer;
  transition: color var(--transition);
}
.back-link:hover { color: var(--accent); }
.back-link svg { width: 14px; height: 14px; }

.p2-dataset-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 16px;
  animation: fadeUp 0.4s var(--transition-slow) both;
}
.p2-dataset-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.p2-dataset-content {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}
.p2-dataset-content.mi-layout { grid-template-columns: 1fr; gap: 16px; }
.p2-dataset-content.mi-layout .result-chart-container { min-height: 340px; }
.p2-dataset-content.mi-layout .result-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2px 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.p2-dataset-content.mi-layout .meta-item .result-metadata-label { margin-top: 0; }

/* --- Annotation Form --- */
.annotation-form {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-top: 24px;
  animation: fadeUp 0.4s 0.15s var(--transition-slow) both;
}
.form-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.form-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 22px;
}
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.form-label .required { color: var(--accent); }
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--card);
  outline: none;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.6;
}
.form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-textarea::placeholder { color: var(--text-muted); }
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.btn-submit {
  padding: 13px 36px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: white;
  transition: all var(--transition);
}
.btn-submit:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary {
  padding: 13px 28px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--card);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* --- Completion --- */
.completion-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 40px;
  text-align: center;
  max-width: 600px;
  margin: 60px auto;
  animation: fadeUp 0.5s var(--transition-slow) both;
}
.completion-icon {
  width: 64px; height: 64px;
  background: var(--success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.completion-icon svg { color: var(--success); width: 32px; height: 32px; }
.completion-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.completion-subtitle { color: var(--text-secondary); margin-bottom: 28px; font-size: 0.9rem; }
.completion-details {
  text-align: left;
  background: var(--canvas);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 28px;
}
.completion-detail-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
  margin-top: 14px;
}
.completion-detail-label:first-child { margin-top: 0; }
.completion-detail-value { font-size: 0.88rem; color: var(--text-primary); line-height: 1.5; }

/* --- Loading Overlay --- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(240, 244, 248, 0.85);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}
.loading-overlay.visible { display: flex; }
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.loading-ring {
  width: 44px; height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-text { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }

/* --- Toast --- */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-elevated);
  animation: slideInRight 0.3s var(--transition-slow), fadeOut 0.3s 3.5s ease forwards;
  max-width: 380px;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  animation: fadeUp 0.4s var(--transition-slow) both;
}
.empty-state-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  opacity: 0.4;
}
.empty-state-text { font-size: 0.95rem; line-height: 1.6; }

/* --- Error --- */
.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}
.form-error.visible { display: block; }

/* --- Animations --- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; pointer-events: none; } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Plotly modebar overrides --- */
.modebar-btn.active path, .modebar-btn:hover path { fill: #2D8CBF !important; }

/* --- Misc --- */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ================================================================
   MODE SELECTOR
   ================================================================ */
.mode-selector {
  display: flex; gap: 12px; margin-top: 4px;
}
.mode-option {
  font-size: 0.8rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 5px; cursor: pointer;
}
.mode-option input[type="radio"] { accent-color: var(--accent); }

/* ================================================================
   VALIDATION MODE
   ================================================================ */
.validation-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.validation-pair-num {
  font-size: 1.2rem; font-weight: 600; color: var(--text-primary);
}
.validation-badge {
  font-size: 0.7rem; padding: 3px 8px; border-radius: var(--radius-xs);
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;
}
.validation-badge.validated {
  background: var(--success-light); color: var(--success);
}
.validation-section {
  margin-bottom: 24px;
}
.validation-section-disabled {
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}
.validation-section-label {
  font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
}
.validation-query-box {
  background: var(--accent-light); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 16px; font-size: 0.95rem;
  line-height: 1.6; color: var(--text-primary);
}
.validation-dataset-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 16px;
  transition: var(--transition);
}
.validation-dataset-card.rejected {
  opacity: 0.5; border-color: var(--danger);
  background: var(--danger-light);
}
.validation-dataset-header {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  margin-bottom: 16px; font-weight: 500;
}
.validation-dataset-header input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0;
}
.validation-dataset-title {
  font-size: 0.9rem; font-weight: 600; color: var(--text-primary);
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.validation-dataset-geo {
  font-size: 0.75rem; font-weight: 600; color: var(--accent);
  background: var(--accent-light); padding: 2px 8px; border-radius: 4px;
  flex-shrink: 0;
}
/* Reuse annotation card grid layout for chart + metadata */
.validation-dataset-content { display: grid; grid-template-columns: 1fr; gap: 16px; }
.validation-dataset-content .result-chart-container { min-height: 340px; }
.validation-dataset-content .result-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2px 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.validation-dataset-content .meta-item .result-metadata-label { margin-top: 0; }
.validation-chart-error {
  padding: 12px; background: #fff3cd; border: 1px solid #ffc107;
  border-radius: var(--radius-xs); font-size: 0.8rem; color: #856404;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.btn-report-issue {
  flex-shrink: 0; padding: 4px 12px; font-size: 0.75rem; font-weight: 500;
  border: 1px solid #dc3545; border-radius: var(--radius-xs);
  background: #fff; color: #dc3545; cursor: pointer; transition: all 0.15s;
}
.btn-report-issue:hover:not(:disabled) { background: #dc3545; color: #fff; }
.btn-report-issue.reported {
  background: #f8d7da; color: #721c24; border-color: #f5c6cb; cursor: default;
}
.validation-reported-badge {
  font-size: 0.7rem; font-weight: 500; color: #721c24; background: #f8d7da;
  padding: 2px 8px; border-radius: 10px; margin-left: auto;
}
.validation-chart-placeholder {
  padding: 40px; text-align: center; color: var(--text-muted);
  font-size: 0.85rem;
}
.single-value-display {
  padding: 24px; text-align: center;
  background: var(--canvas); border-radius: 8px; margin: 8px 0;
  font-size: 1.1rem; color: var(--text);
}
.single-value-number {
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.validation-temporal-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
}
.validation-radio-group {
  display: flex; gap: 20px; margin-bottom: 4px;
}
.validation-radio {
  display: flex; align-items: center; gap: 6px; font-size: 0.9rem;
  cursor: pointer; color: var(--text-primary);
}
.validation-radio input[type="radio"] { accent-color: var(--accent); }
.validation-checkbox-label {
  display: flex; align-items: flex-start; gap: 8px; font-size: 0.85rem;
  color: var(--text-secondary); padding: 4px 0; cursor: pointer;
}
.validation-checkbox-label input[type="checkbox"] {
  margin-top: 2px; accent-color: var(--accent);
}
.validation-actions {
  display: flex; gap: 12px; margin-top: 20px; padding-top: 20px;
  border-top: 1px solid var(--border-light);
}
.btn-submit-validation {
  padding: 10px 24px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-xs); font-size: 0.9rem;
  font-weight: 500; cursor: pointer; transition: var(--transition);
}
.btn-submit-validation:hover { background: var(--accent-hover); }
.btn-nav {
  padding: 6px 12px; background: var(--canvas); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-xs);
  font-size: 0.8rem; cursor: pointer; transition: var(--transition);
}
.btn-nav:hover { background: var(--border-light); }
.btn-nav:disabled { opacity: 0.4; cursor: not-allowed; }
/* Validation sidebar spacing overrides */
#validationSidebar .sidebar-section { margin-bottom: 22px; }
#validationSidebar .sidebar-divider { margin: 2px 0 6px; }

.validation-summary {
  background: var(--canvas);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
}
.validation-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 3px 0;
}
.validation-summary-key {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.validation-summary-val {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.validation-progress-bar {
  width: 100%; height: 8px; background: var(--canvas);
  border-radius: 4px; overflow: hidden;
}
.validation-progress-fill {
  height: 100%; background: var(--accent);
  border-radius: 4px; transition: width 0.3s ease;
}
.validation-progress-text {
  font-size: 0.75rem; color: var(--text-muted); margin-top: 6px;
}
.validation-nav-row {
  display: flex; gap: 6px; align-items: center;
}
.validation-nav-row .btn-nav { flex-shrink: 0; }
.validation-nav-label {
  font-size: 0.8rem; flex: 1; text-align: center; color: var(--text-secondary);
}
.validation-jump-row {
  display: flex; gap: 6px; margin-top: 8px; align-items: center;
}
.validation-jump-row .sidebar-input {
  width: 60px; text-align: center;
}
