/* 后台基础样式（admin.css 在此基础上增强） */
:root {
  --accent: #ff6b35;
  --accent-dark: #e5551f;
  --bg: #f5f5f4;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font: 15px/1.5 -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: var(--text); background: var(--bg);
}

/* 顶栏 */
.topbar {
  height: 52px; background: #1f2937; color: #fff;
  display: flex; align-items: center; gap: 12px; padding: 0 14px; flex-shrink: 0;
}
.logo { font-weight: 700; font-size: 17px; }
.topbar nav { margin-left: auto; display: flex; gap: 8px; }
.link-btn {
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; text-decoration: none;
}
.link-btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,.3); }
.link-btn:active { opacity: .8; }

.chip {
  flex-shrink: 0; border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 16px; padding: 4px 12px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.mini { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.hidden { display: none !important; }

/* 弹层与表单 */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-box {
  background: #fff; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  border-radius: 14px 14px 0 0; padding: 16px;
}
@media (min-width: 769px) { .modal { align-items: center; } .modal-box { border-radius: 14px; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.form input, .form select, .form textarea {
  width: 100%; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-size: 14px; font-family: inherit;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form .primary {
  width: 100%; background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 11px; font-size: 15px; cursor: pointer; margin-top: 4px;
}
.hint { font-size: 12px; color: var(--muted); margin: -4px 0 10px; }
.form-msg { font-size: 13px; margin-top: 8px; text-align: center; }
.form-msg.ok { color: #16a34a; }
.form-msg.err { color: #dc2626; }

/* 照片选择与预览（编辑弹层） */
.photo-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.photo-row input[type=file] { font-size: 12px; max-width: 200px; }
.photo-preview {
  width: 72px; height: 72px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); display: block;
}
.photo-previews { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-previews img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); display: block; cursor: pointer;
}

/* 地图选点图钉（编辑弹层，不加载远程图片） */
.pick-wrap { margin-bottom: 10px; }
.pin {
  width: 26px; height: 26px; border-radius: 50% 50% 50% 0;
  background: var(--accent); transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.pin span { transform: rotate(45deg); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }

.toast {
  position: fixed; left: 50%; bottom: 12%; transform: translateX(-50%);
  background: rgba(31,41,55,.92); color: #fff; border-radius: 8px; padding: 9px 16px;
  font-size: 14px; z-index: 2000; max-width: 80vw;
}

/* ---------- 后台 ---------- */
.admin-body { background: var(--bg); display: block; min-height: 100vh; }
.login-box {
  max-width: 360px; margin: 12vh auto; background: #fff; border-radius: 14px; padding: 28px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.login-box h2 { text-align: center; margin-bottom: 6px; }
.login-box input {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 15px;
}
.login-box .primary { width: 100%; background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 11px; font-size: 15px; cursor: pointer; }
.admin-tabs { display: flex; gap: 8px; padding: 12px 16px 0; }
.admin-main { padding: 12px 16px 40px; max-width: 1000px; margin: 0 auto; }
table.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; font-size: 13px; }
.admin-table th, .admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { background: #f9fafb; color: var(--muted); font-weight: 500; white-space: nowrap; }
.admin-table .ops { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-s { border: none; border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; color: #fff; }
.btn-approve { background: #16a34a; } .btn-reject { background: #9ca3af; }
.btn-edit { background: #2563eb; } .btn-del { background: #dc2626; } .btn-new { background: var(--accent); }
.admin-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 0; max-width: 1000px; margin: 0 auto; }
.admin-table td img {
  width: 44px; height: 44px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--line); margin: 2px 4px 2px 0; vertical-align: middle;
}
