/* 设计 token 由 studio/tokens.css 提供（EP-UI-1 单一来源）；
   模板须在本文件之前加载 tokens.css。 */

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--layout-bg, #f5f5f5);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--layout-bg, #f5f5f5);
  font: 14px/1.5714 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select,
summary {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  box-shadow: var(--focus-ring);
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.52;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.workbench-topbar {
  position: sticky;
  z-index: var(--z-dock);
  top: 0;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px max(20px, calc((100vw - 1180px) / 2));
  color: #fff;
  background: var(--topbar);
  box-shadow: 0 1px 10px rgba(19, 28, 42, 0.24);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  text-decoration: none;
}

.brand-lockup:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  font-weight: 800;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--brand-light), var(--brand));
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 14px;
}

.brand-copy small {
  margin-top: 4px;
  color: #aeb7c5;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.account {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.account-avatar,
.account-avatar-fallback {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: #283548;
}

.account-avatar {
  object-fit: cover;
}

.account-avatar-fallback {
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}

.account-copy {
  display: flex;
  min-width: 0;
  max-width: 230px;
  flex-direction: column;
  line-height: 1.2;
}

.account-name {
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-id {
  margin-top: 3px;
  overflow: hidden;
  color: #9fa9b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.account-actions a {
  padding: 6px 7px;
  color: #d4dae3;
  border-radius: 6px;
}

.account-actions a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.account-divider {
  color: #5e6979;
}

.workbench-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.workbench-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.workbench-hero h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.hero-description {
  max-width: 680px;
  margin: 4px 0 0;
  color: var(--ink-secondary, rgba(0, 0, 0, 0.65));
  font-size: 14px;
}

/* 按钮基线（spec 20260719 T-A2）：值以 tokens.css 的 .button 为准，此处
   仅为覆盖裸 <button> 元素而重复；两处修改必须同步。 */
.button,
button {
  display: inline-flex;
  min-height: var(--control-h, 32px);
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 15px;
  color: var(--ink);
  border: 1px solid var(--border, #d9d9d9);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-weight: 500;
  line-height: 1.5714;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

/* AntD 按压底影只给 .button 类（裸 button 含 tab/图标钮等重置场景，不加） */
.button {
  box-shadow: var(--shadow-btn, 0 2px 0 rgba(0, 0, 0, 0.02));
}

/* 默认描边钮悬停变品牌色。排除实心主按钮 / 工具页 btn-ws 实心态：
   否则 button:hover 特异性高于 .btn-ws--primary:hover，白字被盖成橙底橙字。 */
.button:hover:not(.is-ghost):not(.is-danger),
button:hover:not(:disabled):not(.button-primary):not(.btn-primary):not(.btn-ws--primary):not(.btn-ws--outline):not(.primary-button):not(.ms-button-primary):not(.is-ghost):not(.is-danger) {
  color: var(--brand);
  border-color: var(--brand);
  text-decoration: none;
}

.button:active:not(.is-ghost):not(.is-danger),
button:active:not(:disabled):not(.button-primary):not(.btn-primary):not(.btn-ws--primary):not(.btn-ws--outline):not(.primary-button):not(.ms-button-primary):not(.is-ghost):not(.is-danger) {
  color: var(--brand-dark);
  border-color: var(--brand-dark);
}

/* 主按钮回归 v2 口径：高 --control-h（32），带品牌色按压底影 */
.button-primary {
  min-height: var(--control-h, 32px);
  flex: 0 0 auto;
  padding: 4px 15px;
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: var(--shadow-btn-primary, 0 2px 0 rgba(250, 140, 22, 0.1));
  font-size: 14px;
}

.button-primary:hover {
  color: #fff;
  border-color: var(--brand-hover, #ffa940);
  background: var(--brand-hover, #ffa940);
}

.button-primary:active {
  color: #fff;
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.button-accent {
  color: var(--brand-dark);
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.button-accent:hover:not(:disabled) {
  border-color: var(--brand);
  background: var(--brand-soft-strong);
}

/* 按钮五档补齐（spec 20260719 T-A2，AntD 形态）：
   .button（描边）/ .button-primary（主）/ .is-ghost（幽灵）/ .is-danger（危险）/ .wb-link-btn（文字链） */
.button.is-ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
}

.button.is-ghost:hover {
  border-color: transparent;
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink);
}

.button.is-danger {
  border-color: var(--danger-line, #ffccc7);
  background: var(--surface, #fff);
  color: var(--danger-dark, #cf1322);
}

.button.is-danger:hover {
  border-color: var(--danger, #ff4d4f);
  color: var(--danger, #ff4d4f);
  background: var(--surface, #fff);
}

.button.is-sm {
  min-height: 24px;
  padding: 0 8px;
  font-size: var(--fs-caption, 12px);
}

/* 遗留 Bootstrap 形态类（数据域已迁 .button 族，向导等旧组件仍在用，暂留） */
.btn-secondary,
.btn.btn-ghost {
  color: var(--ink-secondary, rgba(0, 0, 0, 0.65));
  border-color: var(--border, #d9d9d9);
  background: #fff;
}

.btn-danger {
  color: var(--danger-dark, #cf1322);
  border-color: var(--danger-line, #ffccc7);
  background: var(--surface, #fff);
}

.btn-danger:hover:not(:disabled) {
  border-color: var(--danger, #ff4d4f);
  color: var(--danger, #ff4d4f);
  background: var(--surface, #fff);
}

.asset-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.asset-nav .tab {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 14px;
  color: var(--ink-secondary, rgba(0, 0, 0, 0.65));
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  box-shadow: none;
  text-align: left;
  text-decoration: none;
}

.asset-nav .tab:hover {
  color: var(--ink);
  border-color: transparent;
  background: var(--surface-soft);
  box-shadow: none;
  text-decoration: none;
}

.asset-nav .tab.active,
.asset-nav .tab[aria-current="page"] {
  color: var(--brand-dark);
  border-color: transparent;
  background: var(--brand-soft);
}

.nav-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
  border: none;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  font-size: 16px;
  font-weight: 600;
}

.tab.active .nav-icon,
.tab[aria-current="page"] .nav-icon {
  color: var(--brand-dark);
  border-color: transparent;
  background: var(--brand-soft-strong, #ffe7ba);
}

.nav-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.nav-copy strong {
  font-size: 14px;
}

.nav-copy small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 450;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.onboarding-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-md);
  background: var(--brand-tint);
}

.onboarding-banner.is-account {
  border-color: #cfe3d9;
  background: #f1faf6;
}

.onboarding-banner strong {
  display: block;
  margin-bottom: 3px;
}

.banner-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}

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

.banner-copy,
.section-description {
  margin: 0;
  color: var(--muted);
}

.workbench-panel {
  display: grid;
  gap: 18px;
}

.workbench-section {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2,
.projects-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.section-heading .section-description {
  max-width: 720px;
  margin-top: 6px;
}

.step-badge,
.count-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 1px 8px;
  color: var(--ink-secondary, rgba(0, 0, 0, 0.65));
  border: 1px solid var(--border, #d9d9d9);
  border-radius: 4px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.upload-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #cbd1db;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.upload-picker input[type="file"] {
  min-width: 0;
  width: 100%;
  color: #4e5a6c;
}

.upload-picker input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 10px;
  color: var(--ink);
  border: 1px solid #d9dee7;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.status {
  min-height: 22px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.status:not(:empty) {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status:not(:empty)::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status.error,
.error {
  color: var(--danger);
}

.status.ok,
.ok {
  color: var(--success);
}

.workflow-panel {
  padding: 18px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfcfd;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #4e596a;
  font-size: 12px;
  font-weight: 650;
}

.field-row-count {
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

select,
input[type="text"],
input[type="search"] {
  width: 100%;
  min-height: var(--control-h, 32px);
  padding: 4px 11px;
  color: var(--ink);
  border: 1px solid var(--border, #d9d9d9);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:hover,
input[type="text"]:hover,
input[type="search"]:hover {
  border-color: var(--brand-hover, #ffa940);
}

select:focus,
input[type="text"]:focus,
input[type="search"]:focus {
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.sample-wrap {
  max-width: 100%;
  margin: 16px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

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

table.sample th,
table.sample td {
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

table.sample th {
  color: #465267;
  background: #f5f7fa;
}

table.sample th:last-child,
table.sample td:last-child {
  border-right: 0;
}

table.sample tr:last-child td {
  border-bottom: 0;
}

.workflow-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.import-summary {
  margin: 0 0 14px;
}

#shareBox {
  padding-top: 8px;
  overflow-wrap: anywhere;
}

/* 「我的地图」面板卡：跟随 .workbench-section 的卡片内边距（此前被压成 3px 0 0，
   内容顶边贴卡，空态只能再套一层带框卡片撑排版——现在由本卡统一提供留白） */
.projects-section {
  padding: 18px 20px 22px;
}

.projects-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.project-search {
  display: flex;
  gap: 8px;
  margin: 0;
}

.project-search input {
  width: 220px;
}

.project-search input:focus {
  border-color: var(--brand);
  background: #fff;
}

ul.projects,
ul.templates,
ul.datasets {
  padding: 0;
  margin: 0;
  list-style: none;
}

ul.projects {
  display: grid;
  gap: 10px;
}

ul.projects > li {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.proj-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.project-thumb,
.project-thumb-fallback {
  width: 100px;
  height: 62px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--surface-soft, #fafafa);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  object-fit: cover;
}

.proj-meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.proj-title {
  overflow-wrap: anywhere;
}

.proj-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.proj-actions .button,
.proj-actions button,
.proj-actions .btn {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.empty-state {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

/* 「我的地图」空态已在 .projects-section 卡内：去掉第二层卡框，避免卡套卡 */
.projects-section .empty-state {
  padding: 26px 4px 6px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.empty-state h3 {
  margin: 0;
  font-size: 20px;
}

.empty-state > p {
  max-width: 620px;
  margin: 8px auto 22px;
  color: var(--muted);
}

.empty-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  text-align: left;
}

.empty-entry {
  display: flex;
  min-width: 0;
  min-height: 158px;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcfd;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.empty-entry:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow-sm);
}

/* 主路径入口（上传）：轻微品牌色描边区分主次 */
.empty-entry.is-primary {
  border-color: var(--brand-line);
  background: #fffdfa;
}

.empty-entry-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--brand-dark);
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  font-size: 16px;
  font-weight: 600;
}

.empty-entry h4 {
  margin: 12px 0 4px;
  font-size: 14px;
  font-weight: 600;
}

.empty-entry p {
  flex: 1;
  margin: 0 0 14px;
  color: var(--ink-secondary, rgba(0, 0, 0, 0.65));
  font-size: 12px;
}

.empty-entry button {
  min-height: var(--control-h, 32px);
  padding: 4px 12px;
}

.search-empty .button {
  margin-top: 4px;
}

.capability-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  color: #6d4b16;
  border: 1px solid #f2d4a5;
  border-radius: 10px;
  background: #fffaf1;
  font-size: 12px;
}

.capability-note::before {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--warning);
  border-radius: 50%;
  background: #fff0ce;
  content: "i";
  font-family: Georgia, serif;
  font-weight: 800;
}

.state-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.state-row .status {
  flex: 1;
}

.state-row button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

/* ==== 模板画廊（2026-07-14 改版）：宽 4 列 / 中 3 / 窄 2 / 手机 1 ==== */
.template-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 12px !important;
}

@media (min-width: 1400px) {
  .template-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ==== 模板工具栏：Tab + 分类 + 排序 + 搜索 ==== */
.tpl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.tpl-tabs {
  display: flex;
  gap: 4px;
}

.tpl-tab {
  min-height: 34px;
  padding: 4px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-secondary, rgba(0, 0, 0, 0.65));
  font-size: 13px;
  cursor: pointer;
}

.tpl-tab:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.tpl-tab.active {
  color: var(--brand-dark);
  border-color: var(--brand-line);
  background: var(--brand-soft);
  font-weight: 600;
}

.tpl-tab-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  font-size: 12px;
  text-align: center;
}

.tpl-tab.active .tpl-tab-count {
  background: rgba(250, 140, 22, 0.16);
}

.tpl-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tpl-toolbar-right select,
.tpl-toolbar-right input[type="search"] {
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid var(--border, #d9d9d9);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.tpl-toolbar-right input[type="search"] {
  width: 220px;
}

.template-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

/* Hover：轻微上浮 + 阴影略增 + 浅橙描边（不用大面积橙色背景） */
.template-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-line, #ffd9b0);
  box-shadow: 0 10px 24px rgba(38, 34, 29, 0.08);
}

.template-preview {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 7;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  background-color: var(--surface-soft, #fafafa);
  /* 差异化速写（JS 按图层类型注入 --tpl-art）+ 经纬网格 */
  background-image:
    var(--tpl-art, none),
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-position: center;
  background-repeat: no-repeat, repeat, repeat;
  background-size: cover, 28px 28px, 28px 28px;
}

.template-preview img {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #f3f5f8;
  object-fit: cover;
}

/* 右上角轻量「预览效果」标签 */
.template-preview-flag {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  padding: 1px 8px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.template-card:hover .template-preview-flag {
  opacity: 1;
}

.template-card-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 14px 15px 15px;
}

.template-title[role="button"] {
  cursor: pointer;
}

.template-title[role="button"]:hover {
  color: var(--brand-dark);
}

.template-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.template-badge {
  padding: 1px 8px;
  color: var(--ink-secondary, rgba(0, 0, 0, 0.65));
  border: 1px solid var(--border, #d9d9d9);
  border-radius: 4px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 400;
}

.template-badge.is-builtin {
  color: var(--brand-dark);
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.template-title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 600;
}

.template-description {
  display: -webkit-box;
  min-height: 39px;
  margin: 7px 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.template-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 12px;
  color: #596577;
  font-size: 12px;
}

/* 卡片底部只保留一行两个操作：预览（轻描边）左、使用模板（唯一橙色主按钮）右 */
.template-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.template-actions button {
  min-height: 35px;
  padding: 4px 14px;
  font-size: 13px;
  border-radius: 8px;
}

.template-actions .tpl-preview-action {
  color: var(--ink-secondary, rgba(0, 0, 0, 0.65));
  border: 1px solid var(--border, #d9d9d9);
  background: #fff;
}

.template-actions .tpl-preview-action:hover:not(:disabled) {
  color: var(--brand-dark);
  border-color: var(--brand-line);
}

/* 主动作唯一实心：页面同一时刻只保留一个橙色重点 */
.template-actions .use-template-action {
  min-width: 118px;
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
  font-weight: 500;
  flex: 0 0 auto;
}

.template-actions .use-template-action:hover:not(:disabled) {
  color: #fff;
  border-color: var(--brand-hover, #ffa940);
  background: var(--brand-hover, #ffa940);
}

/* ==== 模板骨架屏 ==== */
.template-card.is-skeleton {
  padding-bottom: 14px;
  pointer-events: none;
}

.tpl-sk {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f1f3 25%, #fafbfc 42%, #f0f1f3 60%);
  background-size: 240% 100%;
  animation: tpl-sk-wave 1.3s ease-in-out infinite;
}

.tpl-sk.sk-preview { aspect-ratio: 16 / 7; border-radius: 0; margin-bottom: 12px; }
.tpl-sk.sk-chip { width: 64px; height: 18px; margin: 0 15px 8px; }
.tpl-sk.sk-title { width: 55%; height: 18px; margin: 0 15px 8px; }
.tpl-sk.sk-line { width: 82%; height: 12px; margin: 0 15px 12px; }
.tpl-sk.sk-foot { width: calc(100% - 30px); height: 35px; margin: 0 15px; }

@keyframes tpl-sk-wave {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

/* ==== 无结果空态 ==== */
.tpl-empty {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 34px 16px;
}

.tpl-empty button {
  min-height: 32px;
  padding: 4px 16px;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 13px;
}

/* ==== 模板使用流程：数据来源选择 ==== */
.tpl-source-list {
  display: grid;
  gap: 10px;
}

.tpl-source-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.tpl-source-option:hover:not(.is-disabled) {
  border-color: var(--brand-line);
}

.tpl-source-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.tpl-source-option.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tpl-source-option input {
  margin-top: 3px;
  accent-color: var(--brand);
}

.tpl-source-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.tpl-source-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.template-limit::before {
  flex: 0 0 auto;
  color: var(--warning);
  content: "•";
}

.asset-empty {
  grid-column: 1 / -1;
  padding: 38px 18px;
  color: var(--muted);
  border: 1px dashed #d5dae3;
  border-radius: var(--radius-md);
  background: #fafbfc;
  text-align: center;
}

.dataset-list {
  display: grid;
  gap: 9px;
  margin-top: 8px !important;
}

/* 行卡（spec 20260719 AntD 精修）：白底 + line 描边 + 8px 圆角；
   hover = hoverable 卡片升起（描边隐去 + 三层阴影） */
.dataset-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4, 16px);
  padding: var(--space-4, 16px) var(--space-5, 20px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 8px);
  background: var(--surface, #fff);
}

.dataset-name {
  overflow-wrap: anywhere;
  font-weight: 600;
}

/* 名称行：名称 + 健康度徽标同排（spec 20260719 U2） */
.dataset-name-row {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  flex-wrap: wrap;
}

.dataset-columns {
  overflow: hidden;
  color: var(--ink-disabled, rgba(0, 0, 0, 0.25));
  font-size: var(--fs-caption, 12px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 2026-07-14 我的数据资产化：搜索框 + 来源/时间/状态元信息 + 行内建图动作 */
.dataset-search {
  min-height: var(--control-h, 32px);
  width: 240px;
  padding: 4px 11px;
  border: 1px solid var(--border, #d9d9d9);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface, #fff);
  font-size: var(--fs-body, 14px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dataset-search:hover {
  border-color: var(--brand-hover, #ffa940);
}

.dataset-search:focus {
  border-color: var(--brand, #fa8c16);
  outline: none;
  box-shadow: var(--focus-ring);
}

.dataset-main {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.dataset-meta {
  color: var(--muted, rgba(0, 0, 0, 0.45));
  font-size: var(--fs-caption, 12px);
}

.dataset-meta.has-warning {
  color: var(--warning-dark, #d48806);
}

/* 操作项：等距横排文字链（Ant 列表操作项范式），垂直居中不换行 */
.dataset-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-4, 16px);
  white-space: nowrap;
}

.dataset-actions .wb-link-btn {
  font-size: var(--fs-body, 14px);
}

dialog {
  width: min(680px, calc(100% - 28px));
  max-height: min(780px, calc(100vh - 40px));
  padding: 0;
  overflow: auto;
  color: var(--ink);
  border: 0;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

dialog::backdrop {
  background: rgba(20, 28, 40, 0.58);
  backdrop-filter: blur(2px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
  margin: 0;
  font-size: 20px;
}

.dialog-close {
  display: grid;
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #f3f5f8;
  font-size: 20px;
}

.dialog-body {
  display: grid;
  gap: 16px;
  padding: 20px 22px;
}

.dialog-preview {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 8;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(var(--brand-rgb), 0.12), rgba(62, 116, 157, 0.12)),
    #f6f7f9;
}

.dialog-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f6f7f9;
}

.template-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.template-detail-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
}

.template-detail-panel h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.template-detail-panel ul,
.mapping-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.template-detail-panel li {
  padding: 4px 0;
  color: #526074;
  font-size: 12px;
}

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

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

.mapping-source {
  overflow: hidden;
  color: #4d5a6e;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapping-arrow {
  color: #98a1af;
}

.mapping-row select {
  min-height: 34px;
  padding: 6px 8px;
  color: #7d8694;
  font-size: 12px;
}

.mapping-unavailable {
  margin: 10px 0 0;
  color: var(--warning);
  font-size: 12px;
}

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .workbench-shell {
    width: min(100% - 28px, 760px);
    padding-top: 24px;
  }

  .asset-nav .tab {
    justify-content: center;
    padding-inline: 9px;
  }

  .nav-copy small {
    display: none;
  }

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

  ul.projects > li {
    align-items: flex-start;
    flex-direction: column;
  }

  .proj-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .workbench-topbar {
    position: static;
    align-items: flex-start;
    padding: 10px 14px;
  }

  .account-copy,
  .account-divider,
  .account-actions a:last-child {
    display: none;
  }

  .account-actions a {
    padding-inline: 4px;
    font-size: 12px;
  }

  .workbench-shell {
    width: min(100% - 22px, 560px);
    padding: 20px 0 36px;
  }

  .workbench-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .button-primary {
    width: 100%;
  }

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

  .asset-nav .tab {
    justify-content: flex-start;
  }

  .nav-copy small {
    display: block;
  }

  .onboarding-banner,
  .section-heading,
  .projects-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .banner-actions {
    width: 100%;
  }

  .banner-actions button {
    flex: 1;
  }

  .workbench-section {
    padding: 18px;
    border-radius: 13px;
  }

  .upload-picker,
  .field-grid,
  .empty-entry-grid,
  .template-gallery,
  .template-detail-grid {
    grid-template-columns: 1fr;
  }

  .upload-picker button {
    width: 100%;
  }

  .project-search {
    flex-wrap: wrap;
  }

  .project-search input {
    flex-basis: 100%;
  }

  .proj-row {
    align-items: flex-start;
  }

  .project-thumb {
    width: 78px;
    height: 52px;
  }

  .empty-state {
    padding: 22px 14px;
  }

  .empty-entry {
    min-height: 0;
  }

  /* .dataset-item / .dataset-columns 的移动端规则已迁到数据列表段 768 断点（v2 断点归位） */

  .dialog-header,
  .dialog-body,
  .dialog-footer {
    padding-inline: 16px;
  }
}

@media (max-width: 420px) {
  .brand-copy small {
    display: none;
  }

  .asset-nav .tab {
    min-height: 54px;
  }

  .nav-icon {
    width: 30px;
    height: 30px;
  }

  .nav-copy small {
    display: none;
  }

  .proj-actions .button,
  .proj-actions button,
  .proj-actions .btn {
    flex: 1 1 calc(50% - 7px);
  }

  .template-actions {
    flex-wrap: wrap;
  }

  .template-actions .use-template-action {
    flex: 1 1 100%;
  }
}

/* ===================================================================
   v2.3 工作台布局（body.layout-v23，开关 MAPSTUDIO_WORKBENCH_LAYOUT_V23）
   EP-UI-2/3/4：回访态紧凑头、underline Tab、上传后置
   =================================================================== */

/* --- T-UI-21 紧凑头（回访态）：页面标题 + 新建地图下拉 --- */

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

.workbench-compact-head h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.layout-v23 .workbench-compact-head .button-primary {
  min-height: 40px;
  padding: 9px 18px;
  font-size: 14px;
}

.new-map-dropdown {
  position: relative;
  flex: 0 0 auto;
}

.new-map-dropdown > summary {
  cursor: pointer;
  list-style: none;
}

.new-map-dropdown > summary::-webkit-details-marker {
  display: none;
}

.new-map-dropdown > summary::after {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
}

.new-map-menu {
  position: absolute;
  z-index: calc(var(--z-dock) + 1);
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 180px;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.new-map-menu button {
  min-height: 36px;
  justify-content: flex-start;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font-weight: 600;
  text-align: left;
}

.new-map-menu button:hover:not(:disabled) {
  color: var(--brand-dark);
  background: var(--brand-soft);
  box-shadow: none;
}

/* --- T-UI-21 空态：Hero 压缩为一句话 + 单 CTA（三入口去重，保留 empty-entry-grid） --- */

.layout-v23.no-projects .workbench-hero {
  margin-bottom: 20px;
}

.layout-v23.no-projects .workbench-hero .eyebrow,
.layout-v23.no-projects .workbench-hero .hero-description {
  display: none;
}

.layout-v23.no-projects .workbench-hero h1 {
  font-size: 20px;
}

/* --- T-UI-22 资产导航：4 张大卡片改为 underline Tab（对齐桌面 .asset-tab-btn） --- */

.layout-v23 .asset-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0;
  margin-bottom: 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.layout-v23 .asset-nav .tab {
  min-height: 0;
  padding: 9px 18px;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  font-size: 14px;
  font-weight: 600;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.layout-v23 .asset-nav .tab:hover {
  color: var(--brand);
  border-color: transparent;
  background: none;
  box-shadow: none;
}

.layout-v23 .asset-nav .tab.active,
.layout-v23 .asset-nav .tab[aria-current="page"] {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: none;
}

.layout-v23 .asset-nav .nav-icon,
.layout-v23 .asset-nav .nav-copy small {
  display: none;
}

.layout-v23 .asset-nav .nav-copy strong {
  font-size: 14px;
  font-weight: inherit;
}

/* 「我的分享」为外链，保留 ↗ 标识 */
.layout-v23 .asset-nav a.tab .nav-copy strong::after {
  content: " ↗";
  font-size: 12px;
}

/* --- T-UI-23 上传后置：默认折叠为一行动作条 --- */

.upload-trigger-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  border: 1px dashed #cbd1db;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.upload-trigger-row .upload-trigger {
  flex: 0 0 auto;
}

.upload-trigger-hint {
  font-size: 12px;
}

@media (max-width: 680px) {
  .workbench-compact-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .layout-v23 .asset-nav .tab {
    padding: 9px 12px;
  }
}

/* ============================================================
   工作台平台化重设计：欢迎条 / 快捷入口 / 作品广场卡片网格
   （视觉对齐 dtb_geoapi 云工作台：白卡片、#fa8c16 系强调、12px 圆角）
   ============================================================ */

.platform-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 18px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.platform-hero-copy .eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.platform-hero-copy h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.platform-hero-copy .hero-description {
  margin: 0;
  color: var(--muted);
}

.platform-hero-side {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.platform-stats {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
  margin: 0;
}

.platform-stats .stat-cell {
  min-width: 76px;
  padding: 10px 14px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.platform-stats dt {
  color: var(--muted);
  font-size: 12px;
}

.platform-stats dd {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.quick-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.quick-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.quick-entry:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transform: none;
}

.quick-entry-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--brand-dark);
  font-size: 16px;
  border-radius: 11px;
  background: var(--brand-soft-solid);
}

.quick-entry-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.quick-entry-copy strong {
  font-size: 14px;
}

.quick-entry-copy small {
  color: var(--muted);
  font-size: 12px;
}

/* --- 作品广场卡片网格（替代旧行式 ul.projects） --- */

ul.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 16px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.project-card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-md);
  transform: none;
}

/* 封面兜底：中性制图纸面——细网格经纬线 + 居中图标，替代橙色渐变（去 demo 感） */
.project-card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-color: var(--surface-soft, #fafafa);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.project-card-cover .project-thumb {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(0, 0, 0, 0.18);
  font-size: 20px;
}

.share-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  color: #0f6b43;
  font-size: 12px;
  font-weight: 650;
  border-radius: 999px;
  background: rgba(237, 251, 244, 0.94);
  border: 1px solid #bfe8d3;
}

.share-badge.is-expired {
  color: #8a5a00;
  border-color: #f0dcae;
  background: rgba(255, 248, 232, 0.94);
}

/* D3（spec 20260726-mapstudio-maturity-diagnosis）：已发布·有修改——
   编辑器内容已领先于分享出去的版本，品牌橙提醒重新发布 */
.share-badge.is-stale {
  color: var(--brand-heavy, #ad4e00);
  border-color: #ffd591;
  background: rgba(255, 247, 230, 0.94);
}

.project-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 13px 14px 14px;
}

.project-card .proj-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.project-card .proj-title-row {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card .proj-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.project-card .proj-actions .btn,
.project-card .proj-actions button {
  min-height: 28px;
  padding: 2px 10px;
  font-size: 12px;
}

@media (max-width: 680px) {
  .platform-hero {
    padding: 20px;
  }

  .platform-hero-side {
    width: 100%;
    justify-content: space-between;
  }

  .platform-stats .stat-cell {
    min-width: 62px;
    padding: 8px 10px;
  }
}

/* ---- 少即是多改版（2026-07-11）：单行顶条 + 紧凑 tabs + 卡片 ⋯ 菜单 ---- */

.workbench-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 2px 0;
}

.workbench-topline h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.workbench-topline .topline-meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* 主 CTA「新建地图」：Ant large 主按钮口径（平面、无发光投影） */
.new-map-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  min-height: var(--control-h-lg, 40px);
  padding: 6px 20px;
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.new-map-cta .new-map-cta-plus {
  font-size: 16px;
  line-height: 1;
  font-weight: 500;
}

/* 新建地图弹窗：两选卡片 */
.new-map-dialog .dialog-body {
  padding: 22px;
}

.new-map-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.new-map-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  padding: 18px 16px 16px;
  border: 1px solid var(--border, #d9d9d9);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.new-map-choice:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
  transform: none;
}

.new-map-choice.is-primary {
  border-color: var(--brand);
  background: var(--brand-soft, #fff7e6);
}

.new-map-choice .choice-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--brand-dark);
  background: var(--brand-soft-strong, #ffe7ba);
}

.new-map-choice strong {
  font-size: 16px;
  font-weight: 600;
}

.new-map-choice small {
  font-size: 13px;
  color: var(--ink-secondary, #6b6257);
  line-height: 1.6;
}

.new-map-choice .choice-default-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-dark, #d46b08);
  background: #fff;
  border: 1px solid #ffe0c2;
  border-radius: 999px;
  padding: 2px 9px;
}

/* 2026-07-14 新手推荐路径：推荐角标 + 预计耗时（诊断 §五.2） */
.new-map-choice .choice-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border-radius: 999px;
}

.new-map-choice .choice-badge.is-light {
  color: var(--brand-dark, #d46b08);
  background: var(--brand-soft, #fff7e6);
  border: 1px solid #ffe0c2;
}

.new-map-choice.is-recommended {
  border-color: var(--brand-line, #ffd9b0);
}

.new-map-choice .choice-eta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 560px) {
  .new-map-choice-grid {
    grid-template-columns: 1fr;
  }
}

.asset-nav.is-compact {
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.asset-nav.is-compact .tab {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  box-shadow: none;
  position: relative;
}

.asset-nav.is-compact .tab .nav-copy strong {
  font-size: 14px;
  font-weight: 600;
}

.asset-nav.is-compact .tab.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand, #fa8c16);
}

.asset-nav.is-compact .tab:hover {
  background: var(--brand-soft, #fff7ed);
  transform: none;
}

/* ==================================================================
   工作台化改版（2026-07-12）：顶部全局栏 + 左侧固定导航 + 内容工作区
   作用域：body.wb-shell（仅工作台页；navbar 组件本身不改）
   ================================================================== */

/* 顶栏整体移除（2026-07-12 二次收敛）：<header class="dtb-nav"> 隐藏，
   其后的配额卡 / 权益面板 dialog 与全部脚本保持可用（它们是 header 的兄弟节点）。
   品牌 / 产品切换 / 账户菜单移入侧栏。 */
body.wb-shell .dtb-nav {
  display: none !important;
}

/* 二轮 UI 精修（2026-07-12 数据集市轮）：工作台壳内统一视觉系统——
   页面底 #f7f8fa、主标题 #1f2329、正文 #374151、辅助 #8a8f98、
   浅边框 #e5e7eb（分隔）/ 较强边框 #d8dce3（控件描边）。
   只在 body.wb-shell 作用域覆盖，不影响编辑器 / 分享管理页的 tokens.css 副本。 */
body.wb-shell {
  --wb-sidebar-w: 224px;
  --layout-bg: #f7f8fa;
  --ink: #1f2329;
  --ink-secondary: #374151;
  --muted: #8a8f98;
  --border: #d8dce3;
  --line: #e5e7eb;
}

/* （侧栏组件段已删除：spec 20260720 T-D2，工作台壳统一为顶部导航） */

/* 内容工作区：让位侧栏，正文最大 1440px 靠左排布（成熟控制台惯例），
   1440 屏正文约 1150px（3 卡），1920 屏满 1440px（4 卡），右侧不再出现居中留白 */
body.wb-shell .workbench-shell {
  width: auto;
  max-width: calc(var(--wb-sidebar-w) + 1440px + 64px);
  margin: 0;
  padding: 20px 32px 40px calc(var(--wb-sidebar-w) + 32px);
  transition: padding-left 0.2s ease;
}

/* 页脚贴底：内容不足一屏时页脚落在视口底部，而不是停在页面中间留大片空白 */
body.wb-shell {
  display: flex;
  flex-direction: column;
}

body.wb-shell .wb-main {
  flex: 1 0 auto;
}

body.wb-shell .workbench-footer {
  margin-top: auto;
  padding: 14px 32px 20px calc(var(--wb-sidebar-w) + 32px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

body.wb-shell .workbench-footer a {
  margin-left: 14px;
  color: var(--muted);
}

body.wb-shell .workbench-footer a:hover {
  color: var(--brand-dark);
}

/* 页头：标题（每页只出现一次）+ 一句说明 + 唯一主 CTA（与标题垂直居中）。
   首页头部三层间距收拢：标题↔副标题小、副标题↔资产统计中、头部↔主体大（统计条自带 28px 下距） */
.wb-pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.wb-pagehead h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.wb-pagehead-meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.wb-pagehead-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.wb-pagehead-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.wb-pagehead-link:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.wb-pagehead-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* 主 CTA 收敛到 36px 高，不做页面最大元素 */
.wb-pagehead .new-map-cta {
  min-height: 36px;
  padding: 4px 18px;
}

/* 低优先级提示条（会员状态 / 降档说明）：单行 ≤44px，低饱和，不抢首屏焦点 */
.wb-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 12px;
  margin: 0 0 12px;
  border: 1px solid var(--warning-line, #ffe58f);
  border-radius: var(--radius-sm);
  background: var(--warning-bg, #fffbe6);
  color: var(--ink-secondary, #374151);
  font-size: 13px;
}

.wb-notice-warning .wb-notice-icon {
  color: var(--warning, #faad14);
}

.wb-notice-info {
  border-color: #d6e4ff;
  background: #f0f5ff;
}

.wb-notice-info .wb-notice-icon {
  color: #2f54eb;
}

.wb-notice-icon {
  flex: 0 0 auto;
  font-size: 14px;
}

.wb-notice-text {
  min-width: 0;
  flex: 1;
}

.wb-notice-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
}

.wb-notice-actions .btn-secondary {
  min-height: 28px;
  padding: 2px 10px;
  font-size: 12px;
}

.wb-notice-close {
  display: grid;
  width: 26px;
  min-height: 26px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.wb-notice-close:hover {
  border: 0;
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink);
  box-shadow: none;
}

/* 工作台首页资产概览（2026-07-16 改版，设计图权威）：四张白底统计卡，
   彩色图标片 + 大数字，hover 橙描边强化「可点击进入资产页」的暗示 */
.wb-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 2px 0 24px;
}

.wb-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wb-stat-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-sm);
  font-size: 16px;
}

.wb-stat-icon.is-maps {
  color: var(--brand);
  background: var(--brand-soft);
}

.wb-stat-icon.is-datasets {
  color: #1d4ed8;
  background: #eff6ff;
}

.wb-stat-icon.is-templates {
  color: #7c3aed;
  background: #f5f3ff;
}

.wb-stat-icon.is-shares {
  color: #0d9488;
  background: #f0fdfa;
}

.wb-stat-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
}

.wb-stat b {
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.wb-stat-copy small {
  color: var(--muted);
  font-size: 13px;
}

.wb-stat:hover {
  color: var(--ink-secondary);
  border-color: var(--brand-line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.wb-stat:hover b {
  color: var(--brand-dark);
}

/* 首屏主体分栏：左 65% 最近编辑列表 · 右 35% 快速开始 */
.wb-overview-cols {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 65fr) minmax(0, 35fr);
  gap: 24px;
}

/* 最近编辑：紧凑列表卡，直接放在页面背景上（不再套外层大白卡）。
   整行语义 =「继续编辑」：hover 只用浅底 + 轻阴影（不做橙色整框描边，避免像选中态），
   右侧箭头在 hover 时替换为明确的「继续编辑 →」。管理操作收进行尾 ⋯ 菜单 */
.wb-recent-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.wb-recent-row {
  position: relative;
  display: flex;
  align-items: stretch;
}

.wb-recent-link {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 12px 44px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.wb-recent-link:hover {
  background: #fffdf9;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
}

.wb-recent-thumb {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 88px;
  height: 52px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--ink-disabled);
  font-size: 16px;
}

.wb-recent-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wb-recent-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.wb-recent-copy strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-recent-copy small {
  color: var(--muted);
  font-size: 13px;
}

.wb-recent-state {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.wb-recent-state.is-published {
  border: 1px solid var(--success-line);
  background: var(--success-bg);
  color: var(--success-dark);
}

.wb-recent-state.is-draft {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.wb-recent-state.is-expired,
.wb-recent-state.is-stale {
  border: 1px solid var(--warning-line);
  background: var(--warning-bg);
  color: var(--warning-dark);
}

/* 行尾指示：默认淡箭头，hover 换成明确动作文案 */
.wb-recent-go {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-width: 20px;
  justify-content: flex-end;
}

.wb-recent-arrow {
  color: var(--ink-disabled);
  font-size: 12px;
}

.wb-recent-cta {
  display: none;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.wb-recent-link:hover .wb-recent-arrow {
  display: none;
}

.wb-recent-link:hover .wb-recent-cta {
  display: inline;
}

/* 行尾 ⋯ 菜单（绝对定位在行右上，位于链接 padding 预留区内） */
.wb-recent-more {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
}

.wb-recent-more > summary {
  display: grid;
  width: 26px;
  min-height: 26px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.wb-recent-more > summary::-webkit-details-marker {
  display: none;
}

.wb-recent-more > summary:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink);
}

.wb-recent-more .proj-more-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: calc(var(--z-dock) + 2);
}

/* 快速开始：普通白卡分组（去掉常驻橙色外框；橙色只出现在 hover 与主按钮） */
.wb-overview-side {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.wb-side-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}

/* 最近使用的数据：轻量列表（只有真实数据时渲染） */
.wb-recent-data {
  margin-top: 28px;
}

.wb-data-list {
  display: grid;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  list-style: none;
}

.wb-data-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 70px auto;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
}

.wb-data-row + .wb-data-row {
  border-top: 1px solid var(--line);
}

.wb-data-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.wb-link-btn {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}

.wb-link-btn:hover {
  color: var(--brand);
  border: 0;
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
}

/* 快速开始入口（2026-07-16 改版）：2×2 竖排卡片（图标在上），
   首选路径 is-primary 常驻浅橙底 + 橙描边，其余白底灰边 hover 转橙 */
.wb-quickstart {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wb-quick-item {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.wb-quick-item:hover {
  border-color: var(--brand-line);
  background: var(--brand-tint, #fffbf5);
  color: inherit;
  box-shadow: none;
}

.wb-quick-item:active {
  background: var(--brand-soft);
}

.wb-quick-item:hover .wb-quick-icon {
  transform: translateY(-1px);
}

.wb-quick-item.is-primary {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.wb-quick-item.is-primary:hover {
  background: var(--brand-soft-strong);
}

.wb-quick-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #5f6773;
  border-radius: var(--radius-sm);
  background: #f2f4f7;
  font-size: 16px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.wb-quick-icon i {
  line-height: 1;
}

/* 四条路径各配一色（与顶部资产统计条同一调色板），替代原统一灰块 */
.wb-quick-icon.is-upload {
  color: var(--brand);
  background: var(--brand-soft-strong);
}

.wb-quick-icon.is-address {
  color: #1d4ed8;
  background: #eff6ff;
}

.wb-quick-icon.is-template {
  color: #7c3aed;
  background: #f5f3ff;
}

.wb-quick-icon.is-blank {
  color: #0d9488;
  background: #f0fdfa;
}

.wb-quick-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.wb-quick-copy strong {
  font-size: 13px;
  font-weight: 600;
}

.wb-quick-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 资产卡（工作台化）：封面主体可点，操作收进 ⋯，信息密度上调 */
.wb-asset-card .project-card-cover {
  aspect-ratio: 16 / 9;
}

.wb-asset-card .cover-hover-cta {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.38);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.wb-asset-card .project-card-cover:hover .cover-hover-cta,
.wb-asset-card .project-card-cover:focus-visible .cover-hover-cta {
  opacity: 1;
}

.wb-asset-card .share-badge.is-draft {
  color: var(--ink-secondary, rgba(0, 0, 0, 0.65));
  border-color: var(--border, #d9d9d9);
  background: rgba(255, 255, 255, 0.92);
}

.wb-asset-card .project-card-body {
  gap: 4px;
  padding: 10px 12px 10px;
}

.wb-asset-card .proj-title-link {
  color: var(--ink);
  text-decoration: none;
}

.wb-asset-card .proj-title-link:hover {
  color: var(--brand-dark);
  text-decoration: none;
}

.wb-asset-card .proj-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.wb-asset-card .proj-meta-line {
  font-size: 12px;
}

.wb-asset-card .proj-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.wb-asset-card .proj-share-state {
  font-size: 12px;
}

/* FR-5（spec 20260811-ui-longterm-backlog）：过期卡页脚行动入口。
   徽章告知 + 页脚给行动，操作不禁用不弱化（资产不劫持，PRD §5.3）。 */
.wb-asset-card .proj-share-state:has(.proj-republish-btn) {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.wb-asset-card .proj-republish-btn {
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-xs);
  background: var(--brand-soft);
  color: var(--brand-heavy);
  font-size: 12px;
  line-height: 1.2;
  padding: 3px 8px;
  cursor: pointer;
  white-space: nowrap;
}

.wb-asset-card .proj-republish-btn:hover {
  background: var(--brand-soft-strong);
}

.wb-asset-card .proj-republish-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.wb-asset-card .proj-renew-link {
  color: var(--brand-heavy);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.wb-asset-card .proj-renew-link:hover {
  text-decoration: underline;
}

.wb-asset-card .proj-republish-error {
  color: var(--danger-dark);
  font-size: 12px;
}

.wb-asset-card .proj-more > summary {
  min-height: 26px;
  width: 26px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.wb-asset-card .proj-more > summary:hover {
  border-color: var(--border, #d9d9d9);
  color: var(--ink);
}

/* 「我的地图」筛选排序条：右对齐一行，窄屏才换行 */
.wb-filterbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.wb-filterbar select {
  width: auto;
  min-width: 104px;
  flex: 0 0 auto;
}

.wb-filterbar .project-search button[type="submit"] {
  flex: 0 0 auto;
}

.wb-overview-empty .empty-state {
  padding: 44px 20px;
  text-align: center;
}

/* 响应式断点（2026-07-13 收口）：
   >1280 左右分栏 65/35 + 侧栏展开；1024–1279 收窄为 60/40 + 缩小间距；
   <1024 单列堆叠（快速开始移到最近编辑下方）；<1080 侧栏自动折叠为图标栏 */
@media (max-width: 1279px) {
  .wb-overview-cols {
    grid-template-columns: minmax(0, 60fr) minmax(0, 40fr);
    gap: 16px;
  }
}

@media (max-width: 1023px) {
  .wb-overview-cols {
    grid-template-columns: 1fr;
  }

  .wb-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 680px) {
  body.wb-shell {
    --wb-sidebar-w: 60px;
  }

  body.wb-shell .workbench-shell {
    padding: 16px 14px 48px calc(var(--wb-sidebar-w) + 14px);
  }

  .wb-quickstart {
    grid-template-columns: 1fr;
  }

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

  .wb-pagehead-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 4px;
  }

  .wb-pagehead-actions .new-map-cta {
    width: auto;
    padding-inline: 12px;
  }

  .wb-pagehead-actions .wb-pagehead-link {
    padding-inline: 7px;
    font-size: 12px;
  }
}

/* ==== 数据集市（marketplace DD7 → 二轮 UI 精修）====
   不再用巨大白色容器包全部内容：工具栏是独立白色条，卡片直接排在浅灰内容区。 */

.wb-panel-plain {
  gap: 0;
}

/* 统一筛选工具栏：左分类分段按钮 + 右搜索 / 排序，同一控件高度 34px */
.wb-market-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.wb-market-toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.wb-market-toolbar input[type="search"] {
  width: 220px;
  min-height: 34px;
}

.wb-market-toolbar select {
  width: auto;
  min-width: 108px;
  min-height: 34px;
}

/* 分类：紧凑分段按钮（贴合的一组，不做孤立胶囊） */
.wb-market-tags {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.wb-market-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 2px 12px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--ink-secondary, #374151);
  font-size: 13px;
  font-weight: 400;
}

.wb-market-chip:hover {
  color: var(--ink);
  border-color: transparent;
  background: rgba(0, 0, 0, 0.04);
}

.wb-market-chip.active {
  color: var(--brand-dark);
  border-color: var(--brand-line);
  background: var(--brand-soft);
  font-weight: 500;
}

.wb-market-chip-count {
  font-size: 12px;
  color: var(--muted);
}

.wb-market-chip.active .wb-market-chip-count {
  color: var(--brand-dark);
}

/* 结果数量：工具栏下方 13px 辅助文字（不用绿色，绿色只留成功态） */
.wb-market-staterow {
  margin: 4px 2px 0;
}

.wb-market-staterow .status {
  margin-top: 4px;
  min-height: 20px;
}

/* 纯数量提示不带状态圆点（圆点留给导入成功 / 失败反馈） */
.wb-market-staterow .status.muted::before {
  display: none;
}

/* 卡片网格：直接排在浅灰内容区；1440 正文 4 列、1150 正文 3 列、窄屏 2/1 列 */
.wb-market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

/* 数据资产卡：统一高度，整卡可点，悬停边框加深 + 轻阴影（不浮起不缩放） */
.wb-market-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 188px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.wb-market-card:hover,
.wb-market-card:focus-visible {
  border-color: var(--border, #d8dce3);
  box-shadow: var(--shadow-sm);
}

.wb-market-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

/* 数据类型图形：统一的几何类型占位图标，不用随机插画 */
.wb-market-type {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--brand-dark);
  font-size: 13px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
}

.wb-market-card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.wb-market-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border: 1px solid var(--brand-line);
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.wb-market-tag.is-format {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink-secondary, #374151);
}

.wb-market-used {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 20px;
  padding: 0 8px;
  border: 1px solid var(--success-line);
  border-radius: 4px;
  background: var(--success-bg);
  color: var(--success-dark);
  font-size: 12px;
  line-height: 1;
}

/* 右上角更多菜单（复用项目卡 ⋯ 菜单样式） */
.wb-market-more {
  flex: 0 0 auto;
}

.wb-market-more > summary {
  display: grid;
  width: 26px;
  min-height: 26px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.wb-market-more > summary::-webkit-details-marker {
  display: none;
}

.wb-market-more > summary:hover {
  border-color: var(--border, #d8dce3);
  color: var(--ink);
}

/* 卡片右上角菜单向下展开（项目卡默认向上） */
.wb-market-more .proj-more-menu {
  top: calc(100% + 6px);
  right: 0;
  bottom: auto;
}

.wb-market-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.wb-market-card-summary {
  display: -webkit-box;
  min-height: 40px;
  margin: 0;
  overflow: hidden;
  color: var(--ink-secondary, #374151);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 底部：元信息统一收口 + 操作区 */
.wb-market-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.wb-market-card-meta {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-market-card-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
}

/* 下载是集市主任务，始终可见；导入保留为轻量次级动作。 */
.wb-market-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 2px 12px;
  font-size: 12px;
}

.wb-market-import-link,
.wb-market-card-actions .wb-link-btn {
  font-size: 12px;
  white-space: nowrap;
}

/* 骨架屏：加载中保持网格布局稳定 */
.wb-market-card.is-skeleton {
  cursor: default;
  pointer-events: none;
}

.wb-sk {
  display: block;
  border-radius: 4px;
  background: linear-gradient(90deg, #f0f1f3 25%, #f7f8fa 40%, #f0f1f3 60%);
  background-size: 300% 100%;
  animation: wb-sk-shimmer 1.3s ease infinite;
}

.wb-sk.sk-chip { width: 40%; height: 20px; }
.wb-sk.sk-title { width: 70%; height: 18px; margin-top: 6px; }
.wb-sk.sk-line { width: 100%; height: 12px; }
.wb-sk.sk-line.short { width: 55%; }
.wb-sk.sk-foot { width: 80%; height: 14px; margin-top: auto; }

@keyframes wb-sk-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .wb-sk {
    animation: none;
  }
}

/* 空态 / 搜索无结果：简洁图标 + 说明 + 操作入口 */
.wb-market-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 20px;
  border: 1px dashed var(--border, #d8dce3);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: center;
}

.wb-market-empty i {
  font-size: 20px;
  color: var(--muted);
}

.wb-market-empty strong {
  font-size: 16px;
  color: var(--ink);
}

.wb-market-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.wb-market-empty button {
  margin-top: 6px;
}

/* 详情弹窗：左地图右信息 */
#marketDetailDialog {
  width: min(880px, calc(100vw - 48px));
}

.wb-market-detail {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(220px, 2fr);
  gap: 16px;
}

.wb-market-map-wrap {
  min-width: 0;
}

.wb-market-map {
  height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-soft);
}

.wb-market-truncated {
  margin: 6px 0 0;
  font-size: 12px;
}

.wb-market-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.wb-market-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: 13px;
}

.wb-market-meta dt {
  color: var(--muted);
}

.wb-market-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.wb-market-source {
  margin: 0;
  font-size: 12px;
}

/* 付费下载弹窗：沿用工作台卡片/表单令牌，强调报价而不是制造新的视觉层级。 */
.wb-market-download-dialog {
  width: min(980px, calc(100vw - 48px));
}

.wb-market-download-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: min(72vh, 720px);
  overflow: auto;
}

.wb-market-download-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-md);
  background: var(--brand-soft);
}

.wb-market-download-intro-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--brand-dark);
}

.wb-market-download-intro strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.wb-market-download-intro p {
  margin: 2px 0 0;
  color: var(--ink-secondary, #374151);
  font-size: 12px;
  line-height: 1.5;
}

.wb-market-download-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 18px;
  align-items: start;
}

.wb-market-download-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 18px;
}

.wb-market-download-summary {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.wb-market-download-summary-title {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.wb-market-download-section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.wb-market-download-section legend,
.wb-market-download-section-head h3 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.wb-market-format-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.wb-market-format {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink-secondary, #374151);
  text-align: left;
}

.wb-market-format > i {
  width: 24px;
  color: var(--muted);
  font-size: 20px;
  text-align: center;
}

.wb-market-format span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.wb-market-format strong {
  color: var(--ink);
  font-size: 13px;
}

.wb-market-format small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.wb-market-format:hover:not(:disabled) {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.wb-market-format.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
  background: var(--brand-soft);
}

.wb-market-format.active > i,
.wb-market-format.active strong {
  color: var(--brand-dark);
}

.wb-market-format:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.wb-market-crs-flow {
  display: grid;
  grid-template-columns: 112px 18px minmax(0, 1fr);
  gap: 9px;
  align-items: stretch;
}

.wb-market-crs-source {
  display: flex;
  min-height: 72px;
  flex-direction: column;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.wb-market-crs-source small,
.wb-market-crs-source span {
  color: var(--muted);
  font-size: 12px;
}

.wb-market-crs-source strong {
  margin: 2px 0;
  color: var(--ink);
  font-size: 14px;
}

.wb-market-crs-arrow {
  align-self: center;
  color: var(--brand);
  font-size: 12px;
  text-align: center;
}

.wb-market-crs-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.wb-market-crs {
  display: flex;
  min-width: 0;
  min-height: 72px;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted);
  text-align: left;
}

.wb-market-crs > i {
  width: 18px;
  flex: 0 0 auto;
  text-align: center;
}

.wb-market-crs span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.wb-market-crs strong {
  color: var(--ink);
  font-size: 12px;
}

.wb-market-crs small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.wb-market-crs:hover,
.wb-market-crs.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.wb-market-crs.active {
  box-shadow: 0 0 0 1px var(--brand);
  color: var(--brand-dark);
}

.wb-market-crs.active strong {
  color: var(--brand-dark);
}

.wb-market-download-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.wb-market-download-section-head h3 {
  margin-bottom: 2px;
}

.wb-market-download-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.wb-market-add-filter {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 5px;
  min-height: 30px;
  padding: 3px 10px;
  font-size: 12px;
}

.wb-market-filter-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wb-market-filter-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 118px minmax(160px, 1.25fr) 34px;
  gap: 8px;
  align-items: center;
}

.wb-market-filter-row select,
.wb-market-filter-row input {
  width: 100%;
  min-height: 34px;
}

.wb-market-filter-remove {
  display: grid;
  width: 34px;
  min-height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
}

.wb-market-filter-remove:hover {
  border-color: var(--danger-line, #fecaca);
  background: var(--danger-bg, #fff1f0);
  color: var(--danger, #dc2626);
}

.wb-market-filter-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

.wb-market-filter-empty[hidden] {
  display: none;
}

.wb-market-quote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.wb-market-download-summary .wb-market-quote {
  align-items: stretch;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
}

.wb-market-download-summary .wb-market-quote dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.wb-market-download-summary .wb-market-quote dl div {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.wb-market-download-summary .wb-market-quote dd {
  text-align: right;
}

.wb-market-download-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.wb-market-download-note i {
  margin-top: 2px;
  color: var(--brand-dark);
}

.wb-market-quote-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wb-market-quote-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand-dark);
}

.wb-market-quote-main small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.wb-market-quote-main strong {
  display: block;
  margin-top: 1px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

.wb-market-quote dl {
  display: flex;
  gap: 22px;
  margin: 0;
}

.wb-market-quote dl div {
  min-width: 78px;
}

.wb-market-quote dt {
  color: var(--muted);
  font-size: 12px;
}

.wb-market-quote dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.wb-market-quote.is-sufficient {
  border-color: var(--success-line);
  background: var(--success-bg);
}

.wb-market-quote.is-guest {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.wb-market-quote.is-insufficient,
.wb-market-quote.is-error {
  border-color: var(--danger-line, #fecaca);
  background: var(--danger-bg, #fff1f0);
}

.wb-market-quote.is-loading {
  opacity: 0.68;
}

.wb-market-download-message {
  min-height: 18px;
  margin: 0;
}

@media (max-width: 900px) {
  .wb-market-download-layout {
    grid-template-columns: 1fr;
  }

  .wb-market-download-summary .wb-market-quote dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wb-market-download-summary .wb-market-quote dl div {
    display: block;
  }

  .wb-market-download-summary .wb-market-quote dd {
    text-align: left;
  }
}

#marketRechargeLink {
  margin-right: auto;
  color: var(--danger, #dc2626);
}

#marketConfirmDownloadBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 760px) {
  .wb-market-detail {
    grid-template-columns: 1fr;
  }

  .wb-market-format-options {
    grid-template-columns: 1fr;
  }

  .wb-market-crs-flow {
    grid-template-columns: 1fr;
  }

  .wb-market-crs-source {
    min-height: 58px;
  }

  .wb-market-crs-arrow {
    transform: rotate(90deg);
  }

  .wb-market-filter-row {
    grid-template-columns: 1fr 108px 34px;
  }

  .wb-market-filter-row input {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .wb-market-filter-remove {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: stretch;
  }

  .wb-market-quote {
    align-items: flex-start;
    flex-direction: column;
  }

  .wb-market-quote dl {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .wb-market-download-dialog {
    width: calc(100vw - 20px);
  }

  .wb-market-download-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .wb-market-crs-options {
    grid-template-columns: 1fr;
  }

  .wb-market-filter-row {
    grid-template-columns: 1fr 34px;
  }

  .wb-market-filter-row select,
  .wb-market-filter-row input {
    grid-column: 1;
  }

  .wb-market-filter-row select:nth-child(2) {
    grid-row: 2;
  }

  .wb-market-filter-row input {
    grid-row: 3;
  }

  .wb-market-filter-remove {
    grid-column: 2;
    grid-row: 1 / 4;
  }
}

/* 「我的地图」工具条（卡内不再重复标题）：搜索居左、筛选排序推到右侧 */
.projects-heading.is-inline-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.projects-heading.is-inline-search .wb-filterbar {
  flex: 1;
  justify-content: flex-start;
  margin-left: 0;
}

.projects-heading.is-inline-search .wb-filterbar select:first-of-type {
  margin-left: auto;
}

.projects-heading.is-inline-search .project-search {
  margin: 0;
  flex: 0 1 auto;
}

.projects-heading.is-inline-search .project-search input {
  width: min(300px, 100%);
}

/* 项目卡片 ⋯ 更多菜单 */
.proj-more {
  position: relative;
}

.proj-more > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--ink-secondary, #6b6257);
  cursor: pointer;
}

.proj-more > summary::-webkit-details-marker {
  display: none;
}

.proj-more > summary:hover {
  border-color: var(--brand, #fa8c16);
  color: var(--brand, #fa8c16);
}

.proj-more-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  padding: 5px;
  z-index: calc(var(--z-dock) + 2);
  display: flex;
  flex-direction: column;
}

.proj-more-menu a,
.proj-more-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--ink, #26221d);
  cursor: pointer;
  text-decoration: none;
}

.proj-more-menu a:hover,
.proj-more-menu button:hover {
  background: var(--brand-soft, #fff7ed);
  color: var(--brand-dark, #d46b08);
}

.proj-more-menu .is-danger {
  color: #dc2626;
}

.proj-more-menu .is-danger:hover {
  background: #fef2f2;
  color: #dc2626;
}


@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
   portal-ui（spec 20260715-mapstudio-portal-ui-redesign）新增部件
   ①统一工具/数据页头（T-UI-23，design §4.3，设计图 3 为壳权威）
   ②工作台首页信息流（T-UI-43，design §5.3，设计图 2 为 UI 权威）
   ══════════════════════════════════════════════════════════════════ */

/* ── 统一页头：图标方块 + 标题/一句话 + 右侧动作 ── */
.wb-page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.wb-page-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  font-size: 20px;
  color: var(--brand);
  border-radius: var(--radius-md);
  background: var(--brand-soft);
}

.wb-page-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.wb-page-copy h1 {
  margin: 0;
  font-size: var(--fs-h1, 20px); /* 字阶归位 v2：22 → 20 */
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

/* 页头面包屑（spec 20260719 T-C1 插槽，AntD 色阶：.45 → hover .88 + 浅灰底） */
.wb-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  margin-bottom: 2px;
  color: var(--muted, rgba(0, 0, 0, 0.45));
  font-size: var(--fs-caption, 12px);
  flex-wrap: wrap;
}

.wb-breadcrumb a {
  padding: 0 2px;
  border-radius: 4px;
  color: var(--muted, rgba(0, 0, 0, 0.45));
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.wb-breadcrumb a:hover {
  color: var(--ink, rgba(0, 0, 0, 0.88));
  background: rgba(0, 0, 0, 0.04);
}

.wb-breadcrumb-cur {
  color: var(--ink, rgba(0, 0, 0, 0.88));
}

.wb-page-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.wb-page-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

@media (max-width: 720px) {
  .wb-page-header {
    flex-wrap: wrap;
  }

  .wb-page-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ── 首页信息流「最新动态」卡（作业 + 分享到期 + lazy 取数动态混排） ── */
.wb-feed-card {
  margin-top: 24px;
}

.wb-feed-card[hidden] {
  display: none;
}

.wb-feed-list {
  display: grid;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  list-style: none;
}

.wb-feed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 16px;
}

.wb-feed-row + .wb-feed-row {
  border-top: 1px solid var(--line);
}

.wb-feed-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  font-size: 13px;
  color: var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
}

.wb-feed-icon.is-warning {
  color: var(--warning-dark);
  background: var(--warning-bg);
}

.wb-feed-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.wb-feed-copy strong {
  overflow: hidden;
  max-width: 100%;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-feed-copy small {
  color: var(--muted);
  font-size: 12px;
}

.wb-status {
  flex: none;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 12px;
}

.wb-status.is-success {
  border: 1px solid var(--success-line);
  background: var(--success-bg);
  color: var(--success-dark);
}

.wb-status.is-failed {
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
  color: var(--danger-dark);
}

.wb-status.is-running {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.wb-status.is-cancelled {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.wb-feed-time {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.wb-feed-action {
  flex: none;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.wb-feed-action:hover {
  color: var(--brand);
  text-decoration: underline;
}

/* 动态卡 / 待处理卡底部「查看全部动态 →」：居中弱化链接（button 与 a 通用） */
.wb-feed-foot {
  display: block;
  width: 100%;
  min-height: 0;
  margin-top: 10px;
  padding: 6px 0 0;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 400;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.wb-feed-foot:hover {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--brand);
  text-decoration: underline;
}

.wb-feed-foot[hidden] {
  display: none;
}

/* ── 首页右栏「待处理」提醒卡（2026-07-16 改版）：失败作业重试 + 分享到期续期 ── */
.wb-pending-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.wb-pending-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.wb-pending-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.wb-pending-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.wb-pending-icon.is-danger {
  color: var(--danger-dark);
  background: var(--danger-bg);
}

.wb-pending-icon.is-warning {
  color: var(--warning-dark);
  background: var(--warning-bg);
}

.wb-pending-copy {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-pending-action {
  flex: none;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.wb-pending-action:hover {
  color: var(--brand);
  text-decoration: underline;
}

.wb-pending-card .wb-feed-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* ── 首页侧列「广场精选」2×2 缩略卡 ── */
.wb-plaza-picks {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.wb-plaza-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.wb-plaza-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wb-plaza-card:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
}

.wb-plaza-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-soft);
}

.wb-plaza-caption {
  display: block;
  overflow: hidden;
  padding: 6px 8px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-plaza-more {
  display: inline-block;
  margin-top: 10px;
  color: var(--brand-dark);
  font-size: 13px;
  text-decoration: none;
}

.wb-plaza-more:hover {
  text-decoration: underline;
}

/* ============ 我的地图：回收站 + 批量管理（spec 20260718 T-AM-20/21） ============ */

.wb-maps-subactions {
  display: flex;
  justify-content: flex-end;
  margin: 2px 0 6px;
}

.wb-maps-subactions .wb-link-btn.is-empty {
  color: var(--text-tertiary, #9ca3af);
}

.wb-trash-count {
  display: inline-block;
  min-width: 18px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--brand, #fa8c16);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.wb-trash-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
}

.wb-trash-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.wb-trash-head {
  position: relative;
  padding: 16px 20px 10px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.wb-trash-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.wb-trash-head p {
  margin: 0;
  font-size: 13px;
}

.wb-trash-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.wb-trash-close:hover {
  background: var(--surface-soft, #f3f4f6);
}

.wb-trash-dialog .status {
  padding: 6px 20px 0;
}

.wb-trash-list {
  max-height: min(52vh, 420px);
  margin: 0;
  padding: 8px 12px 14px;
  overflow-y: auto;
  list-style: none;
}

.wb-trash-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border, #eef0f3);
}

.wb-trash-item:last-child {
  border-bottom: 0;
}

.wb-trash-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.wb-trash-main strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-trash-main .muted {
  font-size: 12px;
}

.wb-trash-empty {
  padding: 28px 8px;
  color: var(--text-tertiary, #9ca3af);
  font-size: 13px;
  text-align: center;
}

.wb-batchbar {
  position: fixed;
  bottom: 18px;
  left: 50%;
  z-index: var(--z-drawer);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  transform: translateX(-50%);
}

.wb-batchbar span {
  font-size: 14px;
  font-weight: 500;
}

.proj-batch-check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
  cursor: pointer;
}

.proj-batch-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand, #fa8c16);
  cursor: pointer;
}

.project-grid.is-batch .project-card {
  position: relative; /* 复选框绝对定位锚点 */
  cursor: pointer;
}

.project-grid.is-batch .project-card .cover-hover-cta {
  display: none;
}

.project-grid.is-batch .project-card.is-selected {
  outline: 2px solid var(--brand, #fa8c16);
  outline-offset: 1px;
}

/* ============ 我的数据独立列表页（spec 20260718 T-AM-11~13） ============ */

.dataset-standalone-shell .workbench-section {
  margin-top: var(--space-3, 12px);
}

/* 数据行卡移动端（断点归位 v2：680 → 768） */
@media (max-width: 768px) {
  .dataset-item {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-1, 4px);
  }

  .dataset-columns {
    max-width: 100%;
  }
}

/* 结构化空态（spec 20260719 T-C2，AntD Empty 协议） */
.ds-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2, 8px);
  padding: var(--space-8, 32px) var(--space-4, 16px);
  border: 1px solid var(--line, #f0f0f0);
  border-radius: var(--radius-md, 8px);
  background: var(--surface, #fff);
  text-align: center;
}

/* AntD Empty 灰盒插画（纯 CSS，零图片依赖） */
.ds-empty-icon {
  position: relative;
  display: block;
  width: 64px;
  height: 40px;
  border: 1px solid var(--line, #f0f0f0);
  border-radius: 4px;
  background: linear-gradient(#f5f5f5, #fafafa);
}

.ds-empty-icon::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 18px;
  left: 18px;
  height: 6px;
  border-radius: 3px;
  background: #e8e8e8;
}

.ds-empty-title {
  margin: 0;
  color: var(--muted, rgba(0, 0, 0, 0.45));
  font-size: var(--fs-body, 14px);
}

.ds-empty-hint {
  margin: 0 0 var(--space-1, 4px);
  color: var(--muted, rgba(0, 0, 0, 0.45));
  font-size: var(--fs-caption, 12px);
}

/* 骨架行卡（spec 20260719 T-C2，AntD Skeleton active 波浪） */
.sk-row {
  display: flex;
  align-items: center;
  gap: var(--space-4, 16px);
  padding: var(--space-4, 16px) var(--space-5, 20px);
  border: 1px solid var(--line, #f0f0f0);
  border-radius: var(--radius-md, 8px);
  background: var(--surface, #fff);
}

.skeleton {
  position: relative;
  display: block;
  height: 14px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 25%, rgba(255, 255, 255, 0.55) 37%, transparent 63%);
  background-size: 400% 100%;
  animation: ds-skeleton-wave 1.4s ease infinite;
}

@keyframes ds-skeleton-wave {
  from { background-position: 100% 50%; }
  to { background-position: 0 50%; }
}

.skeleton.sk-w-36 { width: 36%; height: 16px; }
.skeleton.sk-w-22 { width: 22%; }
.skeleton.sk-w-14 { width: 14%; margin-left: auto; }

a.ds-name-link {
  color: inherit;
  text-decoration: none;
}

a.ds-name-link:hover {
  color: var(--brand-heavy, #ad4e00);
  text-decoration: underline;
}

.dataset-actions .ds-more {
  align-self: center;
}

/* ⋯ 收纳菜单降噪：无边框小尺寸，与文字链同排不突兀 */
.dataset-actions .ds-more > summary {
  width: 28px;
  min-height: 28px;
  border: 0;
  background: transparent;
}

.dataset-actions .ds-more > summary:hover {
  color: var(--ink, rgba(0, 0, 0, 0.88));
  background: rgba(0, 0, 0, 0.06);
}

/* 整卡可点（AntD hoverable）：描边隐去 + 三层阴影升起 */
.dataset-item.is-clickable {
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dataset-item.is-clickable:hover {
  border-color: transparent;
  box-shadow: var(--shadow-card-hover);
}

.ds-ref-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: var(--space-4, 16px) var(--space-5, 20px);
  border: 1px solid var(--line, #f0f0f0);
  border-radius: var(--radius-lg, 12px); /* 大弹层允许 12 */
}

/* 共享确认/输入弹窗（spec 20260719 U7，ds_dialogs.js 动态创建） */
.ds-shared-dialog {
  width: min(420px, calc(100vw - 32px));
}

.ds-shared-dialog h3 {
  margin: 0 0 10px;
  font-size: var(--fs-h2, 16px);
}

.ds-shared-dialog p {
  margin: 0 0 14px;
  font-size: var(--fs-body, 14px);
  line-height: 1.6;
}

.ds-dialog-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.ds-dialog-field input {
  padding: 5px 11px;
  border: 1px solid var(--border, #d9d9d9);
  border-radius: var(--radius-sm, 6px);
  font-size: var(--fs-body, 14px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ds-dialog-field input:hover {
  border-color: var(--brand-hover, #ffa940);
}

.ds-dialog-field input:focus {
  border-color: var(--brand, #fa8c16);
  outline: none;
  box-shadow: var(--focus-ring);
}

.ds-ref-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.ds-ref-dialog h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.ds-ref-dialog p {
  margin: 0 0 10px;
  font-size: 13px;
}

.ds-ref-list {
  max-height: 40vh;
  margin: 0 0 12px;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.ds-ref-list li {
  padding: 8px 2px;
  border-bottom: 1px solid var(--border, #eef0f3);
  font-size: 14px;
}

.ds-ref-list li:last-child {
  border-bottom: 0;
}

.ds-ref-list a {
  color: var(--brand-dark, #d46b08);
  text-decoration: none;
}

.ds-ref-list a:hover {
  text-decoration: underline;
}

.ds-ref-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============ 数据集管理页（spec 20260718 T-AM-14~19） ============ */

.ds-manage-header h1 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ds-manage-header h1 #dsTitleText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-rename-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: var(--radius-sm, 6px);
  background: transparent;
  color: var(--muted, rgba(0, 0, 0, 0.45));
  font-size: var(--fs-caption, 12px);
  cursor: pointer;
}

.ds-rename-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink, rgba(0, 0, 0, 0.88));
}

.is-danger-text {
  color: var(--danger-dark, #cf1322);
}

.ds-manage-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--space-4, 16px);
  margin-top: var(--space-3, 12px);
}

/* 断点归位 v2：1024 → 992 */
@media (max-width: 992px) {
  .ds-manage-grid {
    grid-template-columns: 1fr;
  }
}

.ds-manage-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 12px);
  min-width: 0;
}

/* 卡片归位 v2：描边 --line、圆角 8（原 12 超标） */
.ds-card {
  padding: var(--space-4, 16px) var(--space-5, 20px);
  border: 1px solid var(--line, #f0f0f0);
  border-radius: var(--radius-md, 8px);
  background: var(--surface, #fff);
}

.ds-card h2 {
  margin: 0 0 var(--space-3, 12px);
  font-size: var(--fs-h3, 14px);
  font-weight: 600;
}

.ds-counts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2, 8px);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* AntD Statistic 形态：标签在上（.45 12px）、数值 24px 语义色。
   DOM 里 <b> 在 <small> 前，column-reverse 免改模板换显示顺序 */
.ds-counts button {
  display: flex;
  width: 100%;
  flex-direction: column-reverse;
  align-items: flex-start;
  padding: var(--space-2, 8px) var(--space-3, 12px);
  border: 1px solid var(--line, #f0f0f0);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface, #fff);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease;
}

.ds-counts button:hover {
  border-color: var(--brand-line, #ffd591);
}

.ds-counts b {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ds-counts small {
  color: var(--muted, rgba(0, 0, 0, 0.45));
  font-size: var(--fs-caption, 12px);
}

.ds-correct-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.ds-field-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  /* 字段多时（19+）不无限撑高侧栏卡片，区内滚动 */
  max-height: 132px;
  overflow-y: auto;
}

/* AntD 默认 Tag 形态：灰底细描边 4px 圆角 */
.ds-field-chip {
  max-width: 100%;
  overflow: hidden;
  padding: 0 7px;
  border: 1px solid var(--border, #d9d9d9);
  border-radius: 4px;
  background: var(--surface-soft, #fafafa);
  color: var(--ink-secondary, rgba(0, 0, 0, 0.65));
  font-size: var(--fs-caption, 12px);
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-preview-map {
  height: 220px;
  border-radius: 8px;
  background: var(--surface-soft, #f3f4f6);
}

.ds-manage-records {
  min-width: 0;
  padding: var(--space-4, 16px) var(--space-5, 20px);
  border: 1px solid var(--line, #f0f0f0);
  border-radius: var(--radius-md, 8px);
  background: var(--surface, #fff);
}

.ds-records-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2, 8px);
  margin-bottom: var(--space-3, 12px);
}

.ds-records-toolbar .dataset-search {
  flex: 1;
  min-width: 180px;
  max-width: 340px;
}

/* 记录筛选下拉（AntD Select 形态）：自绘箭头、hover 转橙；
   覆盖全局 select{width:100%} 收成行内控件 */
.ds-records-toolbar select {
  width: auto;
  min-width: 112px;
  min-height: var(--control-h, 32px);
  padding: 4px 28px 4px 11px;
  border: 1px solid var(--border, #d9d9d9);
  border-radius: var(--radius-sm, 6px);
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='rgba(0,0,0,0.25)' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink);
  font-size: var(--fs-body, 14px);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}

.ds-records-toolbar select:hover {
  border-color: var(--brand-hover, #ffa940);
}

/* 状态 Tabs（AntD 线性墨条，替代橙色药丸）：独占一行 + 底部分隔线 */
.ds-status-tabs {
  display: flex;
  width: 100%;
  gap: var(--space-8, 32px);
  margin-bottom: var(--space-1, 4px);
  border-bottom: 1px solid var(--line, #f0f0f0);
}

.ds-tab {
  position: relative;
  min-height: 0;
  padding: 8px 0 11px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink, rgba(0, 0, 0, 0.88));
  font-size: var(--fs-body, 14px);
  cursor: pointer;
  transition: color 0.2s ease;
}

.ds-tab:hover {
  color: var(--brand, #fa8c16);
  border: 0;
}

.ds-tab.active {
  color: var(--brand, #fa8c16);
  font-weight: 500;
  background: none;
  border: 0;
}

.ds-tab.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--brand, #fa8c16);
}

/* tab 计数后缀（JS 渲染） */
.ds-tab .ds-tab-count {
  margin-left: 4px;
  color: var(--muted, rgba(0, 0, 0, 0.45));
  font-size: var(--fs-caption, 12px);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

/* 表格（AntD Table）：外框 8px 圆角、表头 #fafafa 600 字重、行 hover */
.ds-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line, #f0f0f0);
  border-radius: var(--radius-md, 8px);
}

.ds-records-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-body, 14px);
}

.ds-records-table th,
.ds-records-table td {
  max-width: 220px;
  overflow: hidden;
  padding: 10px var(--space-4, 16px);
  border-bottom: 1px solid var(--line, #f0f0f0);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-records-table th {
  color: var(--ink, rgba(0, 0, 0, 0.88));
  font-size: var(--fs-body, 14px);
  font-weight: 600;
  background: var(--surface-soft, #fafafa);
}

.ds-records-table tbody tr:last-child td {
  border-bottom: 0;
}

.ds-row-clickable {
  cursor: pointer;
  transition: background 0.2s ease;
}

.ds-row-clickable:hover {
  background: var(--surface-soft, #fafafa);
}

.ds-th-sortable {
  cursor: pointer;
  user-select: none;
}

.ds-th-sortable:hover {
  color: var(--brand, #fa8c16);
}

.ds-empty-cell {
  padding: var(--space-8, 32px) var(--space-3, 12px);
  color: var(--muted, rgba(0, 0, 0, 0.45));
  text-align: center;
}

/* 解析概况四宫格语义色（v2 令牌，与徽标同色系） */
#dsCountSuccess { color: var(--success-dark, #389e0d); }
#dsCountFailed { color: var(--danger-dark, #cf1322); }
#dsCountUnparsed { color: var(--muted, rgba(0, 0, 0, 0.45)); }
#dsCountReview { color: var(--warning-dark, #d48806); }

/* 状态徽标（AntD Tag 预设色：浅底 + 同色系描边 + 4px 圆角） */
.ds-badge {
  display: inline-block;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: var(--fs-caption, 12px);
  line-height: 20px;
}

.ds-badge.is-success { background: var(--success-bg, #f6ffed); border-color: var(--success-line, #b7eb8f); color: var(--success-dark, #389e0d); }
.ds-badge.is-failed { background: var(--danger-bg, #fff2f0); border-color: var(--danger-line, #ffccc7); color: var(--danger-dark, #cf1322); }
.ds-badge.is-unparsed { background: var(--surface-soft, #fafafa); border-color: var(--border, #d9d9d9); color: var(--muted, rgba(0, 0, 0, 0.45)); }
.ds-badge.is-review { background: var(--warning-bg, #fffbe6); border-color: var(--warning-line, #ffe58f); color: var(--warning-dark, #d48806); }

.ds-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.ds-row-dialog {
  width: min(620px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line, #f0f0f0);
  border-radius: var(--radius-lg, 12px); /* 大弹层允许 12 */
}

.ds-row-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.ds-row-head {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: var(--space-3, 12px);
  padding: 14px 44px 10px 20px; /* 右侧留出关闭钮位 */
  border-bottom: 1px solid var(--line, #f0f0f0);
}

.ds-row-head h3 {
  margin: 0;
  font-size: var(--fs-h2, 16px);
}

.ds-row-head .wb-link-btn {
  font-size: var(--fs-caption, 12px);
  white-space: nowrap;
}

.ds-row-dialog .status {
  padding: 6px 20px 0;
}

.ds-row-body {
  max-height: min(56vh, 480px);
  padding: 10px 20px;
  overflow-y: auto;
}

.ds-row-section {
  margin-bottom: 14px;
}

.ds-row-section h4 {
  margin: 0 0 var(--space-2, 8px);
  font-size: var(--fs-caption, 12px);
  color: var(--muted, rgba(0, 0, 0, 0.45));
}

.ds-row-props {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
}

.ds-prop-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2, 8px);
  font-size: var(--fs-body, 14px);
}

.ds-prop-row span {
  overflow: hidden;
  color: var(--muted, rgba(0, 0, 0, 0.45));
  font-size: var(--fs-caption, 12px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 输入交互态（AntD）：hover 橙描边、focus 光环 */
.ds-prop-row input,
.ds-correct-row input {
  padding: 4px 11px;
  border: 1px solid var(--border, #d9d9d9);
  border-radius: var(--radius-sm, 6px);
  font-size: var(--fs-body, 14px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ds-prop-row input:hover,
.ds-correct-row input:hover {
  border-color: var(--brand-hover, #ffa940);
}

.ds-prop-row input:focus,
.ds-correct-row input:focus {
  border-color: var(--brand, #fa8c16);
  outline: none;
  box-shadow: var(--focus-ring);
}

.ds-correct-row {
  display: flex;
  gap: var(--space-2, 8px);
  margin-bottom: var(--space-2, 8px);
}

.ds-correct-row input {
  flex: 1;
  min-width: 0;
}

.ds-row-foot {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  padding: var(--space-3, 12px) var(--space-5, 20px);
  border-top: 1px solid var(--line, #f0f0f0);
}

.ds-row-foot-gap {
  flex: 1;
}

.ds-export-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  /* proj-more 的 summary 是 34px 见方的「⋯」图标钮；这里是带文字的
     页头按钮，必须放开宽度，否则文字溢出压到相邻按钮 */
  width: auto;
  min-width: 0;
  padding: 4px 15px;
}

.ds-export-more > summary::-webkit-details-marker {
  display: none;
}

/* 页头导出菜单向下弹出（proj-more-menu 默认向上，是给底部卡片菜单用的） */
.ds-export-more {
  position: relative;
}

.ds-export-more .proj-more-menu {
  top: calc(100% + 6px);
  bottom: auto;
  min-width: 200px;
}

/* 页头动作区对齐：按钮统一高度、⋯菜单不被压扁 */
.ds-manage-header .wb-page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------------- 单行管理页（spec 20260719）：左地图 + 右校正/属性栏 ---------------- */
/* 字阶回归 v2 SSOT（T-B7）：原 #dsRowRoot 私有字阶（18/16/14/13/12.5/11）已移除，
   页面沿用全局 --fs-* 五级；小尺寸按钮走 .button.is-sm。 */

.dsr-grid {
  display: grid;
  align-items: start;
  /* 地图是主角：右栏随视口收窄（30% 封顶 360px），中小屏地图仍占 7 成 */
  grid-template-columns: minmax(0, 1fr) clamp(300px, 30%, 360px);
  gap: var(--space-4, 16px);
}

/* 地图卡 sticky：滚动右栏长属性列表时地图常驻可见；收窄内边距让地图更大 */
.dsr-map-card {
  position: sticky;
  top: var(--space-3, 12px);
  padding: var(--space-3, 12px) var(--space-4, 16px);
}

.dsr-map-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-2, 8px);
  margin-bottom: var(--space-2, 8px);
}

.dsr-map-head h2 {
  margin: 0;
}

.dsr-map-wrap {
  position: relative;
}

.dsr-map {
  /* 视口高度基本吃满（页头 + 卡头 ≈ 220px），地图占据绝对主体 */
  height: calc(100vh - 220px);
  min-height: 480px;
  border-radius: var(--radius-sm, 6px);
  background: var(--surface-soft, #fafafa);
  /* 层叠上下文隔离 Leaflet 内部 z（控件 800 / .leaflet-top 1000），
     页面浮层才能用 --z-* 七层而不必层层加码。同 maker #map 模式。 */
  position: relative;
  z-index: var(--z-map, 100);
  isolation: isolate;
}

/* 点选暗示：hover 即十字光标，与红色准星标记呼应（U3） */
#dsrMap.leaflet-container {
  cursor: crosshair;
}

/* 校正成功反馈（AntD message 形态）：白底 + 浮层阴影 + 绿色 ✓ 圆标 */
.dsr-toast {
  position: absolute;
  top: var(--space-4, 16px);
  left: 50%;
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  padding: 9px 16px;
  border-radius: var(--radius-md, 8px);
  background: var(--surface, #fff);
  color: var(--ink, rgba(0, 0, 0, 0.88));
  font-size: var(--fs-body, 14px);
  white-space: nowrap;
  box-shadow: var(--shadow-pop);
  transform: translateX(-50%);
  animation: dsr-toast-in 0.18s ease-out;
}

.dsr-toast::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--success, #52c41a);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.dsr-toast.is-leaving {
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes dsr-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.dsr-pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--brand, #fa8c16);
  border-radius: 50%;
  animation: dsr-pulse-ring 0.8s ease-out 2;
}

@keyframes dsr-pulse-ring {
  from { opacity: 0.9; transform: scale(0.25); }
  to { opacity: 0; transform: scale(1); }
}

.dsr-map-tip {
  color: var(--muted, rgba(0, 0, 0, 0.45));
  font-size: var(--fs-caption, 12px);
}

/* 待应用条：悬浮在地图内底部居中（AntD 浮层阴影），确认动作不离开点位视线 */
.dsr-pick-bar {
  position: absolute;
  bottom: var(--space-4, 16px);
  left: 50%;
  z-index: var(--z-drawer); /* 压过 Leaflet pane */
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  padding: 8px 8px 8px 14px;
  border-radius: var(--radius-md, 8px);
  background: var(--surface, #fff);
  box-shadow: var(--shadow-pop);
  transform: translateX(-50%);
  white-space: nowrap;
}

.dsr-pick-coords {
  color: var(--ink, rgba(0, 0, 0, 0.88));
  font-size: var(--fs-body, 14px);
  font-variant-numeric: tabular-nums;
}

.dsr-pick-coords b {
  color: var(--brand-heavy, #ad4e00);
  font-weight: 600;
}

.dsr-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-3, 12px);
  min-width: 0;
}

/* 页头压缩：把纵向空间尽量让给地图 */
#dsRowRoot .wb-page-header {
  margin-bottom: var(--space-3, 12px);
}

/* 面包屑样式已升级为共享 .wb-breadcrumb（页头 include 插槽，见 wb-page-header 段） */

/* ① 身份卡：名称 + 状态徽标 + 坐标 */
.dsr-summary-name-row {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  flex-wrap: wrap;
}

.dsr-summary-name {
  font-size: var(--fs-h2, 16px);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.dsr-summary-address {
  margin: 6px 0 0;
  color: var(--ink-secondary, rgba(0, 0, 0, 0.65));
  font-size: var(--fs-caption, 12px);
  overflow-wrap: anywhere;
}

.dsr-geom-line {
  margin: var(--space-2, 8px) 0 0;
  font-size: var(--fs-body, 14px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dsr-error-line {
  margin: 6px 0 0;
  color: var(--danger-dark, #cf1322);
  font-size: var(--fs-caption, 12px);
}

.dsr-confirm-btn {
  margin-top: var(--space-3, 12px);
}

/* ② 操作卡：三种定位方式按组分层 */
.dsr-correct-group {
  margin-bottom: var(--space-4, 16px);
}

.dsr-correct-group:last-of-type {
  margin-bottom: 0;
}

.dsr-correct-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--ink-secondary, rgba(0, 0, 0, 0.65));
  font-size: var(--fs-caption, 12px);
}

/* 费用标签（AntD warning Tag） */
.dsr-cost-tag {
  display: inline-block;
  padding: 0 7px;
  border: 1px solid var(--warning-line, #ffe58f);
  border-radius: 4px;
  color: var(--warning-dark, #d48806);
  background: var(--warning-bg, #fffbe6);
  font-size: 12px;
  line-height: 18px;
}

/* 充值流量豆入口：标签旁常驻 + 余额不足报错内联（白底橙字用 brand-heavy） */
.dsr-recharge-link {
  margin-left: 2px;
  color: var(--brand-heavy, #ad4e00);
  font-size: var(--fs-caption, 12px);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.dsr-recharge-link:hover {
  color: var(--brand, #fa8c16);
  text-decoration: underline;
}

/* 「去地图点选」引导时短暂高亮地图提示语 */
.dsr-map-tip.is-flash {
  color: var(--brand-heavy, #ad4e00);
  font-weight: 600;
}

/* 待应用标记：红色十字准星（纯 CSS，白色光晕保证深浅底图都醒目；
   默认 Leaflet 图标 png 不在本仓静态目录，divIcon 零图片依赖） */
.dsr-pick-pin {
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.95));
}

.dsr-pick-pin::before {
  content: "";
  position: absolute;
  inset: 7px;
  box-sizing: border-box;
  border: 2.5px solid #e02020;
  border-radius: 50%;
}

.dsr-pick-pin::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#e02020, #e02020) 50% 0 / 2.5px 9px no-repeat,
    linear-gradient(#e02020, #e02020) 50% 100% / 2.5px 9px no-repeat,
    linear-gradient(#e02020, #e02020) 0 50% / 9px 2.5px no-repeat,
    linear-gradient(#e02020, #e02020) 100% 50% / 9px 2.5px no-repeat,
    radial-gradient(circle, #e02020 3px, transparent 3.5px) 50% 50% no-repeat;
}

/* ③ 属性卡：标题行带保存按钮；默认收敛 + 展开全部 */
.dsr-props-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2, 8px);
  margin-bottom: var(--space-3, 12px);
}

.dsr-props-head h2 {
  margin: 0;
}

.dsr-props-toggle {
  display: block;
  margin-top: var(--space-3, 12px);
  font-size: var(--fs-caption, 12px);
}

/* 断点归位 v2：960 → 992 */
@media (max-width: 992px) {
  .dsr-grid {
    grid-template-columns: 1fr;
  }

  .dsr-map-card {
    position: static;
  }

  .dsr-map {
    height: 320px;
    min-height: 0;
  }

  .dsr-pick-bar {
    gap: var(--space-2, 8px);
    white-space: normal;
  }
}

/* ============================================================
   工作台顶导壳（spec 20260720-mapstudio-workbench-map-first）
   侧栏上移顶部导航 + 四 Tab 资产卡。body 加 wb-topshell 修饰：
   --wb-sidebar-w 归零（既有让位 padding 全部自动失效），主区改
   1240px 居中（原型口径）。侧栏部件与其 CSS 段已随 T-D2 删除，
   全部工作台壳页（含工具系）统一走本段顶导。
   ============================================================ */
body.wb-shell.wb-topshell {
  --wb-sidebar-w: 0px;
  --wb-topnav-h: 60px;
  /* map-first 容器高度让位（工具页 calc(100dvh - var(--dtb-nav-h, 0px)) 口径） */
  --dtb-nav-h: var(--wb-topnav-h);
}

body.wb-shell.wb-topshell .wb-sidebar {
  display: none;
}

body.wb-shell.wb-topshell .workbench-shell {
  /* body.wb-shell 是 flex 纵向容器：交叉轴 auto margin 会让 flex 子项
     收缩到内容宽（fit-content），必须给定 width 才能撑满到 max-width */
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}

body.wb-shell.wb-topshell .workbench-footer {
  padding: 14px 24px 20px;
  text-align: center;
}

/* ---- 顶部导航（浅色皮肤，D-B 裁决） ---- */
.wb-topnav {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.wb-topnav-inner {
  /* 用户裁定（2026-07-20 18:23）：顶导不随内容 1240 居中，横向铺满
     （品牌贴左、账户贴右，AntD Pro 头部惯例）；主区仍 1240 居中 */
  max-width: none;
  margin: 0;
  padding: 0 24px;
  height: var(--wb-topnav-h, 60px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wb-topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 20px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink);
}

.wb-topnav-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #fff;
  font-size: 16px;
  background: linear-gradient(135deg, var(--brand-hover), var(--brand-dark));
  display: grid;
  place-items: center;
}

.wb-topnav-copy {
  line-height: 1.15;
}

.wb-topnav-copy strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.wb-topnav-copy small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.wb-topnav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.wb-topnav-menu::-webkit-scrollbar {
  display: none;
}

/* overflow-x:auto 会把菜单变成裁剪容器，剪掉内部下拉（公共数据）；
   下拉展开期间解除裁剪（:has 现代浏览器均支持），收起后恢复可横滚 */
.wb-topnav-menu:has(details[open]) {
  overflow: visible;
}

/* 一级主导航（AntD Menu 口径，03 册 §6）：15px / 默认主文字色 .88 / 500 字重，
   激活与 hover 转 --brand-dark 橙字——与下方二级 Tabs（14px / .65 / 常规）拉开层级 */
.wb-topnav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--wb-topnav-h, 60px);
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  list-style: none;
}

.wb-topnav-item::-webkit-details-marker {
  display: none;
}

.wb-topnav-item:hover {
  color: var(--brand-dark);
}

.wb-topnav-item.is-on {
  color: var(--brand-dark);
  font-weight: 600;
}

.wb-topnav-item.is-on::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--brand);
}

.wb-topnav-caret {
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.wb-topnav-dd {
  position: relative;
}

.wb-topnav-dd > summary {
  list-style: none;
  cursor: pointer;
}

.wb-topnav-dd > summary::-webkit-details-marker {
  display: none;
}

.wb-topnav-dd[open] > summary .wb-topnav-caret {
  transform: rotate(180deg);
}

.wb-topnav-pop {
  position: absolute;
  top: calc(100% - 6px);
  left: 0;
  z-index: calc(var(--z-topbar) + 1);
  min-width: 168px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
}

.wb-topnav-pop a,
.wb-topnav-pop button {
  display: flex;
  align-items: center;
  /* 全局 button 基线是 inline-flex + justify-content:center（workbench.css 按钮段），
     菜单项必须左对齐，显式覆盖掉居中 */
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  min-height: 0;
  padding: 7px 11px;
  border: 0;
  background: none;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.wb-topnav-pop a:hover,
.wb-topnav-pop button:hover {
  background: var(--surface-soft);
}

.wb-topnav-pop a.is-on {
  color: var(--brand-dark);
  font-weight: 600;
}

.wb-topnav-pop .fas {
  width: 16px;
  text-align: center;
  color: var(--muted);
}

.wb-topnav-pop .is-danger {
  color: var(--danger-dark);
}

.wb-topnav-pop-head {
  display: block;
  padding: 6px 11px 7px;
  margin-bottom: 3px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

/* ---- 卡片式 mega 下拉（2026-07-24）：对齐首页 _dtb_navbar 的 .dtb-nav__mega-card
   观感——白底大圆角面板 + 网格卡（品牌色图标 / 名称 / 一句话副标题）。
   <992px 这些下拉整组收进「更多」抽屉（保持列表形态），不受影响。 ---- */
.wb-topnav-pop--mega {
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: min(820px, calc(100vw - 48px));
  padding: 14px;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.wb-topnav-pop--cols-3 {
  grid-template-columns: repeat(3, 1fr);
  width: min(560px, calc(100vw - 48px));
}

.wb-topnav-pop--mega a,
.wb-topnav-pop--mega button {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  height: 100%;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
}

.wb-topnav-pop--mega a:hover,
.wb-topnav-pop--mega button:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.wb-topnav-pop--mega a.is-on {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.wb-topnav-pop--mega .fas {
  width: auto;
  font-size: 20px;
  text-align: left;
  color: var(--brand);
}

.wb-topnav-pop--mega strong {
  font-size: 14px;
  font-weight: 700;
}

.wb-topnav-pop--mega small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  white-space: normal;
}

@media (max-width: 1199.98px) {
  /* 窄桌面防右缘溢出：五卡收 3 列两行（公共数据本就 3 列不变） */
  .wb-topnav-pop--mega {
    grid-template-columns: repeat(3, 1fr);
    width: min(560px, calc(100vw - 48px));
  }
}

.wb-topnav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.wb-topnav-cta {
  white-space: nowrap;
}

.wb-topnav-account > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--wb-topnav-h, 60px);
}

.wb-topnav-account .wb-topnav-pop {
  left: auto;
  right: 0;
  min-width: 176px;
}

/* 右区下拉一律右对齐，默认的 left:0 会把面板顶出视口右边缘 */
.wb-topnav-help .wb-topnav-pop {
  left: auto;
  right: 0;
  min-width: 188px;
}

/* ---- 移动端顶导收纳（T-M1-12，spec 20260724-mapstudio-ui-interaction-optimization）----
   <992px 时 .wb-topnav-menu 的隐藏滚动条横滚会把溢出项裁掉（「模板画廊」截成「模板画」，
   其后入口整组不可见）。小屏仅保留「在线制图」，其余入口收进「更多」抽屉；
   ≥992px 抽屉 display:none，桌面 DOM/样式零变化。 */
.wb-topnav-more {
  display: none;
}

.wb-topnav-more .wb-topnav-pop {
  left: auto;
  right: 0;
  min-width: 200px;
  max-height: calc(100vh - var(--wb-topnav-h, 60px) - 10px);
  overflow-y: auto;
}

.wb-topnav-more .wb-topnav-pop-head:not(:first-child) {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  padding-top: 9px;
}

@media (max-width: 991.98px) {
  .wb-topnav-menu > .wb-topnav-item:not([data-topnav-key="studio"]),
  .wb-topnav-menu > .wb-topnav-dd {
    display: none;
  }

  /* 帮助入口小屏收进「更多」抽屉；A4 改下拉后这里跟着从 .wb-topnav-item 换成 .wb-topnav-help，
     漏改会让右区在窄屏挤出两个下拉 */
  .wb-topnav-right > .wb-topnav-help {
    display: none;
  }

  .wb-topnav-more {
    display: block;
    flex: 0 0 auto;
  }
}

.wb-topnav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
}

.wb-topnav-avatar-fallback {
  color: var(--brand-heavy);
  font-size: 13px;
  background: linear-gradient(135deg, var(--brand-soft-strong), var(--brand-light));
}

/* ---- 四 Tab 资产卡 ---- */
.wb-asset-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.wb-asset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 20px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.wb-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 二级 Tabs（AntD Tabs 口径，03 册 §6）：14px / 次级字色 .65 / 常规字重，
   激活 = --brand-dark 橙字 + 2px 底条；比一级主导航小一号、默认更淡 */
.wb-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 15px 10px 13px;
  border: 0;
  background: none;
  color: var(--ink-secondary);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.wb-tab:hover {
  color: var(--brand-dark);
}

.wb-tab.is-on {
  color: var(--brand-dark);
  font-weight: 500;
}

.wb-tab.is-on::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--brand);
}

.wb-tab-count {
  min-width: 20px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--layout-bg);
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
  font-weight: 400;
  text-align: center;
}

.wb-tab.is-on .wb-tab-count {
  background: var(--brand-soft);
  color: var(--brand-heavy);
}

.wb-tab-sep {
  width: 1px;
  height: 16px;
  background: var(--line);
  margin: 0 8px;
}

/* 独立页（我的分享/我的数据）只挂 Tab 头条：单独一张白卡 */
.wb-asset-tabsbar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 2px 20px 0;
  margin-bottom: 16px;
}

/* ---- Tab 工具栏 ---- */
.wb-asset-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  /* 用户裁定（2026-07-20）：工具栏不与 Tab 同行，改在 Tab 下方独占一行左对齐 */
  flex: 1 0 100%;
  padding: 2px 0 12px;
  flex-wrap: wrap;
}

/* 工具栏内控件收窄（全局 select/input 默认 width:100%，此处按内容自适应） */
.wb-asset-tools select {
  width: auto;
  min-width: 104px;
  flex: 0 0 auto;
}

.wb-asset-tools .project-search {
  flex: 0 1 auto;
}

.wb-asset-tools .project-search input {
  width: min(220px, 100%);
}

.wb-asset-tools .project-search button[type="submit"],
.wb-asset-tools .btn,
.wb-asset-tools .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.wb-asset-tools[hidden] {
  display: none;
}

/* T-M2-05（spec 20260724-mapstudio-ui-interaction-optimization）：
   窄屏筛选行两段式栅格——chips 独占一行、搜索占满一行、排序+批量管理同行，
   替代自然换行的错落排布；≥768px 原样。 */
@media (max-width: 767.98px) {
  .wb-asset-tools {
    row-gap: 8px;
  }

  .wb-asset-tools .wb-seg {
    flex: 1 0 100%;
  }

  .wb-asset-tools .project-search {
    flex: 1 1 100%;
    flex-wrap: nowrap;
  }

  .wb-asset-tools .project-search input {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }
}

.wb-seg {
  display: inline-flex;
  padding: 2px;
  background: var(--layout-bg);
  border-radius: var(--radius-sm);
}

.wb-seg button {
  border: 0;
  background: none;
  padding: 3px 12px;
  border-radius: 5px;
  color: var(--ink-secondary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.wb-seg button.is-on {
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.wb-asset-body {
  padding: 20px;
  min-height: 320px;
}

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

/* ---- 我的地图：新建卡 ---- */
.wb-new-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink-secondary);
  min-height: 100%;
  padding: 24px 12px;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.18s ease;
}

.wb-new-card .wb-new-card-plus {
  /* 用户裁定（2026-07-20 18:26）：+ 号加大一档 */
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: background 0.18s ease, color 0.18s ease;
}

.wb-new-card strong {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}

.wb-new-card small {
  font-size: 12px;
  color: var(--muted);
}

.wb-new-card:hover {
  border-color: var(--brand);
}

.wb-new-card:hover .wb-new-card-plus {
  background: var(--brand);
  color: #fff;
}

/* FR-11 项目名额余量徽标（spec 20260811-ui-longterm-backlog T-C5-01）：
   ≥80% 中性提示，达上限转警示色；数值由 JS 从权益快照注入 */
.wb-quota-badge {
  font-size: 12px;
  line-height: 1.4;
  padding: 1px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.wb-quota-badge.is-limit {
  background: var(--warning-bg);
  border-color: var(--warning-line);
  color: var(--warning-dark);
}

.wb-maps-clientempty {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
}

/* ---- 待处理提醒条（D-D：模块降级为单条 notice） ---- */
.wb-pending-notice .wb-pending-links {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
}

.wb-pending-notice .wb-pending-links a {
  color: var(--brand-heavy);
  font-weight: 500;
  text-decoration: none;
}

.wb-pending-notice .wb-pending-links a:hover {
  text-decoration: underline;
}

@media (max-width: 992px) {
  .wb-topnav-inner {
    padding: 0 14px;
  }

  .wb-topnav-copy small {
    display: none;
  }

  .wb-topnav-item {
    padding: 0 10px;
  }
}

@media (max-width: 680px) {
  /* FR-11 裁定（2026-07-20）「窄屏顶导横向滚动，不做汉堡抽屉」已被用户裁决废止
     （2026-07-24，spec 20260724-mapstudio-ui-interaction-optimization T-M1-12）：
     隐藏滚动条的横滚导致溢出入口不可发现、文案被裁；顶导现于 <992px 收进「更多」抽屉。
     本块仅保留 Tab 头横滚与尺寸变量。 */
  body.wb-shell.wb-topshell {
    --wb-sidebar-w: 0px;
    --wb-topnav-h: 52px;
  }

  body.wb-shell.wb-topshell .workbench-shell {
    padding: 14px 12px 40px;
  }

  .wb-topnav-copy {
    display: none;
  }

  .wb-asset-head {
    padding: 2px 12px 0;
  }

  .wb-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
  }

  .wb-tabs::-webkit-scrollbar {
    display: none;
  }

  .wb-asset-body {
    padding: 14px 12px;
  }
}

/* 新建地图虚线卡在项目网格中的占位（li 壳拉伸填满行高） */
ul.project-grid .wb-new-card-cell {
  display: flex;
  list-style: none;
}

ul.project-grid .wb-new-card-cell .wb-new-card {
  flex: 1;
  min-height: 236px;
}

/* 顶导壳下 projects-section 白卡直接并入资产卡体：去掉双层卡观感 */
body.wb-topshell #assetCard .projects-section {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

/* 我的数据列表工具行（spec 20260720 FR-5）：搜索居左、操作钮居右一行收纳 */
.ds-list-toolbar {
  align-items: center;
  gap: 12px;
}

.ds-list-toolbar .dataset-search {
  flex: 1;
  min-width: 0;
}

.ds-list-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* ============================================================
   单行管理沉浸式工作区（2026-07-20）
   地图吃满顶导以下可用空间；详情栏独立滚动并可拖动调宽。
   查看态只读，修改态由 #dsRowRoot.is-editing 显式开启。
   ============================================================ */
body.wb-shell.wb-topshell.ds-row-page {
  min-height: 100dvh;
  overflow: hidden;
  background: var(--surface, #fff);
}

body.wb-shell.wb-topshell.ds-row-page .workbench-shell {
  width: 100%;
  max-width: none;
  height: calc(100dvh - var(--wb-topnav-h, 60px));
  min-height: 0;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#dsRowRoot {
  --dsr-side-width: 400px;
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  background: var(--surface, #fff);
}

#dsRowRoot .wb-page-header {
  z-index: 2;
  min-height: 64px;
  flex: 0 0 auto;
  margin: 0;
  padding: 9px 20px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: var(--surface, #fff);
}

#dsRowRoot .wb-page-icon {
  width: 38px;
  height: 38px;
  font-size: 16px;
}

#dsRowRoot .wb-page-copy h1 {
  font-size: var(--fs-h2, 16px);
}

#dsRowRoot #dsrPageStatus:not(:empty) {
  position: absolute;
  top: 74px;
  left: 50%;
  z-index: calc(var(--z-toast) + 1);
  max-width: min(560px, calc(100vw - 40px));
  margin: 0;
  padding: 9px 16px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  background: var(--surface, #fff);
  box-shadow: var(--shadow-pop);
  transform: translateX(-50%);
}

#dsRowRoot #dsrPageStatus:empty {
  display: none;
}

#dsRowRoot .dsr-grid {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr) 8px var(--dsr-side-width);
  gap: 0;
  align-items: stretch;
  overflow: hidden;
}

#dsRowRoot .dsr-map-card {
  position: relative;
  top: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--surface-soft, #fafafa);
}

#dsRowRoot .dsr-map-wrap,
#dsRowRoot .dsr-map {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
}

#dsRowRoot .dsr-map-head {
  position: absolute;
  top: 14px;
  left: 50px;
  z-index: calc(var(--z-dock) + 1);
  display: flex;
  max-width: calc(100% - 68px);
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(229, 231, 235, 0.94);
  border-radius: var(--radius-md, 8px);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}

#dsRowRoot .dsr-map-head h2 {
  margin: 0;
  white-space: nowrap;
}

#dsRowRoot #dsrMap.leaflet-container {
  cursor: grab;
}

#dsRowRoot.is-editing #dsrMap.leaflet-container {
  cursor: crosshair;
}

.dsr-sidebar-resizer {
  position: relative;
  z-index: 5;
  width: 8px;
  min-height: 0;
  background: var(--surface, #fff);
  cursor: col-resize;
  touch-action: none;
}

.dsr-sidebar-resizer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 2px;
  background: var(--line, #e5e7eb);
  transition: background 0.16s ease, width 0.16s ease;
}

.dsr-sidebar-resizer:hover::before,
.dsr-sidebar-resizer:focus-visible::before,
body.dsr-resizing .dsr-sidebar-resizer::before {
  left: 2px;
  width: 4px;
  background: var(--brand, #fa8c16);
}

.dsr-sidebar-resizer:focus-visible {
  outline: none;
}

body.dsr-resizing {
  cursor: col-resize;
  user-select: none;
}

#dsRowRoot .dsr-side {
  display: block;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-left: 1px solid var(--line, #e5e7eb);
  background: var(--surface, #fff);
}

.dsr-side-toolbar {
  position: sticky;
  top: 0;
  z-index: var(--z-dock);
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.dsr-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-secondary, #374151);
  font-size: var(--fs-caption, 12px);
  font-weight: 600;
  white-space: nowrap;
}

#dsRowRoot.is-editing .dsr-mode-badge {
  color: var(--brand-heavy, #ad4e00);
}

.dsr-mode-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#dsRowRoot .dsr-side > .ds-card {
  margin: 0;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid var(--line, #e5e7eb);
  border-radius: 0;
  box-shadow: none;
}

#dsRowRoot .dsr-side > .ds-card:last-child {
  border-bottom: 0;
}

#dsRowRoot .ds-prop-row input[readonly],
#dsRowRoot .ds-correct-row input[readonly] {
  border-color: transparent;
  background: transparent;
  color: var(--ink-secondary, #374151);
  cursor: text;
  box-shadow: none;
}

#dsRowRoot .ds-prop-row input[readonly]:hover,
#dsRowRoot .ds-correct-row input[readonly]:hover {
  border-color: transparent;
}

#dsRowRoot.is-editing .ds-prop-row input,
#dsRowRoot.is-editing .ds-correct-row input {
  background: var(--surface, #fff);
}

@media (max-width: 992px) {
  body.wb-shell.wb-topshell.ds-row-page {
    overflow: auto;
  }

  body.wb-shell.wb-topshell.ds-row-page .workbench-shell {
    height: auto;
    min-height: calc(100dvh - var(--wb-topnav-h, 60px));
    overflow: visible;
  }

  #dsRowRoot {
    height: auto;
    min-height: calc(100dvh - var(--wb-topnav-h, 60px));
  }

  #dsRowRoot .wb-page-header {
    padding: 10px 14px;
  }

  #dsRowRoot .dsr-grid {
    display: block;
    overflow: visible;
  }

  #dsRowRoot .dsr-map-card,
  #dsRowRoot .dsr-map-wrap,
  #dsRowRoot .dsr-map {
    height: max(420px, 58dvh);
  }

  .dsr-sidebar-resizer {
    display: none;
  }

  #dsRowRoot .dsr-side {
    overflow: visible;
    border-top: 1px solid var(--line, #e5e7eb);
    border-left: 0;
  }

  .dsr-side-toolbar {
    position: static;
  }
}

/* ============================================================
   数据集管理全宽工作区（2026-07-20）
   去掉 1240px 居中壳的左右留白；全部字段进入横向表格，操作列钉在最右。
   ============================================================ */
body.wb-shell.wb-topshell.ds-manage-page {
  background: var(--layout-bg, #f7f8fa);
}

body.wb-shell.wb-topshell.ds-manage-page .workbench-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 40px;
}

#dsManageRoot {
  width: 100%;
  min-width: 0;
}

#dsManageRoot .wb-page-header {
  margin: 0;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: var(--surface, #fff);
}

#dsManageRoot #dsPageStatus:empty {
  display: none;
}

#dsManageRoot #dsPageStatus:not(:empty) {
  margin: 10px 20px 0;
}

#dsManageRoot .ds-manage-grid {
  width: 100%;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

#dsManageRoot .ds-manage-side {
  padding-top: 12px;
}

#dsManageRoot .ds-manage-side > .ds-card {
  border-left: 0;
  border-radius: 0 var(--radius-md, 8px) var(--radius-md, 8px) 0;
}

#dsManageRoot .ds-manage-records {
  margin-top: 12px;
  border-right: 0;
  border-radius: var(--radius-md, 8px) 0 0 var(--radius-md, 8px);
}

#dsManageRoot .ds-records-table {
  width: max-content;
  min-width: 100%;
}

#dsManageRoot .ds-records-table th,
#dsManageRoot .ds-records-table td {
  min-width: 120px;
}

#dsManageRoot .ds-records-table th:first-child,
#dsManageRoot .ds-records-table td:first-child {
  width: 72px;
  min-width: 72px;
}

#dsManageRoot .ds-records-table .ds-record-action-col {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  background: var(--surface, #fff);
  box-shadow: -1px 0 0 var(--line, #e5e7eb);
  text-align: center;
}

#dsManageRoot .ds-records-table thead .ds-record-action-col {
  z-index: 3;
  background: var(--surface-soft, #fafafa);
}

#dsManageRoot .ds-records-table .ds-row-clickable:hover .ds-record-action-col {
  background: var(--surface-soft, #fafafa);
}

@media (max-width: 992px) {
  #dsManageRoot .wb-page-header {
    padding: 14px;
  }

  #dsManageRoot .ds-manage-grid {
    grid-template-columns: 1fr;
  }

  #dsManageRoot .ds-manage-side,
  #dsManageRoot .ds-manage-records {
    padding-right: 12px;
    padding-left: 12px;
  }

  #dsManageRoot .ds-manage-side > .ds-card,
  #dsManageRoot .ds-manage-records {
    border-right: 1px solid var(--line, #e5e7eb);
    border-left: 1px solid var(--line, #e5e7eb);
    border-radius: var(--radius-md, 8px);
  }
}
