/* ============ 速魅管理后台样式 ============ */
:root {
  --bg: #0d1320;
  --side: #0a0f1a;
  --card: #121a2c;
  --line: rgba(148, 184, 255, .14);
  --cyan: #00e5ff;
  --blue: #4f7cff;
  --text: #e6efff;
  --muted: #8fa0c2;
  --danger: #ff5470;
  --grad: linear-gradient(120deg, #00e5ff, #4f7cff);
  --clip: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 14px; line-height: 1.6;
}
.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(0, 229, 255, .3); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1b2942; border-radius: 6px; }

.input {
  width: 100%;
  background: rgba(148, 184, 255, .05);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 11px 14px;
  font-size: 14px; font-family: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, .1); }
textarea.input { resize: vertical; min-height: 40px; }
.input.file { padding: 9px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; padding: 11px 22px;
  font-size: 14px; font-weight: 600;
  clip-path: var(--clip);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn.primary { background: var(--grad); color: #02131a; }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0, 229, 255, .3); }
.btn.ghost { background: rgba(148, 184, 255, .08); color: var(--text); }
.btn.ghost:hover { color: var(--cyan); }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(0, 229, 255, .07), transparent 60%),
    radial-gradient(ellipse 50% 45% at 85% 85%, rgba(79, 124, 255, .08), transparent 60%),
    var(--bg);
}
.login-card {
  width: 380px; padding: 44px 38px;
  background: var(--card);
  border: 1px solid var(--line);
  display: grid; gap: 16px;
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}
.login-logo {
  font-size: 24px; font-weight: 700; letter-spacing: 4px; text-align: center;
}
.login-logo small {
  display: block; margin-top: 6px;
  font-size: 12px; font-weight: 400; letter-spacing: 3px; color: var(--muted);
}
.login-err { color: var(--danger); font-size: 13px; min-height: 18px; text-align: center; }
.login-back { text-align: center; color: var(--muted); font-size: 13px; }
.login-back:hover { color: var(--cyan); }

/* ---------- 布局 ---------- */
.admin { display: flex; min-height: 100vh; }
.side {
  width: 220px; flex-shrink: 0;
  background: var(--side);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand {
  padding: 24px 22px;
  font-size: 18px; font-weight: 700; letter-spacing: 2px;
  border-bottom: 1px solid var(--line);
}
.side-brand small { display: block; font-size: 11px; font-weight: 400; letter-spacing: 3px; color: var(--muted); margin-top: 4px; }
#side-nav { padding: 14px 12px; display: grid; gap: 4px; }
#side-nav button {
  text-align: left;
  background: none; border: none;
  color: var(--muted);
  font-size: 14px;
  padding: 11px 14px;
  border-left: 2px solid transparent;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
#side-nav button:hover { color: var(--text); background: rgba(148, 184, 255, .05); }
#side-nav button.on {
  color: var(--cyan);
  background: rgba(0, 229, 255, .07);
  border-left-color: var(--cyan);
}
.side-foot {
  margin-top: auto; padding: 16px 12px;
  border-top: 1px solid var(--line);
  display: grid; gap: 8px;
}
.side-foot a, .side-foot button {
  background: none; border: none;
  color: var(--muted); font-size: 13px;
  text-align: left; padding: 6px 10px;
  transition: color .2s ease;
}
.side-foot a:hover, .side-foot button:hover { color: var(--cyan); }

.main { flex: 1; padding: 30px 34px; min-width: 0; }
.page-head-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.page-head-row h2 { font-size: 20px; letter-spacing: 1px; }
.page-head-row small { color: var(--muted); font-size: 13px; margin-left: 8px; }
.hint {
  color: var(--muted); font-size: 13px;
  background: rgba(148, 184, 255, .05);
  border: 1px solid var(--line);
  padding: 10px 14px; margin-bottom: 18px;
  clip-path: var(--clip);
}

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 12px; letter-spacing: 1px;
  color: var(--muted); font-weight: 400;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.tbl td { padding: 12px; border-bottom: 1px solid rgba(148, 184, 255, .07); vertical-align: middle; }
.tbl tbody tr { transition: background .2s ease; }
.tbl tbody tr:hover { background: rgba(148, 184, 255, .04); }
.t-img img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.noimg {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 8px;
  background: rgba(148, 184, 255, .06); color: var(--muted); font-size: 12px;
}
.tbl td small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.t-empty { text-align: center; color: var(--muted); padding: 40px 0 !important; }
.t-ops { white-space: nowrap; }
.op {
  background: rgba(148, 184, 255, .08); border: none;
  color: var(--text); font-size: 13px;
  padding: 7px 14px; margin-right: 6px;
  clip-path: var(--clip);
  transition: color .2s ease, background .2s ease;
}
.op:hover { color: var(--cyan); background: rgba(0, 229, 255, .12); }
.op.danger:hover { color: var(--danger); background: rgba(255, 84, 112, .12); }
.pill {
  display: inline-block; font-size: 12px; padding: 3px 10px;
  border: 1px solid var(--line); color: var(--muted); clip-path: var(--clip);
}
.pill.hot { color: #02131a; background: var(--grad); border-color: transparent; font-weight: 600; }

/* ---------- 表单 ---------- */
.frm { display: grid; gap: 14px; padding: 6px 0 18px; }
.frm label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chk { display: flex !important; align-items: center; gap: 8px; color: var(--text) !important; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--cyan); }
.imgs { display: flex; gap: 10px; flex-wrap: wrap; }
.img-item { position: relative; width: 76px; height: 76px; }
.img-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.img-del {
  position: absolute; top: -7px; right: -7px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--danger); color: #fff;
  border: none; font-size: 12px; line-height: 1;
}
.cover {
  position: absolute; left: 0; bottom: 0; right: 0;
  font-size: 10px; text-align: center;
  background: rgba(0, 229, 255, .85); color: #02131a; font-weight: 600;
  border-radius: 0 0 8px 8px;
}
.imgs-empty { color: var(--muted); font-size: 13px; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(2, 5, 10, .75);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal-card {
  width: 640px; max-width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 26px 28px;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.modal-card h3 { font-size: 18px; margin-bottom: 16px; letter-spacing: 1px; }
.m-ops { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }

/* ---------- 提示 ---------- */
.atip {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 14px);
  z-index: 90;
  background: rgba(8, 16, 30, .96);
  border: 1px solid var(--cyan);
  color: var(--text);
  padding: 11px 22px; font-size: 14px;
  clip-path: var(--clip);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.atip.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.atip.bad { border-color: var(--danger); }

@media (max-width: 860px) {
  .admin { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; }
  .side-brand { border-bottom: none; border-right: 1px solid var(--line); padding: 14px 18px; }
  #side-nav { display: flex; padding: 8px; overflow-x: auto; }
  #side-nav button { white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
  #side-nav button.on { border-bottom-color: var(--cyan); }
  .side-foot { margin: 0 0 0 auto; padding: 8px 12px; border-top: none; display: flex; }
  .main { padding: 20px 16px; }
  .row2 { grid-template-columns: 1fr; }
}

/* ---------- 前端按钮配色 ---------- */
.input.color { padding: 4px; height: 46px; cursor: pointer; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line);
  background: rgba(148, 184, 255, .05);
  color: var(--text); font-size: 12px;
  padding: 6px 12px 6px 6px;
  clip-path: var(--clip);
  transition: border-color .2s ease, background .2s ease;
}
.swatch i { width: 24px; height: 24px; border-radius: 5px; display: block; }
.swatch:hover { border-color: var(--cyan); background: rgba(0, 229, 255, .08); }
.btn-preview {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: #04070d;
  border: 1px solid var(--line);
  padding: 18px;
  clip-path: var(--clip);
}
.btn-preview .demo {
  display: inline-block;
  padding: 10px 22px;
  font-size: 13px; font-weight: 600;
  clip-path: var(--clip);
}
.btn-preview .demo-ghost { background: transparent; }
