/* ============================================================
   管理后台样式（黑白极简）
   ============================================================ */
:root {
  --ink: #0b0b0b; --muted: #6b6b6b; --faint: #9a9a9a;
  --line: #e8e8e8; --paper: #f6f6f4; --serif: "Noto Serif SC","Songti SC",serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--sans); background: #fff; color: var(--ink); line-height: 1.6; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

/* ---------- 登录页 ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 700; font-size: 17px; margin-bottom: 28px; }
.auth-brand img { width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line); }
.auth-card { width: 100%; max-width: 400px; border: 1px solid var(--ink); border-radius: 16px; padding: 34px 30px; }
.auth-card h1 { font-family: var(--serif); font-size: 21px; margin-bottom: 4px; }
.auth-card .sub { font-size: 13px; color: var(--faint); margin-bottom: 22px; }
.auth-card input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 12px; outline: none; transition: border-color .2s;
}
.auth-card input:focus { border-color: var(--ink); }
.btn-block { width: 100%; margin-top: 4px; }
.forgot { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--muted); }
.forgot:hover { color: var(--ink); }
.alert { padding: 11px 14px; border-radius: 9px; font-size: 13px; margin-bottom: 16px; }
.alert.ok { background: #f0faf3; border: 1px solid #b7e0c4; color: #0a7d3c; }
.alert.err { background: #fdf2f2; border: 1px solid #f0c4c4; color: #b00020; }

/* ---------- 后台布局 ---------- */
.dash { display: flex; min-height: 100vh; }
.dash-side {
  width: 220px; flex-shrink: 0; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh;
}
.dash-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 15px; padding: 0 8px 20px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.dash-brand img { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); }
.dash-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  text-align: left; background: none; border: none; padding: 11px 14px; border-radius: 9px;
  font-size: 14px; color: var(--muted); transition: all .2s;
}
.nav-item:hover { background: var(--paper); color: var(--ink); }
.nav-item.active { background: var(--ink); color: #fff; }
.nav-item.ghost { text-align: left; }
.dash-side-foot { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }

.dash-main { flex: 1; padding: 30px 36px; min-width: 0; }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.pane-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 14px; flex-wrap: wrap; }
.pane-head h2 { font-family: var(--serif); font-size: 22px; }

/* ---------- 按钮 ---------- */
.btn-solid { background: var(--ink); color: #fff; border: none; padding: 10px 20px; border-radius: 999px; font-size: 14px; transition: opacity .2s; }
.btn-solid:hover { opacity: .85; }
.btn-solid:disabled { opacity: .4; cursor: not-allowed; }
.btn-ghost { background: none; border: 1px solid var(--line); color: var(--ink); padding: 10px 18px; border-radius: 999px; font-size: 14px; transition: border-color .2s; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: none; border: 1px solid #e0c0c0; color: #b00020; padding: 9px 16px; border-radius: 999px; font-size: 13px; }
.btn-danger:hover { background: #fdf2f2; }

/* ---------- 表格 / 卡片列表 ---------- */
.panel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel table { width: 100%; border-collapse: collapse; font-size: 14px; }
.panel th, .panel td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.panel th { background: var(--paper); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.panel tr:last-child td { border-bottom: none; }
.panel tr:hover td { background: #fafafa; }
.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.tag { display: inline-block; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 12px; margin: 2px; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat-card .num { font-family: var(--serif); font-size: 30px; font-weight: 700; }
.stat-card .lbl { font-size: 12px; color: var(--faint); letter-spacing: .1em; margin-top: 4px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input[type=text], .field input[type=password], .field textarea, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; outline: none; transition: border-color .2s; background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); }
.field textarea { min-height: 90px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--faint); margin-top: 4px; }
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }

/* ---------- 媒体上传 ---------- */
.upload-zone {
  border: 1px dashed var(--ink); border-radius: 10px; padding: 18px; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; transition: all .2s;
}
.upload-zone:hover, .upload-zone.drag { background: var(--paper); }
.media-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.media-item { position: relative; width: 104px; }
.media-item img, .media-item video { width: 104px; height: 78px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #000; }
.media-item .x { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; border: none; font-size: 13px; line-height: 1; }
.media-item .cover-tag { position: absolute; left: 4px; bottom: 4px; background: var(--ink); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 999px; }
.media-item .set-cover { position: absolute; left: 4px; bottom: 4px; font-size: 10px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--ink); background: #fff; color: var(--ink); }
.media-item.vid { width: 150px; }
.media-item.vid video { width: 150px; height: 84px; }
.media-item .meta { font-size: 11px; color: var(--faint); margin-top: 4px; word-break: break-all; }

/* ---------- 附近机位编辑 ---------- */
.nearby-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: flex-start; }
.nearby-row select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 180px; }
.nearby-row textarea { flex: 1; min-height: 60px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.42); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: all .3s; }
.modal-mask.show { opacity: 1; visibility: visible; }
.modal { width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; background: #fff; border-radius: 14px; transform: translateY(14px); transition: transform .3s; box-shadow: 0 20px 60px rgba(0,0,0,.18); display: flex; flex-direction: column; }
.modal-mask.show .modal { transform: none; }
.modal.wide { max-width: 780px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: var(--serif); font-size: 18px; }
.modal-x { background: none; border: none; font-size: 26px; color: var(--faint); line-height: 1; }
.modal-x:hover { color: var(--ink); }
.modal-body { padding: 22px 24px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 14px;
  opacity: 0; visibility: hidden; transition: all .3s; z-index: 300;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.toast.err { background: #b00020; }

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
  .dash { flex-direction: column; }
  .dash-side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; padding: 14px; gap: 8px; }
  .dash-brand { border: none; margin: 0; padding: 0 8px 0 0; }
  .dash-nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .nav-item { padding: 8px 12px; font-size: 13px; }
  .dash-side-foot { border: none; padding: 0; flex-direction: row; }
  .dash-main { padding: 20px 16px; }
  .panel { overflow-x: auto; }
}
