/* ==========================================================================
   钢瓶检测信息 - 样式（移动端优先，扫码直达场景）
   设计基准：375px 手机 → 768px+ 桌面增强
   ========================================================================== */

:root {
  --primary: #0e4d92;
  --primary-strong: #0a3a6e;
  --primary-light: #e8f1fb;
  --accent: #0f8fe0;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #e6ebf2;
  --border-strong: #d3dbe6;
  --text: #1c2735;
  --text-secondary: #5b6b7e;
  --text-muted: #8b98a9;
  --success: #148a54;
  --success-bg: #e6f6ee;
  --warning: #c07a00;
  --warning-bg: #fdf3df;
  --danger: #c23a2b;
  --danger-bg: #fcedea;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 42, 74, 0.05);
  --shadow-md: 0 6px 24px rgba(16, 42, 74, 0.09);
  --shadow-lg: 0 14px 40px rgba(16, 42, 74, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-num: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.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;
}

button { font-family: inherit; }

/* hidden 属性优先于任何显式 display（防止组件样式击穿 hidden） */
[hidden] { display: none !important; }

/* ==========================================================================
   顶部导航（移动端：紧凑单行）
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  min-height: 44px;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary) 0%, #1b7fd0 100%);
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(14, 77, 146, 0.3);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }

.brand-text strong { font-size: 15px; font-weight: 700; letter-spacing: 0.2px; }

.brand-text small { font-size: 11px; color: var(--text-secondary); }

.header-meta { display: none; }

/* ==========================================================================
   落地区 Hero（扫码引导，无查询框）
   ========================================================================== */

.hero {
  position: relative;
  padding: 32px 0 30px;
  color: #fff;
  background:
    radial-gradient(560px 300px at 90% -20%, rgba(31, 145, 224, 0.55) 0%, transparent 60%),
    radial-gradient(520px 300px at 0% 115%, rgba(12, 96, 168, 0.5) 0%, transparent 55%),
    linear-gradient(160deg, #0b3c74 0%, #0e4d92 45%, #1259a8 100%);
  text-align: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.hero h1 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

/* 扫码引导卡片 */
.scan-guide {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 420px;
  margin: 22px auto 0;
  padding: 14px 18px;
  text-align: left;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.scan-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  flex-shrink: 0;
}

.scan-guide strong { font-size: 14px; display: block; }

.scan-guide p { font-size: 12px; color: rgba(255, 255, 255, 0.75); margin-top: 2px; line-height: 1.5; }

/* 扫码 / 路径直达：聚焦结果，弱化落地区 */
body.direct .hero { padding: 12px 0 14px; }
body.direct .hero h1 { font-size: 16px; margin-bottom: 0; letter-spacing: 0.5px; }
body.direct .hero-sub,
body.direct .scan-guide { display: none; }

/* ==========================================================================
   结果区
   ========================================================================== */

.result-section {
  padding: 14px 0 8px;
  animation: fadeUp 0.3s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- 编号摘要 ---------- */
.result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.summary-query {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-all;
  min-width: 0;
}

.summary-label { flex-shrink: 0; }

.summary-code {
  font-family: var(--font-num);
  color: var(--text);
  font-weight: 600;
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.summary-actions { display: flex; gap: 8px; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text-secondary);
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline:hover,
.btn-outline:active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-outline:focus-visible { outline: 3px solid rgba(14, 77, 146, 0.25); }

/* ---------- 状态概览 ---------- */
.status-banner {
  padding: 18px 16px;
  margin-bottom: 12px;
  background:
    radial-gradient(420px 160px at 100% 0%, rgba(15, 143, 224, 0.09) 0%, transparent 60%),
    var(--surface);
}

.status-banner-main { display: flex; align-items: center; gap: 14px; }

.bottle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef5fc 0%, #dbe9f8 100%);
  color: var(--primary);
  flex-shrink: 0;
}

.bottle-info { min-width: 0; }

.status-banner h2 {
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.3;
}

.status-banner .bottle-meta {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.bottle-meta-item + .bottle-meta-item { margin-left: 12px; }

.status-banner-side {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.stat-cell { text-align: left; min-width: 0; }

.stat-label {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
  line-height: 1.4;
  white-space: nowrap;
}

.stat-value {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-num);
  white-space: nowrap;
}

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: #eef1f5; color: var(--text-secondary); }

/* ---------- 区块导航（信息分区按钮） ---------- */
.section-nav {
  position: sticky;
  top: 54px;
  z-index: 30;
  display: flex;
  gap: 8px;
  padding: 8px 0 12px;
  margin-bottom: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--bg);
}

.section-nav::-webkit-scrollbar { display: none; }

.nav-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.nav-btn:hover,
.nav-btn:active { border-color: var(--primary); color: var(--primary); }

.nav-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 77, 146, 0.3);
}

/* 锚点滚动目标预留偏移（头部导航 + 分区导航） */
.block { scroll-margin-top: 122px; }

/* ---------- 通用信息区块 ---------- */
.block { margin-bottom: 12px; }

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
}

.card-title svg { color: var(--primary); }

.card-sub {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-muted);
}

/* 卡片标题内的小字后缀（如"检验记录（核心工序）"） */
.title-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* 信息网格（移动端 2 列） */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
  padding: 16px;
}

.info-cell { min-width: 0; }

.info-label {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.info-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
  line-height: 1.5;
}

/* ---------- 检验记录 ---------- */
.test-list { display: flex; flex-direction: column; padding: 2px 16px 8px; }

.test-item {
  position: relative;
  padding: 13px 0;
}

.test-item + .test-item { border-top: 1px dashed var(--border); }

.test-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.test-unit {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.test-tags {
  margin-top: 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.test-tag {
  display: inline-block;
  width: fit-content;
  font-size: 11.5px;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 9px;
  line-height: 1.5;
}

/* 最近一次检验高亮 */
.test-item.first {
  background: linear-gradient(180deg, #f2f8fe 0%, #ffffff 100%);
  border-radius: var(--radius-sm);
  padding-left: 12px;
  padding-right: 12px;
}

.test-item.first .test-top { color: var(--primary); }

/* ---------- 充装信息 ---------- */
.fill-list { display: flex; flex-direction: column; padding: 2px 16px 8px; }

.fill-item { padding: 13px 0; }
.fill-item + .fill-item { border-top: 1px dashed var(--border); }

.fill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.fill-head > span:first-child {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 600;
}

.fill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}

.fill-grid .info-cell { padding: 0; }

/* ---------- 安全须知 ---------- */
.safety-box { background: #fbfcfd; }

.safety-box .card-title { border-bottom: 0; padding-bottom: 4px; }
.safety-box .card-title svg { color: var(--warning); }

.safety-list {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.safety-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  list-style: none;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.note-index {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center;
  padding: 52px 20px;
  color: var(--text-muted);
}

.empty-state svg { color: #c3cedb; margin-bottom: 14px; }

.empty-state h3 { font-size: 17px; color: var(--text); margin-bottom: 8px; }

.empty-state p { font-size: 13.5px; line-height: 1.6; max-width: 340px; margin: 0 auto; }

/* ==========================================================================
   平台功能区（仅首页 / 未扫码直达时显示）
   ========================================================================== */

.feature-section { padding: 28px 0 36px; }

.section-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.feature-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--primary-light);
  color: var(--primary);
  margin-bottom: 10px;
}

.feature-item h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }

.feature-item p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   页脚
   ========================================================================== */

.site-footer {
  background: #0d2547;
  color: rgba(255, 255, 255, 0.72);
  padding: 24px 0;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.footer-brand .brand-text small { color: rgba(255, 255, 255, 0.55); }

.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; }

.footer-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #7fb3e8;
  flex-shrink: 0;
}

.link-label { color: rgba(255, 255, 255, 0.55); }

.link-value {
  color: #fff;
  font-weight: 600;
  font-family: var(--font-num);
  text-decoration: none;
}

.link-value:active { text-decoration: underline; }

.footer-bottom {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.7;
}

/* ==========================================================================
   打印样式
   ========================================================================== */

@media print {
  .site-header,
  .hero,
  .feature-section,
  .site-footer,
  .summary-actions,
  .section-nav {
    display: none !important;
  }

  body { background: #fff; }
  .container { max-width: none; padding: 0; }
  .result-section { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .status-banner { border: 2px solid var(--border-strong); }
  .test-item, .fill-item { break-inside: avoid; }
}

/* ==========================================================================
   桌面增强（≥768px）
   ========================================================================== */

@media (min-width: 768px) {
  .container { padding: 0 24px; }

  .header-inner { height: 64px; }
  .brand-text strong { font-size: 17px; }
  .header-meta { display: flex; gap: 18px; }

  .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
  }
  .meta-item svg { color: var(--accent); }

  .hero { padding: 60px 0 52px; }
  .hero h1 { font-size: 30px; margin-bottom: 10px; }
  .hero-sub { font-size: 15px; }
  .scan-guide { margin-top: 26px; padding: 16px 20px; }
  .scan-guide p { font-size: 13px; }

  .result-section { padding: 30px 0 8px; }
  .result-summary { padding: 14px 22px; margin-bottom: 20px; }
  .status-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px;
    margin-bottom: 20px;
  }
  .status-banner-side {
    display: flex;
    gap: 28px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
  .stat-cell { text-align: right; }
  .stat-value { font-size: 18px; }
  .bottle-icon { width: 62px; height: 62px; }
  .status-banner h2 { font-size: 22px; }

  .section-nav { top: 64px; padding: 10px 0 14px; }
  .nav-btn { min-height: 42px; padding: 0 22px; font-size: 13.5px; }
  .block { scroll-margin-top: 140px; margin-bottom: 20px; }

  .card-title { padding: 18px 24px; font-size: 16px; }

  .info-grid { grid-template-columns: repeat(3, 1fr); gap: 18px 32px; padding: 22px 24px; }
  .info-label { font-size: 12px; }
  .info-value { font-size: 14.5px; }

  .test-list { padding: 4px 24px 10px; }
  .test-top { font-size: 14px; }
  .test-item { padding: 16px 0; }

  .fill-list { padding: 4px 24px 10px; }
  .fill-item { padding: 16px 0; }
  .fill-grid { grid-template-columns: repeat(3, 1fr); gap: 12px 24px; }

  .safety-list {
    padding: 0 24px 22px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 28px;
  }
  .safety-list li { font-size: 13px; }

  .feature-section { padding: 48px 0 56px; }
  .section-title { font-size: 22px; margin-bottom: 30px; }
  .feature-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .feature-item { padding: 24px 22px; }
  .feature-icon { width: 44px; height: 44px; }
  .feature-item h3 { font-size: 15px; }
  .feature-item p { font-size: 13px; }
}

/* ==========================================================================
   v2 升级：地图首页 / 项目页 / 钢瓶页新板块 / 管理端 / 二维码标签
   ========================================================================== */

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(14, 77, 146, 0.28); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(194, 58, 43, 0.25); }
.btn-danger:hover { background: #f8ddd8; }
.btn-ghost { background: #fff; border-color: var(--border-strong); color: var(--text-secondary); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { min-height: 32px; padding: 4px 12px; font-size: 12.5px; border-radius: 8px; }
.btn:focus-visible { outline: 3px solid rgba(14, 77, 146, 0.25); }

/* ---------- 地图首页 ---------- */
.map-section { padding: 14px 0 30px; }

.map-layout { display: flex; flex-direction: column; gap: 14px; }

.map-wrap { position: relative; overflow: hidden; }

.map-container { height: 340px; width: 100%; background: #e8eef5; }

.map-legend {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 5;
  display: flex;
  gap: 12px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}
.map-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
.dot-valid { background: #148a54; }
.dot-expiring { background: #c07a00; }
.dot-expired { background: #c23a2b; }
.dot-unknown { background: #8b98a9; }

.map-fallback {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(500px 260px at 85% 15%, rgba(15, 143, 224, 0.1) 0%, transparent 60%),
    repeating-linear-gradient(45deg, #eef2f7 0 12px, #e9eef5 12px 24px);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}
.map-fallback p { margin: 2px 0; }
.map-fallback strong { font-size: 15px; color: var(--text); }

/* 高德自定义 marker：色点 + 呼吸圈 */
.amap-marker-dot {
  position: relative;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 8px rgba(16, 42, 74, 0.35);
  cursor: pointer;
}
.amap-marker-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  opacity: 0.35;
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.45; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* 项目面板 */
.project-panel { display: flex; flex-direction: column; gap: 12px; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
}
.panel-head h2 { font-size: 16.5px; }

/* 省份筛选按钮行 */
.province-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px;
  margin-top: -2px;
}
.prov-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.prov-btn b { font-weight: 600; color: var(--text-muted); }
.prov-btn:hover { color: var(--primary); border-color: var(--primary); }
.prov-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.prov-btn.active b { color: #cfe0ff; }

.panel-list { display: flex; flex-direction: column; gap: 8px; }

.panel-loading {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.proj-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.proj-item:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.proj-item.level-valid { border-left-color: #148a54; }
.proj-item.level-expiring { border-left-color: #c07a00; }
.proj-item.level-expired { border-left-color: #c23a2b; }
.proj-item.level-unknown { border-left-color: #8b98a9; }

.proj-name { font-size: 14.5px; line-height: 1.45; display: block; }

.proj-addr {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.proj-addr svg { flex-shrink: 0; }

.proj-stats { display: flex; flex-wrap: wrap; gap: 6px; }

.proj-stat {
  font-size: 11.5px;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
}
.proj-stat b { font-family: var(--font-num); margin-right: 2px; }
.proj-stat.ok { color: var(--success); background: var(--success-bg); border-color: transparent; }
.proj-stat.warn { color: var(--warning); background: var(--warning-bg); border-color: transparent; }
.proj-stat.bad { color: var(--danger); background: var(--danger-bg); border-color: transparent; }

.scan-tip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
}
.scan-tip .scan-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.scan-tip strong { font-size: 13.5px; display: block; }
.scan-tip p { font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.5; }

/* ---------- 项目页 ---------- */
.proj-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 16px;
}

.proj-title { font-size: 19px; line-height: 1.4; }

.proj-addr.big { font-size: 13px; margin-top: 6px; }

.proj-contact-col { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

.proj-contact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
}
.proj-contact:active { color: var(--primary); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-num);
  color: var(--text);
  line-height: 1.2;
}
.stat-card span { font-size: 11.5px; color: var(--text-muted); }
.stat-card.ok b { color: var(--success); }
.stat-card.warn b { color: var(--warning); }
.stat-card.bad b { color: var(--danger); }

/* 钢瓶工具条 + 列表 */
.cyl-toolbar { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
}
.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  outline: none;
  font-family: inherit;
}

.filter-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.cyl-list { display: flex; flex-direction: column; padding: 4px 10px 10px; }

.cyl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s ease;
}
.cyl-item:hover { background: var(--primary-light); }
.cyl-item + .cyl-item { border-top: 1px dashed var(--border); }

.cyl-main { flex: 1; min-width: 0; }

.cyl-id {
  display: block;
  font-family: var(--font-num);
  font-size: 14.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.cyl-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--text-muted); }

.cyl-side { display: flex; flex-direction: column; gap: 2px; text-align: right; flex-shrink: 0; }

.cyl-date { font-size: 11.5px; color: var(--text-muted); font-family: var(--font-num); }

/* ---------- 钢瓶页：8 项结论 / 检验流程 / 企业信息 ---------- */

.block-empty { padding: 20px 16px 24px; font-size: 13px; color: var(--text-muted); text-align: center; }

.items-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.item-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11.5px;
}
.item-name { color: var(--text-secondary); line-height: 1.4; }

.test-remark {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border-left: 3px solid var(--border-strong);
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 14px 16px 18px;
}

.process-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-body strong { font-size: 13px; display: block; }
/* 工序名称后的小字标注（如"仅七氟丙烷"） */
.step-note { font-size: 10.5px; font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.step-body p { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; line-height: 1.5; }

/* 工序配图（右侧小图，上传后自动显示；支持多图竖排与视频） */
.step-photo { flex-shrink: 0; margin-left: auto; display: flex; flex-direction: column; gap: 4px; }
.step-photo img,
.step-photo video {
  display: block;
  width: 86px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #e8eef5;
}

/* 视频步骤：海报 + 播放标识 */
.step-video-thumb { position: relative; }
.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(14, 77, 146, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  pointer-events: none;
  border: 2px solid #fff;
  box-sizing: border-box;
  padding-left: 2px;
}

/* 拆阀照片：显示顶部 */
.step-photo img.fit-top { object-position: center top; }

/* 手机端隐藏打印检验凭证按钮 */
@media (max-width: 767.98px) {
  #btnPrint { display: none !important; }
}
  display: block;
  width: 86px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #e8eef5;
}

/* 企业信息板块 */
.comp-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }

.comp-intro { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }

.qual-list { display: flex; flex-direction: column; gap: 6px; }

.qual-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  font-size: 12.5px;
  color: var(--text);
  background: var(--success-bg);
  border-radius: 8px;
  padding: 5px 11px;
}
.qual-item svg { color: var(--success); flex-shrink: 0; }

.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

/* 企业信息卡片内的照片小节标题 */
.photo-section { padding: 6px 16px 18px; }
.photo-section + .photo-section { padding-top: 0; }
.photo-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.photo-item { margin: 0; }
.photo-item img[data-full] { cursor: zoom-in; }

/* 证书全图查看（lightbox） */
.lightbox-mask {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 20, 35, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  animation: fadeIn 0.15s ease both;
}
.lightbox-mask img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  background: #fff;
}
.lightbox-mask video { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: var(--shadow-lg); }
.photo-item img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
/* 公司环境照片：裁切填满 + 显示底部 */
.photo-item img.fit-bottom {
  object-fit: cover;
  object-position: center bottom;
  background: none;
}

.photo-item figcaption { margin-top: 4px; font-size: 11px; color: var(--text-muted); text-align: center; }

.comp-contact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.contact-section { padding: 0; }

/* 文字资质列表（无照片的机构也展示资质名称） */
.comp-qual-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.comp-qual-list li {
  position: relative;
  padding: 7px 12px 7px 26px;
  background: var(--primary-light);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--primary);
  line-height: 1.5;
}
.comp-qual-list li::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.55;
}

.comp-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.comp-contact-label { cursor: default; display: inline-flex; align-items: center; gap: 6px; }

/* 服务热线 + 号码同一行、同框拉满 */
.comp-contact-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 12px;
  width: 100%;
}
.comp-contact-group a {
  color: var(--primary);
  font-family: var(--font-num);
  font-weight: 700;
  text-decoration: none;
  padding: 2px 4px;
}
.comp-contact-group a:active { text-decoration: underline; }

/* ---------- 管理端 ---------- */
.admin-wrap { padding: 18px 0 40px; }

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.admin-head h1 { font-size: 19px; }

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-bottom: 2.5px solid transparent;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.toolbar-row .search-bar { flex: 1; min-width: 200px; max-width: 340px; }

.data-card { overflow-x: auto; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }

.data-table th {
  text-align: left;
  padding: 11px 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: #fafbfd;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:hover td { background: #f7fafd; }

.data-table .row-actions { display: flex; gap: 6px; }

.table-empty { padding: 30px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* 表单弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(13, 30, 54, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.15s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 18px 18px 24px;
  animation: slideUp 0.2s ease both;
}
@keyframes slideUp { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.modal-head h3 { font-size: 16.5px; }

.modal-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.full { grid-column: 1 / -1; }

.form-field label { font-size: 12.5px; color: var(--text-secondary); font-weight: 600; }
.form-field label em { color: var(--danger); font-style: normal; }

.form-field input,
.form-field select,
.form-field textarea {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  width: 100%;
}
.form-field textarea { min-height: 72px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 77, 146, 0.12); }

.form-hint { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* 8 项检验模板行 */
.items-editor { display: grid; grid-template-columns: 1fr; gap: 8px; }

.items-editor .item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
}
.items-editor select { width: 110px; min-height: 34px; flex-shrink: 0; }

/* 地图选点 */
.picker-map { height: 300px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 8px; }
.picker-coord { font-size: 12.5px; color: var(--text-secondary); font-family: var(--font-num); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%) translateY(16px);
  z-index: 200;
  max-width: 86vw;
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(28, 39, 53, 0.94);
  color: #fff;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { background: rgba(20, 138, 84, 0.96); }
.toast-error { background: rgba(194, 58, 43, 0.96); }

/* 登录页 */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(560px 300px at 90% -10%, rgba(31, 145, 224, 0.4) 0%, transparent 60%),
    linear-gradient(160deg, #0b3c74 0%, #0e4d92 55%, #1259a8 100%);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 18px;
  padding: 30px 26px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-card .brand-icon { width: 46px; height: 46px; margin: 0 auto 12px; }
.login-card h1 { font-size: 18px; margin-bottom: 4px; }
.login-card .login-sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 20px; }
.login-card .form-field { text-align: left; margin-bottom: 14px; }
.login-card .btn { width: 100%; min-height: 44px; }
.login-err { color: var(--danger); font-size: 12.5px; min-height: 18px; margin-bottom: 8px; }

/* ---------- 二维码生成页 ---------- */
.qr-layout { display: grid; grid-template-columns: 1fr; gap: 14px; }

.qr-pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; padding: 4px 2px; }

.qr-pick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
  cursor: pointer;
}
.qr-pick-item:hover { background: var(--primary-light); }
.qr-pick-item input { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }
.qr-pick-item .cyl-meta { margin-top: 0; }

.qr-sheet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px; }

.qr-label {
  background: #fff;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  break-inside: avoid;
}
.qr-label .qr-code svg { width: 100%; max-width: 170px; height: auto; display: block; margin: 0 auto; }
.qr-label .qr-id {
  display: block;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 14px;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.qr-label .qr-sub { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.qr-label .qr-dl { margin-top: 7px; }

.qr-actions-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px 0; }
.qr-base-url { font-size: 12px; color: var(--text-muted); word-break: break-all; }

/* ---------- 打印（钢瓶凭证 + 二维码标签） ---------- */
@media print {
  .site-header, .hero, .site-footer, .summary-actions, .section-nav,
  .cyl-toolbar, .admin-wrap, .toast, .qr-pick-panel { display: none !important; }

  body { background: #fff; }
  .container { max-width: none; padding: 0; }
  .result-section { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .status-banner { border: 2px solid var(--border-strong); }
  .test-item, .fill-item, .qr-label, .process-step { break-inside: avoid; }

  /* 二维码标签打印：一行三枚 */
  .qr-sheet { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 6mm; padding: 0; }
  .qr-label { border: 1px dashed #999; border-radius: 0; }
  .qr-label .qr-dl { display: none; }
}

/* ---------- 桌面增强（v2 组件） ---------- */
@media (min-width: 768px) {
  .map-section { padding: 16px 0 24px; }
  .map-layout { flex-direction: row; align-items: stretch; }
  .map-wrap { flex: 1; min-width: 0; }
  .map-container { height: 560px; }
  .project-panel { width: 380px; flex-shrink: 0; }
  .panel-list { overflow-y: auto; padding-right: 2px; }

  .proj-head { padding: 24px 24px; }
  .proj-title { font-size: 22px; }

  .stat-grid { gap: 14px; margin-bottom: 16px; }
  .stat-card { padding: 18px 12px; }
  .stat-card b { font-size: 28px; }

  .cyl-toolbar { flex-direction: row; align-items: center; padding: 14px 18px; }
  .cyl-toolbar .search-bar { flex: 1; }
  .cyl-list { padding: 6px 14px 14px; }
  .cyl-item { padding: 13px 10px; }

  .items-grid { grid-template-columns: repeat(4, 1fr); }
  .item-chip { padding: 7px 12px; font-size: 12px; }

  .process-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 18px 20px 22px; }
  .step-photo img { width: 110px; height: 82px; }

  .comp-body { padding: 24px 28px; }
  .qual-list { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-item img { height: 150px; }

  .modal-mask { align-items: center; }
  .modal-box { border-radius: 18px; padding: 24px 26px 28px; }

  .qr-layout { grid-template-columns: 380px 1fr; align-items: start; }
  .qr-sheet { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   管理后台桌面增强（≥1024px，后台操作以电脑为主）
   ========================================================================== */

@media (min-width: 1024px) {
  /* 管理端使用更宽的工作区（覆盖 1080px 容器） */
  .admin-wrap .container { max-width: 1280px; }

  .admin-head h1 { font-size: 22px; }

  .tabs { gap: 4px; margin-bottom: 20px; }
  .tab-btn { min-height: 48px; padding: 0 24px; font-size: 15px; }

  .toolbar-row { margin-bottom: 16px; }

  .data-table { font-size: 13.5px; }
  .data-table th { padding: 13px 14px; font-size: 12.5px; }
  .data-table td { padding: 12px 14px; }

  /* 弹窗：桌面居中、更宽敞的表单 */
  .modal-box { max-width: 760px; padding: 28px 30px 30px; }
  .modal-head h3 { font-size: 18px; }
  .form-grid { gap: 14px 16px; }
  .form-field label { font-size: 13px; }
  .form-field input, .form-field select, .form-field textarea { font-size: 14px; }

  /* 8 项检验结论：桌面两列，缩短弹窗高度 */
  .items-editor { grid-template-columns: repeat(2, 1fr); gap: 10px 12px; }

  .picker-map { height: 360px; }

  /* 二维码工作台：左窄右宽 */
  .qr-layout { grid-template-columns: 400px 1fr; gap: 18px; }

  /* Toast 桌面位置稍高 */
  .toast { bottom: 56px; font-size: 14px; }
}

/* 首页（桌面）：JS 计算区块高度（fitMapHeight），地图撑满、页脚贴底、右列与地图等高 */
@media (min-width: 768px) {
  body.map-body { min-height: 100vh; display: flex; flex-direction: column; }
  body.map-body main { flex: 1 1 0%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  body.map-body .map-section { flex: 1 1 0%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 16px 0 24px; }
  body.map-body .map-section .container { flex: 1 1 0%; min-height: 0; display: flex; flex-direction: column; }
  body.map-body .map-layout { flex: 1 1 0%; min-height: 0; display: flex; align-items: stretch; }
  body.map-body .map-wrap { flex: 1 1 0%; min-width: 0; position: relative; display: flex; flex-direction: column; }
  body.map-body .map-container { flex: 1 1 0%; height: auto; min-height: 0; }
  body.map-body .project-panel { width: 380px; flex-shrink: 0; align-self: stretch; display: flex; flex-direction: column; }
  body.map-body .project-panel .panel-list { flex: 1 1 0%; height: 0; overflow-y: auto; max-height: none; }
}
