:root {
  --bg: linear-gradient(135deg, #eef6ff 0%, #f3f7eb 100%);
  --panel: #ffffff;
  --ink: #1a2c3b;
  --muted: #5f6e7a;
  --accent: #12603f;
  --accent-2: #0d4ca3;
  --line: #d6e0e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
}

main {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 14px 24px;
}

header {
  margin-bottom: 14px;
}

.header-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.account-menu {
  position: relative;
  min-width: 220px;
  display: flex;
  justify-content: flex-end;
}

.account-menu-panel {
  position: absolute;
  top: 44px;
  right: 0;
  width: 320px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20, 40, 60, 0.18);
  padding: 12px;
  z-index: 50;
  display: none;
}

.account-menu.open .account-menu-panel {
  display: block;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

p {
  margin: 8px 0 0;
  color: var(--muted);
}

.panel-toolbar {
  margin: 8px 0 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.panel-toolbar label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
  box-shadow: 0 10px 26px rgba(20, 40, 60, 0.08);
}

.sticky-progress-strip {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.93);
}

.ops-overall-progress {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 10px;
}

.ops-overall-label {
  font-weight: 700;
  font-size: 13px;
}

.ops-overall-bar {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8f1fb;
}

.ops-overall-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #2b7cff 0%, #3dc2a5 100%);
  transition: width 220ms ease;
}

.ops-overall-status {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

.ops-module-cards {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.ops-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.ops-card h3 {
  margin: 0;
  font-size: 16px;
}

.ops-card p {
  margin-top: 6px;
  font-size: 12px;
}

.ops-card-fields {
  margin-top: 8px;
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  color: var(--muted);
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
}

.ops-card-bar {
  margin-top: 8px;
  height: 10px;
  border-radius: 999px;
  background: #e8f1fb;
  overflow: hidden;
}

.ops-card-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2b7cff 0%, #3dc2a5 100%);
  transition: width 220ms ease;
}

.ops-card-fill.warn {
  background: linear-gradient(90deg, #d6a300 0%, #ebb441 100%);
}

.ops-card-fill.err {
  background: linear-gradient(90deg, #b53333 0%, #e25f5f 100%);
}

.ops-card-status {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.panel-toggle-btn {
  border: 1px solid var(--line);
  background: #f8fbff;
  color: var(--ink);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}

.panel-toggle-btn:hover {
  background: #edf5ff;
}

.panel.collapsed .panel-body {
  display: none;
}

.two-col,
.three-col,
.four-col {
  display: grid;
  gap: 12px;
}

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

.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact {
  margin-top: 12px;
}

.export-class-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.export-class-toggles label {
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.export-class-toggles input[type='checkbox'] {
  width: auto;
}

.tree-panel {
  margin-top: 12px;
}

#upload-progress,
#bucket-tree {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 8px;
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
}

.dropzone {
  margin-top: 12px;
  border: 2px dashed #9db7d3;
  border-radius: 10px;
  padding: 14px;
  color: #355273;
  background: #f6fbff;
  text-align: center;
  font-size: 13px;
}

.dropzone.drag-active {
  border-color: #2b7cff;
  background: #eef5ff;
}

#upload-progress {
  background: #fcfdff;
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  white-space: normal;
}

.progress-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  margin-bottom: 8px;
}

.progress-title {
  font-weight: 600;
  font-size: 12px;
  word-break: break-word;
}

.progress-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.progress-bar {
  margin-top: 6px;
  width: 100%;
  height: 8px;
  background: #e8f1fb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #2b7cff 0%, #3dc2a5 100%);
  transition: width 120ms linear;
}

#workflow-tracker {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 10px;
}

.wf-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 180px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.wf-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.wf-bar {
  height: 8px;
  border-radius: 999px;
  background: #e8f1fb;
  overflow: hidden;
}

.wf-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2b7cff 0%, #3dc2a5 100%);
  transition: width 180ms ease;
}

.wf-status {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.wf-next {
  margin-top: 2px;
  font-size: 12px;
  color: #1f5f3f;
  font-weight: 600;
}

#metadata-list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 8px;
}

#uploads-list,
#uploads-tree,
#processing-datasets-list,
#finder-list,
#scraper-results-list,
#scraper-audited-list {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 8px;
  font-size: 12px;
}

#uploads-tree {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  white-space: pre;
  line-height: 1.5;
}

#finder-breadcrumb,
#finder-summary {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.finder-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.finder-item.directory {
  background: #f4f9ff;
}

.finder-item.active {
  border-color: #2b7cff;
  box-shadow: 0 0 0 2px rgba(43, 124, 255, 0.18);
}

.finder-title {
  font-weight: 600;
  word-break: break-word;
}

.finder-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  word-break: break-word;
}

#processing-live-state {
  font-size: 12px;
  color: var(--muted);
}

#project-profile-state,
#upload-auto-state,
#resource-link-state {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

#resource-link-list {
  margin-top: 10px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 8px;
  font-size: 12px;
}

#dashboard-progress-board {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 10px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 180px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.dashboard-row:last-child {
  margin-bottom: 0;
}

.dashboard-label {
  font-size: 12px;
  font-weight: 700;
}

.dashboard-bar {
  height: 10px;
  border-radius: 999px;
  background: #e8f1fb;
  overflow: hidden;
}

.dashboard-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2b7cff 0%, #3dc2a5 100%);
  transition: width 200ms ease;
}

.dashboard-fill.warn {
  background: linear-gradient(90deg, #d6a300 0%, #ebb441 100%);
}

.dashboard-fill.err {
  background: linear-gradient(90deg, #b53333 0%, #e25f5f 100%);
}

.dashboard-status {
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}

#output-hub-state {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

#output-hub-summary {
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 8px;
  font-size: 12px;
  color: var(--muted);
}

#output-hub-list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 8px;
}

.output-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  margin-bottom: 8px;
}

.output-item.active {
  border-color: #2b7cff;
  box-shadow: 0 0 0 2px rgba(43, 124, 255, 0.15);
}

.output-item.validated {
  border-color: #0f8a58;
  box-shadow: 0 0 0 2px rgba(15, 138, 88, 0.1);
}

.output-item.deliverable {
  border-color: #0d4ca3;
  box-shadow: 0 0 0 2px rgba(13, 76, 163, 0.1);
}

.output-title {
  font-weight: 700;
  font-size: 13px;
  word-break: break-word;
}

.output-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  word-break: break-word;
}

.output-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

body.structured-layout section.panel.module-hidden {
  display: none;
}

.resource-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.resource-item.active {
  border-color: #2b7cff;
  box-shadow: 0 0 0 2px rgba(43, 124, 255, 0.15);
}

.resource-item-title {
  font-weight: 700;
  font-size: 13px;
}

.resource-item-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  word-break: break-word;
}

#manuals-state {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

#manuals-frame {
  margin-top: 10px;
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

#processing-audit-state {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

#processing-audit-detail {
  margin-top: 8px;
  margin-bottom: 10px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 8px;
  font-size: 12px;
}

#seamless-state,
#beta-state,
#well-workflow-state,
#processing-well-jobs-state {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

#beta-steps,
#beta-missing {
  margin-top: 8px;
  margin-bottom: 10px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 8px;
  font-size: 12px;
}

#beta-context {
  margin-top: 8px;
  margin-bottom: 10px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 8px;
  font-size: 12px;
}

.beta-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 7px 8px;
  margin-bottom: 8px;
}

.beta-item:last-child {
  margin-bottom: 0;
}

.beta-item-title {
  font-weight: 700;
  font-size: 12px;
}

.beta-item-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  word-break: break-word;
}

.beta-item.ok {
  border-color: #0f8a58;
  box-shadow: 0 0 0 2px rgba(15, 138, 88, 0.12);
}

.beta-item.warn {
  border-color: #c28700;
  box-shadow: 0 0 0 2px rgba(194, 135, 0, 0.12);
}

.beta-item.err {
  border-color: #b53333;
  box-shadow: 0 0 0 2px rgba(181, 51, 51, 0.1);
}

#beta-release-channel {
  width: 180px;
}

#beta-refresh-interval-sec {
  width: 120px;
}

#seamless-steps,
#seamless-snapshot,
#processing-well-job-detail {
  margin-top: 8px;
  margin-bottom: 10px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 8px;
  font-size: 12px;
}

#processing-well-summary {
  margin: 8px 0 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

#ecef-consistency-state {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

#ecef-consistency-detail {
  margin-top: 8px;
  margin-bottom: 10px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 8px;
  font-size: 12px;
}

#processing-live-summary {
  margin: 8px 0 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcff;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.processing-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.processing-summary-title {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.processing-summary-value {
  font-weight: 700;
  font-size: 15px;
}

.upload-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  margin-bottom: 8px;
}

.upload-name {
  font-weight: 600;
  word-break: break-word;
}

.upload-meta {
  color: var(--muted);
  margin-top: 2px;
  word-break: break-word;
}

.processing-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.scraper-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  margin-bottom: 8px;
}

.scraper-title {
  font-weight: 600;
  word-break: break-word;
}

.scraper-meta {
  color: var(--muted);
  margin-top: 2px;
  word-break: break-word;
  font-size: 12px;
}

.scraper-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.processing-item.active {
  border-color: #2b7cff;
  box-shadow: 0 0 0 2px rgba(43, 124, 255, 0.15);
}

.processing-title {
  font-weight: 700;
  font-size: 13px;
}

.processing-line {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  word-break: break-word;
}

.meta-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.meta-item.active {
  border-color: #2b7cff;
  box-shadow: 0 0 0 2px rgba(43, 124, 255, 0.15);
}

.meta-item.selected {
  border-color: #1d8f5b;
  box-shadow: 0 0 0 2px rgba(29, 143, 91, 0.14);
}

.meta-select {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.meta-title {
  font-weight: 700;
  font-size: 13px;
}

.meta-line {
  color: var(--muted);
  font-size: 12px;
}

#metadata-detail {
  min-height: 320px;
  max-height: 320px;
}

#viewer-3d {
  height: 520px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #06121f;
  overflow: hidden;
}

#terrain-map {
  height: 520px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eef3f7;
  overflow: hidden;
}

#terrain-map-stats {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px 10px;
  font-size: 12px;
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  white-space: pre-wrap;
}

#viewer-note {
  margin-top: 8px;
  font-size: 12px;
}

#viewer-stats,
#viewer-class-panel,
#viewer-pick-info {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px 10px;
  font-size: 12px;
}

#viewer-stats {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  white-space: pre-wrap;
  line-height: 1.4;
}

.viewer-class-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

#viewer-pick-info {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  color: #21374e;
  white-space: pre-wrap;
}

.viewer-class-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dashed #d9e4ee;
}

.viewer-class-row:last-child {
  border-bottom: 0;
}

.viewer-class-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.viewer-class-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid #8ea2b5;
  flex: 0 0 auto;
}

.viewer-class-label {
  color: #334155;
}

.viewer-class-count {
  color: var(--muted);
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}

.viewer-help {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px 10px;
  font-size: 12px;
}

.viewer-help summary {
  cursor: pointer;
  font-weight: 600;
}

.viewer-help p {
  margin: 6px 0 0;
  color: var(--muted);
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfcfe;
  color: var(--ink);
}

.row-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

button.secondary {
  background: var(--accent-2);
}

button:hover {
  filter: brightness(1.05);
}

a.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

a.btn-link.secondary {
  background: var(--accent-2);
}

a.btn-link.inline-link {
  padding: 6px 10px;
  font-size: 12px;
}

a.btn-link:hover {
  filter: brightness(1.05);
}

#auth-state {
  margin-top: 8px;
  font-size: 13px;
}

pre {
  margin: 0;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  min-height: 240px;
  overflow: auto;
}

.lite-dashboard-main {
  max-width: 1200px;
}

.validator-sticky {
  position: sticky;
  top: 0;
  z-index: 35;
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.95);
}

.lite-stage-bars {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.lite-stage-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 220px;
  gap: 8px;
  align-items: center;
}

.lite-stage-label {
  font-size: 12px;
  font-weight: 700;
}

.lite-stage-bar {
  height: 10px;
  border-radius: 999px;
  background: #e8f1fb;
  overflow: hidden;
}

.lite-stage-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #2b7cff 0%, #3dc2a5 100%);
}

.lite-stage-fill.warn {
  background: linear-gradient(90deg, #d6a300 0%, #ebb441 100%);
}

.lite-stage-fill.err {
  background: linear-gradient(90deg, #b53333 0%, #e25f5f 100%);
}

.lite-stage-meta {
  font-size: 12px;
  color: var(--muted);
}

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

.validator-node {
  grid-column: span 2;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.validator-node.pending {
  border-color: var(--line);
}

.validator-node.ok {
  border-color: #4daf7b;
  background: #f4fff8;
}

.validator-node.warn {
  border-color: #e1b347;
  background: #fffaf1;
}

.validator-node.err {
  border-color: #d45a5a;
  background: #fff5f5;
}

.validator-node h3 {
  margin: 0;
  font-size: 14px;
}

.validator-node p {
  margin-top: 6px;
  font-size: 12px;
}

.validator-arrow {
  display: grid;
  place-items: center;
  color: #52739a;
  font-size: 22px;
  font-weight: 700;
}

.help-inline details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 4px 8px;
}

.help-inline summary {
  cursor: pointer;
  font-weight: 700;
  color: #0d4ca3;
}

.help-inline details div {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink);
  max-width: 420px;
}

.lite-cards {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.lite-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.lite-card h3 {
  margin: 0;
  font-size: 15px;
}

.lite-metric-value {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 700;
}

.lite-card p {
  margin-top: 6px;
  font-size: 12px;
}

.lite-crs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.lite-kv {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #f8fbff;
}

.lite-kv span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.lite-kv strong {
  font-size: 20px;
  line-height: 1.2;
}

.table-wrap {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
}

.lite-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.lite-table th,
.lite-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.lite-table thead th {
  background: #f8fbff;
}

.lite-table tr.warn-row {
  background: #fffaf1;
}

.lite-table tr.err-row {
  background: #fff5f5;
}

.toquis-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(29, 92, 120, 0.18), transparent 30%),
    linear-gradient(135deg, #d8dee5 0%, #e8ecef 34%, #c9ced4 100%);
  color: #1d2937;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
}

.toquis-shell {
  display: grid;
  grid-template-columns: 460px minmax(0, 1fr);
  min-height: 100vh;
}

.toquis-sidebar {
  padding: 18px 16px;
  background: rgba(249, 250, 251, 0.92);
  border-right: 1px solid rgba(120, 128, 138, 0.28);
  overflow-y: auto;
  backdrop-filter: blur(12px);
}

.toquis-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.toquis-kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5b6a78;
}

.toquis-brand h1 {
  margin: 4px 0 0;
  font-size: 34px;
  line-height: 1;
}

.toquis-account {
  min-width: 180px;
}

.toquis-card {
  border: 1px solid rgba(136, 148, 160, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 18px 28px rgba(35, 44, 54, 0.08);
  padding: 14px;
  margin-bottom: 14px;
}

.toquis-card-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5f6874;
  margin-bottom: 10px;
}

.toquis-toggle-pills {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.toquis-pill {
  flex: 1 1 auto;
  border: 1px solid #c7d0d8;
  border-radius: 12px;
  background: #eceff2;
  color: #4c5a67;
}

.toquis-pill.active {
  background: #b7bcc1;
  color: #1c242c;
}

.toquis-metric-block {
  border: 1px solid #dce2e7;
  border-radius: 12px;
  background: #f6f8fa;
  padding: 10px 12px;
  min-height: 90px;
}

.toquis-metric-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px dashed #d5dde5;
}

.toquis-metric-line:last-child {
  border-bottom: 0;
}

.toquis-metric-line span {
  color: #667484;
}

.toquis-metric-line strong {
  text-align: right;
  color: #18222d;
}

.toquis-formula-box {
  border: 1px solid #dce2e7;
  border-radius: 12px;
  background: #f6f8fa;
  padding: 8px 10px;
}

.toquis-formula-box summary {
  cursor: pointer;
  font-weight: 700;
}

#toquis-formulas {
  min-height: 0;
  margin-top: 8px;
  background: #fbfdff;
}

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

.toquis-layer-row {
  border-bottom: 1px solid #dde2e8;
  padding-bottom: 10px;
}

.toquis-layer-row.active .toquis-layer-title {
  color: #1b4a6d;
}

.toquis-layer-title {
  font-size: 18px;
  font-weight: 500;
  color: #69737c;
}

.toquis-layer-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #7b8691;
}

.toquis-layer-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.toquis-main {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
}

.toquis-topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px 8px;
  color: #eaeff2;
}

.toquis-topbar-title {
  font-size: 15px;
  font-weight: 700;
}

#toquis-render-note {
  font-size: 12px;
  color: #dbe0e4;
}

.toquis-stage {
  position: relative;
  padding: 10px 12px 0;
}

.toquis-viewer-3d {
  height: calc(100vh - 220px);
  border-radius: 24px;
  border: 1px solid rgba(210, 216, 222, 0.24);
  overflow: hidden;
  background: #7f7167;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.toquis-map-inset {
  position: absolute;
  right: 28px;
  bottom: 28px;
  width: 360px;
  height: 360px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  overflow: hidden;
  box-shadow: 0 24px 32px rgba(26, 31, 37, 0.22);
  background: #edf1f4;
}

.toquis-layer-badge {
  position: absolute;
  top: 24px;
  right: 28px;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(240, 244, 247, 0.9);
  border: 1px solid rgba(164, 176, 186, 0.35);
  box-shadow: 0 18px 24px rgba(29, 35, 41, 0.14);
  color: #24313c;
  font-size: 15px;
}

.toquis-footer-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 12px 12px;
}

.toquis-footer-card {
  border-radius: 16px;
  border: 1px solid rgba(136, 148, 160, 0.24);
  background: rgba(245, 248, 250, 0.88);
  padding: 12px;
}

#toquis-render-stats,
#toquis-point-info {
  min-height: 160px;
  background: #fbfdff;
}

@media (max-width: 860px) {
  .header-main {
    flex-direction: column;
  }

  .account-menu {
    width: 100%;
    justify-content: flex-start;
  }

  .account-menu-panel {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .ops-overall-progress {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ops-overall-status {
    text-align: left;
  }

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

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

  .validator-node {
    grid-column: span 1;
  }

  .validator-arrow {
    transform: rotate(90deg);
  }

  .two-col,
  .three-col,
  .four-col {
    grid-template-columns: 1fr;
  }

  .toquis-shell {
    grid-template-columns: 1fr;
  }

  .toquis-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(120, 128, 138, 0.28);
  }

  .toquis-viewer-3d {
    height: 58vh;
  }

  .toquis-map-inset {
    position: static;
    width: 100%;
    height: 260px;
    margin-top: 12px;
  }

  .toquis-layer-badge {
    position: static;
    margin-top: 12px;
    max-width: none;
  }

  .toquis-footer-panels {
    grid-template-columns: 1fr;
  }
}
