:root {
  color-scheme: light;
  --bg: #eaf4ef;
  --surface: #ffffff;
  --surface-2: #eef7f2;
  --line: rgba(34, 91, 71, 0.16);
  --text: #13251f;
  --muted: #5d736b;
  --green: #0d6b63;
  --green-dark: #0a352d;
  --green-light: #ddf3ea;
  --green-sidebar: #071b16;
  --green-sidebar-hover: rgba(54, 179, 149, 0.16);
  --gold: #d1a142;
  --red: #c24b42;
  --blue: #16869b;
  --ink-soft: #e6f5ef;
  --cyan: #36b395;
  --cyan-soft: #8ee3cf;
  --tech-bg-deep: #071b16;
  --tech-bg-mid: #0e3a31;
  --tech-bg-soft: #eff8f3;
  --amber: #d7a84a;
  --panel: rgba(255, 255, 255, 0.92);
  --soft: #edf7f2;
  --panel-glass: rgba(255, 255, 255, 0.82);
  --panel-line: rgba(34, 91, 71, 0.14);
  --glow: 0 18px 42px rgba(10, 74, 62, 0.14);
  --shadow-sm: 0 6px 18px rgba(10, 61, 49, 0.07);
  --shadow: 0 14px 34px rgba(10, 61, 49, 0.10);
  --shadow-lg: 0 22px 56px rgba(10, 61, 49, 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 220px;
  --topbar-h: 56px;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* Tree-age identification workspace */
.page-age-identification {
  min-width: 0;
}

.age-page {
  --age-ink: #17352b;
  --age-green: #287451;
  --age-green-soft: #e9f2ed;
  --age-blue: #315f7d;
  --age-red: #a43d3d;
  --age-line: #d8dfdb;
  width: 100%;
  min-width: 0;
  color: var(--text);
}

.age-action-btn {
  min-height: 34px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #cbd5d0;
  border-radius: 6px;
  background: #fff;
  color: var(--age-ink);
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.age-action-btn:hover:not(:disabled),
.age-file-button:hover:not(.disabled) {
  border-color: var(--age-green);
  background: #f4f8f6;
}

.age-action-btn.primary {
  border-color: var(--age-green);
  background: var(--age-green);
  color: #fff;
}

.age-action-btn.danger {
  border-color: #d7b5b5;
  color: var(--age-red);
}

.age-action-btn:disabled,
.age-file-button.disabled {
  opacity: .52;
  cursor: not-allowed;
}

.age-action-btn:focus-visible,
.age-file-button:focus-within,
.age-project-link:focus-visible,
.age-anchor-nav a:focus-visible {
  outline: 3px solid rgba(49, 95, 125, .26);
  outline-offset: 2px;
}

.age-title-line,
.age-editor-toolbar,
.age-inline-actions,
.age-section-title,
.age-subsection-head,
.age-tree-head,
.age-sample-head,
.age-dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.age-title-line {
  flex-wrap: wrap;
}

.age-title-line h1 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.age-editor-toolbar,
.age-inline-actions,
.age-dialog-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.age-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #ccd7d1;
  border-radius: 999px;
  background: #f4f7f5;
  color: #47554f;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.age-status-pending_review { border-color: #d9c697; background: #fff8e5; color: #765f24; }
.age-status-rejected,
.age-status-void,
.age-status-deleted { border-color: #dfbcbc; background: #fff1f1; color: #873434; }
.age-status-finalized { border-color: #aac9b7; background: #eaf5ee; color: #256445; }

.age-stat-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(92px, 1fr));
  border-top: 1px solid var(--age-line);
  border-bottom: 1px solid var(--age-line);
  background: #fff;
}

.age-stat-strip button {
  min-width: 0;
  min-height: 64px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 0;
  border-right: 1px solid var(--age-line);
  background: transparent;
  color: #52615a;
  cursor: pointer;
}

.age-stat-strip button:last-child { border-right: 0; }
.age-stat-strip button.active { box-shadow: inset 0 -3px var(--age-green); color: var(--age-green); background: #f5f9f7; }
.age-stat-strip strong { font-size: 20px; color: var(--age-ink); }

.age-list-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px auto auto;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
}

.age-search-field {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--age-line);
  border-radius: 6px;
  background: #fff;
}

.age-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.age-list-filters select,
.age-add-tree select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--age-line);
  border-radius: 6px;
  background: #fff;
}

.age-list-table th,
.age-list-table td {
  vertical-align: middle;
}

.age-project-link {
  max-width: 360px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--age-blue);
  font: inherit;
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.age-editor-head {
  align-items: flex-start;
}

.age-anchor-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 8px 0;
  border-bottom: 1px solid var(--age-line);
  background: rgba(248, 250, 249, .96);
  backdrop-filter: blur(8px);
}

.age-anchor-nav a {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 4px;
  color: #475850;
  font-size: 12px;
  text-decoration: none;
}

.age-anchor-nav a:hover { background: var(--age-green-soft); color: var(--age-green); }

.age-form-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--age-line);
  scroll-margin-top: 58px;
}

.age-section-title,
.age-subsection-head,
.age-tree-head,
.age-sample-head {
  justify-content: space-between;
}

.age-section-title {
  min-height: 38px;
  margin-bottom: 14px;
}

.age-section-title h2,
.age-section-title h3,
.age-subsection-head h3 {
  margin: 0;
  color: var(--age-ink);
  font-size: 16px;
}

.age-section-title > span {
  color: var(--muted);
  font-size: 12px;
}

.age-form-grid,
.age-sample-grid,
.age-tree-result {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.age-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  margin: 0;
}

.age-field > span,
.age-result-metric > span {
  color: #5e6d66;
  font-size: 11px;
  font-weight: 700;
}

.age-required { margin-left: 3px; color: var(--age-red); }

.age-field input,
.age-field textarea,
.age-field select,
.age-add-tree select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid #ccd6d1;
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.age-field textarea {
  min-height: 76px;
  resize: vertical;
}

.age-field input:disabled,
.age-field textarea:disabled,
.age-field select:disabled {
  border-color: #e1e5e3;
  background: #f5f6f5;
  color: #4e5a54;
  opacity: 1;
}

.age-field input:focus,
.age-field textarea:focus,
.age-field select:focus,
.age-list-filters select:focus,
.age-add-tree select:focus {
  border-color: var(--age-blue);
  outline: 3px solid rgba(49, 95, 125, .12);
}

.age-field-wide { grid-column: span 2; }
.age-field-full { grid-column: 1 / -1; }

.age-expert-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 2fr);
  gap: 18px;
  align-items: start;
}

.age-expert-checks {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--age-line);
  border-radius: 6px;
}

.age-expert-checks legend { padding: 0 6px; color: #5e6d66; font-size: 11px; font-weight: 700; }
.age-expert-checks label,
.age-sync-target label { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
.age-expert-checks span { min-width: 0; overflow-wrap: anywhere; }

.age-process-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 8px;
}

.age-process-item {
  min-width: 0;
  min-height: 122px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--age-line);
  border-radius: 7px;
  background: #fff;
}

.age-process-index { color: var(--age-blue); font-size: 11px; font-weight: 800; }
.age-process-copy { min-width: 0; display: grid; gap: 4px; align-content: start; }
.age-process-copy strong { color: var(--age-ink); font-size: 13px; }
.age-process-copy span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }

.age-file-button {
  position: relative;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px dashed #aebdb5;
  border-radius: 6px;
  background: #fff;
  color: var(--age-ink);
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

.age-file-button input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.age-add-tree {
  min-width: min(100%, 460px);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
}

.age-tree-list {
  display: grid;
  gap: 16px;
}

.age-tree-item {
  min-width: 0;
  padding: 16px;
  border: 1px solid #cbd7d1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(28, 59, 45, .06);
}

.age-tree-head {
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--age-green-soft);
}

.age-tree-head > div { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.age-tree-head span { color: var(--age-blue); font-size: 11px; font-weight: 800; }
.age-tree-head strong { min-width: 0; color: var(--age-ink); overflow-wrap: anywhere; }

.age-subsection-head {
  min-height: 38px;
  margin-top: 16px;
  padding: 7px 0;
  border-top: 1px solid var(--age-line);
}

.age-sample-list {
  border-top: 1px solid var(--age-line);
}

.age-sample-row {
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--age-line);
}

.age-sample-head {
  margin-bottom: 10px;
}

.age-sample-head .age-field { width: min(260px, 80%); }
.age-sample-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.age-sample-assets,
.age-asset-list {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.age-asset-chip {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 8px;
  border: 1px solid #d4ddd8;
  border-radius: 5px;
  background: #f6f8f7;
  color: #48564f;
  font-size: 11px;
}

.age-asset-chip > span { min-width: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.age-asset-chip .age-action-btn { min-width: 26px; min-height: 26px; padding: 4px; border: 0; background: transparent; }

.age-fixed-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid #9fb6aa;
  border-radius: 4px;
  background: #eef4f1;
  color: #315b47;
  font-size: 10px;
  font-weight: 700;
}

.age-fixed-certificate { color: #52635b; font-size: 11px; }

.age-tree-result {
  grid-template-columns: minmax(120px, .7fr) repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  padding-top: 16px;
}

.age-result-metric {
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px 10px;
  border-left: 3px solid var(--age-green);
  background: var(--age-green-soft);
}

.age-result-metric strong { color: var(--age-ink); font-size: 17px; }

.age-history-list {
  display: grid;
  border-top: 1px solid var(--age-line);
}

.age-history-list > div {
  display: grid;
  grid-template-columns: 130px minmax(220px, 1fr) minmax(0, 2fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--age-line);
  font-size: 12px;
}

.age-history-list p { margin: 0; overflow-wrap: anywhere; }
.age-editor-footer { display: flex; justify-content: flex-end; padding: 18px 0 4px; }

.age-empty-state,
.age-loading {
  min-height: 220px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  border: 1px dashed #cbd5d0;
  border-radius: 7px;
  background: #fafcfb;
}

.age-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #d8e2dd;
  border-top-color: var(--age-green);
  border-radius: 50%;
  animation: age-spin .8s linear infinite;
}

@keyframes age-spin { to { transform: rotate(360deg); } }

.modal.age-preview-modal { width: min(1040px, 96vw); }
.modal.age-expert-modal { width: min(1180px, 97vw); }

.age-report-preview,
.age-expert-manager {
  min-width: 0;
  display: grid;
  gap: 20px;
}

.age-report-preview > header { display: grid; gap: 5px; padding-bottom: 14px; border-bottom: 2px solid var(--age-green); }
.age-report-preview > header strong { color: var(--age-ink); font-size: 20px; overflow-wrap: anywhere; }
.age-report-preview > header span { color: var(--muted); font-size: 12px; }
.age-report-preview nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.age-report-preview nav span { padding-bottom: 5px; border-bottom: 1px dotted #cbd5d0; font-size: 12px; }
.age-report-preview section { padding-top: 4px; border-top: 1px solid var(--age-line); }
.age-report-preview h3,
.age-expert-manager h3 { margin: 0 0 10px; color: var(--age-ink); font-size: 15px; }
.age-report-preview article { display: grid; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--age-line); font-size: 12px; }
.age-report-preview h4 { margin: 0; color: var(--age-ink); font-size: 13px; }
.age-report-preview p { line-height: 1.75; }
.age-preview-table { margin: 8px 0 14px; }
.age-preview-table table { width: 100%; }
.age-preview-table th,
.age-preview-table td { min-width: 110px; padding: 7px 9px; vertical-align: top; font-size: 12px; overflow-wrap: anywhere; }
.age-preview-assets { display: flex; flex-wrap: wrap; gap: 8px; }
.age-preview-asset { min-width: 0; display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; border: 1px solid var(--age-line); border-radius: 5px; background: #f7f9f8; }
.age-preview-asset > span { max-width: 280px; overflow-wrap: anywhere; }

.age-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; color: var(--muted); font-size: 12px; }

.age-asset-preview { display: grid; place-items: center; min-height: 320px; background: #f2f4f3; }
.age-asset-preview img { display: block; max-width: 100%; max-height: 72vh; object-fit: contain; }

.age-dialog-form,
.age-expert-form,
.age-sync-form,
.age-sync-preview {
  display: grid;
  gap: 14px;
}

.age-danger-copy {
  margin: 0;
  padding: 10px;
  border-left: 3px solid var(--age-red);
  background: #fff2f2;
  color: #7d3030;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.age-sync-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.age-sync-target {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--age-line);
  border-radius: 6px;
}

.age-sync-target legend { padding: 0 6px; color: var(--age-ink); font-size: 12px; font-weight: 700; }
.age-sync-form > .age-dialog-actions { grid-column: 1 / -1; }

@media (max-width: 1100px) {
  .age-process-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .age-sample-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .age-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .age-expert-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .age-editor-head,
  .age-section-title { align-items: stretch; flex-direction: column; }
  .age-editor-toolbar { justify-content: flex-start; }
  .age-stat-strip { grid-template-columns: repeat(3, minmax(90px, 1fr)); }
  .age-stat-strip button:nth-child(3) { border-right: 0; }
  .age-stat-strip button:nth-child(-n+3) { border-bottom: 1px solid var(--age-line); }
  .age-list-filters { grid-template-columns: minmax(0, 1fr) auto auto; }
  .age-search-field { grid-column: 1 / -1; }
  .age-form-grid,
  .age-sample-grid,
  .age-tree-result { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .age-field-wide { grid-column: span 2; }
  .age-expert-layout { grid-template-columns: 1fr; }
  .age-process-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .age-add-tree { width: 100%; min-width: 0; }
  .age-history-list > div { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 520px) {
  .age-action-btn { padding: 7px 8px; }
  .age-stat-strip { grid-template-columns: repeat(2, minmax(90px, 1fr)); }
  .age-stat-strip button:nth-child(2n) { border-right: 0; }
  .age-stat-strip button:nth-child(3) { border-right: 1px solid var(--age-line); }
  .age-stat-strip button:nth-child(-n+4) { border-bottom: 1px solid var(--age-line); }
  .age-form-grid,
  .age-sample-grid,
  .age-tree-result,
  .age-process-grid,
  .age-expert-checks,
  .age-sync-form,
  .age-sync-target,
  .age-report-preview nav { grid-template-columns: minmax(0, 1fr); }
  .age-pagination { align-items: stretch; flex-direction: column; }
  .age-field-wide,
  .age-field-full { grid-column: span 1; }
  .age-add-tree { grid-template-columns: 1fr; }
  .age-tree-item { padding: 12px; }
  .age-tree-head > div { display: grid; gap: 2px; }
  .age-sync-form > .age-dialog-actions { grid-column: span 1; }
}

/* ===== 首页 GIS 驾驶舱（只作用于信息总览） ===== */
.page-analytics {
  --dashboard-bg: #07131d;
  --dashboard-panel: #0d2230;
  --dashboard-panel-2: #102a39;
  --dashboard-line: rgba(108, 190, 214, 0.22);
  --dashboard-text: #e7f4f7;
  --dashboard-muted: #8ba9b2;
  --dashboard-cyan: #37c6e9;
  --dashboard-green: #43d29b;
  --dashboard-amber: #e9b34f;
  --dashboard-red: #ef6f68;
  margin: -20px;
  padding: 20px;
  min-height: calc(100vh - var(--topbar-h));
  background: #07131d;
  color: var(--dashboard-text);
  overflow-x: hidden;
}

.dashboard-home {
  display: grid;
  gap: 14px;
  max-width: 2200px;
  margin: 0 auto;
}

.dashboard-home-header,
.dashboard-filter-bar,
.dashboard-panel,
.dashboard-map-panel,
.dashboard-kpi {
  border: 1px solid var(--dashboard-line);
  background: var(--dashboard-panel);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.dashboard-home-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  border-top: 2px solid rgba(55, 198, 233, 0.72);
}

.dashboard-brand,
.dashboard-header-meta,
.dashboard-filter-bar,
.dashboard-filter-title,
.dashboard-map-footer {
  display: flex;
  align-items: center;
}

.dashboard-brand { gap: 12px; }
.dashboard-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(55, 198, 233, 0.7);
  color: var(--dashboard-cyan);
  font-size: 22px;
  font-weight: 900;
}
.dashboard-brand span {
  display: block;
  color: var(--dashboard-cyan);
  font-size: 10px;
  letter-spacing: 0.16em;
}
.dashboard-brand h1 {
  margin: 2px 0 0;
  color: var(--dashboard-text);
  font-size: 23px;
  letter-spacing: 0.04em;
}
.dashboard-header-meta {
  gap: 8px;
  color: var(--dashboard-muted);
  font-size: 12px;
  white-space: nowrap;
}
.dashboard-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dashboard-green);
  box-shadow: 0 0 0 4px rgba(67, 210, 155, 0.12);
}
.dashboard-header-divider { color: rgba(139, 169, 178, 0.34); }

.dashboard-filter-bar {
  min-height: 64px;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: var(--dashboard-panel-2);
}
.dashboard-filter-title {
  min-width: 220px;
  flex: 1 1 260px;
  align-items: flex-start;
  flex-direction: column;
  gap: 1px;
}
.dashboard-filter-title span,
.dashboard-filter-bar label span,
.dashboard-filter-title strong {
  color: var(--dashboard-muted);
  font-size: 11px;
}
.dashboard-filter-title strong {
  color: var(--dashboard-text);
  font-size: 12px;
  font-weight: 600;
}
.dashboard-filter-bar label {
  display: grid;
  gap: 3px;
  min-width: 150px;
}
.dashboard-filter-bar select {
  min-height: 34px;
  border-color: var(--dashboard-line);
  border-radius: 3px;
  background: #071b27;
  color: var(--dashboard-text);
}
.dashboard-filter-reset,
.dashboard-map-panel button {
  min-height: 34px;
  border-radius: 3px;
  border-color: rgba(55, 198, 233, 0.5);
  background: transparent;
  color: var(--dashboard-cyan);
}
.dashboard-filter-reset { align-self: end; }
.dashboard-filter-reset:hover:not(:disabled),
.dashboard-map-panel button:hover:not(:disabled) {
  background: rgba(55, 198, 233, 0.12);
  color: #fff;
  box-shadow: none;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.dashboard-kpi {
  position: relative;
  min-height: 104px;
  padding: 14px 16px 12px;
  overflow: hidden;
}
.dashboard-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--dashboard-cyan);
}
.dashboard-kpi.blue::before { background: #6caee9; }
.dashboard-kpi.green::before,
.dashboard-kpi.teal::before { background: var(--dashboard-green); }
.dashboard-kpi.amber::before { background: var(--dashboard-amber); }
.dashboard-kpi.red::before { background: var(--dashboard-red); }
.dashboard-kpi span,
.dashboard-kpi small { display: block; color: var(--dashboard-muted); font-size: 12px; }
.dashboard-kpi strong { display: block; margin: 8px 0 3px; color: var(--dashboard-text); font-size: 28px; line-height: 1; }
.dashboard-kpi small { font-size: 11px; }

.dashboard-content-grid {
  display: grid;
  grid-template-columns: minmax(235px, 0.72fr) minmax(500px, 1.9fr) minmax(250px, 0.78fr);
  gap: 14px;
  align-items: stretch;
}
.dashboard-column { display: grid; gap: 14px; align-content: start; }
.dashboard-panel,
.dashboard-map-panel { min-width: 0; padding: 14px; }
.dashboard-map-panel { display: grid; grid-template-rows: auto minmax(470px, 1fr) auto; gap: 10px; padding: 14px; }
.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(108, 190, 214, 0.16);
}
.dashboard-panel-head h2 { margin: 0; color: var(--dashboard-text); font-size: 15px; }
.dashboard-panel-head span,
.dashboard-panel-head p { margin: 0; color: var(--dashboard-muted); font-size: 11px; }
.dashboard-panel-head p { margin-top: 3px; }
.dashboard-panel-head button { padding: 0 10px; }
.dashboard-ring-wrap { display: flex; align-items: center; gap: 12px; padding: 14px 0 10px; }
.dashboard-ring {
  --ring: 0%;
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--dashboard-cyan) 0 var(--ring), rgba(79, 117, 128, 0.24) var(--ring) 100%);
  box-shadow: inset 0 0 0 12px #0d2230;
}
.dashboard-ring strong { font-size: 24px; line-height: 1; }
.dashboard-ring span { color: var(--dashboard-muted); font-size: 11px; }
.dashboard-mini-stats { display: grid; gap: 8px; }
.dashboard-mini-stats div { display: grid; gap: 1px; }
.dashboard-mini-stats strong { color: var(--dashboard-cyan); font-size: 21px; line-height: 1; }
.dashboard-mini-stats span { color: var(--dashboard-muted); font-size: 11px; }
.dashboard-subtitle { padding: 7px 0; color: var(--dashboard-muted); font-size: 11px; }
.dashboard-bar-row {
  display: grid;
  grid-template-columns: minmax(68px, 0.65fr) minmax(60px, 1fr) 34px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 30px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--dashboard-muted);
  text-align: left;
}
.dashboard-bar-row:hover:not(:disabled) { background: rgba(55, 198, 233, 0.08); box-shadow: none; transform: none; }
.dashboard-bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.dashboard-bar-row i { display: block; height: 7px; overflow: hidden; border-radius: 1px; background: rgba(117, 157, 169, 0.2); }
.dashboard-bar-row i b { display: block; height: 100%; background: var(--dashboard-cyan); }
.dashboard-bar-row strong { color: var(--dashboard-text); font-size: 12px; text-align: right; }

.dashboard-map-panel { background: #0a1d2a; }
.dashboard-map-surface.leaflet-map,
.dashboard-map-surface.fake-map { min-height: 520px !important; height: 100%; border: 1px solid rgba(108, 190, 214, 0.2); border-radius: 3px; overflow: hidden; }
.dashboard-map-surface .leaflet-container { min-height: 520px; height: 100%; background: #09202d; }
.dashboard-map-footer { justify-content: space-between; gap: 10px; color: var(--dashboard-muted); font-size: 11px; }

.dashboard-alert-row,
.dashboard-task-row {
  display: grid;
  width: 100%;
  min-height: 52px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid rgba(108, 190, 214, 0.12);
  border-radius: 0;
  background: transparent;
  color: var(--dashboard-text);
  text-align: left;
}
.dashboard-alert-row { grid-template-columns: 9px 1fr; gap: 9px; align-items: start; }
.dashboard-alert-row:hover:not(:disabled),
.dashboard-task-row:hover:not(:disabled) { background: rgba(55, 198, 233, 0.08); box-shadow: none; transform: none; }
.dashboard-alert-row i { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--dashboard-amber); }
.dashboard-alert-row i.danger { background: var(--dashboard-red); }
.dashboard-alert-row strong,
.dashboard-alert-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-alert-row strong { font-size: 12px; }
.dashboard-alert-row small { margin-top: 3px; color: var(--dashboard-muted); font-size: 11px; }
.dashboard-task-row { grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; }
.dashboard-task-row span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.dashboard-task-row small { color: var(--dashboard-muted); font-size: 10px; }
.dashboard-task-status { color: var(--dashboard-amber); font-size: 10px; }
.dashboard-empty { margin: 12px 0 2px; color: var(--dashboard-muted); font-size: 12px; }
.dashboard-bottom-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.dashboard-feed-row { display: grid; grid-template-columns: minmax(130px, 1fr) auto auto; gap: 8px; align-items: center; min-height: 34px; border-bottom: 1px solid rgba(108, 190, 214, 0.12); font-size: 11px; }
.dashboard-feed-row strong { color: var(--dashboard-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-feed-row span { color: var(--dashboard-muted); }
.dashboard-feed-row small { color: var(--dashboard-green); }

@media (max-width: 1280px) {
  .dashboard-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-content-grid { grid-template-columns: minmax(220px, 0.7fr) minmax(460px, 1.5fr); }
  .dashboard-right { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 901px) {
  .page-analytics { margin-right: -18px; }
}

@media (max-width: 900px) {
  .page-analytics { margin: -12px; padding: 12px; }
  .dashboard-home-header { align-items: flex-start; flex-direction: column; padding: 14px; }
  .dashboard-header-meta { align-self: stretch; justify-content: flex-end; }
  .dashboard-filter-title { flex-basis: 100%; }
  .dashboard-filter-bar label { flex: 1 1 140px; }
  .dashboard-content-grid,
  .dashboard-bottom-grid { grid-template-columns: 1fr; }
  .dashboard-left,
  .dashboard-right { grid-column: auto; grid-template-columns: 1fr; }
  .dashboard-map-panel { min-height: 0; }
  .dashboard-map-surface.leaflet-map,
  .dashboard-map-surface.fake-map,
  .dashboard-map-surface .leaflet-container { min-height: 390px !important; }
}

@media (max-width: 560px) {
  .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-brand h1 { font-size: 18px; }
  .dashboard-brand span { font-size: 8px; letter-spacing: 0.08em; }
  .dashboard-header-meta { justify-content: flex-start; flex-wrap: wrap; }
  .dashboard-filter-bar label { min-width: 100%; }
  .dashboard-filter-reset { width: 100%; }
  .dashboard-ring-wrap { justify-content: space-around; }
  .dashboard-feed-row { grid-template-columns: 1fr auto; }
  .dashboard-feed-row small { grid-column: 2; grid-row: 1; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 13% 8%, rgba(54, 179, 149, 0.18), transparent 28%),
    radial-gradient(circle at 88% 2%, rgba(215, 168, 74, 0.16), transparent 26%),
    linear-gradient(180deg, #f6fbf8 0%, var(--bg) 340px),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
}

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

button {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 251, 248, 0.94));
  color: var(--text);
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  font-weight: 500;
}

button:hover:not(:disabled) {
  border-color: rgba(54, 179, 149, 0.46);
  background: #f6fffb;
  box-shadow: 0 8px 18px rgba(10, 74, 62, 0.10);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary {
  background: linear-gradient(135deg, #0d6b63, #36b395);
  border-color: rgba(54, 179, 149, 0.72);
  color: white;
  font-weight: 600;
  box-shadow: 0 10px 22px rgba(13, 107, 99, 0.18);
}

.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0b594f, #2fb08f);
  border-color: rgba(54, 179, 149, 0.86);
  box-shadow: 0 12px 28px rgba(13, 107, 99, 0.26);
}

.danger {
  background: var(--red);
  border-color: var(--red);
  color: white;
  font-weight: 600;
}

.danger:hover:not(:disabled) {
  background: #a83d37;
  border-color: #a83d37;
  box-shadow: 0 4px 14px rgba(194, 75, 66, 0.32);
}

.ghost {
  background: transparent;
  border-color: transparent;
}

.ghost:hover:not(:disabled) {
  background: rgba(0,0,0,0.04);
  box-shadow: none;
  transform: none;
}

/* ===== 管理后台布局 ===== */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  min-height: 100vh;
}

/* 左侧导航栏 */
.sidebar {
  grid-row: 1 / -1;
  grid-column: 1;
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  overflow-y: auto;
  background:
    radial-gradient(circle at 18% 8%, rgba(54, 179, 149, 0.24), transparent 24%),
    radial-gradient(circle at 92% 88%, rgba(215, 168, 74, 0.12), transparent 30%),
    linear-gradient(180deg, #061511 0%, #09241e 48%, #071b16 100%);
  color: rgba(255,255,255,0.9);
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: 18px 0 42px rgba(5, 34, 27, 0.18);
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(142, 227, 207, 0.08), transparent 34%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 26px);
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar-logo {
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(142, 227, 207, 0.16);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, #36b395, #d7a84a);
  color: #071b16;
  box-shadow: 0 10px 24px rgba(54, 179, 149, 0.24);
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
}
.sidebar-logo strong { font-size: 14px; display: block; }
.sidebar-logo span { font-size: 10px; opacity: 0.6; display: block; }

.sidebar nav { flex: 1; padding: 8px 0; }
.sidebar .nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 20px; margin: 2px 8px; border-radius: 6px;
  font-size: 13px; color: rgba(255,255,255,0.75); cursor: pointer;
  transition: all 0.15s ease; border: none; background: none; text-align: left;
  min-height: auto; font-weight: 400;
}
.sidebar .nav-item:hover {
  background: var(--green-sidebar-hover);
  color: #fff;
  box-shadow: none;
  transform: none;
}
.sidebar .nav-item.active {
  background: linear-gradient(90deg, rgba(54, 179, 149, 0.28), rgba(255,255,255,0.08));
  color: #fff;
  font-weight: 700;
  border-left: 3px solid var(--cyan-soft);
  padding-left: 17px;
  box-shadow: inset 0 0 0 1px rgba(142, 227, 207, 0.10);
}
.sidebar .nav-icon { font-size: 16px; width: 6px; text-align: center; }

.sidebar-footer {
  padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 10px; opacity: 0.4; text-align: center;
  line-height: 1.6;
}

/* 顶部工具栏 */
.topbar {
  grid-row: 1; grid-column: 2;
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px; height: var(--topbar-h);
  background: rgba(247, 252, 249, 0.82);
  border-bottom: 1px solid rgba(34, 91, 71, 0.12);
  box-shadow: 0 10px 28px rgba(10, 61, 49, 0.06);
  backdrop-filter: blur(18px);
}

.topbar-title {
  font-size: 16px; font-weight: 800; color: var(--green-dark);
  white-space: nowrap;
}

.topbar-search { position:relative;
  flex: 1; max-width: 400px;
}
.topbar-search input {
  width: 100%; border-radius: 20px; background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(34, 91, 71, 0.14); padding: 0 16px; min-height: 34px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.topbar-actions {
  display: flex; align-items: center; gap: 8px; margin-left: auto;
}
.topbar-actions .user-info {
  font-size: 12px; color: var(--muted); text-align: right;
}
.topbar-actions .user-info strong { display: block; color: var(--text); font-size: 13px; }

.auth-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(34, 91, 71, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--green-dark);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.auth-btn.primary {
  border-color: rgba(44, 143, 103, 0.26);
  background: linear-gradient(135deg, #2f7d4d, #36b395);
  color: #fff;
  box-shadow: 0 8px 18px rgba(32, 128, 93, 0.18);
}

.auth-form .muted {
  grid-column: 1 / -1;
  margin: 0;
}

.admin-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(70, 160, 111, 0.22), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(78, 172, 148, 0.18), transparent 26%),
    linear-gradient(135deg, #f4faf5 0%, #e8f3ee 52%, #f8fbf7 100%);
}

.admin-login-card {
  width: min(440px, 100%);
  border: 1px solid rgba(34, 91, 71, 0.12);
  border-radius: 24px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 70px rgba(35, 75, 55, 0.16);
}

.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.admin-login-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #1a5c35, #36b395);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(32, 128, 93, 0.24);
}

.admin-login-brand strong {
  display: block;
  font-size: 20px;
  color: var(--green-dark);
}

.admin-login-brand span,
.admin-login-tip {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.admin-login-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.admin-login-form input {
  min-height: 44px;
  border-radius: 14px;
}

.admin-login-form .auth-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  justify-content: center;
}

.admin-login-tip {
  margin: 16px 0 0;
}

/* 主内容区 */
.layout {
  grid-row: 2; grid-column: 2;
  padding: 20px;
  min-width: 0;
}

.content { min-width: 0; }

/* 旧的topnav样式已不需要，但保留兼容 */
.topnav, .account, .actions, .row-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}

.muted { color: var(--muted); font-size: 13px; }

.role-select,
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  min-height: 36px;
  padding: 0 10px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(54, 179, 149, 0.62);
  box-shadow: 0 0 0 3px rgba(54, 179, 149, 0.14);
}

textarea {
  padding: 10px;
  resize: vertical;
}

.permission {
  margin-top: 8px;
  padding: 10px;
  background: var(--surface-2);
  border-radius: 6px;
  color: var(--muted);
}

.permission strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.content {
  min-width: 0;
}

.module-ribbon {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(35, 48, 40, 0.05);
}

.module-ribbon-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.module-ribbon-head strong {
  display: block;
  margin-top: 2px;
}

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

.module-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  min-height: 58px;
  padding: 9px 10px;
  border-radius: 8px;
  text-align: left;
}

.module-chip .module-index {
  grid-row: span 2;
  align-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #edf4ee;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.module-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.module-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.module-chip.active {
  background: #e7f0ea;
  border-color: #b7cdbf;
  color: var(--green-dark);
}

.command-center {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff 0%, #ffffff 68%, #f4f1e8 100%);
}

.command-center h1 {
  margin: 4px 0;
}

.command-center p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

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

.signal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.signal-tile {
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.signal-tile:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.signal-tile.blue { border-left-color: var(--blue); }
.signal-tile.gold { border-left-color: var(--gold); }
.signal-tile.red { border-left-color: var(--red); }

.signal-tile span,
.signal-tile small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.signal-tile strong {
  display: block;
  margin: 6px 0;
  font-size: 28px;
  font-weight: 700;
}

.overview-dashboard {
  display: grid;
  gap: 14px;
}

.overview-hero {
  align-items: stretch;
  overflow: hidden;
  position: relative;
  padding: 22px;
  border-color: #c9d8cf;
  background:
    radial-gradient(circle at 8% 10%, rgba(60, 143, 91, 0.16), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(184, 134, 30, 0.14), transparent 26%),
    linear-gradient(135deg, #ffffff 0%, #f8fbf8 54%, #edf5ef 100%);
  box-shadow: var(--shadow-sm);
}

.overview-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 38px solid rgba(27, 94, 58, 0.06);
  pointer-events: none;
}

.overview-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.overview-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.overview-hero-stack {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: space-between;
  justify-items: end;
  gap: 14px;
  min-width: min(440px, 42vw);
}

.overview-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 8px;
  width: 100%;
}

.overview-hero-metrics div {
  padding: 12px;
  border: 1px solid rgba(27, 94, 58, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 26px rgba(26, 46, 32, 0.06);
  backdrop-filter: blur(10px);
}

.overview-hero-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.overview-hero-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--green-dark);
  font-size: 26px;
  line-height: 1;
}

.overview-signal-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.overview-signal-grid .signal-tile {
  min-height: 112px;
  padding: 14px 14px 13px;
}

.overview-main-grid,
.overview-map-grid,
.overview-alert-grid,
.overview-data-grid {
  display: grid;
  gap: 14px;
}

.overview-main-grid {
  grid-template-columns: minmax(560px, 1.35fr) minmax(320px, 0.65fr);
  align-items: stretch;
}

.overview-map-grid {
  grid-template-columns: minmax(560px, 1.5fr) minmax(300px, 0.5fr);
}

.overview-alert-grid,
.overview-data-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-priority-panel,
.overview-patrol-panel {
  min-height: 100%;
}

.overview-priority-panel .table-wrap {
  max-height: 360px;
}

.overview-priority-panel table {
  min-width: 720px;
}

.overview-patrol-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  background:
    linear-gradient(180deg, #ffffff, #fbf8ef);
}

.overview-patrol-meter {
  justify-content: space-between;
  gap: 14px;
  padding: 4px 0 2px;
}

.overview-patrol-meter .patrol-ring {
  width: 116px;
  height: 116px;
  box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.74);
}

.overview-patrol-meter .patrol-ring strong {
  font-size: 28px;
}

.overview-patrol-meter .patrol-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  min-width: 132px;
}

.overview-patrol-meter .patrol-stats div {
  padding: 9px 10px;
  border: 1px solid rgba(27, 94, 58, 0.10);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
}

.overview-patrol-meter .patrol-stats strong {
  font-size: 22px;
}

.overview-compact-cards {
  display: grid;
  gap: 8px;
}

.overview-compact-cards .dash-card {
  min-height: 68px;
  padding: 11px 12px;
  border-radius: 12px;
  box-shadow: none;
}

.overview-compact-cards .dash-card .card-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 15px;
}

.overview-compact-cards .dash-card .card-body strong {
  font-size: 21px;
}

.overview-featured-section {
  margin-bottom: 0;
}

.overview-featured-section .section-head {
  margin-bottom: 8px;
}

.focus-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(280px, 0.65fr);
  gap: 14px;
  margin-bottom: 14px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.panel-head h2 {
  margin: 0;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
}

.mini-metrics {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.policy-strip {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.policy-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.policy-head h2 {
  margin: 4px 0 0;
}

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

.policy-grid article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.policy-grid strong,
.policy-grid span {
  display: block;
}

.policy-grid strong {
  color: var(--green-dark);
  font-size: 18px;
}

.policy-grid span {
  margin: 4px 0 8px;
  color: var(--text);
  font-weight: 700;
}

.policy-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.article-shell {
  max-width: 980px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.breadcrumb,
.article-meta {
  color: var(--muted);
  font-size: 13px;
}

.article-shell h1 {
  margin: 12px 0 8px;
  font-size: 30px;
}

.article-shell > p {
  line-height: 1.8;
}

.media-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff 0%, #ffffff 62%, #edf3ed 100%);
}

.media-hero h2 {
  margin: 4px 0 8px;
}

.media-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.media-preview {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 150px;
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(rgba(31, 93, 62, 0.54), rgba(31, 93, 62, 0.72)),
    linear-gradient(135deg, #26493a, #2d7890);
}

.media-preview strong {
  font-size: 28px;
}

.governance-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.governance-list div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-2);
}

.governance-list span {
  color: var(--muted);
}

.map-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(130px, 180px)) auto auto minmax(180px, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.map-tools.compact {
  grid-template-columns: minmax(220px, 1fr) 160px 180px;
}

.map-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
}

.fake-map {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1d2c28;
  box-shadow: var(--shadow);
}

.satellite-map,
.satellite-fallback,
.satellite-labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.satellite-map {
  overflow: hidden;
  background: #1c302b;
}

.satellite-fallback {
  background:
    radial-gradient(circle at 20% 18%, rgba(93, 124, 82, 0.86), transparent 18%),
    radial-gradient(circle at 76% 28%, rgba(35, 82, 75, 0.78), transparent 22%),
    radial-gradient(circle at 42% 72%, rgba(104, 130, 76, 0.7), transparent 24%),
    linear-gradient(135deg, #22372f 0%, #536d45 42%, #253f38 58%, #6f7b4f 100%);
  filter: saturate(0.92) contrast(1.08);
}

.satellite-tile {
  position: absolute;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.06) brightness(0.9);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.satellite-tile[src] {
  opacity: 1;
}

.satellite-labels {
  pointer-events: none;
}

.district-label,
.town-label text {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  pointer-events: none;
}

.district-label {
  fill: rgba(255, 255, 255, 0.24);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.district-label.satellite {
  fill: rgba(255, 255, 255, 0.3);
  stroke: rgba(0, 0, 0, 0.38);
  stroke-width: 0.4;
  paint-order: stroke;
}

.town-label circle {
  fill: rgba(255, 255, 255, 0.94);
  stroke: rgba(18, 92, 57, 0.9);
  stroke-width: 0.45;
}

.town-label text {
  fill: #ffffff;
  font-size: 3px;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.78);
  stroke-width: 0.9;
  font-weight: 700;
}

.map-layer {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}

.basemap-switcher {
  display: flex;
  gap: 4px;
  padding: 4px;
  z-index: 6;
}

.basemap-switcher button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid transparent;
}

.basemap-switcher button.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

.map-compass {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: grid;
  gap: 4px;
  padding: 10px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}

.zoom-control {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 3;
  display: grid;
  gap: 6px;
  width: 48px;
  padding: 6px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.zoom-control button {
  min-height: 30px;
  padding: 0;
  font-weight: 800;
}

.zoom-control span {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.map-compass span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-weight: 800;
}

.marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 20px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  border: 2px solid white;
  box-shadow: 0 4px 12px rgba(18, 92, 57, 0.28);
  transform: translate(-50%, -50%);
  font-size: 10px;
  line-height: 1;
  transition: all 0.2s ease;
  cursor: pointer;
  z-index: 3;
}

.marker:hover {
  z-index: 4;
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow: 0 8px 20px rgba(18, 92, 57, 0.4);
}

.marker.active { z-index:5;width:10px;height:10px;
  border-width: 3px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.marker.famous { background: var(--gold); }

.marker.cluster {
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid white;
  box-shadow: 0 6px 18px rgba(18, 92, 57, 0.32);
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.16s ease;
  z-index: 3;
}

.marker.cluster:hover {
  transform: translate(-50%, -50%) scale(1.22);
  background: var(--green-dark);
}

.marker.cluster.famous {
  background: var(--gold);
  box-shadow: 0 6px 18px rgba(180, 120, 20, 0.32);
}

/* 古树等级颜色 */
.marker.level-1 { background: #c24b42; box-shadow: 0 6px 16px rgba(194,75,66,0.28); }
.marker.level-2 { background: #e07c24; box-shadow: 0 6px 16px rgba(224,124,36,0.28); }
.marker.level-3 { background: #2d7890; box-shadow: 0 6px 16px rgba(45,120,144,0.28); }
.marker.successor { background: #7b4ea3; box-shadow: 0 6px 16px rgba(123,78,163,0.28); }

.marker.cluster.level-1 { background: #c24b42; box-shadow: 0 6px 18px rgba(194,75,66,0.36); }
.marker.cluster.level-2 { background: #e07c24; box-shadow: 0 6px 18px rgba(224,124,36,0.36); }
.marker.cluster.level-3 { background: #2d7890; box-shadow: 0 6px 18px rgba(45,120,144,0.36); }
.marker.cluster.successor { background: #7b4ea3; box-shadow: 0 6px 18px rgba(123,78,163,0.36); }

/* 图例条 */
.map-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  z-index: 5;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.map-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.8);
}
.map-legend i.level-1 { background: #c24b42; }
.map-legend i.level-2 { background: #e07c24; }
.map-legend i.level-3 { background: #2d7890; }
.map-legend i.famous { background: var(--gold); }
.map-legend i.successor { background: #7b4ea3; }

.detail-panel,
.panel,
.table-wrap,
.mini-card,
.tree-card,
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.confirm-box {
  text-align: center;
  padding: 8px 0;
}

.confirm-box p {
  margin: 8px 0;
  line-height: 1.6;
}

.detail-panel {
  padding: 16px;
}

.detail-image {
  display: grid;
  place-items: center;
  min-height: 170px;
  margin-bottom: 14px;
  border-radius: 8px;
  color: white;
  font-size: 28px;
  font-weight: 800;
  background:
    linear-gradient(rgba(31, 93, 62, 0.2), rgba(45, 120, 144, 0.08)),
    linear-gradient(135deg, #2d5744, #7fa66f 48%, #d4b765);
}

.detail-image.small {
  min-height: 110px;
  font-size: 20px;
}

.detail-title,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 5px;
  background: var(--ink-soft);
  color: var(--green-dark);
  font-size: 13px;
  white-space: nowrap;
}

.tag-success {
  background: rgba(47, 125, 77, 0.14);
  color: var(--green-dark);
}

.tag-pending {
  background: rgba(212, 183, 101, 0.18);
  color: #8a6316;
}

.tag-warning {
  background: rgba(237, 146, 54, 0.16);
  color: #a45a12;
}

.tag-danger {
  background: rgba(184, 67, 67, 0.14);
  color: #9f2f2f;
}

.kv {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px 10px;
  margin: 16px 0;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.manager-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.status-tile {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 16px rgba(35, 48, 40, 0.05);
}

.status-tile span,
.status-tile.clickable {
  cursor: pointer;
  transition: all 0.18s ease;
}
.status-tile.clickable:hover {
  background: var(--green-light);
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.status-tile small {
  display: block;
  color: var(--muted);
}

.status-tile strong {
  display: block;
  margin: 6px 0;
  font-size: 26px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.quick-actions button {
  min-height: 48px;
  text-align: left;
  background: var(--surface-2);
}

.quick-actions button:hover:not(:disabled) {
  background: #eef3ed;
}

.kpi {
  padding: 20px;
  border-radius: var(--radius);
  transition: box-shadow 0.2s ease;
}

.kpi:hover {
  box-shadow: var(--shadow-lg);
}

.kpi span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
  font-weight: 700;
  color: var(--green-dark);
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.columns.wide-left {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.5fr);
}

.panel {
  padding: 16px;
}

.app-export-panel {
  margin: 14px 0;
}

.viz-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.viz-card {
  min-height: 220px;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 14px;
  align-items: center;
}

.donut {
  display: grid;
  place-items: center;
  width: 132px;
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: var(--surface);
}

.donut span {
  position: relative;
  z-index: 1;
  font-size: 28px;
  font-weight: 800;
}

.legend {
  display: grid;
  gap: 8px;
}

.legend.inline {
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  margin-top: 12px;
}

.legend div {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.stack-bar {
  display: flex;
  overflow: hidden;
  height: 34px;
  border-radius: 8px;
  background: #e6ebe6;
}

.stack-bar i {
  min-width: 2px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.insight-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.insight-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.insight-card strong {
  font-size: 24px;
}

.insight-card small {
  color: var(--muted);
  line-height: 1.5;
}

.risk-gauge {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.risk-gauge div {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-2);
  text-align: center;
}

.risk-gauge strong,
.risk-gauge span {
  display: block;
}

.risk-gauge strong {
  font-size: 26px;
}

.risk-gauge span {
  color: var(--muted);
  font-size: 12px;
}

.heat-table {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.heat-head,
.heat-row {
  display: grid;
  grid-template-columns: 110px repeat(4, minmax(70px, 1fr));
  gap: 6px;
  align-items: center;
  min-width: 440px;
}

.heat-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.heat-row > span,
.heat-row b {
  min-height: 34px;
  display: grid;
  align-items: center;
  border-radius: 6px;
  padding: 0 8px;
}

.heat-row > span {
  background: var(--surface-2);
}

.heat-row b {
  justify-items: center;
  background: rgba(47, 125, 77, var(--alpha));
}

.rank-row {
  display: grid;
  grid-template-columns: 32px minmax(90px, 1fr) minmax(120px, 1.3fr) 58px;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

.rank-row > span {
  color: var(--muted);
  font-weight: 800;
}

.bar-row {
  display: grid;
  grid-template-columns: 96px 1fr 36px;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}

.bar-track {
  overflow: hidden;
  height: 12px;
  background: #e6ebe6;
  border-radius: 999px;
}

.bar-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.tree-card,
.mini-card {
  padding: 14px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #fafbf8;
  color: var(--muted);
  font-weight: 700;
}

tr:hover td {
  background: #fbfcfa;
}

.table-btn {
  min-height: 30px;
  padding: 0 9px;
  font-size: 13px;
}

.batch-selection-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #cfe0d3;
  border-radius: 6px;
  background: #f3f8f4;
  font-size: 13px;
}

.batch-selection-bar > span {
  color: var(--muted);
}

.batch-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.batch-selection-actions button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.batch-export-town-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 6px;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
}

.batch-export-town-toggle input {
  margin: 0;
}

.survey-export-template-control {
  align-items: center;
  flex-wrap: wrap;
  cursor: default;
}

.survey-export-template-control select {
  min-width: 148px;
  max-width: 260px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.survey-export-template-status {
  flex-basis: 100%;
  width: fit-content;
  max-width: min(320px, 100%);
  line-height: 1.35;
  white-space: normal;
}

.survey-export-template-control--detail {
  background: #fff;
  border-color: #b8c7bc;
}

.batch-page-select {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  padding: 7px 12px;
  border-radius: 4px;
  background: #f5f7f5;
}

.batch-page-select input,
table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  cursor: pointer;
}

.batch-delete-confirm {
  max-width: 620px;
  margin: 0 auto;
}

.confirm-question {
  margin-top: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.batch-delete-preview {
  max-height: 280px;
  overflow: auto;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.batch-delete-preview > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.batch-delete-preview > div:last-child {
  border-bottom: 0;
}

.batch-delete-preview span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.delete-warning {
  padding: 10px 12px;
  border-left: 3px solid var(--red);
  background: #fff6f5;
  color: #8f342f;
  font-size: 13px;
}

.timeline {
  margin-bottom: 0;
  padding-left: 20px;
}

.timeline li {
  margin: 10px 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid label,
.form-grid textarea,
.form-actions,
.form-grid p {
  grid-column: span 2;
}

.form-grid label {
  display: grid;
  gap: 6px;
}

.form-grid label:nth-child(-n+12) {
  grid-column: span 1;
}

.form-grid span {
  color: var(--muted);
  font-size: 13px;
}

.form-grid .form-wide {
  grid-column: span 2 !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 27, 19, 0.38);
}

.modal {
  width: min(900px, 96vw);
  max-height: 90vh;
  overflow: auto;
  padding: 18px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.permission-matrix-form {
  display: grid;
  gap: 12px;
}

.permission-config-panel {
  display: grid;
  gap: 14px;
}

.permission-config-head {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfb;
}

.permission-role-select {
  display: grid;
  gap: 6px;
  margin: 0;
}

.permission-role-select span {
  color: var(--muted);
  font-size: 13px;
}

.permission-role-select select {
  width: 100%;
}

.permission-config-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.permission-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7faf8;
}

.permission-toolbar p {
  margin: 0;
}

.permission-matrix {
  display: grid;
  gap: 8px;
  max-height: 58vh;
  overflow: auto;
  padding-right: 4px;
}

.permission-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.permission-module {
  display: grid;
  gap: 4px;
  align-content: start;
}

.permission-module code {
  color: var(--muted);
  font-size: 11px;
  white-space: normal;
}

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

.permission-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 76px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbf9;
  color: var(--text);
  font-size: 12px;
}

.permission-check input {
  margin: 0;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  background: white;
}

.app-data-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.app-data-tabs button {
  flex: 0 0 auto;
}

.app-survey-page {
  display: grid;
  gap: 12px;
}

.survey-document {
  width: min(1380px, 100%);
  margin: 0 auto;
  color: #17231c;
  background: #fff;
  font-family: "SimSun", "Songti SC", "Microsoft YaHei", sans-serif;
}

.survey-document-head {
  position: relative;
  padding: 8px 10px 14px;
  text-align: center;
}

.survey-document-head > span {
  position: absolute;
  left: 10px;
  top: 12px;
  font-weight: 700;
}

.survey-document-head h2 {
  margin: 0 0 10px;
  font-size: 26px;
  letter-spacing: 0;
}

.survey-document-head p {
  margin: 0;
  font-size: 13px;
}

.survey-source-line {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 10px;
  color: var(--muted);
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 11px;
}

.survey-document-table-wrap {
  overflow-x: auto;
}

.survey-document-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1px solid #667069;
}

.survey-document-table td {
  border: 1px solid #89918b;
  padding: 0;
  vertical-align: top;
}

.survey-document-cell-label {
  background: #f3f5f3;
  vertical-align: middle !important;
}

.survey-document-label {
  min-height: 56px;
  display: grid;
  place-items: center;
  padding: 10px 8px;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
}

.survey-document-value {
  min-height: 56px;
  padding: 10px 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.survey-document-field {
  min-height: 56px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 8px 10px;
}

.survey-document-field b {
  display: block;
  font-size: 12px;
  color: #304138;
  line-height: 1.35;
}

.survey-document-field span {
  display: block;
  line-height: 1.65;
  white-space: pre-wrap;
}

.survey-photo-title {
  margin: 18px 0 8px;
  text-align: center;
}

.survey-photo-categories {
  border: 1px solid #89918b;
}

.survey-photo-category {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  min-height: 90px;
  border-bottom: 1px solid #89918b;
}

.survey-photo-category:last-child {
  border-bottom: 0;
}

.survey-photo-category h4 {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 8px;
  border-right: 1px solid #89918b;
  background: #f3f5f3;
  text-align: center;
}

.survey-photo-category > p {
  padding: 18px;
}

.survey-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
}

.survey-photo-grid figure,
.survey-photo-wall figure {
  margin: 0;
}

.survey-photo-grid img,
.survey-photo-wall img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.survey-photo-grid figcaption,
.survey-photo-wall figcaption {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.survey-export-actions {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.survey-document-shell {
  display: grid;
  gap: 10px;
  justify-items: center;
  overflow-x: auto;
  padding: 10px;
  background: #eef1ec;
}

.survey-document-shell .tree-survey-paper {
  width: 210mm;
  min-height: 297mm;
  max-width: 100%;
  box-sizing: border-box;
}

.survey-export-preview-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 10mm 12mm 10mm;
  }

  .survey-export-preview-hint {
    display: none;
  }

  .survey-document-shell {
    display: block;
    overflow: visible;
    padding: 0;
    background: #fff;
  }

  .survey-document-shell .tree-survey-paper {
    width: auto;
    min-height: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
}

.sync-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 56vh;
  overflow: auto;
}

.survey-edit-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 58vh;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  background: #f7f9f7;
}

.survey-edit-grid label {
  display: grid;
  gap: 5px;
}

.app-tree-survey-review-modal {
  width: min(1180px, 98vw);
  padding: 0;
}

.app-tree-survey-review-modal .modal-head {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 64px;
  margin: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.app-tree-survey-review-form {
  display: grid;
  gap: 14px;
  padding: 18px 20px 0;
}

.app-tree-survey-review-form > * {
  grid-column: 1 / -1;
}

.review-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #f7faf7;
}

.review-context-main,
.review-context-status {
  display: grid;
  gap: 3px;
}

.review-context-main strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 17px;
}

.review-context span {
  color: var(--muted);
  font-size: 12px;
}

.review-context-status {
  min-width: 94px;
  text-align: right;
}

.review-context-status strong {
  color: var(--green);
  font-size: 14px;
}

.app-review-special-stack {
  display: grid;
  gap: 14px;
}

.review-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.review-section-head {
  display: flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 10px;
}

.review-section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.review-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.review-section-grid > label,
.review-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.review-section-grid > label > span,
.review-field > span {
  color: var(--muted);
  font-size: 12px;
}

.review-section-grid > label > input,
.review-section-grid > label > select,
.review-section-grid > label > textarea,
.review-field > input,
.review-field > select,
.review-field > textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.review-field--wide {
  grid-column: 1 / -1;
}

.review-section--decision {
  border-top: 0;
  padding-top: 0;
}

.review-section--decision .review-section-grid {
  align-items: end;
}

.review-section--growth,
.review-section--standard {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.review-section--growth summary,
.review-section--standard summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  cursor: pointer;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  list-style: none;
}

.review-section--growth summary::-webkit-details-marker,
.review-section--standard summary::-webkit-details-marker {
  display: none;
}

.review-section--growth summary::after,
.review-section--standard summary::after {
  margin-left: auto;
  color: var(--muted);
  content: "+";
  font-size: 20px;
  font-weight: 400;
}

.review-section--growth[open] summary,
.review-section--standard[open] summary {
  border-bottom: 1px solid var(--line);
}

.review-section--growth[open] summary::after,
.review-section--standard[open] summary::after {
  content: "-";
}

.review-section-body {
  padding: 14px;
}

.review-standard-grid {
  max-height: min(52vh, 620px);
  padding: 12px;
  border-radius: 6px;
  background: #f8faf8;
}

.review-section--photos .survey-review-photo-editor,
.review-section--photos .photo-editor {
  margin: 0;
}

.review-section--comment {
  padding-bottom: 2px;
}

.review-savebar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 -20px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.review-savebar button {
  min-width: 96px;
}

.survey-photo-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.app-photo-download-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.app-photo-download-filters label {
  display: grid;
  gap: 5px;
}

.app-photo-download-filters label > span {
  color: var(--muted);
  font-size: 12px;
}

.app-photo-download-wall figure,
.app-photo-meta-card,
.photo {
  position: relative;
}

.app-photo-download-wall figure {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.app-photo-download-wall figure.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(47, 107, 69, 0.12);
}

.app-photo-download-wall figcaption {
  display: grid;
  gap: 3px;
}

.app-photo-download-wall figcaption strong,
.app-photo-download-wall figcaption span,
.app-photo-download-wall figcaption small {
  display: block;
}

.photo-download-button {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  min-height: 28px;
  padding: 3px 9px;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(24, 64, 43, 0.88);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(4px);
}

.photo-select-control {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 12px;
}

.photo-select-control input {
  min-height: auto;
  margin: 0;
}

@media (max-width: 900px) {
  .survey-photo-category {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .survey-document {
    width: min(100%, 1380px);
  }

  .survey-document-table {
    min-width: 980px;
  }

  .survey-photo-grid,
  .survey-photo-wall,
  .app-photo-download-filters,
  .sync-field-grid,
  .survey-edit-grid {
    grid-template-columns: 1fr;
  }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-head h2 {
  margin: 0;
}

.photo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.photo {
  display: grid;
  place-items: center;
  min-height: 92px;
  border-radius: 8px;
  background: #e7eee8;
  color: var(--green-dark);
  overflow: hidden;
  margin: 0;
}

.photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo figcaption {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--muted);
  background: white;
}

.comment-list {
  padding-left: 18px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  padding: 12px 16px;
  border-radius: 6px;
  background: #1f2d25;
  color: white;
  box-shadow: var(--shadow);
}

.batch-export-progress {
  position: fixed;
  right: 20px;
  bottom: 78px;
  z-index: 1250;
  width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid #cbded4;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(24, 55, 39, 0.18);
  color: var(--text);
}

.batch-export-progress[hidden] { display: none; }

.batch-export-progress-head,
.batch-export-progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.batch-export-progress-head strong { font-size: 15px; }

.batch-export-progress-head button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.batch-export-progress-copy {
  margin-top: 8px;
  font-size: 13px;
}

.batch-export-progress-copy span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.batch-export-progress-copy b { color: var(--green); }

.batch-export-progress progress {
  display: block;
  width: 100%;
  height: 10px;
  margin: 10px 0 7px;
  accent-color: var(--green);
}

.batch-export-progress small { color: var(--muted); }
.batch-export-progress.is-completed { border-color: #7fbd98; }
.batch-export-progress.is-failed { border-color: #d98078; }
.batch-export-progress.is-failed .batch-export-progress-copy b { color: var(--red); }

@media (max-width: 640px) {
  .batch-export-progress {
    right: 16px;
    bottom: 16px;
  }
}

.admin-state-page {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--bg);
}

.admin-state-page strong {
  color: var(--text);
  font-size: 22px;
}

.admin-state-page span {
  max-width: 560px;
  line-height: 1.7;
}

.admin-state-page .primary {
  justify-self: center;
  min-width: 112px;
  margin-top: 6px;
}

.admin-state-error strong {
  color: var(--red);
}

.loading-page,
.loading-mobile {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.loading-page strong,
.loading-mobile strong {
  color: var(--text);
  font-size: 22px;
}

.file-field {
  display: grid;
  gap: 6px;
}

.nansha-tools {
  margin-top: 12px;
}

.source-card {
  overflow: hidden;
}

.source-card .photo-strip {
  margin: 8px 0;
}

.photo-strip.large {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.photo-strip.large img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}

.compare strong {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
}

.feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.feature-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #d9e7dd;
  border-radius: 999px;
  background: #f7fbf8;
  color: #315a43;
  font-size: 13px;
  font-weight: 700;
}

.protection-board {
  margin-bottom: 14px;
}

.national-map {
  background: #16322b;
  cursor: grab;
  touch-action: none;
}

.national-map:active {
  cursor: grabbing;
}

.national-map .marker { z-index: 4; }

.invalid-coordinate-panel {
  margin-top: 16px;
  padding: 16px;
  border-left: 4px solid var(--red);
}

.invalid-coordinate-panel .table-wrap {
  margin-top: 12px;
}

.china-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.china-outline {
  fill: rgba(45, 122, 74, 0.10);
  stroke: rgba(160, 220, 180, 0.85);
  stroke-width: 0.5;
  stroke-dasharray: none;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px rgba(100, 200, 140, 0.3));
}

.china-outline.south-sea {
  fill: rgba(45, 122, 74, 0.06);
  stroke: rgba(160, 220, 180, 0.5);
  stroke-width: 0.3;
  stroke-dasharray: 1 1;
  filter: none;
}

.china-label circle {
  fill: #fff;
  stroke: #2d7a4a;
  stroke-width: 0.5;
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.6));
}

.china-label text {
  fill: #ffffff;
  font-size: 2.8px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.72);
  stroke-width: 0.7;
}

.pan-control {
  position: absolute;
  left: 14px;
  top: 174px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 32px);
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.pan-control button {
  min-height: 30px;
  padding: 0;
  font-weight: 800;
}

.pan-control button:first-child {
  grid-column: 2;
}

.pan-control button:last-child {
  grid-column: 2;
}

.national-zoom {
  width: 58px;
}

.national-zoom button {
  font-size: 12px;
}

.digital-command {
  --digital-bg: #06111e;
  --digital-panel: rgba(7, 31, 48, 0.88);
  --digital-line: rgba(54, 217, 255, 0.34);
  --digital-text: #dff8ff;
  --digital-muted: #8cb5c6;
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 150px);
  margin: -4px;
  padding: 16px;
  color: var(--digital-text);
  border: 1px solid rgba(48, 213, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(42, 245, 210, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(42, 245, 210, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #071729 0%, #050b16 54%, #081827 100%);
  background-size: 40px 40px, 40px 40px, auto;
  box-shadow: 0 24px 70px rgba(0, 10, 24, 0.38);
}

.digital-command::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(50, 214, 255, 0.16), transparent),
    linear-gradient(120deg, transparent 0 48%, rgba(69, 181, 255, 0.12) 49%, transparent 50% 100%);
  opacity: 0.72;
}

.digital-command > * {
  position: relative;
  z-index: 1;
}

.digital-topbar {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(380px, 1.4fr) minmax(210px, 0.8fr);
  align-items: center;
  gap: 14px;
  min-height: 78px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(47, 213, 255, 0.28);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(8, 31, 54, 0.92), rgba(4, 16, 30, 0.9));
  box-shadow: inset 0 -1px 0 rgba(64, 232, 255, 0.2), 0 12px 36px rgba(2, 12, 28, 0.36);
}

.digital-time,
.digital-state {
  color: #b7d8e4;
  font-size: 14px;
}

.digital-title {
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
}

.digital-title strong {
  color: #e8fbff;
  font-size: 32px;
  line-height: 1.15;
  text-shadow: 0 0 12px rgba(69, 229, 255, 0.85), 0 0 28px rgba(37, 211, 255, 0.48);
}

.digital-title span {
  color: rgba(183, 231, 241, 0.82);
  font-size: 11px;
}

.digital-state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.digital-state span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.digital-state span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #23f7bd;
  box-shadow: 0 0 14px #23f7bd;
}

.digital-state button,
.digital-module-dock button,
.digital-alert,
.terrain-point {
  color: inherit;
  border: 0;
}

.digital-state button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(54, 217, 255, 0.42);
  border-radius: 999px;
  background: rgba(14, 51, 74, 0.8);
  color: #dff8ff;
}

.digital-kpi-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.digital-kpi {
  position: relative;
  min-height: 74px;
  padding: 13px 14px 12px 48px;
  border: 1px solid rgba(54, 217, 255, 0.24);
  border-radius: 7px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent), transparent 84%), rgba(11, 39, 62, 0.88)),
    linear-gradient(180deg, rgba(30, 105, 130, 0.36), rgba(5, 22, 38, 0.78));
  box-shadow: inset 0 0 20px rgba(59, 222, 255, 0.12), 0 12px 28px rgba(0, 10, 24, 0.22);
}

.digital-kpi::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: color-mix(in srgb, var(--accent), transparent 72%);
  border: 1px solid color-mix(in srgb, var(--accent), white 20%);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent), transparent 10%);
}

.digital-kpi span {
  display: block;
  color: var(--digital-muted);
  font-size: 12px;
  font-weight: 700;
}

.digital-kpi strong {
  display: inline-block;
  margin-top: 4px;
  color: color-mix(in srgb, var(--accent), white 24%);
  font-size: 24px;
  line-height: 1;
  text-shadow: 0 0 16px color-mix(in srgb, var(--accent), transparent 20%);
}

.digital-kpi small {
  margin-left: 5px;
  color: #8fb7c4;
  font-size: 11px;
}

.digital-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(500px, 1.7fr) minmax(260px, 0.75fr);
  gap: 12px;
  align-items: stretch;
}

.digital-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.digital-panel {
  position: relative;
  overflow: hidden;
  min-height: 206px;
  padding: 14px;
  border: 1px solid var(--digital-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(13, 51, 76, 0.8), rgba(4, 19, 34, 0.94)),
    var(--digital-panel);
  box-shadow: inset 0 0 28px rgba(58, 220, 255, 0.1), 0 12px 32px rgba(0, 9, 24, 0.3);
}

.digital-panel::before,
.digital-panel::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: #25e7ff;
  pointer-events: none;
}

.digital-panel::before {
  left: 8px;
  bottom: 8px;
  border-left: 3px solid;
  border-bottom: 3px solid;
}

.digital-panel::after {
  right: 8px;
  top: 8px;
  border-right: 3px solid;
  border-top: 3px solid;
}

.digital-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(54, 217, 255, 0.18);
}

.digital-panel-head h2 {
  margin: 0;
  color: #dff8ff;
  font-size: 15px;
}

.digital-panel-head i {
  width: 52px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22f5d2, #38bdf8);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.82);
}

.digital-panel-body {
  min-height: 0;
}

.digital-chart-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 10px;
  color: var(--digital-muted);
  font-size: 12px;
}

.digital-chart-head strong {
  color: #35efff;
  font-size: 22px;
  text-shadow: 0 0 14px rgba(53, 239, 255, 0.6);
}

.digital-bars {
  display: grid;
  gap: 9px;
}

.digital-bar-row {
  display: grid;
  grid-template-columns: minmax(56px, 74px) 1fr 38px;
  gap: 8px;
  align-items: center;
  color: #c7e5ee;
  font-size: 12px;
}

.digital-bar-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-bar-row div {
  overflow: hidden;
  height: 12px;
  border: 1px solid rgba(58, 220, 255, 0.18);
  border-radius: 999px;
  background: rgba(7, 24, 39, 0.88);
}

.digital-bar-row i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2dd4bf, #38bdf8 58%, #fde047);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.54);
}

.digital-bar-row b {
  color: #effcff;
  text-align: right;
}

.digital-donut-wrap {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 14px;
  align-items: center;
}

.digital-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 26px rgba(34, 245, 210, 0.22);
}

.digital-ring::before {
  content: "";
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  background: #061724;
  box-shadow: inset 0 0 26px rgba(44, 218, 255, 0.18);
}

.digital-ring strong,
.digital-ring span {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
}

.digital-ring strong {
  color: #22f5d2;
  font-size: 27px;
  line-height: 1;
  text-shadow: 0 0 14px rgba(34, 245, 210, 0.7);
}

.digital-ring span {
  margin-top: 4px;
  color: #a6cbd8;
  font-size: 11px;
}

.digital-legend {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.digital-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: #a8cad6;
  font-size: 12px;
}

.digital-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}

.digital-legend span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-legend b {
  color: #eaffff;
  white-space: nowrap;
}

.digital-trend svg {
  display: block;
  width: 100%;
  height: 126px;
  margin-top: 6px;
}

.digital-gridline {
  fill: none;
  stroke: rgba(139, 203, 216, 0.16);
  stroke-width: 0.5;
}

.digital-trend-area {
  fill: rgba(34, 211, 238, 0.15);
  stroke: none;
}

.digital-trend-line {
  fill: none;
  stroke: #31f2ff;
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(49, 242, 255, 0.75));
}

.digital-trend-dot {
  fill: #f8e76a;
  stroke: #072033;
  stroke-width: 0.6;
}

.digital-trend-axis {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  color: #8fb7c4;
  font-size: 11px;
  text-align: center;
}

.digital-center {
  min-width: 0;
}

.digital-map-stage {
  position: relative;
  min-height: 626px;
  padding: 14px 18px 12px;
  border: 1px solid rgba(54, 217, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(5, 14, 27, 0.28), rgba(7, 20, 36, 0.92)),
    linear-gradient(90deg, rgba(24, 190, 255, 0.08), transparent 18% 82%, rgba(24, 190, 255, 0.08));
  box-shadow: inset 0 0 80px rgba(37, 99, 235, 0.12), 0 16px 44px rgba(0, 9, 24, 0.28);
}

.digital-map-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
  color: #a9d7e5;
  text-align: center;
}

.digital-map-caption strong {
  color: #e7fbff;
  font-size: 18px;
}

.digital-map-caption span {
  overflow: hidden;
  max-width: 48%;
  color: #85aebd;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-terrain {
  position: relative;
  overflow: hidden;
  height: 510px;
  border: 1px solid rgba(62, 218, 255, 0.28);
  border-radius: 8px;
  background: #06121f;
  clip-path: polygon(8% 18%, 22% 7%, 46% 8%, 72% 4%, 94% 18%, 88% 72%, 60% 92%, 30% 88%, 5% 68%);
  box-shadow:
    inset 0 0 46px rgba(37, 210, 255, 0.25),
    inset 0 -38px 42px rgba(30, 90, 255, 0.38),
    0 28px 54px rgba(0, 0, 0, 0.42);
}

.digital-terrain::after {
  content: "";
  position: absolute;
  inset: auto 7% 4% 7%;
  height: 62px;
  border-radius: 50%;
  background: rgba(31, 103, 255, 0.25);
  filter: blur(12px);
  pointer-events: none;
}

.digital-satellite-layer {
  position: absolute;
  inset: 0;
  opacity: 0.72;
  filter: saturate(1.28) contrast(1.12) brightness(0.78);
}

.digital-satellite-layer .satellite-map {
  background: #071421;
}

.digital-satellite-layer .satellite-fallback {
  background:
    linear-gradient(135deg, rgba(31, 78, 67, 0.82), rgba(8, 32, 53, 0.86)),
    repeating-linear-gradient(30deg, rgba(45, 160, 110, 0.26) 0 12px, rgba(12, 54, 88, 0.28) 12px 22px);
}

.digital-satellite-layer .satellite-tile {
  filter: saturate(1.18) contrast(1.14) brightness(0.74);
}

.terrain-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(78, 219, 255, 0.08) 0 1px, transparent 1px 8px),
    linear-gradient(180deg, transparent, rgba(42, 245, 210, 0.12));
  mix-blend-mode: screen;
}

.terrain-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.terrain-outline {
  fill: rgba(29, 159, 206, 0.11);
  stroke: rgba(83, 232, 255, 0.72);
  stroke-width: 0.9;
  filter: drop-shadow(0 0 5px rgba(44, 210, 255, 0.85));
}

.terrain-ridge {
  fill: none;
  stroke: rgba(207, 239, 255, 0.46);
  stroke-width: 0.35;
  stroke-dasharray: 2 2;
}

.terrain-town line {
  stroke: rgba(46, 245, 214, 0.45);
  stroke-width: 0.45;
}

.terrain-town circle {
  fill: #eaffff;
  stroke: #22f5d2;
  stroke-width: 0.6;
}

.terrain-town text {
  fill: #f2fbff;
  font-size: 3px;
  paint-order: stroke;
  stroke: rgba(1, 10, 20, 0.72);
  stroke-width: 0.8;
}

.terrain-point {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(222, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(15, 181, 147, 0.88);
  box-shadow: 0 0 12px rgba(34, 245, 210, 0.75), 0 8px 14px rgba(0, 0, 0, 0.24);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.terrain-point::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, rgba(53, 239, 255, 0), rgba(53, 239, 255, 0.9));
}

.terrain-point span {
  color: #f4ffff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.terrain-point.risk {
  background: rgba(244, 63, 94, 0.92);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.85);
}

.terrain-point.successor {
  background: rgba(250, 204, 21, 0.92);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.82);
}

.terrain-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  padding: 9px 14px;
  border: 1px solid rgba(54, 217, 255, 0.36);
  border-radius: 4px;
  background: rgba(4, 17, 31, 0.78);
  color: #dff8ff;
  font-size: 14px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 22px rgba(46, 245, 214, 0.26);
}

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

.digital-center-stats div {
  padding: 9px 10px;
  border: 1px solid rgba(54, 217, 255, 0.22);
  border-radius: 6px;
  background: rgba(7, 31, 48, 0.74);
}

.digital-center-stats span,
.digital-center-stats small {
  display: block;
  overflow: hidden;
  color: #92bdcb;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-center-stats strong {
  display: block;
  margin: 2px 0;
  color: #35efff;
  font-size: 18px;
}

.digital-module-dock {
  display: grid;
  grid-template-columns: repeat(5, minmax(84px, 1fr));
  gap: 10px;
  max-width: 560px;
  margin: 12px auto 0;
}

.digital-module-dock button {
  display: grid;
  gap: 4px;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid rgba(54, 217, 255, 0.32);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(13, 58, 85, 0.86), rgba(5, 20, 36, 0.88));
  color: #bce7f0;
  box-shadow: inset 0 0 18px rgba(54, 217, 255, 0.1);
}

.digital-module-dock button.active,
.digital-module-dock button:hover {
  color: #ffffff;
  border-color: rgba(46, 245, 214, 0.72);
  box-shadow: 0 0 20px rgba(46, 245, 214, 0.2), inset 0 0 24px rgba(46, 245, 214, 0.14);
}

.digital-module-dock strong {
  color: #35efff;
  font-size: 17px;
}

.digital-module-dock span {
  font-size: 12px;
}

.digital-monitor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.digital-monitor {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(54, 217, 255, 0.16);
  border-radius: 6px;
  background: rgba(5, 20, 36, 0.7);
}

.digital-monitor span {
  display: block;
  overflow: hidden;
  color: #9cc3d0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-monitor strong {
  display: block;
  margin-top: 5px;
  color: #35efff;
  font-size: 18px;
}

.digital-monitor.good strong {
  color: #22f5d2;
}

.digital-monitor.warn strong {
  color: #facc15;
}

.digital-monitor.danger strong {
  color: #fb7185;
}

.digital-alerts {
  display: grid;
  gap: 7px;
}

.digital-alert-head,
.digital-alert {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(54px, 0.8fr) 58px;
  gap: 8px;
  align-items: center;
}

.digital-alert-head {
  color: #83adbb;
  font-size: 12px;
  font-weight: 700;
}

.digital-alert {
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid rgba(54, 217, 255, 0.14);
  border-radius: 5px;
  background: rgba(7, 29, 45, 0.72);
  color: #cdebf2;
  text-align: left;
}

.digital-alert span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-alert b {
  color: #22f5d2;
  font-size: 12px;
  text-align: right;
}

.digital-alert.warn b {
  color: #facc15;
}

.digital-alert.danger b {
  color: #fb7185;
}

.digital-alert.info b {
  color: #38bdf8;
}

.digital-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  color: #8fb7c4;
  border: 1px dashed rgba(54, 217, 255, 0.22);
  border-radius: 6px;
}

@media (max-width: 1400px) {
  .digital-kpi-strip {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .digital-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  .digital-command {
    padding: 12px;
  }

  .digital-topbar {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .digital-state {
    justify-content: center;
  }

  .digital-title strong {
    font-size: 24px;
  }

  .digital-kpi-strip,
  .digital-side,
  .digital-center-stats,
  .digital-monitor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .digital-terrain {
    height: 420px;
  }

  .digital-module-dock {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .digital-kpi-strip,
  .digital-side,
  .digital-center-stats,
  .digital-monitor-grid,
  .digital-donut-wrap {
    grid-template-columns: 1fr;
  }

  .digital-map-caption {
    align-items: center;
    flex-direction: column;
  }

  .digital-map-caption span {
    max-width: 100%;
  }
}

@media (max-width: 1100px) {
  .topbar,
  .layout,
  .map-grid,
  .columns,
  .columns.wide-left,
  .overview-main-grid,
  .overview-map-grid,
  .overview-alert-grid,
  .overview-data-grid,
  .focus-layout,
  .media-hero,
  .policy-grid,
  .policy-grid.large,
  .viz-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .map-tools,
  .map-tools.compact {
    grid-template-columns: 1fr 1fr;
  }

  .signal-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .overview-hero-stack {
    justify-items: stretch;
    width: 100%;
    min-width: 0;
  }

  .overview-patrol-meter {
    justify-content: flex-start;
  }

  .fake-map {
    min-height: 440px;
  }
}

@media (max-width: 680px) {
  .layout,
  .topbar {
    padding: 12px;
  }

  .map-tools,
  .map-tools.compact,
  .kpis,
  .signal-grid,
  .overview-hero-metrics,
  .overview-compact-cards,
  .manager-strip,
  .form-grid,
  .form-grid label:nth-child(-n+12) {
    grid-template-columns: 1fr;
  }

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

  .overview-hero {
    padding: 16px;
  }

  .overview-hero h1 {
    font-size: 30px;
  }

  .overview-patrol-meter {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-patrol-meter .patrol-stats {
    width: 100%;
  }

  .form-grid label,
  .form-grid textarea,
  .form-actions,
  .form-grid p {
    grid-column: span 1;
  }

  .section-head,
  .detail-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

.digital-command {
  --digital-bg: #f4f8f4;
  --digital-panel: #ffffff;
  --digital-line: #dce9de;
  --digital-text: #1d3328;
  --digital-muted: #65766d;
  margin: 0;
  padding: 16px;
  color: var(--digital-text);
  border-color: #d9e7dd;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 247, 242, 0.96)),
    radial-gradient(circle at 12% 8%, rgba(47, 125, 77, 0.12), transparent 28%);
  box-shadow: 0 18px 48px rgba(31, 65, 47, 0.12);
}

.digital-command::before {
  background:
    linear-gradient(90deg, transparent, rgba(47, 125, 77, 0.08), transparent),
    linear-gradient(0deg, rgba(47, 125, 77, 0.04) 1px, transparent 1px);
  background-size: auto, 36px 36px;
  opacity: 1;
}

.digital-topbar {
  min-height: 66px;
  padding: 12px 16px;
  border-color: #dce9de;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(31, 65, 47, 0.09);
}

.digital-time,
.digital-state,
.digital-title span {
  color: #687a70;
}

.digital-title {
  gap: 4px;
}

.digital-title strong {
  color: #163a2a;
  font-size: 28px;
  text-shadow: none;
}

.digital-title span {
  font-size: 13px;
}

.digital-state span {
  color: #315a43;
}

.digital-state span::before {
  background: #2f7d4d;
  box-shadow: none;
}

.digital-state button {
  border-color: #cfe1d4;
  background: #eef6f0;
  color: #24513a;
}

.digital-state button:hover {
  background: #e4f0e7;
}

.digital-kpi-strip {
  gap: 12px;
}

.digital-kpi {
  min-height: 76px;
  padding: 14px 14px 12px 48px;
  border-color: #dce9de;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 24px rgba(31, 65, 47, 0.08);
}

.digital-kpi::before {
  width: 18px;
  height: 18px;
  background: color-mix(in srgb, var(--accent), white 72%);
  border-color: color-mix(in srgb, var(--accent), white 36%);
  box-shadow: none;
}

.digital-kpi span {
  color: #687a70;
}

.digital-kpi strong {
  color: color-mix(in srgb, var(--accent), #173a2a 30%);
  font-size: 25px;
  text-shadow: none;
}

.digital-kpi small {
  color: #6d7d73;
}

.digital-grid {
  grid-template-columns: minmax(260px, 0.72fr) minmax(500px, 1.56fr) minmax(280px, 0.82fr);
  gap: 14px;
}

.digital-panel {
  min-height: 194px;
  padding: 15px;
  border-color: #dce9de;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 24px rgba(31, 65, 47, 0.08);
}

.digital-panel::before,
.digital-panel::after {
  display: none;
}

.digital-panel-head {
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom-color: #e6eee8;
}

.digital-panel-head h2 {
  color: #19382a;
  font-size: 15px;
}

.digital-panel-head i {
  width: 36px;
  height: 2px;
  background: #2f7d4d;
  box-shadow: none;
}

.digital-chart-head {
  color: #6f8077;
}

.digital-chart-head strong {
  color: #2f7d4d;
  font-size: 20px;
  text-shadow: none;
}

.digital-bar-row {
  color: #30483b;
}

.digital-bar-row div {
  height: 10px;
  border-color: #dce9de;
  background: #edf4ef;
}

.digital-bar-row i {
  background: linear-gradient(90deg, #2f7d4d, #36a16a 68%, #d2a21c);
  box-shadow: none;
}

.digital-bar-row b,
.digital-legend b {
  color: #24382e;
}

.digital-ring {
  width: 122px;
  box-shadow: none;
}

.digital-ring::before {
  inset: 17px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #e7efe9;
}

.digital-ring strong {
  color: #2f7d4d;
  font-size: 25px;
  text-shadow: none;
}

.digital-ring span,
.digital-legend div,
.digital-trend-axis,
.digital-empty {
  color: #66796f;
}

.digital-legend i {
  box-shadow: none;
}

.digital-map-stage {
  min-height: 600px;
  padding: 14px;
  border-color: #dce9de;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 24px rgba(31, 65, 47, 0.08);
}

.digital-map-caption {
  justify-content: space-between;
  margin-bottom: 12px;
  color: #66796f;
}

.digital-map-caption strong {
  color: #173a2a;
  font-size: 18px;
}

.digital-map-caption span {
  max-width: 62%;
  color: #66796f;
}

.digital-terrain {
  height: 492px;
  clip-path: none;
  border-color: #dce9de;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 12px 22px rgba(31, 65, 47, 0.16);
}

.digital-terrain::after,
.terrain-scan {
  display: none;
}

.digital-satellite-layer {
  opacity: 0.9;
  filter: saturate(1.06) contrast(1.03) brightness(0.9);
}

.terrain-outline {
  fill: rgba(47, 125, 77, 0.12);
  stroke: rgba(96, 211, 151, 0.78);
  stroke-width: 0.65;
  filter: none;
}

.terrain-ridge {
  stroke: rgba(225, 245, 233, 0.5);
  stroke-width: 0.25;
}

.terrain-town line {
  stroke: rgba(197, 230, 208, 0.56);
  stroke-width: 0.35;
}

.terrain-town circle {
  fill: #ffffff;
  stroke: #44c17a;
}

.terrain-town text {
  fill: #ffffff;
  stroke: rgba(12, 31, 24, 0.72);
}

.terrain-point {
  min-width: 36px;
  min-height: 20px;
  padding: 0 6px;
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(47, 125, 77, 0.9);
  box-shadow: 0 6px 12px rgba(4, 25, 16, 0.22);
}

.terrain-point::before {
  display: none;
}

.terrain-point span {
  font-size: 9px;
}

.terrain-point.risk {
  background: rgba(201, 77, 67, 0.92);
  box-shadow: 0 7px 14px rgba(113, 34, 28, 0.25);
}

.terrain-point.successor {
  background: rgba(188, 139, 31, 0.92);
  box-shadow: 0 7px 14px rgba(113, 80, 20, 0.22);
}

.terrain-core {
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(22, 58, 42, 0.78);
  color: #ffffff;
  box-shadow: none;
}

.digital-center-stats {
  gap: 10px;
}

.digital-center-stats div {
  border-color: #dce9de;
  background: #f8fbf8;
}

.digital-center-stats span,
.digital-center-stats small {
  color: #697d72;
}

.digital-center-stats strong {
  color: #2f7d4d;
}

.digital-module-dock {
  display: none;
}

.digital-monitor {
  border-color: #dce9de;
  background: #f8fbf8;
}

.digital-monitor span {
  color: #6b7d73;
}

.digital-monitor strong,
.digital-monitor.good strong {
  color: #2f7d4d;
}

.digital-monitor.warn strong {
  color: #b88616;
}

.digital-monitor.danger strong {
  color: #c24b42;
}

.digital-alert-head {
  color: #73857b;
}

.digital-alert {
  border-color: #e1ece4;
  background: #f8fbf8;
  color: #30483b;
}

.digital-alert:hover {
  background: #eef6f0;
}

.digital-alert b {
  color: #2f7d4d;
}

.digital-alert.warn b {
  color: #b88616;
}

.digital-alert.danger b {
  color: #c24b42;
}

.digital-alert.info b {
  color: #2f6f9f;
}

@media (max-width: 1400px) {
  .digital-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  .digital-topbar {
    grid-template-columns: 1fr;
  }

  .digital-kpi-strip,
  .digital-side,
  .digital-center-stats,
  .digital-monitor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .digital-terrain {
    height: 420px;
  }
}

@media (max-width: 560px) {
  .digital-kpi-strip,
  .digital-side,
  .digital-center-stats,
  .digital-monitor-grid,
  .digital-donut-wrap {
    grid-template-columns: 1fr;
  }
}

/* 照片墙 */
.photo-wall{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;}
.photo-card{margin:0;cursor:pointer;transition:transform 0.18s ease;border-radius:8px;overflow:hidden;background:var(--surface);box-shadow:var(--shadow-sm);}
.photo-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);}
.photo-card figcaption{padding:8px 10px;font-size:12px;color:var(--muted);}

.drillable{cursor:pointer;transition:all 0.15s ease;border-radius:4px;padding:2px 4px;margin:-2px -4px}.drillable:hover{background:var(--green-light);color:var(--green-dark)}.bar-row.drillable:hover{background:var(--green-light)}
.patrol-dashboard{display:flex;gap:16px;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-sm);margin-bottom:14px;align-items:center}
.patrol-meter{display:flex;gap:20px;align-items:center}
.patrol-ring{width:90px;height:90px;border-radius:50%;display:grid;place-items:center;text-align:center}
.patrol-ring strong{font-size:22px;color:var(--green-dark)}
.patrol-ring small{font-size:11px;color:var(--muted)}
.patrol-stats{display:flex;gap:20px}
.patrol-stats div{text-align:center}
.patrol-stats strong{display:block;font-size:22px}
.patrol-stats span{font-size:12px;color:var(--muted)}
.dashboard-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:20px}
.dash-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px;display:flex;align-items:flex-start;gap:14px;box-shadow:var(--shadow-sm);transition:all 0.18s ease;cursor:pointer}
.dash-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.dash-card .card-icon{width:44px;height:44px;border-radius:10px;display:grid;place-items:center;font-size:20px;flex-shrink:0}
.dash-card .card-body{flex:1}
.dash-card .card-body strong{display:block;font-size:26px;font-weight:700;color:var(--green-dark)}
.dash-card .card-body span{font-size:12px;color:var(--muted)}
.dash-card .card-body small{display:block;font-size:11px;margin-top:2px}
.card-icon.green{background:#e6f2ea;color:var(--green)}
.card-icon.gold{background:#fdf3dc;color:var(--gold)}
.card-icon.red{background:#fde8e6;color:var(--red)}
.card-icon.blue{background:#e2f0f6;color:var(--blue)}
@media(max-width:900px){.shell{grid-template-columns:1fr}.sidebar{display:none}.layout{padding:12px}}

.pagination{display:flex;align-items:center;gap:4px;padding:12px 0;flex-wrap:wrap}.pagination button{min-height:32px;min-width:32px;padding:0 8px;font-size:13px}.pagination span{margin-left:8px;font-size:12px}

.alert-row{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:6px;cursor:pointer;transition:background 0.15s;margin-bottom:4px}
.alert-row:hover{background:var(--green-light)}
.alert-row small{color:var(--muted);font-size:11px;margin-left:auto}

.featured-trees{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px}
.tree-feature-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;cursor:pointer;transition:all 0.18s ease;box-shadow:var(--shadow-sm)}
.tree-feature-card:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.page-footer{display:flex;justify-content:space-between;padding:12px 20px;margin-top:20px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.leaflet-map{position:relative;z-index:1}.leaflet-map .leaflet-popup-content{font-family:"Microsoft YaHei",sans-serif;font-size:13px}.leaflet-map .leaflet-popup-content strong{color:#1a5c35}.health-warn{display:flex;gap:12px;flex-wrap:wrap;padding:8px 20px;background:#fff3cd;border-bottom:1px solid #ffc107;font-size:13px}.health-warn span{color:#856404}
.batch-selected-row{background:#e6f2ea}

.archive-tabs {
  display: flex;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.archive-tab-body {
  min-height: 220px;
}

.app-patrol-history {
  display: grid;
  gap: 12px;
}

.app-patrol-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.app-patrol-card .kv {
  grid-template-columns: 92px minmax(0, 1fr);
  margin: 12px 0;
}

.patrol-photo-row img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.pest-disease-list-photo {
  display: inline-grid;
  gap: 3px;
  justify-items: center;
  min-width: 72px;
  padding: 4px;
}

.pest-disease-list-photo img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}

.pest-disease-list-photo small {
  color: var(--muted);
  font-size: 11px;
}

.app-photo-meta-card {
  margin: 0;
  display: grid;
  gap: 6px;
}

.app-photo-meta-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.app-photo-meta-card figcaption {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.app-patrol-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.app-patrol-filters label {
  display: grid;
  gap: 5px;
}

.app-patrol-filters label span {
  color: var(--muted);
  font-size: 12px;
}

.app-patrol-filters input,
.app-patrol-filters select {
  width: 100%;
}

.app-survey-advanced-filters {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.app-survey-advanced-filters summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 600;
}

.app-survey-advanced-filters .app-patrol-filters {
  margin-bottom: 0;
}

.filter-actions {
  display: flex;
  gap: 6px;
}

/* ===== 全局科技感主题层：参考专项检测智能分析平台 ===== */
.module-ribbon,
.command-center,
.overview-hero,
.policy-strip,
.article-shell,
.media-hero,
.app-patrol-filters,
.patrol-dashboard,
.app-patrol-card,
.detail-panel,
.panel,
.table-wrap,
.mini-card,
.tree-card,
.kpi,
.status-tile,
.dash-card,
.tree-feature-card {
  border-color: var(--panel-line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(240, 249, 244, 0.88)),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.command-center,
.overview-hero,
.media-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 14%, rgba(54, 179, 149, 0.22), transparent 30%),
    radial-gradient(circle at 92% 4%, rgba(215, 168, 74, 0.18), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 248, 243, 0.92));
  box-shadow: var(--glow);
}

.command-center::after,
.overview-hero::before,
.media-hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -58px 46%;
  height: 120px;
  pointer-events: none;
  opacity: 0.48;
  background:
    linear-gradient(90deg, transparent, rgba(54, 179, 149, 0.15), transparent),
    repeating-linear-gradient(90deg, rgba(13, 107, 99, 0.12) 0 1px, transparent 1px 18px);
  transform: rotate(-8deg);
}

.command-center > *,
.overview-hero > *,
.media-hero > * {
  position: relative;
  z-index: 1;
}

.command-center h1,
.overview-hero h1,
.article-shell h1 {
  color: var(--green-dark);
}

.eyebrow,
.module-ribbon-head span {
  color: var(--green);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-ribbon,
.special-detection-tabs {
  backdrop-filter: blur(14px);
}

.module-ribbon {
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(237, 247, 242, 0.76));
}

.module-chip {
  border-color: rgba(34, 91, 71, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.module-chip.active {
  border-color: rgba(54, 179, 149, 0.42);
  color: var(--green-dark);
  background:
    linear-gradient(135deg, rgba(54, 179, 149, 0.16), rgba(215, 168, 74, 0.12)),
    rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 0 0 1px rgba(142, 227, 207, 0.20);
}

.signal-tile,
.status-tile,
.dash-card,
.kpi,
.mini-card,
.tree-card,
.tree-feature-card,
.policy-grid article,
.overview-hero-metrics div,
.overview-patrol-meter .patrol-stats div {
  position: relative;
  overflow: hidden;
  border-color: rgba(34, 91, 71, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 248, 244, 0.86));
  box-shadow: 0 12px 30px rgba(10, 61, 49, 0.07);
}

.signal-tile::before,
.status-tile::before,
.dash-card::before,
.kpi::before,
.tree-feature-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(#36b395, #d7a84a);
  opacity: 0.78;
}

.signal-tile:hover,
.status-tile.clickable:hover,
.dash-card:hover,
.kpi:hover,
.tree-feature-card:hover {
  border-color: rgba(54, 179, 149, 0.34);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.signal-tile,
.signal-tile.blue,
.signal-tile.gold,
.signal-tile.red {
  border-left-color: transparent;
}

.signal-tile.blue::before { background: linear-gradient(#16869b, #36b395); }
.signal-tile.gold::before { background: linear-gradient(#d7a84a, #f2d47b); }
.signal-tile.red::before { background: linear-gradient(#c6533f, #d7a84a); }

.signal-tile strong,
.status-tile strong,
.kpi strong,
.dash-card .card-body strong,
.overview-hero-metrics strong,
.overview-patrol-meter .patrol-stats strong,
.policy-grid strong {
  color: var(--green-dark);
}

.panel,
.detail-panel,
.table-wrap {
  border-radius: 16px;
}

.panel,
.detail-panel {
  backdrop-filter: blur(12px);
}

.section-head,
.detail-title,
.panel-head {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(34, 91, 71, 0.08);
}

.section-head h2,
.detail-title h2,
.panel-head h2,
.policy-head h2 {
  color: var(--green-dark);
}

th {
  color: var(--green-dark);
  background:
    linear-gradient(180deg, rgba(236, 247, 241, 0.96), rgba(226, 241, 234, 0.86));
}

td,
th {
  border-bottom-color: rgba(34, 91, 71, 0.10);
}

tbody tr {
  transition: background 0.16s ease;
}

tbody tr:hover {
  background: rgba(54, 179, 149, 0.06);
}

.tag {
  border: 1px solid rgba(54, 179, 149, 0.16);
  background: rgba(54, 179, 149, 0.10);
}

.card-icon.green,
.card-icon.blue {
  background: rgba(54, 179, 149, 0.14);
  color: var(--green);
}

.card-icon.gold {
  background: rgba(215, 168, 74, 0.16);
  color: #9b6d15;
}

.card-icon.red {
  background: rgba(194, 75, 66, 0.14);
  color: var(--red);
}

.quick-actions button,
.permission,
.governance-list div,
.overview-patrol-panel {
  border: 1px solid rgba(34, 91, 71, 0.10);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(238, 247, 242, 0.72));
}

.quick-actions button:hover:not(:disabled),
.alert-row:hover,
.drillable:hover,
.bar-row.drillable:hover {
  background: rgba(54, 179, 149, 0.10);
}

.fake-map,
.media-preview {
  border-color: rgba(142, 227, 207, 0.26);
  box-shadow: 0 18px 42px rgba(10, 39, 31, 0.18);
}

.map-legend {
  border-color: rgba(142, 227, 207, 0.18);
  background: rgba(248, 253, 250, 0.88);
  backdrop-filter: blur(10px);
}

.public-showcase-link {
  background:
    linear-gradient(135deg, #0d6b63, #071b16);
  border-color: rgba(142, 227, 207, 0.42);
  box-shadow: 0 14px 32px rgba(10, 61, 49, 0.24);
}

/* 专项检测智能分析平台 */
.detection-page {
  --detect-ink: #0c1b18;
  --detect-teal: #0d6b63;
  --detect-cyan: #3eb7a8;
  --detect-amber: #d9a441;
  --detect-red: #c6533f;
}

.detection-command {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 26px;
  margin-bottom: 14px;
  color: #edf9f2;
  border: 1px solid rgba(92, 180, 152, 0.3);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 18%, rgba(62, 183, 168, 0.36), transparent 34%),
    radial-gradient(circle at 88% 0%, rgba(217, 164, 65, 0.26), transparent 28%),
    linear-gradient(135deg, #071b16 0%, #0e3a31 54%, #173024 100%);
  box-shadow: 0 18px 42px rgba(10, 39, 31, 0.22);
}

.detection-command::after {
  content: "";
  position: absolute;
  inset: auto -8% -38% 42%;
  height: 170px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 18px);
  transform: rotate(-8deg);
}

.detection-command h1 {
  margin: 4px 0 8px;
  color: white;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.04em;
}

.detection-command p {
  max-width: 760px;
  margin: 0;
  color: rgba(237, 249, 242, 0.82);
}

.detection-command .eyebrow,
.special-record-card .eyebrow,
.picus-section-card .eyebrow,
.detection-comparison-timeline .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8ee3cf;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detection-command-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detection-command-actions {
  position: relative;
  z-index: 1;
  justify-content: flex-end;
  min-width: 360px;
}

.detection-command-actions button {
  color: #ecfff8;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.detection-command-actions button.primary {
  color: #10231c;
  border-color: #a7f0d9;
  background: linear-gradient(135deg, #b8ffe9, #e8c66d);
}

.special-detection-tabs {
  display: flex;
  gap: 8px;
  padding: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  border: 1px solid rgba(34, 91, 71, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-sm);
}

.special-detection-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 999px;
}

.detection-intel-grid,
.special-platform-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 14px;
  margin-bottom: 14px;
}

.detection-intel-grid {
  grid-template-columns: 1.1fr 0.8fr 1fr;
}

.detection-ai-card,
.detection-next-card,
.detection-radar,
.detection-priority-strip,
.special-detection-panel {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(34, 91, 71, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 242, 0.88)),
    var(--surface);
  box-shadow: 0 14px 32px rgba(26, 46, 32, 0.08);
}

.detection-ai-card::before,
.detection-next-card::before,
.special-detection-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(#36b395, #d7a84a);
}

.detection-ai-score {
  display: flex;
  align-items: end;
  gap: 10px;
  margin: 10px 0;
}

.detection-ai-score strong {
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.06em;
}

.detection-ai-score span {
  margin-bottom: 7px;
  color: var(--muted);
  font-weight: 700;
}

.detection-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8de;
}

.detection-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7d4d, #36b395, #d9a441);
}

.detection-next-card ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.detection-next-card li {
  margin: 6px 0;
  color: var(--muted);
}

.detection-radar {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 190px;
}

.radar-orbit {
  position: relative;
  width: 142px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 24px, rgba(47, 125, 77, 0.13) 25px 26px),
    conic-gradient(from 160deg, rgba(47, 125, 77, 0.12), rgba(217, 164, 65, 0.18), rgba(45, 109, 138, 0.12), rgba(47, 125, 77, 0.12));
}

.radar-core {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: white;
  font-size: 24px;
  font-weight: 900;
  border-radius: 50%;
  background: linear-gradient(135deg, #123d2b, #0d6b63);
  box-shadow: 0 10px 26px rgba(13, 107, 99, 0.22);
}

.radar-point {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(47, 125, 77, 0.08);
}

.radar-point.root {
  right: 18%;
  top: calc(82% - var(--pct, 50%) * 0.5);
  background: #2d6d8a;
}

.radar-point.cavity {
  left: 16%;
  bottom: calc(18% + var(--pct, 50%) * 0.4);
  background: #d9a441;
}

.radar-legend {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.radar-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
}

.radar-legend .root {
  color: #2d6d8a;
}

.radar-legend .cavity {
  color: #d9a441;
}

.detection-kpis {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.special-record-grid,
.priority-grid,
.picus-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.special-record-card,
.detection-priority-card,
.picus-section-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(34, 91, 71, 0.14);
  border-radius: 16px;
  background: linear-gradient(160deg, #ffffff, #f6faf7);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.special-record-card:hover,
.detection-priority-card:hover,
.picus-section-card:hover {
  transform: translateY(-3px);
  border-color: rgba(13, 107, 99, 0.34);
  box-shadow: var(--shadow);
}

.special-record-card.danger,
.detection-priority-card.danger {
  border-color: rgba(198, 83, 63, 0.32);
  background: linear-gradient(160deg, #fffafa, #fff2ed);
}

.special-record-card.warning,
.detection-priority-card.warning {
  border-color: rgba(217, 164, 65, 0.34);
  background: linear-gradient(160deg, #fffdf7, #fff6df);
}

.special-record-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.special-record-top h3 {
  margin: 4px 0 2px;
  font-size: 20px;
}

.special-risk-score {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.special-risk-score strong {
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.detection-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.detection-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: #174a38;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(47, 125, 77, 0.16);
  border-radius: 999px;
  background: #edf7f0;
}

.special-suggestion {
  padding: 12px;
  margin: 10px 0;
  color: #2d412f;
  line-height: 1.7;
  border: 1px solid rgba(217, 164, 65, 0.26);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 249, 224, 0.9), rgba(237, 247, 240, 0.86));
}

.special-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.special-flow-grid article {
  min-height: 118px;
  padding: 16px;
  border: 1px dashed rgba(13, 107, 99, 0.26);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(62, 183, 168, 0.18), transparent 36%),
    #fbfdfb;
}

.special-flow-grid strong {
  display: block;
  margin-bottom: 8px;
  color: #123d2b;
}

.detection-subform {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(47, 125, 77, 0.16);
  border-radius: 14px;
  background: #fbfdfb;
}

.detection-subform.compact {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
}

.detection-subform legend {
  padding: 0 6px;
  color: var(--green-dark);
  font-weight: 800;
}

.special-detection-form .wide,
.detection-subform .wide {
  grid-column: 1 / -1;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.checkbox-line input {
  width: auto;
}

.picus-visual-row {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
}

.picus-section-ring {
  width: 104px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 13px rgba(255, 255, 255, 0.75), 0 10px 24px rgba(20, 52, 39, 0.12);
}

.picus-section-ring span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #123d2b;
  font-weight: 900;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.kv.compact {
  grid-template-columns: 56px minmax(0, 1fr);
  margin: 0;
  gap: 5px 8px;
  font-size: 12px;
}

.detection-image-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.detection-image-strip figure {
  margin: 0;
}

.detection-image-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.detection-image-strip figcaption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.tru-density-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.tru-density-cell {
  display: grid;
  gap: 3px;
  min-height: 94px;
  padding: 10px;
  color: #233028;
  border-radius: 14px;
  background: #e7ece8;
}

.tru-density-cell.density-1 {
  background: linear-gradient(135deg, #e5f1fb, #cfe2f2);
}

.tru-density-cell.density-2 {
  background: linear-gradient(135deg, #e3f4e8, #bfe2c9);
}

.tru-density-cell.density-3 {
  background: linear-gradient(135deg, #fff0ea, #f2b4a7);
}

.tru-density-cell strong {
  font-size: 18px;
}

.tru-density-cell small,
.tru-density-cell span {
  color: rgba(35, 48, 40, 0.72);
  font-size: 12px;
}

.tru-density-cell b {
  font-size: 12px;
}

.detection-priority-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.priority-score {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: white;
  border-radius: 18px;
  background: linear-gradient(135deg, #123d2b, #0d6b63);
}

.priority-score strong {
  font-size: 24px;
  line-height: 1;
}

.priority-score span {
  font-size: 11px;
}

.priority-main small {
  display: block;
  color: var(--muted);
}

.priority-main p {
  margin: 4px 0 0;
  color: var(--muted);
}

.detection-comparison-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.detection-comparison-timeline article {
  padding: 13px;
  border: 1px solid rgba(47, 125, 77, 0.14);
  border-radius: 14px;
  background: #fbfdfb;
}

.detection-comparison-timeline strong,
.detection-comparison-timeline small {
  display: block;
  margin: 5px 0;
}

.detection-detail-modal .panel,
.detection-comparison-modal .panel,
.tree-special-panel {
  border-radius: 16px;
}

.detection-conclusion-panel p {
  line-height: 1.75;
}

.detection-empty {
  border: 1px dashed rgba(47, 125, 77, 0.22);
  background:
    radial-gradient(circle at 100% 0, rgba(62, 183, 168, 0.12), transparent 36%),
    #fbfdfb;
}

.archive-tabs {
  overflow-x: auto;
  flex-wrap: wrap;
}

@media (max-width: 1180px) {
  .app-patrol-filters {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .detection-command,
  .detection-intel-grid,
  .special-platform-grid {
    grid-template-columns: 1fr;
  }

  .detection-command-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .detection-kpis {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

@media (max-width: 720px) {
  .app-patrol-filters {
    grid-template-columns: 1fr;
  }

  .detection-command {
    padding: 20px;
  }

  .detection-subform,
  .detection-subform.compact,
  .picus-visual-row,
  .detection-priority-card {
    grid-template-columns: 1fr;
  }

  .special-detection-tabs {
    border-radius: 18px;
  }

  .detection-kpis {
    grid-template-columns: 1fr;
  }
}
/* 对外展示宣传页入口 */
.public-showcase-link {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 36px;
  padding: 0 12px;
  color: #fff7df;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, #2d5a47, #173226);
  border: 1px solid rgba(216, 190, 114, 0.58);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(31, 49, 36, 0.22);
}

.public-showcase-link:hover {
  transform: translateY(-1px);
}

body:has(.modal-backdrop) .public-showcase-link {
  display: none;
}

@media (max-width: 768px) {
  .public-showcase-link {
    display: none;
  }
}

.detection-cv-workbench {
  display: grid;
  gap: 14px;
}

.detection-cv-upload {
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel), white 3%);
}

.detection-cv-grid {
  margin-top: 2px;
}

.detection-cv-card {
  gap: 10px;
}

.detection-cv-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detection-cv-compare figure {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.detection-cv-compare img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f8fafc;
}

.detection-cv-compare figcaption {
  padding: 7px 9px;
  color: var(--muted);
  font-size: 11px;
}

.inline-check {
  display: flex !important;
  grid-column: 1 / -1;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
}

.inline-check input {
  width: auto;
  min-height: 0;
}

.tru-manual-editor {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.tru-manual-editor .section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tru-manual-editor h3 {
  margin: 0;
  font-size: 15px;
}

.tru-manual-grid {
  display: grid;
  grid-template-columns: 56px 96px 120px minmax(220px, 1fr) 150px;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
}

.tru-manual-grid-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.tru-manual-grid input,
.tru-manual-grid select {
  width: 100%;
  min-height: 34px;
}

.mini-check {
  display: flex !important;
  justify-content: center;
  padding: 0 !important;
}

.mini-check input {
  width: auto;
  min-height: 0;
}

@media (max-width: 760px) {
  .detection-cv-compare {
    grid-template-columns: 1fr;
  }

  .tru-manual-grid {
    grid-template-columns: 48px 82px 106px minmax(180px, 1fr) 132px;
  }
}

/* ===== 拍照路线 / 巡查轨迹 ===== */
.photo-route-page {
  display: grid;
  gap: 14px;
}

.photo-route-filter {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(220px, 320px) auto;
  gap: 12px;
  align-items: end;
}

.photo-route-filter label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.photo-route-filter input,
.photo-route-filter select {
  width: 100%;
  min-height: 38px;
}

.photo-route-distance-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(36, 117, 184, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(235, 246, 255, 0.96), rgba(237, 247, 242, 0.96));
  color: var(--muted);
  font-size: 13px;
}

.photo-route-distance-note strong {
  color: var(--text);
}

.photo-route-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(340px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.photo-route-main,
.photo-route-side {
  min-width: 0;
}

.photo-route-side {
  max-height: 720px;
  overflow: auto;
}

.photo-route-map {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(34, 91, 71, 0.14);
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 24%, rgba(54, 179, 149, 0.18), transparent 30%),
    linear-gradient(135deg, #eef8f2 0%, #dfeee6 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}

.photo-route-map.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.photo-route-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.photo-route-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.photo-route-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.route-line-dot {
  width: 22px;
  height: 4px;
  border-radius: 999px;
  display: inline-block;
}

.route-line-dot.track {
  background: #2475b8;
}

.route-line-dot.straight {
  background: repeating-linear-gradient(90deg, #d28a2a 0 8px, transparent 8px 13px);
  border: 1px solid rgba(210, 138, 42, 0.35);
}

.photo-route-summary span {
  padding: 7px 10px;
  border: 1px solid rgba(34, 91, 71, 0.12);
  border-radius: 999px;
  background: rgba(237, 247, 242, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.photo-route-timeline {
  display: grid;
  gap: 10px;
}

.photo-route-timeline-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 10px;
  border-bottom: 1px solid rgba(34, 91, 71, 0.1);
}

.photo-route-avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1b8f45, #2475b8);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.photo-route-timeline-header strong,
.photo-route-timeline-header small {
  display: block;
}

.photo-route-timeline-header small {
  color: var(--muted);
  font-size: 12px;
}

.photo-route-timeline-list {
  display: grid;
  gap: 0;
}

.photo-route-timeline-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  position: relative;
  cursor: pointer;
}

.timeline-rail {
  position: relative;
  min-height: 100%;
}

.timeline-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 17px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(27, 143, 69, 0.32), rgba(36, 117, 184, 0.34), rgba(199, 68, 62, 0.28));
}

.photo-route-timeline-item:first-child .timeline-rail::before {
  top: 18px;
}

.photo-route-timeline-item:last-child .timeline-rail::before {
  bottom: calc(100% - 18px);
}

.timeline-marker {
  position: sticky;
  top: 10px;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: 1px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #2475b8;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(36, 117, 184, 0.22);
}

.timeline-marker.start {
  background: #1b8f45;
  box-shadow: 0 8px 16px rgba(27, 143, 69, 0.22);
}

.timeline-marker.end {
  background: #c7443e;
  box-shadow: 0 8px 16px rgba(199, 68, 62, 0.22);
}

.timeline-marker.invalid {
  width: 20px;
  height: 20px;
  margin: 6px 0 0 7px;
  background: #98a2a0;
  box-shadow: none;
}

.timeline-segment-dot {
  position: absolute;
  top: 20px;
  left: 14px;
  z-index: 1;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: rgba(36, 117, 184, 0.48);
}

.timeline-content {
  min-width: 0;
  padding: 0 0 14px;
}

.timeline-node .timeline-content {
  padding-top: 2px;
}

.timeline-between-segment .timeline-content {
  padding-top: 2px;
  padding-bottom: 18px;
}

.timeline-node-main {
  padding: 2px 2px 0;
}

.timeline-node-title {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.timeline-node-title strong,
.timeline-node-address,
.timeline-node-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-node-title strong {
  color: var(--text);
  font-size: 15px;
}

.timeline-node-address {
  margin-top: 4px;
  color: #173c31;
  font-size: 13px;
  font-weight: 800;
}

.timeline-node-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-warning {
  display: block;
  margin-top: 5px;
  color: #9a5b10;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.photo-route-thumbs {
  display: flex;
  gap: 7px;
  margin-top: 9px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.photo-route-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 58px;
  height: 46px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(34, 91, 71, 0.14);
  border-radius: 10px;
  background: var(--soft);
  cursor: pointer;
}

.photo-route-thumbs img,
.photo-route-thumbs span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  object-fit: cover;
  padding: 4px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.photo-route-thumb b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 35, 29, 0.58);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.timeline-segment-card {
  display: grid;
  gap: 4px;
  margin: 2px 0 2px;
  padding: 10px 11px;
  border-radius: 6px;
  background: rgba(245, 247, 246, 0.96);
  color: var(--muted);
  font-size: 12px;
}

.timeline-segment-title {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

.timeline-segment-title strong,
.timeline-segment-card strong {
  color: var(--text);
}

.timeline-segment-title span {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(36, 117, 184, 0.1);
  color: #2475b8;
  font-size: 11px;
  font-weight: 800;
}

.timeline-segment-relation {
  color: #5e7168;
  font-size: 11px;
  font-weight: 800;
}

.timeline-segment-card em {
  color: #9a5b10;
  font-style: normal;
  font-weight: 700;
}

.timeline-segment.abnormal .timeline-segment-card {
  background: rgba(255, 247, 230, 0.96);
}

.photo-route-timeline-item.selected .timeline-marker,
.photo-route-timeline-item.selected .timeline-segment-dot {
  outline: 3px solid rgba(36, 117, 184, 0.2);
}

.photo-route-timeline-item.selected .timeline-node-main,
.photo-route-timeline-item.selected .timeline-segment-card {
  background: rgba(235, 246, 255, 0.9);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(36, 117, 184, 0.18);
}

.invalid-route-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(246, 247, 247, 0.92);
  color: var(--muted);
  font-size: 12px;
}

.invalid-route-note strong {
  color: #66756b;
}

.photo-route-preview {
  display: grid;
  gap: 12px;
}

.photo-route-preview-main {
  width: min(720px, 100%);
  max-height: 62vh;
  object-fit: contain;
  border-radius: 12px;
  background: #f4f7f5;
}

.photo-route-preview-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-radius: 12px;
  background: #f4f7f5;
  color: var(--muted);
}

.photo-route-preview-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.photo-route-preview-strip img,
.photo-route-preview-strip span {
  width: 76px;
  height: 58px;
  flex: 0 0 auto;
  border: 2px solid transparent;
  border-radius: 10px;
  object-fit: cover;
  background: var(--soft);
}

.photo-route-preview-strip img.active {
  border-color: #2475b8;
}

.invalid-route-photos {
  display: grid;
  gap: 8px;
}

.invalid-route-photo {
  display: grid;
  grid-template-columns: 130px minmax(120px, 1fr) minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px dashed rgba(102, 117, 107, 0.32);
  border-radius: 12px;
  background: rgba(246, 251, 248, 0.88);
  color: var(--muted);
  font-size: 12px;
}

.invalid-route-photo strong {
  color: var(--text);
}

.route-arrow-marker {
  background: transparent;
  border: 0;
}

.route-arrow-marker span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--route-arrow-color, #1b8f45);
  font-size: 20px;
  text-shadow: 0 1px 3px rgba(255,255,255,0.95), 0 2px 8px rgba(10,61,49,0.22);
  transform-origin: center;
}

@media (max-width: 1180px) {
  .photo-route-layout {
    grid-template-columns: 1fr;
  }

  .photo-route-side {
    max-height: none;
  }
}

@media (max-width: 760px) {
  .photo-route-filter {
    grid-template-columns: 1fr;
  }

  .photo-route-map {
    min-height: 360px;
  }

  .invalid-route-photo {
    grid-template-columns: 1fr;
  }
}

.growth-vigor-panel,
.growth-vigor-readonly {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf8;
}

.growth-vigor-panel h3,
.growth-vigor-readonly h4,
.growth-vigor-report h2,
.growth-vigor-distribution h3 {
  margin: 0;
}

.growth-vigor-summary {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid rgba(36, 94, 63, 0.15);
  color: var(--text);
  font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.growth-vigor-report {
  display: grid;
  gap: 14px;
}

.growth-vigor-table {
  display: grid;
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.growth-vigor-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.5fr) repeat(5, minmax(62px, 1fr));
  min-width: 520px;
  border-top: 1px solid var(--line);
}

.growth-vigor-row:first-child {
  border-top: 0;
}

.growth-vigor-row span {
  padding: 8px 10px;
  border-left: 1px solid var(--line);
  font-size: 12px;
}

.growth-vigor-row span:first-child {
  border-left: 0;
  font-weight: 700;
}

.growth-vigor-row.head {
  background: #edf6ef;
  color: var(--green-dark);
  font-weight: 700;
}
.growth-vigor-ai-review {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid #b8d4c1;
  background: #f5faf6;
  border-radius: 6px;
}

.growth-vigor-ai-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.growth-vigor-ai-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 14px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .growth-vigor-ai-review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-tree-survey-review-modal {
    width: min(760px, 98vw);
  }

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

  .review-field--wide {
    grid-column: span 1;
  }
}

@media (max-width: 620px) {
  .modal-backdrop {
    padding: 0;
  }

  .app-tree-survey-review-modal {
    width: 100vw;
    max-height: 100vh;
    min-height: 100vh;
    border-radius: 0;
  }

  .app-tree-survey-review-modal .modal-head {
    min-height: 56px;
    padding: 0 14px;
  }

  .app-tree-survey-review-modal .modal-head h2 {
    font-size: 18px;
  }

  .app-tree-survey-review-form {
    gap: 12px;
    padding: 14px 14px 0;
  }

  .review-context {
    align-items: flex-start;
  }

  .review-context-status {
    min-width: 74px;
  }

  .review-standard-grid {
    max-height: none;
    padding: 10px;
  }

  .review-savebar {
    margin: 0 -14px;
    padding: 10px 14px;
  }

  .review-savebar button {
    flex: 1;
  }
}

/* APP 每木调查表审核工作台 */
.app-tree-survey-review-modal {
  width: min(1560px, 99vw);
  max-width: 1560px;
  height: min(94vh, 980px);
  max-height: 94vh;
  padding: 0;
  overflow: hidden;
  background: #f4f7f5;
  border: 1px solid rgba(34, 91, 71, 0.14);
  box-shadow: 0 22px 58px rgba(10, 61, 49, 0.18);
}

.app-tree-survey-review-modal > .modal-head { display: none; }
.app-tree-survey-review-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.app-tree-survey-review-form > * { grid-column: auto; }
.review-topbar {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.review-topbar-title { display: flex; align-items: center; gap: 12px; min-width: 270px; }
.review-topbar-accent { width: 4px; height: 34px; border-radius: 4px; background: var(--green); }
.review-topbar-title h2 { margin: 0; color: var(--ink, var(--text)); font-size: 20px; line-height: 1.2; }
.review-topbar-subtitle { color: var(--muted); font-size: 12px; }
.review-topbar-meta { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 300px; flex-wrap: wrap; }
.review-topbar-id { color: var(--ink, var(--text)); font-weight: 700; letter-spacing: .02em; }
.review-type-tag, .review-status-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.review-type-tag { color: #21694d; background: #e7f5ee; }
.review-status-tag.is-pending { color: #8a6417; background: #fff2d8; }
.review-status-tag.is-approved { color: #1d7650; background: #dff4e8; }
.review-status-tag.is-rejected { color: #a63d38; background: #fde8e6; }
.review-topbar-actions { display: flex; gap: 8px; margin-left: auto; }
.review-topbar-actions button { min-height: 38px; padding-inline: 15px; }
.review-secondary { background: #fff; }
.review-summary-strip {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(230px, 1.7fr) minmax(110px, .8fr) minmax(260px, 2fr) repeat(3, minmax(100px, .75fr));
  gap: 0;
  margin: 14px 20px 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.review-summary-item { min-width: 0; padding: 12px 15px; border-right: 1px solid var(--line); }
.review-summary-item:last-child { border-right: 0; }
.review-summary-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.review-summary-item strong { display: block; overflow: hidden; color: var(--ink, var(--text)); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.review-summary-item--id strong { font-variant-numeric: tabular-nums; }
.review-summary-item--conclusion strong { font-weight: 500; }
.review-summary-status strong { color: #8a6417; }
.review-risk-中 strong, .review-risk-高 strong, .review-risk-紧急 strong { color: #c47a18; }
.review-risk-低 strong { color: var(--green); }
.review-workbench-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr) 238px; gap: 14px; min-height: 0; flex: 1; padding: 14px 20px 20px; }
.review-module-nav { min-width: 0; padding: 8px 0; overflow: auto; }
.review-nav-heading { display: grid; gap: 2px; padding: 4px 12px 12px; color: var(--ink, var(--text)); font-weight: 700; }
.review-nav-heading small { color: var(--muted); font-size: 11px; font-weight: 400; }
.review-nav-item { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-left: 3px solid transparent; border-radius: 0 7px 7px 0; background: transparent; box-shadow: none; text-align: left; }
.review-nav-item:hover:not(:disabled) { transform: none; box-shadow: none; background: #edf7f1; }
.review-nav-item.is-active { border-left-color: var(--green); background: #e8f5ee; color: var(--green-dark); font-weight: 700; }
.review-nav-dot { width: 7px; height: 7px; border: 1px solid #c2d2ca; border-radius: 50%; background: #fff; }
.review-nav-item.is-active .review-nav-dot { border-color: var(--green); background: var(--green); }
.review-nav-label { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.review-nav-status { color: var(--muted); font-size: 10px; white-space: nowrap; }
.review-workbench-content { min-width: 0; min-height: 0; padding: 0 3px 30px 0; overflow: auto; scroll-behavior: smooth; }
.review-workbench-content > .review-section, .review-workbench-content > .app-review-special-stack { margin-bottom: 12px; }
.review-section { margin: 0; padding: 15px 16px 17px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 2px 8px rgba(10, 61, 49, 0.035); scroll-margin-top: 12px; }
.review-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; margin-bottom: 14px; }
.review-section-title { display: flex; align-items: center; gap: 8px; }
.review-section-icon { color: var(--green); font-size: 11px; }
.review-section-head h3 { margin: 0; color: var(--ink, var(--text)); font-size: 15px; }
.review-section-status { color: var(--muted); font-size: 11px; }
.review-section-status.is-complete { color: var(--green); font-weight: 700; }
.review-section-status.is-warning { color: #be781b; font-weight: 700; }
.review-section-status.is-empty { color: var(--muted); }
.review-section--decision { border-top: 3px solid var(--green); }
.review-section-grid { gap: 14px; }
.review-field > span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.review-field > span::after { content: "选填"; color: #98a79f; font-size: 10px; font-weight: 400; }
.review-section--decision .review-field > span::after { content: "*"; color: var(--red); font-size: 14px; font-weight: 700; }
.review-field > span em { margin-left: 2px; color: #8b9790; font-size: 10px; font-style: normal; }
.review-field > input, .review-field > select, .review-field > textarea { min-height: 38px; border-color: #d9e3dd; border-radius: 6px; background: #fbfdfc; }
.review-field > textarea { min-height: 78px; resize: vertical; }
.review-field--readonly > input { color: #697a71; background: #f1f5f2; }
.review-subsection { margin-top: 15px; padding-top: 14px; border-top: 1px solid #edf1ee; scroll-margin-top: 12px; }
.review-subsection:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.review-subsection-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.review-subsection-head h4 { margin: 0; color: var(--ink, var(--text)); font-size: 13px; }
.review-subsection-head span { color: var(--muted); font-size: 11px; }
.review-section--growth, .review-section--standard { padding: 0; overflow: hidden; }
.review-section--growth summary, .review-section--standard summary { min-height: 48px; padding: 0 16px; background: #fbfdfc; }
.review-section--growth .review-section-body, .review-section--standard .review-section-body { padding: 16px; }
.review-section--photos .admin-review-photo-editor { margin: 0; border: 0 !important; padding: 0 !important; background: transparent !important; }
.review-section--comment textarea, .review-result-field textarea { min-height: 92px; }
.review-char-count { display: block; color: var(--muted); font-size: 11px; text-align: right; }
.review-overview { min-width: 0; align-self: start; position: sticky; top: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.review-overview-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.review-overview-head h3 { margin: 0; color: var(--ink, var(--text)); font-size: 15px; }
.review-overview-toggle { display: none; min-height: 28px; padding: 0 8px; font-size: 11px; }
.review-overview-content { padding: 16px 14px 14px; }
.review-progress { display: flex; align-items: center; gap: 13px; padding-bottom: 16px; border-bottom: 1px solid #edf1ee; }
.review-progress-ring { --review-progress: 270deg; display: grid; place-items: center; width: 78px; height: 78px; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--green) var(--review-progress), #e7efeb 0deg); position: relative; }
.review-progress-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.review-progress-ring strong { position: relative; z-index: 1; color: var(--ink, var(--text)); font-size: 18px; }
.review-progress-copy { display: grid; gap: 3px; }
.review-progress-copy strong { color: var(--ink, var(--text)); font-size: 13px; }
.review-progress-copy span { color: var(--muted); font-size: 12px; }
.review-overview-block { padding: 15px 0; border-bottom: 1px solid #edf1ee; }
.review-overview-block h4 { margin: 0 0 8px; color: var(--ink, var(--text)); font-size: 13px; }
.review-metric-row { display: flex; align-items: center; justify-content: space-between; min-height: 28px; color: var(--muted); font-size: 12px; }
.review-metric-row strong { color: var(--ink, var(--text)); font-variant-numeric: tabular-nums; }
.review-overview-tips li { margin: 7px 0; color: var(--muted); font-size: 12px; }
.review-overview-tips li::marker { color: #d89b2c; }
.review-overview-save { padding-top: 15px; }
.review-overview-save-button { width: 100%; min-height: 42px; }
.review-autosave-note { margin: 9px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.review-savebar { display: none; }
.review-standard-extra { margin-top: 14px; }
.review-workbench-content .paper-choice-group { display: flex; flex-wrap: wrap; gap: 7px; }
.review-workbench-content .paper-choice { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border: 1px solid #d9e3dd; border-radius: 6px; background: #fff; cursor: pointer; }
.review-workbench-content .paper-choice:has(input:checked) { border-color: #58a77b; background: #e8f5ee; color: #1f7650; }
.review-workbench-content .paper-choice input { position: absolute; opacity: 0; pointer-events: none; }
.review-workbench-content .paper-choice .choice-mark { display: none; }
.review-workbench-content .paper-stack { display: grid; gap: 12px; }
.review-workbench-content .paper-choice-fieldset { margin: 0; padding: 10px; border: 1px solid #edf1ee; border-radius: 6px; }
.review-workbench-content .paper-choice-fieldset legend { padding: 0 4px; color: var(--muted); font-size: 11px; }
.admin-review-photo-editor > div:first-child { display: flex !important; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.admin-review-photo-editor > div:first-child strong { color: var(--ink, var(--text)); font-size: 13px; }
.admin-review-photo-editor > div:first-child .primary { min-height: 34px; padding: 0 12px !important; }
.admin-review-photo-editor > div:nth-child(3) { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px !important; margin-top: 12px !important; }
.admin-review-photo-editor > div:nth-child(3) > div { display: grid !important; grid-template-columns: 92px minmax(0, 1fr) !important; gap: 10px !important; padding: 9px !important; border-color: #e0e8e3 !important; background: #fbfdfc !important; }
.admin-review-photo-editor, .admin-review-photo-editor * { min-width: 0; max-width: 100%; }
.admin-review-photo-editor label { width: 100%; overflow: hidden; }
.admin-review-photo-editor label input, .admin-review-photo-editor label select { width: 100%; min-width: 0; max-width: 100%; }
.admin-review-photo-editor img { width: 92px !important; height: 72px !important; border-radius: 6px !important; }
.admin-review-photo-editor label span { color: var(--muted); font-size: 11px; }
.admin-review-photo-editor .row-actions { display: flex; gap: 7px; flex-wrap: wrap; }

@media (max-width: 1180px) {
  .review-summary-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .review-summary-item--conclusion { grid-column: span 2; }
  .review-workbench-layout { grid-template-columns: 168px minmax(0, 1fr) 220px; }
}
@media (max-width: 980px) {
  .app-tree-survey-review-modal { width: 98vw; }
  .review-workbench-layout { grid-template-columns: 168px minmax(0, 1fr); }
  .review-overview { position: static; grid-column: 1 / -1; }
  .review-overview-toggle { display: inline-flex; }
  .review-overview.is-collapsed .review-overview-content { display: none; }
  .review-overview.is-collapsed .review-overview-toggle { transform: rotate(180deg); }
}
@media (max-width: 720px) {
  body:has(.app-tree-survey-review-modal) { overflow-x: hidden; }
  .app-tree-survey-review-modal { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .review-topbar { align-items: flex-start; padding: 12px 14px; gap: 10px; }
  .review-topbar-title { min-width: 0; flex: 1 1 100%; }
  .review-topbar-title h2 { font-size: 17px; }
  .review-topbar-meta { min-width: 0; order: 3; flex-basis: 100%; }
  .review-topbar-actions { position: absolute; top: 10px; right: 10px; }
  .review-topbar-actions button { min-height: 32px; padding-inline: 9px; font-size: 12px; }
  .review-topbar-actions .primary { display: none; }
  .review-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px 12px 0; }
  .review-summary-item { padding: 9px 10px; }
  .review-summary-item--wide, .review-summary-item--conclusion { grid-column: span 2; }
  .review-workbench-layout { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 70px; overflow: auto; }
  .review-module-nav { display: none; }
  .review-workbench-content { overflow: visible; padding: 0; }
  .review-overview { order: 2; }
  .review-section-grid { grid-template-columns: 1fr; }
  .review-section--decision .review-section-grid { min-width: 0; }
  .review-field--wide { grid-column: span 1; }
  .review-standard-grid { grid-template-columns: 1fr; max-height: none; }
  .review-savebar { display: flex; position: fixed; right: 0; bottom: 0; left: 0; z-index: 20; margin: 0; padding: 9px 12px; background: #fff; }
  .review-savebar button { flex: 1; }
  .review-overview-save { display: none; }
  .admin-review-photo-editor > div:nth-child(3) { grid-template-columns: 1fr; }
}

/* ===== 后台统一视觉层：公共 Shell / 地图 / 数据管理 / 档案 ===== */
:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --line: #dfe7e2;
  --text: #18251f;
  --muted: #66766d;
  --green: #117a59;
  --green-dark: #15513d;
  --green-light: #e9f5ef;
  --green-sidebar: #ffffff;
  --green-sidebar-hover: #f0f7f3;
  --gold: #d38a22;
  --red: #c44b43;
  --blue: #2e7188;
  --ink-soft: #e9f5ef;
  --panel: #ffffff;
  --soft: #f3f7f5;
  --panel-glass: #ffffff;
  --panel-line: #dfe7e2;
  --glow: none;
  --shadow-sm: 0 1px 2px rgba(25, 52, 41, 0.04);
  --shadow: 0 4px 14px rgba(25, 52, 41, 0.06);
  --shadow-lg: 0 10px 26px rgba(25, 52, 41, 0.10);
  --radius: 8px;
  --radius-sm: 6px;
  --sidebar-w: 212px;
  --topbar-h: 58px;
}

body {
  background: var(--bg);
  background-attachment: initial;
}

button {
  min-height: 36px;
  border-color: var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
  font-weight: 600;
}

button:hover:not(:disabled) {
  border-color: #a9cabc;
  background: #f4faf7;
  box-shadow: none;
  transform: none;
}

.primary,
.auth-btn.primary {
  border-color: var(--green);
  background: var(--green);
  box-shadow: none;
}

.primary:hover:not(:disabled),
.auth-btn.primary:hover:not(:disabled) {
  border-color: #0d674b;
  background: #0d674b;
  box-shadow: none;
}

.shell { background: var(--bg); }

.sidebar {
  color: var(--text);
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: none;
}

.sidebar::before { display: none; }

.sidebar-logo {
  min-height: var(--topbar-h);
  padding: 10px 15px;
  border-bottom-color: var(--line);
}

.sidebar-logo .logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  color: #fff;
  background: var(--green);
  box-shadow: none;
}

.sidebar-logo strong { color: var(--text); }
.sidebar-logo span { color: var(--muted); opacity: 1; }
.sidebar nav { padding: 10px 8px; }

.sidebar .nav-item {
  min-height: 40px;
  margin: 2px 0;
  padding: 0 11px;
  border-left: 3px solid transparent;
  border-radius: 6px;
  color: #52645b;
}

.sidebar .nav-item:hover {
  color: var(--green-dark);
  background: var(--green-sidebar-hover);
}

.sidebar .nav-item.active {
  padding-left: 11px;
  border-left-color: var(--green);
  color: var(--green-dark);
  background: var(--green-light);
  box-shadow: none;
}

.sidebar .nav-icon { width: 22px; color: #6b8176; font-size: 15px; }
.sidebar .nav-item.active .nav-icon { color: var(--green); }

.sidebar-footer {
  color: var(--muted);
  border-top-color: var(--line);
  opacity: 1;
}

.topbar {
  gap: 12px;
  padding: 0 18px;
  background: #fff;
  border-bottom-color: var(--line);
  box-shadow: none;
  backdrop-filter: none;
}

.topbar-title { color: var(--text); font-size: 15px; }
.topbar-search { max-width: 460px; }

.topbar-search input,
.auth-btn {
  border-color: var(--line);
  border-radius: 6px;
  background: #f7f9f8;
  box-shadow: none;
}

.layout { padding: 16px 18px 22px; background: var(--bg); }

.module-ribbon,
.command-center,
.overview-hero,
.media-hero,
.article-shell,
.panel,
.detail-panel,
.table-wrap,
.mini-card,
.tree-card,
.kpi,
.status-tile,
.dash-card,
.tree-feature-card,
.app-patrol-filters,
.app-patrol-card,
.patrol-dashboard {
  border-color: var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  backdrop-filter: none;
}

.command-center,
.overview-hero,
.media-hero { background: #fff; box-shadow: var(--shadow-sm); }

.command-center::after,
.overview-hero::before,
.media-hero::after { display: none; }

.module-ribbon { padding: 12px; background: #fff; }
.module-chip { border-color: transparent; border-radius: 6px; background: #f7f9f8; }
.module-chip.active { border-color: #b9d8ca; background: var(--green-light); box-shadow: none; }

.signal-tile,
.status-tile,
.dash-card,
.kpi,
.mini-card,
.tree-card,
.tree-feature-card,
.policy-grid article,
.overview-hero-metrics div,
.overview-patrol-meter .patrol-stats div {
  border-color: var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.signal-tile::before,
.status-tile::before,
.dash-card::before,
.kpi::before,
.tree-feature-card::before { display: none; }

.signal-tile:hover,
.status-tile.clickable:hover,
.dash-card:hover,
.kpi:hover,
.tree-feature-card:hover {
  border-color: #b9d8ca;
  box-shadow: var(--shadow);
  transform: none;
}

.status-tile strong,
.kpi strong,
.dash-card .card-body strong { color: var(--text); }
.status-tile strong { font-size: 24px; }
.kpi { padding: 16px; }
.kpi strong { margin-top: 6px; font-size: 28px; }

.section-head,
.detail-title,
.panel-head {
  padding-bottom: 10px;
  border-bottom: 1px solid #edf1ef;
}

.section-head h1,
.section-head h2,
.detail-title h2,
.panel-head h2 { color: var(--text); }

.map-tools,
.map-tools.compact {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.map-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; }
.fake-map { border-color: var(--line); border-radius: 8px; box-shadow: none; }
.map-layer,
.map-compass,
.zoom-control,
.map-legend { border-color: var(--line); background: rgba(255, 255, 255, 0.96); box-shadow: var(--shadow-sm); }

.table-wrap { border: 1px solid var(--line); }
th { color: #40534a; background: #f3f7f5; }
td, th { border-bottom-color: #e8eeeb; }
tbody tr:hover, tr:hover td { background: #f6faf8; }

.role-select,
input,
select,
textarea {
  border-color: #d6e0db;
  border-radius: 6px;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #68a98d;
  box-shadow: 0 0 0 3px rgba(17, 122, 89, 0.10);
}

.app-data-tabs,
.archive-tabs { gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.app-data-tabs button,
.archive-tabs button { border-color: transparent; background: transparent; }
.app-data-tabs button.primary,
.app-data-tabs button.active,
.archive-tabs button.primary,
.archive-tabs button.active { color: var(--green-dark); background: var(--green-light); }

.app-patrol-filters,
.batch-selection-bar,
.app-survey-advanced-filters { border-color: var(--line); background: #fff; }

.tag { border-color: #cfe4da; border-radius: 4px; background: var(--green-light); }
.modal { border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg); }

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

@media (max-width: 900px) {
  .topbar { grid-column: 1; }
  .layout { grid-column: 1; padding: 12px; }
}

/* ===== 统一管理工作台：导航分组、页面模板与数据密度 ===== */
.shell {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  overflow-x: hidden;
  background: var(--surface);
}

.sidebar-logo {
  gap: 9px;
}

.sidebar-logo .logo-icon {
  display: grid;
  place-items: center;
  font-size: 15px;
}

.sidebar-logo strong {
  font-size: 14px;
  font-weight: 700;
}

.sidebar-logo span {
  margin-top: 1px;
  font-size: 11px;
}

.sidebar-nav {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 13px;
  padding: 13px 8px 18px;
}

.sidebar-nav-group {
  display: grid;
  gap: 2px;
}

.sidebar-nav-group-label {
  padding: 0 9px 4px;
  color: #8a9990;
  font-size: 11px;
  font-weight: 700;
}

.sidebar .nav-item {
  min-width: 0;
  min-height: 38px;
  gap: 9px;
  margin: 0;
  padding: 0 10px;
  border-left-width: 3px;
  font-size: 13px;
}

.sidebar .nav-item .nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar .nav-item.active {
  padding-left: 10px;
}

.sidebar .nav-icon {
  display: grid;
  width: 19px;
  min-width: 19px;
  place-items: center;
}

.sidebar .nav-count {
  min-width: 19px;
  margin-left: auto;
  padding: 1px 5px;
  border-radius: 10px;
  color: #fff;
  background: var(--red);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.sidebar-recent {
  display: grid;
  gap: 2px;
  margin: 0 8px 10px;
  padding: 10px 8px;
  border-top: 1px solid var(--line);
}

.sidebar-recent-label {
  margin-bottom: 3px;
  color: #8a9990;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-recent-item {
  display: block;
  min-width: 0;
  min-height: 28px;
  padding: 0 4px;
  overflow: hidden;
  color: var(--muted);
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-recent-item:hover:not(:disabled) {
  color: var(--green-dark);
  background: var(--green-light);
}

.sidebar-footer {
  padding: 11px 16px;
  text-align: left;
}

.sidebar-footer-count {
  margin-bottom: 2px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.sidebar-footer-copy {
  color: var(--muted);
  font-size: 10px;
}

.topbar {
  min-width: 0;
  padding: 0 20px;
}

.topbar-title {
  min-width: 104px;
}

.topbar-search input {
  background: #f8faf9;
}

.topbar-actions {
  gap: 10px;
}

.topbar-notification {
  position: relative;
  display: grid;
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  place-items: center;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.topbar-notification:hover:not(:disabled) {
  background: var(--green-light);
  box-shadow: none;
}

.topbar-notification-count {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--red);
  font-size: 10px;
  font-weight: 700;
}

.topbar-connection {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 4px;
  background: #f2f5f3;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.topbar-connection.online {
  background: var(--green-light);
  color: var(--green-dark);
}

.topbar-connection.local {
  background: #fff4e5;
  color: #a35e11;
}

.workspace-content {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.workspace-content > .section-head:first-child,
.workspace-content > .module-ribbon:first-child,
.workspace-content > .command-center:first-child {
  margin-top: 0;
}

.section-head {
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h1 {
  font-size: 23px;
  line-height: 1.3;
}

.section-head h2,
.panel-head h2 {
  font-size: 16px;
  line-height: 1.35;
}

.section-head p,
.panel-head p {
  max-width: 760px;
}

.command-center,
.overview-hero,
.media-hero {
  padding: 18px 20px;
}

.command-center h1,
.overview-hero h1 {
  font-size: 24px;
  line-height: 1.25;
}

.command-actions,
.actions,
.row-actions,
.form-actions {
  gap: 8px;
}

.manager-strip,
.signal-grid {
  gap: 10px;
}

.status-tile,
.signal-tile,
.dash-card,
.kpi,
.mini-card {
  min-height: 112px;
  padding: 15px;
}

.status-tile strong,
.signal-tile strong,
.dash-card .card-body strong {
  line-height: 1.15;
}

.panel,
.detail-panel,
.table-wrap,
.app-patrol-filters,
.app-patrol-card,
.patrol-dashboard,
.module-ribbon {
  box-shadow: var(--shadow-sm);
}

.panel {
  padding: 16px;
}

.panel-head {
  gap: 10px;
  margin-bottom: 12px;
}

.module-ribbon {
  display: grid;
  gap: 10px;
}

.module-chip {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.app-data-tabs,
.archive-tabs {
  overflow: auto hidden;
  scrollbar-width: thin;
}

.app-data-tabs button,
.archive-tabs button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.app-data-tabs button.primary,
.app-data-tabs button.active,
.archive-tabs button.primary,
.archive-tabs button.active {
  border-color: #bfdccd;
  color: var(--green-dark);
  background: var(--green-light);
}

.table-wrap {
  overflow-x: auto;
}

table {
  min-width: 680px;
}

th {
  height: 42px;
  color: #4b5e54;
  font-size: 12px;
  font-weight: 700;
}

td {
  min-height: 48px;
  vertical-align: middle;
}

tbody tr:hover td {
  background: #f7fbf8;
}

.tag {
  min-height: 22px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
}

.form-grid {
  gap: 14px;
}

.form-grid label > span,
.form-grid label > strong {
  color: #52645b;
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  min-height: 38px;
}

textarea {
  min-height: 96px;
}

.page-footer {
  margin-top: 18px;
  padding: 12px 2px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 1280px) {
  :root { --sidebar-w: 196px; }
  .topbar { padding: 0 16px; }
  .layout { padding: 14px 16px 20px; }
  .topbar-title { min-width: auto; }
}

@media (max-width: 980px) {
  .topbar .user-info { display: none; }
  .topbar-search { max-width: none; }
  .manager-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .topbar { grid-column: 1; padding: 0 12px; }
  .layout { grid-column: 1; padding: 12px; }
  .topbar-title { font-size: 14px; }
  .topbar-connection { display: none; }
  .topbar-search { max-width: none; }
  .section-head { flex-direction: column; }
  .section-head > .actions { width: 100%; }
}

@media (max-width: 620px) {
  .topbar-search { display: none; }
  .topbar-actions { margin-left: auto; }
  .manager-strip,
  .signal-grid { grid-template-columns: 1fr; }
  .status-tile,
  .signal-tile,
  .dash-card,
  .kpi,
  .mini-card { min-height: auto; }
  .command-center,
  .overview-hero,
  .media-hero,
  .panel { padding: 14px; }
  .section-head h1,
  .command-center h1,
  .overview-hero h1 { font-size: 20px; }
  .app-data-tabs,
  .archive-tabs { margin-inline: -2px; }
}

/* ===== 工作台模块细化：档案 / APP / 巡查 / 检测 / 治理 ===== */
.workspace-content > * {
  min-width: 0;
}

.page-archive .section-head:first-child,
.page-archive-manage .section-head:first-child,
.page-app-data .section-head:first-child,
.page-patrol .section-head:first-child,
.page-tasks .section-head:first-child,
.page-reports .section-head:first-child,
.page-digital-twin .section-head:first-child,
.page-permissions-admin .section-head:first-child,
.page-app-versions .section-head:first-child {
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.page-archive .section-head:first-child .actions,
.page-app-data .section-head:first-child .actions,
.page-patrol .section-head:first-child .actions,
.page-tasks .section-head:first-child .actions,
.page-reports .section-head:first-child .actions,
.page-digital-twin .section-head:first-child .actions,
.page-permissions-admin .section-head:first-child .actions {
  justify-content: flex-end;
}

.page-archive .app-patrol-filters,
.page-archive-manage .app-patrol-filters,
.page-patrol .app-patrol-filters,
.page-digital-twin .app-patrol-filters,
.page-detection .app-patrol-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.page-archive .app-patrol-filters label,
.page-archive-manage .app-patrol-filters label,
.page-patrol .app-patrol-filters label,
.page-digital-twin .app-patrol-filters label,
.page-detection .app-patrol-filters label {
  min-width: 0;
}

.page-app-data .app-data-tabs,
.page-permissions-admin .archive-tabs,
.page-detection .special-detection-tabs {
  position: sticky;
  top: calc(var(--topbar-h) + 8px);
  z-index: 6;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.page-app-data .app-data-tabs,
.page-permissions-admin .archive-tabs {
  padding: 5px;
  border-color: var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
}

.page-app-data .app-data-tabs button,
.page-permissions-admin .archive-tabs button {
  border-radius: 5px;
}

.page-patrol .manager-strip,
.page-tasks .manager-strip,
.page-digital-twin .manager-strip {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.page-reports .viz-grid,
.page-reports .columns {
  gap: 12px;
}

.page-reports .viz-card,
.page-reports .columns > .panel {
  min-height: 250px;
}

/* ===== 统计报表：统一口径驾驶舱 ===== */
.page-reports .report-dashboard {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.page-reports .report-title-head {
  align-items: flex-start;
}

.report-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.report-filter-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(148px, 1fr));
  gap: 10px;
  align-items: end;
}

.report-filter-grid-advanced {
  padding-top: 12px;
  border-top: 1px dashed #d8e4dc;
}

.report-filter-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.report-filter-field > span {
  color: #52635a;
  font-size: 12px;
  font-weight: 600;
}

.report-filter-field select,
.report-filter-field input {
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 6px 9px;
  color: var(--text);
  border: 1px solid #d5e1d9;
  border-radius: 5px;
  background: #fff;
}

.report-filter-field select[multiple] {
  min-height: 64px;
}

.report-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.report-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.report-metric {
  position: relative;
  display: grid;
  min-height: 126px;
  padding: 14px;
  overflow: hidden;
  text-align: left;
  border: 1px solid #d9e5dd;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.report-metric::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  content: "";
  background: #24795a;
}

.report-metric:hover {
  border-color: #9fcbb0;
  box-shadow: var(--shadow-md);
}

.report-metric > span {
  color: #627168;
  font-size: 13px;
  font-weight: 600;
}

.report-metric strong {
  align-self: end;
  margin-top: 8px;
  color: #173d2c;
  font-size: 28px;
  line-height: 1;
}

.report-metric em {
  position: absolute;
  top: 50px;
  right: 14px;
  color: #637269;
  font-size: 12px;
  font-style: normal;
}

.report-metric small {
  min-height: 18px;
  margin-top: 8px;
  overflow: hidden;
  color: #718078;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-metric-blue::before { background: #2d7890; }
.report-metric-orange::before { background: #d8852b; }
.report-metric-red::before { background: #c24b42; }
.report-metric-slate::before { background: #75827b; }

.report-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, 0.65fr);
  gap: 14px;
}

.report-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-chart-panel {
  min-width: 0;
  min-height: 300px;
}

.report-main-grid > .report-chart-panel {
  min-height: 348px;
}

.report-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  margin-bottom: 8px;
}

.report-panel-head h2 {
  margin: 0;
  color: #1d3428;
  font-size: 16px;
}

.report-panel-head p {
  margin: 5px 0 0;
  color: #718078;
  font-size: 12px;
  line-height: 1.45;
}

.report-chart-canvas {
  width: 100%;
  height: 246px;
}

.report-main-grid .report-chart-canvas {
  height: 286px;
}

.report-focus-panel {
  display: grid;
  align-content: start;
}

.report-focus-list,
.report-quality-list {
  display: grid;
  gap: 1px;
}

.report-focus-row,
.report-quality-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 11px 8px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #e8efea;
  border-radius: 0;
  background: transparent;
}

.report-focus-row:hover,
.report-quality-row:hover {
  background: #f2f8f4;
}

.report-focus-row span,
.report-quality-row span {
  color: #33483c;
  font-size: 13px;
}

.report-focus-row strong,
.report-quality-row strong {
  color: #183f2d;
  font-size: 15px;
}

.report-focus-row small,
.report-quality-row small {
  grid-column: 1 / -1;
  color: #7d8b82;
  font-size: 11px;
}

.report-focus-row.danger strong,
.report-quality-row.danger strong { color: #b53f38; }
.report-focus-row.warning strong,
.report-quality-row.warning strong { color: #bf751d; }
.report-focus-row.info strong,
.report-quality-row.info strong { color: #27738c; }

.report-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 2px;
}

.report-chart-toolbar > span {
  margin-right: 5px;
  color: #627168;
  font-size: 12px;
  font-weight: 600;
}

.report-chart-toolbar button {
  min-height: 30px;
  padding: 4px 9px;
  color: #53645a;
  font-size: 12px;
  border-color: #d5e1d9;
  border-radius: 4px;
  background: #fff;
}

.report-chart-toolbar button.active {
  color: #176648;
  border-color: #acd5ba;
  background: #e8f5ec;
}

.report-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr) minmax(230px, 0.65fr);
  gap: 14px;
}

.report-transition-table {
  display: grid;
  overflow: hidden;
  border: 1px solid #dce7df;
  border-radius: 6px;
}

.report-transition-row {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, minmax(45px, 1fr));
}

.report-transition-row > span,
.report-transition-row > button {
  min-height: 37px;
  padding: 9px 6px;
  color: #4b5e53;
  font-size: 12px;
  text-align: center;
  border: 0;
  border-right: 1px solid #e2ebe5;
  border-bottom: 1px solid #e2ebe5;
  background: #fff;
}

.report-transition-row > span:first-child {
  color: #33483c;
  font-weight: 600;
}

.report-transition-row > button:not(:disabled) {
  color: #176648;
  font-weight: 700;
  background: #edf8f0;
  cursor: pointer;
}

.report-transition-row.head > span {
  color: #426150;
  font-weight: 700;
  background: #f5faf6;
}

.report-rectification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.report-rectification-item {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 9px;
  text-align: left;
  border: 1px solid #dde8e0;
  border-radius: 5px;
  background: #fbfdfb;
}

.report-rectification-item:hover {
  border-color: #a7ceb5;
  background: #f0f8f2;
}

.report-rectification-item span {
  color: #68776e;
  font-size: 12px;
}

.report-rectification-item strong {
  color: #244333;
  font-size: 18px;
}

.report-detail-panel {
  min-width: 0;
  scroll-margin-top: calc(var(--topbar-h) + 12px);
}

.report-table-wrap {
  max-height: 580px;
  overflow: auto;
  border: 1px solid #20392d;
  border-radius: 6px;
  background: #172c22;
}

.report-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  color: #e7f0e9;
  background: #172c22;
}

.report-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 10px;
  color: #f6fbf7;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid #456454;
  background: #203c2e;
}

.report-table td {
  padding: 10px;
  color: #d8e7dc;
  font-size: 12px;
  border-bottom: 1px solid rgba(178, 208, 189, 0.14);
}

.report-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

.report-table tbody tr:hover {
  background: rgba(80, 163, 111, 0.16);
}

.report-table .table-btn {
  min-height: 26px;
  padding: 2px 0;
  color: #9ee6b7;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.report-status {
  display: inline-flex;
  max-width: 132px;
  padding: 3px 7px;
  overflow: hidden;
  font-size: 11px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 3px;
}

.report-status-success { color: #d9f5e2; background: #236443; }
.report-status-warning { color: #fff1c9; background: #88631f; }
.report-status-danger { color: #ffe0dc; background: #8c3d36; }
.report-status-info { color: #d9eff7; background: #255f73; }
.report-status-muted { color: #e3e8e4; background: #59655e; }

.report-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  color: #68776e;
  font-size: 12px;
}

.report-empty-state,
.report-error-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  gap: 8px;
  padding: 22px;
  color: #637269;
  text-align: center;
  border: 1px dashed #c8d9cd;
  border-radius: 6px;
  background: #fbfdfb;
}

.report-empty-state.compact {
  min-height: 138px;
}

.report-empty-state strong,
.report-error-state strong {
  color: #2b4837;
  font-size: 14px;
}

.report-error-state {
  justify-items: start;
  min-height: 180px;
  color: #91433c;
  border-color: #e2b8b3;
  background: #fff9f8;
}

.report-loading-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.report-skeleton {
  min-height: 126px;
  border-radius: 7px;
  background: linear-gradient(100deg, #edf3ee 20%, #f8fbf8 40%, #edf3ee 60%);
  background-size: 300% 100%;
  animation: report-skeleton-shift 1.2s ease-in-out infinite;
}

.report-saved-views {
  display: grid;
  gap: 8px;
}

.report-saved-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px;
  border: 1px solid #dce7df;
  border-radius: 5px;
}

.report-saved-view small {
  display: block;
  margin-top: 4px;
  color: #718078;
  font-size: 12px;
}

.report-export-form {
  display: grid;
  gap: 14px;
}

.report-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@keyframes report-skeleton-shift {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

@media (max-width: 1400px) {
  .report-filter-grid { grid-template-columns: repeat(4, minmax(148px, 1fr)); }
  .report-analysis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-rectification-panel { grid-column: span 2; }
}

@media (max-width: 1080px) {
  .report-main-grid,
  .report-chart-grid { grid-template-columns: 1fr; }
  .report-filter-grid { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
}

@media (max-width: 720px) {
  .report-filter-grid,
  .report-loading-grid,
  .report-analysis-grid { grid-template-columns: 1fr; }
  .report-rectification-panel { grid-column: auto; }
  .report-title-head .actions { width: 100%; }
  .report-title-head .actions button { flex: 1 1 auto; }
  .report-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-metric { min-height: 112px; }
  .report-metric strong { font-size: 24px; }
  .report-panel-head { flex-direction: column; }
  .report-pagination { align-items: flex-start; flex-direction: column; }
}

/* ===== 统计报表第二轮：深色分析工作台 ===== */
.page-reports .report-dashboard {
  --report-panel: #17211f;
  --report-panel-secondary: #1c2926;
  --report-control: #111a18;
  --report-text-primary: #eef5f1;
  --report-text-secondary: #c0cec7;
  --report-text-muted: #94a69e;
  --report-border: #334640;
  --report-border-hover: #5e8978;
  --report-normal: #56c694;
  --report-warning: #f0b45b;
  --report-danger: #f07868;
  --report-neutral: #8da2b7;
  color: var(--report-text-primary);
}

.page-reports .report-dashboard .panel,
.page-reports .report-filter-panel {
  color: var(--report-text-primary);
  border-color: var(--report-border);
  background: var(--report-panel);
  box-shadow: 0 8px 20px rgba(7, 18, 14, .14);
}

.page-reports .report-title-head h1,
.page-reports .report-panel-head h2 { color: var(--report-text-primary); }
.page-reports .report-meta-line,
.page-reports .report-panel-head p { color: var(--report-text-secondary); }
.page-reports .report-filter-panel { border-radius: 8px; }
.page-reports .report-filter-grid-advanced { border-color: var(--report-border); }
.page-reports .report-filter-field > span { color: var(--report-text-secondary); }
.page-reports .report-filter-field select,
.page-reports .report-filter-field input,
.page-reports .report-table-tools input,
.page-reports .report-pagination select,
.page-reports .report-page-jump input {
  color: var(--report-text-primary);
  border-color: var(--report-border);
  background: var(--report-control);
}
.page-reports .report-filter-field select:focus,
.page-reports .report-filter-field input:focus,
.page-reports .report-table-tools input:focus,
.page-reports .report-pagination select:focus,
.page-reports .report-page-jump input:focus { border-color: var(--report-border-hover); outline: 2px solid rgba(86, 198, 148, .18); }

.report-multi-field { position: relative; z-index: 3; }
.report-multi-trigger {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 6px 9px;
  color: var(--report-text-secondary);
  text-align: left;
  border: 1px solid var(--report-border);
  border-radius: 5px;
  background: var(--report-control);
}
.report-multi-trigger::after { content: "⌄"; color: var(--report-text-muted); font-size: 14px; }
.report-multi-trigger.selected { color: var(--report-text-primary); border-color: #4b7868; }
.report-multi-trigger:hover { border-color: var(--report-border-hover); }
.report-multi-summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-multi-popover {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 12;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 34px));
  padding: 10px;
  border: 1px solid #557465;
  border-radius: 7px;
  background: #101917;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .35);
}
.report-multi-search { min-height: 34px; padding: 6px 8px; color: var(--report-text-primary); border: 1px solid var(--report-border); border-radius: 4px; background: #182421; }
.report-multi-actions { display: flex; gap: 6px; }
.report-multi-actions button { min-height: 26px; padding: 3px 7px; color: var(--report-text-secondary); font-size: 12px; border-color: var(--report-border); background: #1d2b27; }
.report-multi-options { display: grid; max-height: 190px; overflow: auto; gap: 3px; }
.report-multi-option { min-height: 30px; padding: 5px 8px; color: var(--report-text-secondary); text-align: left; border: 1px solid transparent; border-radius: 4px; background: transparent; }
.report-multi-option:hover { color: var(--report-text-primary); background: #22342e; }
.report-multi-option.active { color: #e9fff3; border-color: #39755d; background: #21523f; }
.report-multi-empty { padding: 8px; color: var(--report-text-muted); font-size: 12px; }

.report-applied-conditions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  color: var(--report-text-secondary);
  font-size: 12px;
  border: 1px solid var(--report-border);
  border-radius: 6px;
  background: var(--report-panel-secondary);
}
.report-applied-conditions strong { color: var(--report-text-primary); }
.report-applied-tag { padding: 3px 7px; color: #cef0de; border: 1px solid #396051; border-radius: 999px; background: #1c3b30; }
.report-applied-conditions button { min-height: 27px; margin-left: auto; padding: 3px 8px; color: var(--report-text-secondary); border-color: var(--report-border); background: transparent; }
.report-refreshing-note { padding: 7px 10px; color: #b7d2c5; font-size: 12px; border-left: 3px solid var(--report-normal); background: rgba(86, 198, 148, .11); }

.page-reports .report-metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.page-reports .report-metric { min-height: 120px; border-color: var(--report-border); background: var(--report-panel); box-shadow: none; }
.page-reports .report-metric:hover { border-color: var(--report-border-hover); box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.page-reports .report-metric > span { color: var(--report-text-secondary); }
.page-reports .report-metric strong { color: var(--report-text-primary); }
.page-reports .report-metric em,
.page-reports .report-metric small { color: var(--report-text-muted); }
.page-reports .report-metric-blue::before { background: #4c8ec9; }
.page-reports .report-metric-orange::before { background: var(--report-warning); }
.page-reports .report-metric-red::before { background: var(--report-danger); }
.page-reports .report-metric-slate::before { background: var(--report-neutral); }

.report-tabs { display: flex; overflow-x: auto; gap: 2px; padding: 4px; border: 1px solid var(--report-border); border-radius: 7px; background: var(--report-panel-secondary); }
.report-tabs button { min-height: 34px; padding: 6px 13px; color: var(--report-text-secondary); white-space: nowrap; border: 1px solid transparent; border-radius: 5px; background: transparent; }
.report-tabs button:hover { color: var(--report-text-primary); background: #263933; }
.report-tabs button.active { color: #effff6; border-color: #3c7b62; background: #21523f; }
.report-tab-content { display: grid; gap: 14px; }

.page-reports .report-chart-panel,
.page-reports .report-focus-panel,
.page-reports .report-transition-panel,
.page-reports .report-quality-panel,
.page-reports .report-rectification-panel,
.page-reports .report-comparison-panel { background: var(--report-panel); }
.report-rank-select { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 7px; color: var(--report-text-secondary); font-size: 12px; }
.report-rank-select select { min-height: 30px; padding: 4px 8px; color: var(--report-text-primary); border: 1px solid var(--report-border); border-radius: 4px; background: var(--report-control); }
.report-status-block { display: grid; gap: 10px; }
.report-status-summary,
.report-quality-summary { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 9px 11px; color: var(--report-text-secondary); font-size: 12px; border: 1px solid var(--report-border); border-radius: 6px; background: var(--report-panel-secondary); }
.report-status-summary span:first-child { color: var(--report-text-primary); font-weight: 700; }
.report-focus-row,
.report-quality-row { color: var(--report-text-secondary); border-bottom-color: var(--report-border); }
.report-focus-row:hover,
.report-quality-row:hover { background: #22332d; }
.report-focus-row span,
.report-quality-row span { color: var(--report-text-primary); }
.report-focus-row strong,
.report-quality-row strong { color: #d6eee1; }
.report-focus-row small,
.report-quality-row small { color: var(--report-text-muted); }
.report-focus-row em { align-self: center; padding: 2px 6px; color: #f8d38c; font-size: 11px; font-style: normal; border-radius: 3px; background: rgba(240, 180, 91, .16); }
.report-focus-row.danger em { color: #ffd0c8; background: rgba(240, 120, 104, .17); }
.report-focus-row.danger strong,
.report-quality-row.danger strong { color: #ff9e91; }
.report-focus-row.warning strong,
.report-quality-row.warning strong { color: #ffd184; }
.report-focus-row.info strong,
.report-quality-row.info strong { color: #9fc6f0; }

.report-status-analysis { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: 14px; }
.report-comparison-sample,
.report-transition-note { margin: 0 0 10px; color: var(--report-text-secondary); font-size: 12px; line-height: 1.6; }
.report-comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.report-comparison-item { display: grid; gap: 5px; padding: 9px; border: 1px solid var(--report-border); border-radius: 5px; background: var(--report-panel-secondary); }
.report-comparison-item span,
.report-comparison-item small { color: var(--report-text-secondary); font-size: 12px; }
.report-comparison-item strong { color: var(--report-text-primary); font-size: 18px; }
.page-reports .report-transition-table { border-color: var(--report-border); }
.page-reports .report-transition-row > span,
.page-reports .report-transition-row > button { color: var(--report-text-secondary); border-color: var(--report-border); background: var(--report-panel-secondary); }
.page-reports .report-transition-row > span:first-child,
.page-reports .report-transition-row.head > span { color: var(--report-text-primary); background: #22322d; }
.page-reports .report-transition-row > button:not(:disabled) { color: #eafff2; background: #214c3c; }
.page-reports .report-transition-row > button.transition-worse:not(:disabled) { color: #ffe0b2; background: #61482a; }
.page-reports .report-transition-row > button.transition-better:not(:disabled) { color: #d8ffea; background: #24533f; }
.page-reports .report-transition-row > button:disabled { opacity: .48; cursor: default; }

.page-reports .report-rectification-item { border-color: var(--report-border); background: var(--report-panel-secondary); }
.page-reports .report-rectification-item:hover { border-color: var(--report-border-hover); background: #22372f; }
.page-reports .report-rectification-item span { color: var(--report-text-secondary); }
.page-reports .report-rectification-item strong { color: var(--report-text-primary); }
.page-reports .report-empty-state { color: var(--report-text-secondary); border-color: var(--report-border); background: var(--report-panel-secondary); }
.page-reports .report-empty-state strong { color: var(--report-text-primary); }

.report-table-tools { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 9px; }
.report-table-tools form { display: flex; gap: 6px; flex: 1 1 230px; }
.report-table-tools input { min-width: 0; min-height: 32px; flex: 1; padding: 5px 8px; border-radius: 4px; }
.report-table-tools button,
.report-pagination button { min-height: 30px; padding: 4px 8px; color: var(--report-text-secondary); border-color: var(--report-border); background: var(--report-panel-secondary); }
.report-pagination button.active { color: #effff6; border-color: #3c7b62; background: #21523f; }
.page-reports .report-table-wrap { max-height: none; overflow-x: auto; overflow-y: visible; border-color: var(--report-border); background: #111b18; }
.report-table-wrap.compact .report-table td { padding-top: 6px; padding-bottom: 6px; }
.report-table-empty { color: var(--report-text-muted); }
.page-reports .report-pagination { color: var(--report-text-secondary); }
.report-pagination-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.report-page-gap { padding: 0 2px; color: var(--report-text-muted); }
.report-page-jump { display: flex; align-items: center; gap: 4px; }
.report-page-jump input { width: 58px; min-height: 30px; padding: 4px 6px; }
.report-detail-panel.is-fullscreen { position: fixed; inset: 14px; z-index: 80; display: flex; flex-direction: column; max-width: none; margin: 0; overflow: auto; }
.report-detail-panel.is-fullscreen .report-table-wrap { flex: 1; overflow: auto; }
.report-column-settings { display: grid; gap: 8px; }
.report-column-settings label { display: flex; align-items: center; gap: 8px; color: var(--text); }

@media (min-width: 1700px) {
  .page-reports .report-metrics-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .page-reports .report-metric { min-width: 0; }
  .page-reports .report-metric strong { font-size: 25px; }
}

@media (max-width: 1440px) {
  .page-reports .report-metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  .report-status-analysis { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .page-reports .report-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-applied-conditions button { margin-left: 0; }
  .report-status-summary,
  .report-quality-summary { display: grid; gap: 5px; }
  .report-comparison-grid { grid-template-columns: 1fr; }
  .report-pagination-actions { width: 100%; }
  .report-detail-panel.is-fullscreen { inset: 6px; }
}

.page-digital-twin .panel > .app-patrol-filters {
  margin-bottom: 14px;
  box-shadow: none;
}

.page-permissions-admin .archive-tabs button.primary,
.page-permissions-admin .archive-tabs button.active {
  border-color: #bfdccd;
  color: var(--green-dark);
  background: var(--green-light);
}

.page-detection .detection-page {
  --detect-teal: var(--green);
  --detect-cyan: var(--blue);
  --detect-amber: var(--gold);
  --detect-red: var(--red);
  display: grid;
  gap: 14px;
}

.page-detection .detection-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 18px 20px;
  margin: 0;
  color: var(--text);
  border-color: var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.page-detection .detection-command::after,
.page-detection .detection-ai-card::before,
.page-detection .detection-next-card::before,
.page-detection .special-detection-panel::before {
  display: none;
}

.page-detection .detection-command h1 {
  margin: 2px 0 6px;
  color: var(--text);
  font-size: 24px;
  letter-spacing: 0;
}

.page-detection .detection-command p {
  color: var(--muted);
}

.page-detection .detection-command .eyebrow {
  color: var(--green);
  letter-spacing: 0;
}

.page-detection .detection-command-actions {
  min-width: 0;
  justify-content: flex-end;
}

.page-detection .detection-command-actions button {
  color: var(--text);
  border-color: var(--line);
  background: #fff;
  backdrop-filter: none;
}

.page-detection .detection-command-actions button.primary {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.page-detection .special-detection-tabs {
  gap: 4px;
  padding: 5px;
  margin: 0;
  border-color: var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
}

.page-detection .special-detection-tabs button {
  min-height: 34px;
  border-radius: 5px;
}

.page-detection .special-detection-tabs button.primary,
.page-detection .special-detection-tabs button.active {
  color: var(--green-dark);
  border-color: #bfdccd;
  background: var(--green-light);
}

.page-detection .detection-intel-grid,
.page-detection .special-platform-grid {
  gap: 12px;
  margin: 0;
}

.page-detection .detection-ai-card,
.page-detection .detection-next-card,
.page-detection .detection-radar,
.page-detection .detection-priority-strip,
.page-detection .special-detection-panel {
  padding: 16px;
  border-color: var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.page-detection .detection-ai-score {
  align-items: baseline;
  justify-content: flex-start;
}

.page-detection .detection-ai-score strong {
  color: var(--text);
  font-size: 30px;
}

.page-detection .detection-progress {
  background: #eaf0ed;
}

.page-detection .detection-progress i {
  background: var(--green);
}

.page-detection .special-record-card,
.page-detection .detection-priority-card,
.page-detection .picus-section-card {
  padding: 14px;
  border-color: var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.page-detection .special-record-card:hover,
.page-detection .detection-priority-card:hover,
.page-detection .picus-section-card:hover {
  border-color: #b9d8ca;
  box-shadow: var(--shadow);
  transform: none;
}

.page-detection .detection-priority-card.danger,
.page-detection .special-record-card.danger {
  border-color: #efc6c2;
  background: #fffafa;
}

.page-detection .detection-priority-card.warning,
.page-detection .special-record-card.warning {
  border-color: #f0d5a7;
  background: #fffdf8;
}

.page-detection .detection-ledger {
  margin: 0 !important;
}

@media (max-width: 1100px) {
  .page-archive .app-patrol-filters,
  .page-archive-manage .app-patrol-filters,
  .page-patrol .app-patrol-filters,
  .page-digital-twin .app-patrol-filters,
  .page-detection .app-patrol-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-detection .detection-command,
  .page-detection .detection-intel-grid,
  .page-detection .special-platform-grid {
    grid-template-columns: 1fr;
  }

  .page-detection .detection-command-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .page-app-data .app-data-tabs,
  .page-permissions-admin .archive-tabs,
  .page-detection .special-detection-tabs {
    position: static;
  }

  .page-archive .app-patrol-filters,
  .page-archive-manage .app-patrol-filters,
  .page-patrol .app-patrol-filters,
  .page-digital-twin .app-patrol-filters,
  .page-detection .app-patrol-filters {
    grid-template-columns: 1fr;
  }

  .page-detection .detection-command {
    padding: 15px;
  }

  .page-detection .detection-command-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .page-detection .detection-command-actions button:last-child {
    grid-column: 1 / -1;
  }
}

/* ===== 古树档案工作台：概览、分层筛选与高密度列表 ===== */
.page-archive .archive-workbench {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.page-archive .archive-page-head {
  align-items: flex-start;
  gap: 18px;
  margin: 0;
  padding: 0 0 14px;
}

.page-archive .archive-page-head h1 {
  margin-bottom: 4px;
}

.page-archive .archive-page-actions {
  gap: 8px;
}

.page-archive .archive-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.page-archive .archive-overview-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.page-archive .archive-overview-label,
.page-archive .archive-overview-note {
  color: var(--muted);
  font-size: 12px;
}

.page-archive .archive-overview-value {
  color: var(--green-dark);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.page-archive .archive-filter-panel {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.page-archive .archive-filter-primary {
  display: grid;
  grid-template-columns: minmax(260px, 1.75fr) auto minmax(136px, .8fr) minmax(136px, .8fr) auto;
  gap: 9px;
  align-items: end;
}

.page-archive .archive-filter-search {
  width: 100%;
}

.page-archive .archive-filter-select {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.page-archive .archive-filter-select select,
.page-archive .archive-filter-advanced input {
  width: 100%;
  min-width: 0;
}

.page-archive .archive-filter-primary > button,
.page-archive .archive-filter-footer button {
  min-height: 38px;
}

.page-archive .archive-filter-toggle.active,
.page-archive .archive-quick-filter.active {
  border-color: rgba(13, 107, 99, 0.52);
  background: var(--green-light);
  color: var(--green-dark);
  box-shadow: none;
}

.page-archive .archive-quick-filters,
.page-archive .archive-filter-footer,
.page-archive .archive-list-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.page-archive .archive-quick-filters {
  padding-top: 10px;
  border-top: 1px solid #edf1ee;
}

.page-archive .archive-quick-filter {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
  font-size: 12px;
}

.page-archive .archive-filter-advanced {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 0 0;
  border-top: 1px solid #edf1ee;
}

.page-archive .archive-filter-advanced > input {
  min-height: 38px;
}

.page-archive .archive-filter-footer {
  justify-content: flex-end;
}

.page-archive .archive-list-region {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.page-archive .archive-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1ee;
}

.page-archive .archive-list-head h2 {
  margin: 0 0 4px;
  color: var(--green-dark);
  font-size: 16px;
}

.page-archive .archive-list-head p {
  margin: 0;
}

.page-archive .archive-list-tools {
  justify-content: flex-end;
}

.page-archive .archive-list-region > .pagination {
  order: 3;
  margin: 0;
  padding-top: 4px;
}

.page-archive .archive-list-region .table-wrap {
  order: 2;
  margin: 0;
  border: 1px solid #e4ebe7;
  border-radius: 6px;
  background: #fff;
}

.page-archive .archive-list-region table {
  min-width: 1020px;
}

.page-archive .archive-list-region th {
  padding-top: 11px;
  padding-bottom: 11px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.page-archive .archive-list-region td {
  padding-top: 12px;
  padding-bottom: 12px;
  vertical-align: middle;
}

.page-archive .archive-list-region tbody tr:hover {
  background: #fbfdfc;
}

.page-archive .archive-name {
  display: grid;
  gap: 3px;
}

.page-archive .archive-name strong {
  color: var(--green-dark) !important;
  font-variant-numeric: tabular-nums;
}

.page-archive .archive-status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.page-archive .archive-status-tag.is-success {
  border-color: rgba(13, 107, 99, 0.14);
  background: #e8f5ee;
  color: #1e7351;
}

.page-archive .archive-status-tag.is-warning {
  border-color: rgba(190, 120, 27, 0.16);
  background: #fff4df;
  color: #9c6817;
}

.page-archive .archive-status-tag.is-danger {
  border-color: rgba(194, 75, 66, 0.17);
  background: #fdebea;
  color: #a7423d;
}

.page-archive .archive-list-region .row-actions {
  flex-wrap: nowrap;
}

.page-archive .archive-list-region .row-actions button {
  min-height: 30px;
  padding: 0 9px;
  box-shadow: none;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .page-archive .archive-filter-primary {
    grid-template-columns: minmax(220px, 1.5fr) auto repeat(2, minmax(130px, .9fr));
  }

  .page-archive .archive-filter-primary > .archive-filter-toggle {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .page-archive .archive-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .page-archive .archive-page-head,
  .page-archive .archive-list-head {
    flex-direction: column;
  }

  .page-archive .archive-page-actions,
  .page-archive .archive-list-tools {
    justify-content: flex-start;
  }

  .page-archive .archive-filter-primary,
  .page-archive .archive-filter-advanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-archive .archive-filter-primary > .archive-filter-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .page-archive .archive-overview,
  .page-archive .archive-filter-primary,
  .page-archive .archive-filter-advanced {
    grid-template-columns: 1fr;
  }

  .page-archive .archive-filter-primary > .archive-filter-search,
  .page-archive .archive-filter-primary > .archive-filter-toggle {
    grid-column: auto;
  }

  .page-archive .archive-page-actions,
  .page-archive .archive-list-tools,
  .page-archive .archive-filter-footer {
    width: 100%;
    justify-content: stretch;
  }

  .page-archive .archive-page-actions button,
  .page-archive .archive-list-tools button,
  .page-archive .archive-filter-footer button {
    flex: 1 1 130px;
  }

  .page-archive .archive-list-region {
    padding: 12px;
  }
}

/* ===== 拍照路线工作台：路线地图优先、时间轴联动与紧凑筛选 ===== */
.page-photo-routes .photo-route-page {
  gap: 14px;
}

.page-photo-routes .photo-route-page-head {
  align-items: flex-start;
  gap: 18px;
  margin: 0;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.page-photo-routes .photo-route-page-head h1 {
  margin-bottom: 4px;
}

.page-photo-routes .photo-route-page-actions {
  justify-content: flex-end;
  gap: 8px;
}

.page-photo-routes .photo-route-filter-panel {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.page-photo-routes .photo-route-filter-panel label {
  font-weight: 600;
}

.page-photo-routes .photo-route-filter-panel button {
  min-height: 38px;
  align-self: end;
}

.page-photo-routes .photo-route-calculation-note {
  margin: 0;
  padding: 10px 12px;
  border-color: rgba(13, 107, 99, 0.14);
  border-radius: 6px;
  background: #f4faf6;
  color: var(--muted);
  box-shadow: none;
}

.page-photo-routes .photo-route-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.page-photo-routes .photo-route-overview-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.page-photo-routes .photo-route-overview-label,
.page-photo-routes .photo-route-overview-note {
  color: var(--muted);
  font-size: 12px;
}

.page-photo-routes .photo-route-overview-value {
  color: var(--green-dark);
  font-size: 23px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.page-photo-routes .photo-route-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, .8fr);
  gap: 14px;
}

.page-photo-routes .photo-route-map-panel,
.page-photo-routes .photo-route-timeline-panel,
.page-photo-routes .photo-route-list-panel {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.page-photo-routes .photo-route-map-head,
.page-photo-routes .photo-route-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid #edf1ee;
}

.page-photo-routes .photo-route-map-head h2,
.page-photo-routes .photo-route-list-head h2,
.page-photo-routes .photo-route-timeline-panel > h2 {
  margin: 0 0 4px;
  color: var(--green-dark);
  font-size: 16px;
}

.page-photo-routes .photo-route-map-head p,
.page-photo-routes .photo-route-list-head p {
  margin: 0;
}

.page-photo-routes .photo-route-map-head .photo-route-legend {
  justify-content: flex-end;
  margin: 3px 0 0;
}

.page-photo-routes .photo-route-map {
  min-height: 510px;
  margin-top: 12px;
  border-color: #dfe8e3;
  border-radius: 6px;
  background: #f4f8f5;
  box-shadow: none;
}

.page-photo-routes .photo-route-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.page-photo-routes .photo-route-summary span {
  min-width: 0;
  padding: 8px 10px;
  border-color: #e3ebe6;
  border-radius: 5px;
  background: #fbfdfc;
  color: var(--muted);
  font-weight: 600;
}

.page-photo-routes .photo-route-side {
  max-height: 684px;
}

.page-photo-routes .photo-route-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.page-photo-routes .photo-route-tabs button {
  flex: 1 1 0;
  min-width: 0;
  border-color: transparent;
  background: transparent;
  white-space: normal;
}

.page-photo-routes .photo-route-tabs button.active {
  color: var(--green-dark);
  background: var(--green-light);
}

.page-photo-routes .photo-route-exceptions,
.page-photo-routes .photo-route-detail-panel {
  min-width: 0;
}

.page-photo-routes .photo-route-exception-summary,
.page-photo-routes .photo-route-empty-state,
.page-photo-routes .photo-route-empty {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7faf8;
  color: var(--muted);
}

.page-photo-routes .photo-route-empty-state {
  justify-items: center;
  padding: 36px 18px;
  text-align: center;
}

.page-photo-routes .invalid-route-photo {
  grid-template-columns: minmax(130px, .8fr) minmax(190px, 1.2fr) minmax(180px, 1fr) auto;
  border-radius: 6px;
}

.page-photo-routes .photo-route-detail-panel > .table-wrap {
  margin: 0;
}

.page-photo-routes .photo-route-timeline-panel > h2 {
  padding-bottom: 11px;
  border-bottom: 1px solid #edf1ee;
}

.page-photo-routes .photo-route-timeline-header {
  padding: 2px 0 10px;
}

.page-photo-routes .photo-route-avatar,
.page-photo-routes .timeline-marker.start {
  background: var(--green);
}

.page-photo-routes .timeline-marker {
  position: static;
  box-shadow: none;
}

.page-photo-routes .timeline-node-main,
.page-photo-routes .timeline-segment-card {
  border-radius: 6px;
}

.page-photo-routes .timeline-segment-card {
  background: #fbfdfc;
}

.page-photo-routes .photo-route-timeline-item.selected .timeline-node-main,
.page-photo-routes .photo-route-timeline-item.selected .timeline-segment-card {
  background: #eaf6ef;
  box-shadow: inset 0 0 0 1px rgba(13, 107, 99, 0.16);
}

.page-photo-routes .photo-route-list-panel {
  display: grid;
  gap: 12px;
}

.page-photo-routes .photo-route-list-panel > .table-wrap {
  margin: 0;
  border: 1px solid #e4ebe7;
  border-radius: 6px;
}

.page-photo-routes .photo-route-list-panel table {
  min-width: 900px;
}

.page-photo-routes .photo-route-list-panel th {
  padding-top: 11px;
  padding-bottom: 11px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 12px;
}

.page-photo-routes .photo-route-list-panel td {
  padding-top: 11px;
  padding-bottom: 11px;
  vertical-align: middle;
}

.page-photo-routes .photo-route-list-panel .pagination {
  margin: 0;
}

@media (max-width: 1100px) {
  .page-photo-routes .photo-route-layout {
    grid-template-columns: 1fr;
  }

  .page-photo-routes .photo-route-side {
    max-height: none;
  }

  .page-photo-routes .photo-route-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-photo-routes .photo-route-page-head,
  .page-photo-routes .photo-route-map-head {
    flex-direction: column;
  }

  .page-photo-routes .photo-route-page-actions,
  .page-photo-routes .photo-route-map-head .photo-route-legend {
    justify-content: flex-start;
  }

  .page-photo-routes .photo-route-filter-panel,
  .page-photo-routes .photo-route-overview,
  .page-photo-routes .photo-route-summary {
    grid-template-columns: 1fr;
  }

  .page-photo-routes .photo-route-page-actions {
    width: 100%;
  }

  .page-photo-routes .photo-route-page-actions button {
    flex: 1 1 128px;
  }

  .page-photo-routes .photo-route-map {
    min-height: 360px;
  }

  .page-photo-routes .invalid-route-photo {
    grid-template-columns: 1fr;
  }
}

/* ===== V2.1 unified government GIS HUD shell ===== */
.shell {
  --hud-bg: #020b14;
  --hud-bg-raised: #061827;
  --hud-surface: rgba(5, 25, 42, 0.94);
  --hud-surface-soft: rgba(8, 33, 53, 0.78);
  --hud-line: rgba(37, 198, 239, 0.28);
  --hud-line-strong: rgba(36, 211, 255, 0.58);
  --hud-cyan: #25d4ff;
  --hud-blue: #2d8cff;
  --hud-green: #4fd69c;
  --hud-amber: #f4b744;
  --hud-red: #f3695f;
  --hud-text: #d9f3ff;
  --hud-muted: #7fa3b6;
  --bg: var(--hud-bg);
  --surface: var(--hud-surface);
  --surface-2: var(--hud-surface-soft);
  --text: var(--hud-text);
  --muted: var(--hud-muted);
  --line: var(--hud-line);
  --green: var(--hud-cyan);
  --green-dark: #58dcff;
  --green-light: rgba(37, 212, 255, 0.11);
  --red: var(--hud-red);
  --gold: var(--hud-amber);
  --sidebar-w: 168px;
  --topbar-h: 72px;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  grid-template-rows: var(--topbar-h) minmax(0, 1fr);
  color: var(--hud-text);
  background:
    linear-gradient(rgba(31, 148, 190, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 148, 190, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 52% 28%, rgba(0, 111, 169, 0.12), transparent 36%),
    linear-gradient(150deg, #020b14, #04121f 46%, #020a12);
  background-size: 26px 26px, 26px 26px, auto, auto;
  transition: grid-template-columns 220ms ease;
}

.shell.sidebar-collapsed {
  --sidebar-w: 62px;
}

.tech-icon {
  display: block;
  flex: 0 0 auto;
  overflow: visible;
}

.shell button,
.shell input,
.shell select,
.shell textarea,
.shell a,
.shell strong,
.shell span,
.shell h1,
.shell h2,
.shell h3,
.shell h4,
.shell p {
  letter-spacing: 0;
}

.sidebar {
  position: relative;
  z-index: 50;
  display: flex;
  grid-column: 1;
  grid-row: 1 / 3;
  width: auto;
  min-width: 0;
  color: var(--hud-text);
  border-right: 1px solid var(--hud-line);
  background:
    linear-gradient(180deg, rgba(8, 34, 57, 0.98), rgba(2, 13, 24, 0.98)),
    #041523;
  box-shadow: inset -12px 0 32px rgba(0, 136, 194, 0.035);
  transition: width 220ms ease, transform 220ms ease;
}

.sidebar::before {
  display: block;
  width: 1px;
  background: linear-gradient(transparent, rgba(37, 212, 255, 0.72), transparent);
}

.sidebar-logo {
  min-height: var(--topbar-h);
  gap: 9px;
  padding: 11px 12px;
  overflow: hidden;
  border-bottom: 1px solid var(--hud-line);
  background: rgba(5, 24, 40, 0.72);
}

.sidebar-logo .logo-icon {
  width: 38px;
  min-width: 38px;
  height: 38px;
  color: var(--hud-cyan);
  border: 1px solid rgba(37, 212, 255, 0.54);
  border-radius: 5px;
  background: rgba(8, 64, 83, 0.72);
  box-shadow: inset 0 0 16px rgba(37, 212, 255, 0.12);
}

.sidebar-logo strong {
  color: #e5f8ff;
  font-size: 13px;
  white-space: nowrap;
}

.sidebar-logo span {
  color: #71a4b9;
  font-size: 10px;
  opacity: 1;
  white-space: nowrap;
}

.sidebar-brand-copy,
.sidebar .nav-label,
.sidebar-nav-group-label,
.sidebar-recent,
.sidebar-footer {
  transition: opacity 140ms ease, visibility 140ms ease;
}

.sidebar-nav {
  gap: 10px;
  padding: 11px 7px 15px;
  overflow: hidden auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 212, 255, 0.24) transparent;
}

.sidebar-nav-group-label {
  padding: 0 9px 3px;
  color: #54798b;
  font-size: 10px;
}

.sidebar .nav-item {
  min-height: 38px;
  gap: 9px;
  padding: 0 10px;
  color: #9ab7c5;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
}

.sidebar .nav-item:hover:not(:disabled) {
  color: #dbf7ff;
  border-color: rgba(37, 212, 255, 0.16);
  background: rgba(20, 111, 143, 0.18);
}

.sidebar .nav-item.active {
  padding-left: 10px;
  color: var(--hud-cyan);
  border-color: rgba(37, 212, 255, 0.25);
  border-left-color: var(--hud-cyan);
  background: linear-gradient(90deg, rgba(0, 157, 215, 0.24), rgba(5, 61, 86, 0.11));
  box-shadow: inset 0 0 18px rgba(37, 212, 255, 0.06);
}

.sidebar .nav-icon {
  width: 20px;
  min-width: 20px;
  color: #79a7ba;
  font-size: 0;
}

.sidebar .nav-item.active .nav-icon {
  color: var(--hud-cyan);
}

.sidebar .nav-count {
  color: #fff;
  background: #bc4d4d;
}

.sidebar-recent {
  border-top-color: var(--hud-line);
}

.sidebar-recent-label,
.sidebar-recent-item,
.sidebar-footer-copy {
  color: var(--hud-muted);
}

.sidebar-recent-item {
  background: transparent;
}

.sidebar-recent-item:hover:not(:disabled) {
  color: var(--hud-cyan);
  background: rgba(37, 212, 255, 0.08);
}

.sidebar-footer {
  border-top-color: var(--hud-line);
}

.sidebar-footer-count {
  color: #cdebf7;
}

.sidebar-collapsed .sidebar-logo {
  justify-content: center;
  padding-inline: 8px;
}

.sidebar-collapsed .sidebar-brand-copy,
.sidebar-collapsed .sidebar .nav-label,
.sidebar-collapsed .sidebar-nav-group-label,
.sidebar-collapsed .sidebar-recent,
.sidebar-collapsed .sidebar-footer,
.sidebar-collapsed .sidebar .nav-count {
  display: none;
}

.sidebar-collapsed .sidebar-nav {
  gap: 5px;
  padding-inline: 8px;
}

.sidebar-collapsed .sidebar-nav-group {
  gap: 5px;
}

.sidebar-collapsed .sidebar .nav-item {
  justify-content: center;
  padding: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  display: grid;
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: max-content minmax(292px, auto) minmax(180px, 1fr) max-content;
  min-width: 0;
  min-height: var(--topbar-h);
  gap: 12px;
  padding: 0 14px;
  color: var(--hud-text);
  border-bottom: 1px solid var(--hud-line);
  background: linear-gradient(180deg, rgba(3, 18, 31, 0.98), rgba(5, 29, 48, 0.96));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), inset 0 -1px rgba(37, 212, 255, 0.08);
  backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-actions,
.topbar-brand,
.topbar-clock,
.topbar-link,
.auth-btn {
  display: flex;
  align-items: center;
}

.topbar-left {
  min-width: 0;
  gap: 8px;
}

.tech-icon-btn,
.topbar-link,
.topbar-quick-nav button,
.topbar-notification {
  color: #8eb6c7;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}

.tech-icon-btn {
  display: grid;
  width: 36px;
  min-width: 36px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  border-color: rgba(37, 212, 255, 0.24);
  border-radius: 3px;
  background: rgba(17, 78, 103, 0.2);
}

.tech-icon-btn:hover:not(:disabled),
.topbar-link:hover:not(:disabled),
.topbar-quick-nav button:hover:not(:disabled),
.topbar-notification:hover:not(:disabled) {
  color: var(--hud-cyan);
  border-color: rgba(37, 212, 255, 0.32);
  background: rgba(37, 212, 255, 0.08);
}

.topbar-quick-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 2px;
}

.topbar-quick-nav button {
  position: relative;
  min-height: 36px;
  padding: 0 14px;
  color: #a6c0cc;
  border-radius: 2px;
  font-size: 12px;
}

.topbar-quick-nav button.active {
  color: #e7fbff;
  border-color: rgba(37, 212, 255, 0.32);
  background: linear-gradient(135deg, rgba(9, 86, 121, 0.7), rgba(8, 38, 63, 0.78));
  box-shadow: inset 0 -2px var(--hud-cyan);
}

.topbar-brand {
  justify-content: center;
  gap: 10px;
  min-width: 330px;
  color: #e7fbff;
}

.topbar-brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--hud-cyan);
  border: 1px solid rgba(37, 212, 255, 0.5);
  border-radius: 50%;
  box-shadow: inset 0 0 18px rgba(37, 212, 255, 0.13), 0 0 12px rgba(37, 212, 255, 0.08);
}

.topbar-brand strong,
.topbar-brand span {
  display: block;
  text-align: center;
}

.topbar-brand strong {
  color: #dff8ff;
  font-size: 21px;
  line-height: 1.05;
}

.topbar-brand span {
  margin-top: 3px;
  color: #4fb9db;
  font-size: 9px;
}

.topbar-search {
  position: relative;
  display: flex;
  width: 100%;
  max-width: none;
  align-items: center;
  color: #6ca4ba;
}

.topbar-search > .tech-icon {
  position: absolute;
  left: 11px;
  z-index: 1;
}

.topbar-search input {
  width: 100%;
  min-height: 34px;
  padding-left: 34px;
  color: #d6edf6;
  border-color: rgba(37, 212, 255, 0.22);
  border-radius: 3px;
  background: rgba(1, 12, 22, 0.72);
}

.topbar-search input::placeholder {
  color: #527385;
}

.topbar-actions {
  min-width: 0;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.topbar-actions .user-info {
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
}

.topbar-link {
  min-height: 32px;
  gap: 5px;
  padding: 0 8px;
  border-radius: 3px;
  font-size: 11px;
  white-space: nowrap;
}

.topbar-clock {
  gap: 5px;
  color: #7fa5b5;
  font-size: 10px;
  white-space: nowrap;
}

.topbar-notification {
  color: #8eb6c7;
}

.topbar-connection {
  min-height: 26px;
  padding: 0 7px;
  color: #8ab7c9;
  border: 1px solid rgba(37, 212, 255, 0.18);
  border-radius: 3px;
  background: rgba(11, 47, 64, 0.48);
}

.topbar-connection.online {
  color: #7fe4b7;
  border-color: rgba(79, 214, 156, 0.22);
  background: rgba(21, 100, 71, 0.18);
}

.topbar .user-info strong {
  color: #d8eff8;
}

.topbar .user-info span {
  color: #6f95a6;
}

.auth-btn {
  min-height: 32px;
  gap: 5px;
  padding: 0 9px;
  color: #9ab9c7;
  border-color: rgba(37, 212, 255, 0.2);
  border-radius: 3px;
  background: rgba(3, 21, 34, 0.7);
}

.layout {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 12px 14px 18px;
  overflow: hidden;
  color: var(--hud-text);
  background: transparent;
}

.workspace-content,
.workspace-content > * {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.shell .panel,
.shell .detail-panel,
.shell .table-wrap,
.shell .mini-card,
.shell .tree-card,
.shell .kpi,
.shell .status-tile,
.shell .dash-card,
.shell .tree-feature-card,
.shell .app-patrol-filters,
.shell .app-patrol-card,
.shell .patrol-dashboard,
.shell .module-ribbon,
.shell .map-tools,
.shell .map-tools.compact {
  color: var(--hud-text);
  border-color: var(--hud-line);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(7, 31, 50, 0.96), rgba(3, 17, 29, 0.94));
  box-shadow: inset 0 0 20px rgba(0, 170, 255, 0.025), 0 5px 18px rgba(0, 0, 0, 0.12);
}

.shell .section-head,
.shell .detail-title,
.shell .panel-head {
  border-bottom-color: rgba(37, 212, 255, 0.13);
}

.shell .section-head h1,
.shell .section-head h2,
.shell .detail-title h2,
.shell .panel-head h2,
.shell .panel h2,
.shell .panel h3,
.shell .panel h4 {
  color: #dff6ff;
}

.shell .muted,
.shell .panel p,
.shell .detail-panel p {
  color: var(--hud-muted);
}

.shell button {
  color: #a7c7d4;
  border-color: rgba(37, 212, 255, 0.22);
  border-radius: 4px;
  background: rgba(7, 34, 52, 0.78);
  box-shadow: none;
}

.shell button:hover:not(:disabled) {
  color: #e0f8ff;
  border-color: rgba(37, 212, 255, 0.48);
  background: rgba(16, 79, 103, 0.56);
}

.shell .primary,
.shell .auth-btn.primary {
  color: #ebfcff;
  border-color: rgba(37, 212, 255, 0.62);
  background: linear-gradient(180deg, #087ba4, #075b82);
}

.shell input,
.shell select,
.shell textarea,
.shell .role-select {
  color: #d6edf6;
  border-color: rgba(37, 212, 255, 0.2);
  border-radius: 4px;
  background: rgba(2, 17, 28, 0.86);
}

.shell input:focus,
.shell select:focus,
.shell textarea:focus {
  border-color: rgba(37, 212, 255, 0.62);
  box-shadow: 0 0 0 2px rgba(37, 212, 255, 0.1);
}

.shell select option {
  color: #d7eef7;
  background: #071d2d;
}

.shell .table-wrap {
  border-color: var(--hud-line);
}

.shell th {
  color: #80bdd2;
  border-bottom-color: rgba(37, 212, 255, 0.2);
  background: rgba(8, 42, 63, 0.9);
}

.shell td {
  color: #b8d5e0;
  border-bottom-color: rgba(37, 212, 255, 0.09);
  background: rgba(3, 18, 30, 0.52);
}

.shell tbody tr:hover td {
  background: rgba(18, 74, 96, 0.42);
}

.shell .tag {
  color: #8cd9ef;
  border-color: rgba(37, 212, 255, 0.24);
  background: rgba(37, 212, 255, 0.08);
}

.shell .app-data-tabs,
.shell .archive-tabs,
.shell .batch-selection-bar,
.shell .app-survey-advanced-filters {
  color: var(--hud-text);
  border-color: var(--hud-line);
  background: rgba(4, 23, 37, 0.9);
}

.shell .modal {
  color: var(--hud-text);
  border-color: var(--hud-line-strong);
  background: #071c2b;
}

.page-footer {
  color: #5f8798;
  border-top-color: rgba(37, 212, 255, 0.12);
}

.page-analytics + .page-footer {
  display: none;
}

.public-showcase-link[hidden] {
  display: none !important;
}

.page-footer > span:last-child {
  display: flex;
  align-items: center;
}

.shell * {
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 212, 255, 0.27) rgba(2, 12, 21, 0.45);
}

.shell *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.shell *::-webkit-scrollbar-thumb {
  border: 2px solid rgba(2, 12, 21, 0.8);
  border-radius: 5px;
  background: rgba(37, 212, 255, 0.25);
}

.shell *::-webkit-scrollbar-track {
  background: rgba(2, 12, 21, 0.45);
}

@media (max-width: 1760px) {
  .topbar {
    grid-template-columns: minmax(245px, 1fr) auto minmax(390px, 1fr);
  }

  .topbar-search,
  .topbar-clock,
  .topbar-link span {
    display: none;
  }

  .topbar-brand {
    min-width: 292px;
  }

  .topbar-brand strong {
    font-size: 18px;
  }
}

@media (max-width: 1180px) {
  .shell {
    --sidebar-w: 154px;
  }

  .topbar {
    grid-template-columns: minmax(190px, 1fr) auto minmax(230px, 1fr);
  }

  .topbar-quick-nav button {
    padding-inline: 9px;
  }

  .topbar .user-info,
  .topbar-connection {
    display: none;
  }
}

@media (max-width: 900px) {
  .shell,
  .shell.sidebar-collapsed {
    --topbar-h: 60px;
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: min(82vw, 270px);
    transform: translateX(-102%);
  }

  .mobile-sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.48);
  }

  .sidebar-collapsed .sidebar-brand-copy,
  .sidebar-collapsed .sidebar .nav-label,
  .sidebar-collapsed .sidebar-nav-group-label,
  .sidebar-collapsed .sidebar-recent,
  .sidebar-collapsed .sidebar-footer,
  .sidebar-collapsed .sidebar .nav-count {
    display: initial;
  }

  .topbar,
  .layout {
    grid-column: 1;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: var(--topbar-h);
    padding-inline: 10px;
  }

  .topbar-quick-nav,
  .topbar-search,
  .topbar-link,
  .topbar-clock,
  .topbar-connection,
  .topbar .user-info {
    display: none;
  }

  .topbar-brand {
    min-width: 0;
  }

  .topbar-brand-icon {
    width: 34px;
    height: 34px;
  }

  .topbar-brand strong {
    font-size: 15px;
  }

  .topbar-brand span {
    display: none;
  }

  .layout {
    padding: 10px;
  }
}

@media (max-width: 560px) {
  .topbar-brand-icon,
  .auth-btn span {
    display: none;
  }

  .topbar-brand strong {
    font-size: 14px;
  }

  .layout {
    overflow: visible;
  }
}

/* ===== V2.1 dashboard information architecture ===== */
.page-analytics {
  --dashboard-bg: #020b14;
  --dashboard-panel: rgba(5, 25, 42, 0.94);
  --dashboard-panel-2: rgba(7, 34, 54, 0.9);
  --dashboard-line: rgba(37, 198, 239, 0.26);
  --dashboard-text: #dff6ff;
  --dashboard-muted: #789daf;
  --dashboard-cyan: #25d4ff;
  --dashboard-green: #4fd69c;
  --dashboard-amber: #f4b744;
  --dashboard-red: #f3695f;
  width: auto;
  min-width: 0;
  max-width: none;
  min-height: calc(100vh - var(--topbar-h));
  margin: -12px -14px -18px;
  padding: 10px;
  overflow: hidden auto;
  color: var(--dashboard-text);
  background:
    linear-gradient(rgba(35, 154, 194, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 154, 194, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 32%, rgba(0, 116, 177, 0.1), transparent 40%),
    #020b14;
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.dashboard-home-v2,
.dashboard-home-v2.dashboard-home {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  gap: 10px;
  align-content: start;
}

.dashboard-home-v2 .tech-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--dashboard-line);
  border-radius: 3px 3px 6px 6px;
  background: linear-gradient(180deg, rgba(6, 30, 49, 0.97), rgba(3, 16, 28, 0.95));
  box-shadow: inset 0 0 20px rgba(0, 170, 255, 0.035), 0 6px 16px rgba(0, 0, 0, 0.15);
}

.dashboard-home-v2 .tech-panel::before,
.dashboard-home-v2 .tech-panel::after {
  position: absolute;
  z-index: 2;
  width: 22px;
  height: 2px;
  content: "";
  pointer-events: none;
  background: rgba(37, 212, 255, 0.72);
}

.dashboard-home-v2 .tech-panel::before {
  top: -1px;
  left: 10px;
}

.dashboard-home-v2 .tech-panel::after {
  right: 10px;
  bottom: -1px;
  opacity: 0.38;
}

.dashboard-home-v2 .dashboard-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(6, minmax(112px, 0.48fr)) auto;
  min-height: 56px;
  gap: 8px;
  padding: 7px 10px;
  align-items: end;
  border: 1px solid rgba(37, 198, 239, 0.24);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(8, 37, 58, 0.95), rgba(4, 22, 36, 0.94));
  box-shadow: inset 0 -1px rgba(37, 212, 255, 0.06);
}

.dashboard-home-v2 .dashboard-filter-title {
  display: grid;
  min-width: 0;
  gap: 1px;
  align-self: center;
}

.dashboard-home-v2 .dashboard-filter-title strong {
  overflow: hidden;
  color: #bad8e4;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-home-v2 .dashboard-filter-bar label {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.dashboard-home-v2 .dashboard-filter-bar label span,
.dashboard-home-v2 .dashboard-filter-title span {
  color: #6f95a6;
  font-size: 10px;
}

.dashboard-home-v2 .dashboard-filter-bar select {
  width: 100%;
  min-height: 32px;
  padding: 0 25px 0 8px;
  overflow: hidden;
  color: #c7e3ed;
  border-color: rgba(37, 212, 255, 0.2);
  border-radius: 3px;
  background-color: rgba(2, 17, 29, 0.88);
  font-size: 11px;
  text-overflow: ellipsis;
}

.dashboard-home-v2 .dashboard-filter-reset {
  min-height: 32px;
  align-self: end;
  padding: 0 12px;
}

.dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(258px, 288px) minmax(620px, 1fr) minmax(322px, 358px);
  min-width: 0;
  gap: 10px;
  align-items: stretch;
  grid-template-rows: minmax(0, 1fr);
}

@media (min-width: 1241px) and (min-height: 850px) {
  .dashboard-workspace {
    height: clamp(640px, calc(100vh - 362px), 1078px);
  }
}

.dashboard-workspace > *,
.dashboard-home-v2 .dashboard-left,
.dashboard-home-v2 .dashboard-center,
.dashboard-home-v2 .dashboard-right {
  min-height: 0;
}

.dashboard-home-v2 .dashboard-column {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.dashboard-home-v2 .dashboard-left {
  grid-template-rows: repeat(3, minmax(136px, 1fr)) minmax(176px, 1.2fr);
}

.dashboard-home-v2 .dashboard-right {
  grid-template-rows: minmax(130px, 0.78fr) minmax(104px, 0.64fr) minmax(156px, 0.95fr) minmax(218px, 1.32fr);
}

.dashboard-center {
  display: grid;
  min-width: 0;
  grid-template-rows: 90px minmax(530px, 1fr);
  gap: 10px;
}

.dashboard-home-v2 .dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-home-v2 .dashboard-kpi {
  display: flex;
  min-width: 0;
  min-height: 90px;
  gap: 11px;
  padding: 11px 12px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(37, 198, 239, 0.22);
  border-radius: 3px;
  background: linear-gradient(155deg, rgba(7, 43, 66, 0.92), rgba(4, 22, 36, 0.94));
  box-shadow: inset 0 0 16px rgba(0, 170, 255, 0.025);
}

.dashboard-home-v2 .dashboard-kpi::before {
  top: 10px;
  bottom: 10px;
  height: auto;
  width: 2px;
}

.dashboard-kpi-icon {
  display: grid !important;
  width: 42px;
  min-width: 42px;
  height: 42px;
  place-items: center;
  color: var(--dashboard-cyan) !important;
  border: 1px solid rgba(37, 212, 255, 0.34);
  border-radius: 50%;
  background: rgba(37, 212, 255, 0.07);
}

.dashboard-kpi.green .dashboard-kpi-icon { color: var(--dashboard-green) !important; border-color: rgba(79, 214, 156, 0.32); background: rgba(79, 214, 156, 0.07); }
.dashboard-kpi.amber .dashboard-kpi-icon { color: var(--dashboard-amber) !important; border-color: rgba(244, 183, 68, 0.34); background: rgba(244, 183, 68, 0.07); }
.dashboard-kpi.blue .dashboard-kpi-icon { color: #6c9cff !important; border-color: rgba(108, 156, 255, 0.34); background: rgba(108, 156, 255, 0.07); }

.dashboard-home-v2 .dashboard-kpi > div {
  min-width: 0;
}

.dashboard-home-v2 .dashboard-kpi > div > span,
.dashboard-home-v2 .dashboard-kpi small {
  overflow: hidden;
  color: #789daf;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-home-v2 .dashboard-kpi p {
  display: flex;
  margin: 3px 0 1px;
  align-items: baseline;
  gap: 4px;
}

.dashboard-home-v2 .dashboard-kpi strong {
  display: inline;
  margin: 0;
  color: #e8fbff;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.dashboard-home-v2 .dashboard-kpi em {
  color: #77a4b6;
  font-size: 10px;
  font-style: normal;
}

.dashboard-home-v2 .dashboard-panel {
  display: flex;
  min-height: 0;
  padding: 9px 10px;
  flex-direction: column;
}

.dashboard-home-v2 .dashboard-panel-head {
  display: flex;
  min-height: 26px;
  gap: 8px;
  padding: 0 0 7px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(37, 198, 239, 0.13);
}

.dashboard-home-v2 .dashboard-panel-head h2 {
  margin: 0;
  color: #d9f3ff;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-home-v2 .dashboard-panel-head > span,
.dashboard-home-v2 .dashboard-panel-head p {
  margin: 0;
  color: #6f95a6;
  font-size: 9px;
}

.dashboard-chart {
  width: 100%;
  min-width: 0;
  min-height: 100px;
  flex: 1;
}

.dashboard-compact-chart .dashboard-chart {
  min-height: 104px;
}

.dashboard-home-v2 .dashboard-empty {
  display: grid;
  min-height: 76px;
  margin: 0;
  place-items: center;
  color: #658a9b;
  font-size: 11px;
  text-align: center;
}

.dashboard-progress-panel {
  display: grid;
  min-height: 0;
  padding: 10px 3px 2px;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  flex: 1;
}

.dashboard-progress-ring {
  --progress: 0%;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--dashboard-cyan) 0 var(--progress), rgba(66, 118, 139, 0.2) var(--progress) 100%);
  box-shadow: inset 0 0 0 9px #061b2b;
}

.dashboard-progress-ring strong,
.dashboard-progress-ring span {
  display: block;
  text-align: center;
}

.dashboard-progress-ring strong {
  color: #e7faff;
  font-size: 19px;
}

.dashboard-progress-ring span {
  color: #6f95a6;
  font-size: 9px;
}

.dashboard-progress-panel dl,
.dashboard-selected-tree dl,
.dashboard-map-popup dl {
  margin: 0;
}

.dashboard-progress-panel dl div {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(37, 198, 239, 0.08);
}

.dashboard-progress-panel dt,
.dashboard-progress-panel dd {
  color: #83a4b3;
  font-size: 10px;
}

.dashboard-progress-panel dd {
  margin: 0;
  color: #c9e5ef;
  font-variant-numeric: tabular-nums;
}

.dashboard-progress-panel .danger dt,
.dashboard-progress-panel .danger dd {
  color: var(--dashboard-red);
}

.dashboard-home-v2 .dashboard-map-panel {
  display: grid;
  min-width: 0;
  min-height: 530px;
  padding: 8px;
  grid-template-rows: auto minmax(455px, 1fr) auto;
  gap: 6px;
  overflow: visible;
}

.dashboard-home-v2 .dashboard-map-panel::before {
  width: 54px;
}

.dashboard-map-head {
  padding: 0 2px 6px !important;
}

.dashboard-map-head > div:first-child {
  min-width: 0;
}

.dashboard-map-actions {
  display: flex;
  gap: 3px;
}

.dashboard-map-actions button {
  min-height: 27px;
  padding: 0 8px;
  color: #78a5b7;
  border-color: rgba(37, 212, 255, 0.15);
  font-size: 9px;
}

.dashboard-map-actions button.active {
  color: #dff8ff;
  border-color: rgba(37, 212, 255, 0.52);
  background: rgba(13, 109, 144, 0.48);
}

.dashboard-map-surface.leaflet-map,
.dashboard-map-surface.fake-map,
.dashboard-map-surface .leaflet-container {
  width: 100%;
  min-height: 455px !important;
  height: 100%;
  border: 1px solid rgba(37, 198, 239, 0.2);
  border-radius: 2px;
  background-color: #dce7e4;
  background-image:
    linear-gradient(rgba(74, 117, 109, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 117, 109, 0.1) 1px, transparent 1px);
  background-size: 32px 32px;
}

.dashboard-map-panel:not(.satellite-mode) .leaflet-tile-pane {
  filter: brightness(0.82) saturate(0.9) hue-rotate(153deg) contrast(1.08);
}

.dashboard-map-panel .leaflet-tile-pane {
  transition: filter 180ms ease;
}

.leaflet-map[data-basemap-status="loading"]::after,
.leaflet-map[data-basemap-status="error"]::after {
  content: attr(data-basemap-message);
  position: absolute;
  z-index: 520;
  top: 12px;
  left: 50%;
  max-width: calc(100% - 96px);
  padding: 7px 12px;
  transform: translateX(-50%);
  border: 1px solid rgba(27, 113, 122, 0.28);
  border-radius: 5px;
  background: rgba(244, 250, 248, 0.94);
  box-shadow: 0 4px 14px rgba(8, 37, 49, 0.18);
  color: #164c53;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}

.leaflet-map[data-basemap-status="error"]::after {
  border-color: rgba(190, 93, 33, 0.35);
  background: rgba(255, 247, 237, 0.96);
  color: #8a3f13;
}

.dashboard-map-panel .leaflet-control-zoom a {
  color: #a8d5e5;
  border-color: rgba(37, 212, 255, 0.22);
  background: rgba(3, 24, 39, 0.9);
}

.dashboard-map-footer {
  display: flex;
  min-width: 0;
  padding: 1px 2px 0;
  justify-content: space-between;
  gap: 8px;
  color: #648a9b;
  font-size: 9px;
}

.dashboard-map-footer span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-map-legend {
  position: absolute;
  z-index: 510;
  right: 50%;
  bottom: 31px;
  display: flex;
  padding: 3px;
  transform: translateX(50%);
  gap: 2px;
  border: 1px solid rgba(37, 212, 255, 0.24);
  border-radius: 3px;
  background: rgba(3, 20, 33, 0.9);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.28);
}

.dashboard-map-legend button {
  display: flex;
  min-height: 25px;
  padding: 0 7px;
  align-items: center;
  gap: 4px;
  color: #8eb0bf;
  border: 0;
  background: transparent;
  font-size: 9px;
}

.dashboard-map-legend button.active {
  color: #e2f9ff;
  background: rgba(37, 212, 255, 0.12);
}

.dashboard-map-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8399a3;
  box-shadow: 0 0 6px currentColor;
}

.dashboard-map-legend .health-正常 { color: #4fd69c; background: #4fd69c; }
.dashboard-map-legend .health-衰弱 { color: #f4b744; background: #f4b744; }
.dashboard-map-legend .health-濒危 { color: #f3695f; background: #f3695f; }
.dashboard-map-legend .health-未知 { color: #8399a3; background: #8399a3; }

.dashboard-marker-shell,
.dashboard-town-label-shell {
  border: 0 !important;
  background: transparent !important;
}

.dashboard-tree-marker {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #8399a3;
  border: 1px solid currentColor;
  border-radius: 50% 50% 50% 6px;
  background: rgba(6, 29, 42, 0.94);
  box-shadow: 0 0 9px currentColor;
  transform: rotate(-45deg);
}

.dashboard-tree-marker svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(45deg);
}

.dashboard-tree-marker.health-正常 { color: #4fd69c; }
.dashboard-tree-marker.health-衰弱 { color: #f4b744; }
.dashboard-tree-marker.health-濒危 { color: #f3695f; }
.dashboard-tree-marker.health-未知 { color: #8399a3; }

.dashboard-tree-marker.selected {
  z-index: 3;
  outline: 4px solid rgba(37, 212, 255, 0.25);
  color: #e8fbff;
  transform: rotate(-45deg) scale(1.18);
}

.dashboard-tree-cluster {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #e4f9ff;
  border: 1px solid rgba(37, 212, 255, 0.72);
  border-radius: 50%;
  background: rgba(5, 57, 81, 0.9);
  box-shadow: 0 0 0 5px rgba(37, 212, 255, 0.11), 0 0 14px rgba(37, 212, 255, 0.42);
  font-size: 10px;
  font-weight: 700;
}

.dashboard-town-label-shell span {
  display: block;
  width: 82px;
  overflow: hidden;
  color: #bfefff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px #00101b, 0 0 7px #0b94c3;
  white-space: nowrap;
}

.dashboard-leaflet-popup .leaflet-popup-content-wrapper,
.dashboard-leaflet-popup .leaflet-popup-tip {
  color: #d9f3ff;
  border: 1px solid rgba(37, 212, 255, 0.28);
  border-radius: 4px;
  background: rgba(4, 24, 38, 0.97);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.dashboard-leaflet-popup .leaflet-popup-content {
  margin: 10px;
  color: #d9f3ff;
}

.dashboard-map-popup {
  display: grid;
  min-width: 210px;
  gap: 6px;
}

.dashboard-map-popup > strong {
  color: #e6faff;
  font-size: 13px;
}

.dashboard-map-popup-photo {
  width: 100%;
  height: 92px;
  object-fit: cover;
  border-radius: 3px;
}

.dashboard-map-popup dl div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 5px;
  font-size: 10px;
}

.dashboard-map-popup dt { color: #6f95a6; }
.dashboard-map-popup dd { margin: 0; color: #bcd9e4; }
.dashboard-map-popup button { min-height: 28px; }

.dashboard-list,
.dashboard-recent-list {
  min-height: 0;
  overflow: hidden;
}

.dashboard-home-v2 .dashboard-alert-row {
  min-height: 31px;
  padding: 4px 2px;
}

.dashboard-home-v2 .dashboard-alert-row strong,
.dashboard-home-v2 .dashboard-alert-row small {
  max-width: 100%;
  font-size: 9px;
}

.dashboard-home-v2 .dashboard-alert-row small {
  margin-top: 1px;
  color: #7398a8;
}

.dashboard-review-grid {
  display: grid;
  padding-top: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-review-grid button {
  display: grid;
  min-height: 57px;
  padding: 6px 8px;
  align-content: center;
  text-align: left;
}

.dashboard-review-grid span {
  overflow: hidden;
  color: #7ea3b3;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-review-grid strong {
  color: var(--dashboard-cyan);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.dashboard-recent-list button {
  display: grid;
  width: 100%;
  min-height: 24px;
  padding: 2px 1px;
  grid-template-columns: 36px minmax(92px, 1fr) minmax(55px, 0.6fr) 42px;
  gap: 5px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid rgba(37, 198, 239, 0.08);
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.dashboard-recent-list time,
.dashboard-recent-list strong,
.dashboard-recent-list span,
.dashboard-recent-list small {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-recent-list time,
.dashboard-recent-list span,
.dashboard-recent-list small { color: #6f95a6; }
.dashboard-recent-list strong { color: #bcdce8; }

.dashboard-selected-empty {
  display: grid;
  min-height: 150px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #567c8e;
  text-align: center;
}

.dashboard-selected-empty p {
  margin: 0;
  color: #6f95a6;
  font-size: 10px;
}

.dashboard-selected-tree {
  display: grid;
  min-height: 0;
  padding-top: 8px;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: 118px auto;
  gap: 7px 9px;
}

.dashboard-tree-photo {
  width: 96px;
  height: 118px;
  object-fit: cover;
  border: 1px solid rgba(37, 212, 255, 0.18);
  border-radius: 3px;
}

.dashboard-tree-photo-empty {
  display: grid;
  place-items: center;
  color: #5e8798;
  background: rgba(14, 58, 76, 0.34);
}

.dashboard-selected-tree dl {
  min-width: 0;
  overflow: hidden;
}

.dashboard-selected-tree dl div {
  display: grid;
  min-height: 19px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px;
  align-items: center;
}

.dashboard-selected-tree dt,
.dashboard-selected-tree dd {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-selected-tree dt { color: #668c9d; }
.dashboard-selected-tree dd { margin: 0; color: #b9d6e1; }

.dashboard-detail-button {
  display: flex;
  min-height: 28px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--dashboard-cyan) !important;
}

.dashboard-home-v2 .dashboard-bottom-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  gap: 10px;
}

.dashboard-bottom-panel {
  height: 184px;
  min-height: 184px !important;
  max-height: 184px;
}

.dashboard-bottom-panel .dashboard-chart {
  height: 136px;
  min-height: 0;
}

@media (max-width: 1500px) {
  .dashboard-workspace {
    grid-template-columns: minmax(232px, 258px) minmax(510px, 1fr) minmax(282px, 310px);
  }

  .dashboard-home-v2 .dashboard-filter-bar {
    grid-template-columns: minmax(180px, 1fr) repeat(6, minmax(90px, 0.45fr)) auto;
  }

  .dashboard-home-v2 .dashboard-kpi {
    gap: 8px;
    padding-inline: 9px;
  }

  .dashboard-kpi-icon {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }
}

@media (max-width: 1240px) {
  .dashboard-workspace {
    grid-template-columns: minmax(220px, 245px) minmax(480px, 1fr);
  }

  .dashboard-home-v2 .dashboard-right {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: minmax(150px, auto);
  }

  .dashboard-home-v2 .dashboard-filter-bar {
    grid-template-columns: minmax(190px, 1fr) repeat(3, minmax(100px, 0.5fr)) auto;
  }

  .dashboard-home-v2 .dashboard-filter-bar label:nth-of-type(n + 4) {
    grid-row: 2;
  }

  .dashboard-home-v2 .dashboard-filter-reset {
    grid-column: -2;
  }

  .dashboard-home-v2 .dashboard-bottom-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .page-analytics {
    margin: -10px;
    padding: 8px;
  }

  .dashboard-home-v2 .dashboard-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-home-v2 .dashboard-filter-title {
    grid-column: 1 / -1;
  }

  .dashboard-home-v2 .dashboard-filter-bar label:nth-of-type(n) {
    grid-row: auto;
  }

  .dashboard-home-v2 .dashboard-filter-reset {
    grid-column: auto;
  }

  .dashboard-workspace {
    grid-template-columns: 1fr;
  }

  .dashboard-home-v2 .dashboard-left,
  .dashboard-home-v2 .dashboard-right {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(150px, auto));
  }

  .dashboard-center {
    grid-row: 1;
  }
}

@media (max-width: 680px) {
  .dashboard-home-v2 .dashboard-filter-bar,
  .dashboard-home-v2 .dashboard-kpi-grid,
  .dashboard-home-v2 .dashboard-left,
  .dashboard-home-v2 .dashboard-right,
  .dashboard-home-v2 .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-home-v2 .dashboard-filter-bar label,
  .dashboard-home-v2 .dashboard-filter-reset {
    grid-column: 1;
  }

  .dashboard-center {
    grid-template-rows: auto minmax(440px, auto);
  }

  .dashboard-home-v2 .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-home-v2 .dashboard-map-panel {
    min-height: 440px;
    grid-template-rows: auto minmax(355px, 1fr) auto;
  }

  .dashboard-map-surface.leaflet-map,
  .dashboard-map-surface.fake-map,
  .dashboard-map-surface .leaflet-container {
    min-height: 355px !important;
  }

  .dashboard-map-head {
    align-items: flex-start !important;
    flex-direction: column;
  }

  .dashboard-map-actions {
    width: 100%;
  }

  .dashboard-map-actions button {
    flex: 1;
  }

  .dashboard-home-v2 .dashboard-left,
  .dashboard-home-v2 .dashboard-right {
    grid-template-rows: auto;
  }

  .dashboard-bottom-panel {
    min-height: 210px;
  }
}
