/* ===== 碰一碰商家管理后台 · 深空蓝主题 ===== */
* { margin:0; padding:0; box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body {
  font-family:"Microsoft YaHei","PingFang SC",sans-serif;
  background:#eef2f7; color:#2c3542; font-size:14px;
  min-height:100vh;
}
::-webkit-scrollbar { width:8px; height:8px; }
::-webkit-scrollbar-thumb { background:#c6d0db; border-radius:8px; }
::-webkit-scrollbar-thumb:hover { background:#a9b8c8; }
::-webkit-scrollbar-track { background:transparent; }
.muted { color:#98a2b3; font-size:12px; }
.hint { font-size:12px; color:#718096; line-height:1.9; background:#f5f8fc; border:1px solid #e8eef6; padding:11px 14px; border-radius:10px; margin-bottom:14px; }

/* ---------- 登录页 ---------- */
.login-page {
  min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px;
  background:linear-gradient(135deg,#0b1e33 0%,#14304d 46%,#0f4870 100%);
  position:relative; overflow:hidden;
}
.login-page::before, .login-page::after {
  content:""; position:absolute; border-radius:50%; filter:blur(70px); opacity:.45;
}
.login-page::before { width:420px; height:420px; background:#1f6fb2; top:-120px; right:-80px; }
.login-page::after { width:360px; height:360px; background:#0ac2b0; bottom:-130px; left:-90px; opacity:.25; }
.login-card {
  width:90%; max-width:400px; background:rgba(255,255,255,.97);
  border-radius:20px; padding:38px 34px 30px; text-align:center; position:relative; z-index:1;
  box-shadow:0 24px 70px rgba(4,18,36,.5), inset 0 1px 0 rgba(255,255,255,.6);
  animation:loginIn .45s ease;
}
@keyframes loginIn { from { opacity:0; transform:translateY(18px) scale(.98); } to { opacity:1; transform:none; } }
.login-logo {
  width:64px; height:64px; margin:0 auto 4px; border-radius:18px; font-size:30px; line-height:64px;
  background:linear-gradient(135deg,#2b7fff,#12c2b3); color:#fff;
  box-shadow:0 10px 26px rgba(43,127,255,.35);
}
.login-card h2 { margin:12px 0 24px; font-size:20px; letter-spacing:1px; color:#16324f; }
.login-form .field { text-align:left; }
.login-form .field:focus { background:#f6faff; }
.login-card .field { padding:13px 15px; }
.field {
  width:100%; padding:12px 14px; border:1px solid #e2e8f0; border-radius:11px;
  font-size:14px; margin-bottom:13px; outline:none; background:#fbfcfe; transition:all .2s;
}
.field:focus { border-color:#2b7fff; box-shadow:0 0 0 3px rgba(43,127,255,.14); background:#fff; }
.btn-primary {
  width:100%; padding:13px; background:linear-gradient(90deg,#1e6fe8,#3b9bff);
  color:#fff; border:none; border-radius:11px; font-size:16px; font-weight:600; cursor:pointer;
  box-shadow:0 8px 22px rgba(43,127,255,.35); transition:all .2s; letter-spacing:4px;
}
.btn-primary:hover { transform:translateY(-1px); box-shadow:0 12px 28px rgba(43,127,255,.45); }
.btn-primary:active { transform:translateY(0); }
.btn-primary:disabled { opacity:.7; cursor:not-allowed; transform:none; }

/* ---------- 主框架 ---------- */
.main-page { display:none; }
.topbar {
  background:linear-gradient(90deg,#0d2743,#164a75 55%,#0e6a63);
  color:#fff; padding:0 22px; height:58px; display:flex; justify-content:space-between; align-items:center;
  box-shadow:0 2px 14px rgba(13,39,67,.35); position:sticky; top:0; z-index:20;
}
.topbar-title { font-size:17px; font-weight:700; letter-spacing:1px; display:flex; align-items:center; gap:10px; }
.topbar-title::before { content:"📡"; font-size:18px; }
.topbar-right { display:flex; align-items:center; gap:12px; font-size:14px; }
.topbar-right .who { background:rgba(255,255,255,.12); padding:5px 12px; border-radius:20px; }
.btn-plain {
  background:rgba(255,255,255,.14); color:#fff; border:1px solid rgba(255,255,255,.35);
  border-radius:9px; padding:6px 14px; cursor:pointer; font-size:13px; transition:all .2s;
}
.btn-plain:hover { background:rgba(255,255,255,.24); }

/* ---------- Tabs ---------- */
.tabs {
  background:#fff; display:flex; padding:0 18px;
  box-shadow:0 1px 5px rgba(13,39,67,.08); overflow-x:auto; position:sticky; top:58px; z-index:19;
}
.tab {
  padding:15px 20px; font-size:14px; color:#5a6572; cursor:pointer; white-space:nowrap;
  border-bottom:3px solid transparent; transition:color .2s; position:relative;
}
.tab:hover { color:#2b7fff; }
.tab.active { color:#1e6fe8; font-weight:700; border-bottom-color:#2b7fff; }
.content { max-width:1120px; margin:0 auto; padding:24px 18px 70px; animation:fadeIn .3s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px);} to { opacity:1; transform:none; } }

/* ---------- 卡片 ---------- */
.card {
  background:#fff; border-radius:16px; padding:22px; margin-bottom:20px;
  box-shadow:0 2px 10px rgba(13,39,67,.06); border:1px solid #edf1f6;
  transition:box-shadow .25s, transform .25s;
}
.card:hover { box-shadow:0 8px 24px rgba(13,39,67,.09); }
.card h3 { font-size:16px; margin-bottom:16px; color:#16324f; border-left:4px solid #2b7fff; padding-left:10px; }
.grid-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:16px; }
.stat-card {
  background:#fff; border-radius:16px; padding:20px; box-shadow:0 2px 10px rgba(13,39,67,.06);
  border:1px solid #edf1f6; position:relative; overflow:hidden; transition:all .25s;
}
.stat-card::before { content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:linear-gradient(180deg,#2b7fff,#12c2b3); }
.stat-card:hover { transform:translateY(-3px); box-shadow:0 10px 26px rgba(13,39,67,.10); }
.stat-card .num { font-size:32px; font-weight:800; color:#1e6fe8; }
.stat-card .lbl { color:#98a2b3; margin-top:8px; font-size:13px; }

/* ---------- 表格 ---------- */
.card > table, table.data { width:100%; border-collapse:collapse; font-size:13px; }
th, td { padding:12px 12px; text-align:left; border-bottom:1px solid #f0f3f7; }
th { color:#7a8494; font-weight:600; background:#f7f9fc; font-size:12px; letter-spacing:.5px; }
tr:last-child td { border-bottom:none; }
tr:hover td { background:#f6faff; }
.card:has(> table thead) { padding:14px 6px; }
.card.card-table { padding:16px 8px 8px; }

/* ---------- 按钮 ---------- */
.btn {
  padding:8px 16px; border:none; border-radius:9px; cursor:pointer; font-size:13px;
  transition:all .2s; font-weight:500; display:inline-flex; align-items:center; gap:4px;
}
.btn:hover { transform:translateY(-1px); box-shadow:0 6px 16px rgba(13,39,67,.15); }
.btn:active { transform:none; }
.btn-blue { background:linear-gradient(90deg,#2b7fff,#4f9dff); color:#fff; }
.btn-green { background:linear-gradient(90deg,#00a884,#00c9a0); color:#fff; }
.btn-red { background:linear-gradient(90deg,#f0564f,#ff7676); color:#fff; }
.btn-gray { background:#eef0f3; color:#6b7583; }
.btn-sm { padding:5px 12px; font-size:12px; border-radius:8px; }

/* ---------- 表单 ---------- */
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px 20px; }
.form-grid .full { grid-column:1/-1; }
.form-item label { display:block; font-size:13px; color:#5a6572; margin-bottom:6px; font-weight:500; }
.form-item input, .form-item textarea, .form-item select {
  width:100%; padding:10px 12px; border:1px solid #e2e8f0; border-radius:10px; font-size:13px;
  outline:none; background:#fbfcfe; transition:all .2s;
}
.form-item input:focus, .form-item textarea:focus, .form-item select:focus {
  border-color:#2b7fff; box-shadow:0 0 0 3px rgba(43,127,255,.13); background:#fff;
}
.form-group-title { grid-column:1/-1; font-weight:700; color:#1e6fe8; margin-top:12px; border-bottom:1px dashed #e2e8f0; padding-bottom:7px; display:flex; align-items:center; gap:8px; }

/* ---------- 开关 ---------- */
.switch { position:relative; width:46px; height:26px; display:inline-block; vertical-align:middle; }
.switch input { display:none; }
.switch .slider { position:absolute; inset:0; background:#d6dde5; border-radius:26px; transition:.2s; cursor:pointer; box-shadow:inset 0 1px 3px rgba(0,0,0,.12); }
.switch .slider:before { content:""; position:absolute; width:20px; height:20px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s; box-shadow:0 1px 4px rgba(0,0,0,.25); }
.switch input:checked + .slider { background:linear-gradient(90deg,#00a884,#00c9a0); }
.switch input:checked + .slider:before { transform:translateX(20px); }

/* ---------- 模块网格 ---------- */
.mod-grid-admin { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; }
.mod-cell {
  border:1px solid #edf1f6; border-radius:14px; padding:16px 10px; text-align:center;
  background:#fff; transition:all .22s; cursor:pointer; box-shadow:0 1px 6px rgba(13,39,67,.05);
}
.mod-cell:hover { transform:translateY(-3px); box-shadow:0 10px 22px rgba(13,39,67,.10); border-color:#cfddff; }
.mod-cell img { width:40px; height:40px; object-fit:cover; margin-bottom:8px; border-radius:10px; }
.mod-cell .nm { font-size:13px; margin-bottom:10px; font-weight:500; color:#2c3542; }
.mod-cell.off { opacity:.5; filter:grayscale(.9); }

/* ---------- 柱状图 ---------- */
.bars { display:flex; align-items:flex-end; gap:14px; height:160px; padding-top:12px; }
.bar-col { flex:1; text-align:center; }
.bar-col .bar {
  background:linear-gradient(180deg,#4f9dff,#2b7fff); border-radius:8px 8px 0 0;
  min-height:4px; margin:0 auto; width:56%; position:relative;
  box-shadow:0 4px 10px rgba(43,127,255,.25); transition:height .5s ease;
}
.bar-col .dv { font-size:12px; margin-top:8px; color:#5a6572; }
.bar-col .num { font-size:12px; color:#1e6fe8; font-weight:700; }

/* ---------- 其它 ---------- */
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
textarea.ai-copy {
  width:100%; min-height:86px; border:1px dashed #cbd5e1; border-radius:10px; padding:11px;
  font-size:13px; background:#fbfcfe; outline:none; transition:all .2s;
}
textarea.ai-copy:focus { border-color:#2b7fff; background:#fff; }
.empty { text-align:center; color:#98a2b3; padding:40px 0; font-size:13px; }
.empty::before { content:"📭 "; }

/* ---------- 页脚版权 ---------- */
.admin-footer { text-align:center; padding:16px 12px 26px; color:#98a2b3; font-size:12px; letter-spacing:1px; }
.login-card .cp { margin-top:16px; color:#98a2b3; font-size:12px; letter-spacing:1px; }

/* ---------- 音量滑杆 ---------- */
.range-wrap { display:flex; align-items:center; gap:10px; }
.range-wrap input[type=range] {
  flex:1; margin:0; padding:0; height:6px; -webkit-appearance:none; appearance:none;
  background:linear-gradient(90deg,#2b7fff,#12c2b3); border-radius:6px; outline:none; border:none;
}
.range-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance:none; width:20px; height:20px; border-radius:50%; background:#fff;
  border:3px solid #2b7fff; box-shadow:0 2px 8px rgba(43,127,255,.4); cursor:pointer;
}
.range-wrap input[type=range]::-moz-range-thumb {
  width:20px; height:20px; border-radius:50%; background:#fff;
  border:3px solid #2b7fff; box-shadow:0 2px 8px rgba(43,127,255,.4); cursor:pointer;
}
.range-val { min-width:34px; text-align:center; font-weight:700; color:#1e6fe8; font-size:14px; background:#eef4ff; border-radius:8px; padding:3px 6px; }

/* 响应式 */
@media (max-width:760px) {
  .form-grid { grid-template-columns:1fr; }
  .content { padding:14px 10px 60px; max-width:100%; }
  .topbar-title { font-size:15px; }
  .tab { padding:13px 14px; font-size:13px; }
  .tabs { padding:0 8px; }
  /* 手机：卡片内表格可横向滚动，避免撑破布局 */
  .card { padding:16px; overflow-x:auto; box-shadow:0 1px 8px rgba(13,39,67,.06); }
  .card:hover { transform:none; box-shadow:0 1px 8px rgba(13,39,67,.06); }
  .card h3 { font-size:15px; }
  .grid-cards { grid-template-columns:repeat(2,1fr); gap:10px; }
  .stat-card { padding:14px; }
  .stat-card:hover { transform:none; box-shadow:0 1px 8px rgba(13,39,67,.06); }
  .stat-card .num { font-size:24px; }
  .topbar { padding:0 12px; height:54px; }
  .topbar-right .who { display:none; }
  .btn { padding:7px 12px; }
  .btn-sm { padding:4px 9px; font-size:12px; }
  .row { gap:8px; }
  .mod-grid-admin { grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); gap:10px; }
  .mod-cell:hover { transform:none; box-shadow:0 1px 6px rgba(13,39,67,.05); }
  .bars { gap:6px; height:140px; }
  .bar-col .bar { width:72%; }
  textarea.ai-copy { min-height:72px; }
  th, td { padding:9px 8px; font-size:12px; }
  .hint { font-size:12px; }
  .admin-footer { padding:14px 10px 22px; }
  .login-card { padding:30px 22px 24px; }
  .topbar-right { gap:8px; font-size:13px; }
  .range-val { min-width:30px; font-size:13px; }
  .range-wrap input[type=range] { height:8px; }
  .form-item input, .form-item textarea, .form-item select { padding:11px 12px; }
}
