* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: #f5f7fa;
}

header {
  padding: 20px 24px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

header h1 { margin: 0; font-size: 22px; }
header .sub { margin: 4px 0 12px; color: #6b7280; font-size: 14px; }
nav { display: flex; gap: 8px; }

.tab {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}

.tab.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

main {
  display: flex;
  gap: 20px;
  padding: 20px 24px;
  align-items: flex-start;
}

#map {
  flex: 1;
  height: 68vh;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #e5e7eb;
}

.panel {
  width: 380px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  max-height: 68vh;
  overflow-y: auto;
}

.panel h2 { margin-top: 0; font-size: 17px; }
.hint { color: #6b7280; font-size: 13px; margin: 0 0 12px; }

label {
  display: block;
  margin: 10px 0;
  font-size: 14px;
  color: #374151;
}

label input, label textarea, label select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.btn.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  width: 100%;
  margin-top: 8px;
}

.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 8px; margin: 8px 0; }
.tail-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 2px;
}
.tail-option input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.link-btn {
  border: none;
  background: none;
  color: #2563eb;
  padding: 0;
  margin-left: 4px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.ttl-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ttl-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}
.ttl-btn.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.ttl-btn.long { color: #b45309; border-color: #fcd34d; }
.ttl-btn.long.active { background: #b45309; border-color: #b45309; color: #fff; }

.result {
  margin-top: 14px;
  padding: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
}

.result .code {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 6px;
  text-align: center;
  color: #1d4ed8;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.result .meta { text-align: center; color: #6b7280; font-size: 13px; margin: 6px 0 12px; }

.result .found .coords { font-weight: 600; margin-bottom: 8px; }
.result .found .note {
  white-space: pre-wrap;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.result .media { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.result .media img, .result .media video { width: 100%; border-radius: 8px; }
.result .beacon-meta {
  margin-top: 8px;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.6;
}

.nav-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.nav-actions a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
}
.nav-actions a.car {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  font-weight: 600;
}

.result .report-btn {
  width: 100%;
  margin-top: 10px;
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff;
}

.mine-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.mine-table th, .mine-table td { text-align: left; padding: 6px 4px; border-bottom: 1px solid #eee; }
.mine-table .btn { padding: 5px 10px; min-height: 0; }
.mine-subtitle { margin: 12px 0 4px; font-weight: 700; color: #1f2937; font-size: 14px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.tag.active { background: #dcfce7; color: #15803d; }
.tag.cooling { background: #fef3c7; color: #b45309; }
.tag.released { background: #e5e7eb; color: #4b5563; }
input:disabled { background: #f3f4f6; color: #9ca3af; }

.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.file-item { display: flex; align-items: center; gap: 8px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px 8px; }
.file-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.file-name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-ico { font-size: 20px; }
.file-rm { border: none; background: #fee2e2; color: #dc2626; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 14px; line-height: 1; flex-shrink: 0; }

.hidden { display: none; }

@media (max-width: 860px) {
  header { padding: 14px 16px; }
  header h1 { font-size: 19px; }
  nav { gap: 6px; }
  .tab { flex: 1; text-align: center; padding: 10px 8px; }
  main { flex-direction: column; gap: 12px; padding: 12px 12px 24px; }
  #map { width: 100%; height: 42vh; min-height: 280px; }
  @supports (height: 42dvh) {
    #map { height: 42dvh; }
  }
  .panel { width: 100%; max-height: none; padding: 16px; }
  .btn { min-height: 44px; }
  .btn.primary { min-height: 48px; }
  .result .code { font-size: 32px; letter-spacing: 4px; }
  label input, label textarea, label select { font-size: 16px; }
}

.addr {
  margin: 8px 0 2px;
  padding: 6px 10px;
  background: #eef2ff;
  color: #3730a3;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
}

.btn.mini { font-size: 13px; padding: 5px 12px; }
.btn.mini.danger { color: #dc2626; border-color: #fecaca; }
.mine-footer { margin-top: 18px; padding-top: 12px; border-top: 1px solid #eee; color: #9ca3af; font-size: 13px; }
.beacon-row { background:#fff; border:1px solid #eef0f3; border-radius:12px; padding:12px 14px; margin-bottom:10px; }
.beacon-top { display: flex; align-items: center; justify-content: space-between; }
.bcode { font-size: 18px; font-weight: 700; letter-spacing: 1px; color: #111827; word-break: break-all; }
.bname { color: #111827; font-size: 14px; font-weight: 600; margin-top: 6px; line-height: 1.45; word-break: break-all; }
.bname.loc { color: #6b7280; font-weight: 400; font-size: 13px; }
.bmeta { color: #6b7280; font-size: 12px; margin-top: 4px; }
.bactions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.mine-more { text-align: center; margin: 8px 0 4px; }

.qr { text-align: center; margin: 12px 0; }
.qr img { width: 160px; height: 160px; border: 1px solid #e5e7eb; border-radius: 8px; }

.member-item { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; border:1px solid #e5e7eb; border-radius:8px; margin-bottom:6px; font-size:14px; }

.benefit-table { margin-bottom: 8px; }
.benefit-table table { width: 100%; border-collapse: collapse; font-size: 13px; background:#fff; border:1px solid #e5e7eb; border-radius:8px; overflow:hidden; }
.benefit-table th, .benefit-table td { padding: 6px 8px; text-align:left; border-bottom:1px solid #f0f0f0; }

/* ===== 现代化 UI 增强 ===== */
:root {
  --brand: #2563eb;
  --brand2: #4f46e5;
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
}

body { background: var(--bg); }

header {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  border-bottom: none;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .18);
}
header h1 { font-weight: 800; letter-spacing: .5px; }
header .sub { color: rgba(255,255,255,.82); }
nav { gap: 10px; }
.tab {
  border: none;
  background: rgba(255,255,255,.18);
  color: #fff;
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 600;
  transition: all .2s;
}
.tab:hover { background: rgba(255,255,255,.28); }
.tab.active { background: #fff; color: var(--brand); }

main { gap: 18px; }
#map {
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, .08);
  border: none;
}
.panel {
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, .06);
  border: 1px solid #eef0f4;
}
.panel h2 { font-weight: 700; }

label input, label textarea, select {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  transition: border-color .15s, box-shadow .15s;
}
label input:focus, label textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.btn { border-radius: 10px; font-weight: 600; }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  border: none;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .22);
}
.btn.primary:hover { filter: brightness(1.05); }

.result {
  border-radius: 14px;
  background: #f4f7ff;
  border: 1px solid #dbe5ff;
}

.member-item {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #eef0f4;
}
.benefit-table table { border-radius: 12px; }
.benefit-table th { background: #f8fafc; }

@media (max-width: 860px) {
  header { padding: 14px 14px 16px; }
  nav { gap: 6px; }
  .tab { padding: 10px 6px; font-size: 14px; }
}

.acct-summary { background:#f8fafc; border:1px solid #e5e7eb; border-radius:12px; padding:4px 16px; margin-bottom:14px; }
.acct-row { display:flex; align-items:center; justify-content:space-between; min-height:44px; padding:8px 0; border-bottom:1px solid #eef0f3; }
.acct-row:last-child { border-bottom:none; }
.acct-label { flex-shrink:0; color:#6b7280; font-size:13px; margin-right:16px; }
.acct-value { flex:1; display:flex; align-items:center; justify-content:flex-end; text-align:right; color:#111827; font-size:13px; gap:8px; }
.acct-code { color:#2563eb; font-weight:600; letter-spacing:1px; word-break:break-all; }
.copy-chip { flex-shrink:0; font-family:inherit; font-size:13px; line-height:1; color:#2563eb; padding:7px 14px; border:1px solid #bfdbfe; border-radius:20px; background:#fff; cursor:pointer; }
.copy-chip:hover { background:#eff6ff; }


/* 表单卡片分组：分享/寻找页字段分区 */
.form-card { background:#f8fafc; border:1px solid #eef0f3; border-radius:14px; padding:14px 16px; margin-bottom:14px; }
.form-card-title { font-size:13px; font-weight:700; color:#374151; margin-bottom:8px; }
.form-card .btn { width:100%; margin:4px 0 8px; }
.form-card label { margin:8px 0; }
.form-card .hint { margin-bottom:0; }
input[type="file"] { display:block; width:100%; margin:6px 0 8px; padding:9px 10px; border:1px dashed #d1d5db; border-radius:10px; font-size:13px; background:#fff; color:#6b7280; }.row .btn { flex:1; }
.row .btn.primary { width:auto; margin-top:0; }


/* 备案信息页脚（ICP 备案要求） */
.site-footer {
  text-align: center;
  padding: 18px 16px 28px;
  color: #9ca3af;
  font-size: 12px;
  background: #fff;
}
.site-footer a {
  color: #6b7280;
  text-decoration: none;
}
.site-footer a:hover { color: #2563eb; }
