/* ==========================================================================
   山西电信积分商城 · 管理后台 Demo 主题
   深色侧边栏 + 浅色内容区 · 科技蓝紫渐变
   ========================================================================== */
:root {
  --primary: #3b82f6;
  --violet: #8b5cf6;
  --grad: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --bg: #f1f5f9;
  --card: #ffffff;
  --line: #e8edf4;
  --txt: #1e293b;
  --txt2: #64748b;
  --txt3: #94a3b8;
  --ok: #10b981;
  --warn: #f59e0b;
  --err: #ef4444;
  --side-w: 232px;
  --top-h: 60px;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--txt);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--txt); outline: none; }
a { text-decoration: none; color: inherit; }
b { font-weight: 600; }

#app { display: flex; min-height: 100vh; }
/* 登录 / 无权限页：#app 直接包裹 #page，需占满整行，否则右侧露出 body 浅色底 */
#app > #page { flex: 1; min-width: 0; }

/* ==========================================================================
   侧边栏
   ========================================================================== */
.sidebar {
  width: var(--side-w); flex: none;
  background: linear-gradient(180deg, #0b1220 0%, #101a30 55%, #111d36 100%);
  color: #cbd5e1;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 4px 14px -2px rgba(99, 102, 241, .55);
}
.brand-logo .ico { width: 20px; height: 20px; }
.brand-txt b { display: block; color: #f1f5f9; font-size: 15px; letter-spacing: .5px; }
.brand-txt span { font-size: 11px; color: #64748b; }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 2px; }
.nav-group { font-size: 11px; color: #475569; padding: 16px 10px 6px; letter-spacing: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 2px; border-radius: 10px;
  color: #94a3b8; font-size: 13.5px;
  transition: all .18s;
  position: relative;
}
.nav-item .ico { width: 17px; height: 17px; flex: none; }
.nav-item:hover { color: #e2e8f0; background: rgba(148, 163, 184, .08); }
.nav-item.active {
  color: #fff; background: var(--grad);
  box-shadow: 0 4px 12px -2px rgba(79, 70, 229, .5);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 20%; bottom: 20%;
  width: 3px; border-radius: 2px; background: #60a5fa;
}
.side-foot {
  padding: 14px 18px; font-size: 11px; color: #475569;
  border-top: 1px solid rgba(148, 163, 184, .1);
  display: flex; align-items: center; gap: 6px;
}
.v-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }

/* ==========================================================================
   主区域 / 顶栏
   ========================================================================== */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--top-h); flex: none;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 24px;
  position: sticky; top: 0; z-index: 20;
}
.crumb { display: flex; align-items: center; gap: 8px; color: var(--txt3); font-size: 13px; }
.crumb i { font-style: normal; color: #cbd5e1; }
.crumb b { color: var(--txt); font-weight: 600; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; position: relative; }
.tb-icon {
  width: 34px; height: 34px; border-radius: 9px; font-size: 16px; color: var(--txt2);
  border: 1px solid var(--line); background: #fff; transition: all .15s;
}
.tb-icon:hover { color: var(--primary); border-color: #bfdbfe; }
.tb-user { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 5px 6px 5px 5px; border-radius: 10px; transition: background .15s; }
.tb-user:hover { background: #f1f5f9; }
.avatar {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: var(--grad); color: #fff; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.tb-name { font-size: 13.5px; font-weight: 600; }
.caret { font-style: normal; font-size: 10px; color: var(--txt3); }
.user-drop {
  position: absolute; top: 46px; right: 0; width: 200px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, .18);
  overflow: hidden; z-index: 50;
}
.ud-head { padding: 13px 15px; border-bottom: 1px solid var(--line); }
.ud-head b { display: block; font-size: 14px; }
.ud-head span { font-size: 12px; color: var(--txt2); }
.user-drop button {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 11px 15px; font-size: 13.5px; color: var(--txt2); transition: all .15s;
}
.user-drop button:hover { background: #fef2f2; color: var(--err); }
.user-drop button .ico { width: 15px; height: 15px; }

.content { flex: 1; padding: 22px 24px 40px; max-width: 1440px; width: 100%; margin: 0 auto; }

/* ==========================================================================
   通用组件
   ========================================================================== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; gap: 14px; flex-wrap: wrap; }
.page-head h2 { font-size: 20px; font-weight: 700; }
.page-head .sub { color: var(--txt2); font-size: 13px; margin-top: 5px; }
.page-head .ops { display: flex; gap: 10px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: var(--grad); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  height: 34px; padding: 0 15px; border-radius: 9px; font-size: 13px; font-weight: 500;
  transition: all .16s; white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 12px -3px rgba(79, 70, 229, .45); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--txt2); }
.btn-ghost:hover { border-color: #c7d2fe; color: var(--primary); }
.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #fecaca; }
.btn-sm { height: 28px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.btn-link { color: var(--primary); font-size: 12.5px; padding: 4px 6px; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--err); }
.btn-link[disabled] { color: var(--txt3); cursor: not-allowed; text-decoration: none; }
.perm-hidden { display: none !important; }

/* 表单 */
.f-item { margin-bottom: 15px; }
.f-item > label { display: block; font-size: 13px; color: var(--txt2); margin-bottom: 7px; }
.f-item > label em { color: var(--err); font-style: normal; margin-left: 2px; }
.f-input, .f-select, .f-textarea {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px; background: #f8fafc;
  transition: all .15s;
}
.f-textarea { height: auto; padding: 9px 12px; resize: vertical; min-height: 70px; line-height: 1.6; }
.f-input:focus, .f-select:focus, .f-textarea:focus { border-color: #93c5fd; background: #fff; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.f-row { display: flex; gap: 12px; }
.f-row .f-item { flex: 1; }
.f-hint { font-size: 12px; color: var(--txt3); margin-top: 6px; }
.f-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.f-check input { width: 16px; height: 16px; accent-color: var(--primary); }

/* 徽章 */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
}
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.ok { background: #ecfdf5; color: #059669; }
.pill.warn { background: #fffbeb; color: #d97706; }
.pill.err { background: #fef2f2; color: #dc2626; }
.pill.info { background: #eff6ff; color: #2563eb; }
.pill.gray { background: #f1f5f9; color: #64748b; }
.pill.violet { background: #f5f3ff; color: #7c3aed; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: #eef2ff; color: #4f46e5; font-size: 11.5px; margin-right: 4px;
}

/* 开关 */
.ui-switch { display: inline-flex; width: 36px; height: 20px; border-radius: 20px; background: #cbd5e1; cursor: pointer; transition: background .2s; position: relative; align-items: center; }
.ui-switch i { position: absolute; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.ui-switch.on { background: var(--primary); }
.ui-switch.on i { left: 18px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; }
.tb th {
  text-align: left; font-size: 12px; color: var(--txt3); font-weight: 500;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: #f8fafc;
}
.tb th:first-child { border-radius: 8px 0 0 8px; }
.tb th:last-child { border-radius: 0 8px 8px 0; }
.tb td { padding: 12px; border-bottom: 1px solid #f1f5f9; font-size: 13.5px; vertical-align: middle; }
.tb tbody tr { transition: background .12s; }
.tb tbody tr:hover { background: #f8faff; }
.tb .td-sub { display: block; font-size: 11.5px; color: var(--txt3); margin-top: 3px; }
.tb .td-actions { white-space: nowrap; }
.tb .num { font-variant-numeric: tabular-nums; }

/* 缩略图 */
.thumb {
  width: 52px; height: 40px; border-radius: 8px; overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  position: relative; flex: none;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.round { border-radius: 50%; width: 42px; height: 42px; }
.thumb.lg { width: 76px; height: 52px; }
.img-fb::after { content: attr(data-emoji); position: absolute; }

/* 排序按钮 */
.sort-btns { display: inline-flex; flex-direction: column; gap: 3px; }
.sort-btns button {
  width: 22px; height: 16px; border-radius: 5px; font-size: 9px; line-height: 1;
  background: #f1f5f9; color: var(--txt2); transition: all .12s;
}
.sort-btns button:hover { background: var(--primary); color: #fff; }
.sort-btns button[disabled] { opacity: .35; cursor: not-allowed; }

/* 工具栏 */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-box { position: relative; }
.search-box input { width: 220px; height: 34px; padding: 0 12px 0 32px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.search-box::before { content: '⌕'; position: absolute; left: 10px; top: 50%; transform: translateY(-52%); color: var(--txt3); font-size: 15px; }
.search-box input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59, 130, 246, .1); }
.toolbar .f-select.mini { width: auto; height: 34px; padding: 0 30px 0 10px; }

/* Tab */
.tabs { display: inline-flex; background: #eef2f7; padding: 4px; border-radius: 10px; gap: 2px; }
.tabs button { padding: 7px 16px; border-radius: 8px; font-size: 13px; color: var(--txt2); transition: all .16s; }
.tabs button.cur { background: #fff; color: var(--txt); font-weight: 600; box-shadow: 0 1px 4px rgba(15, 23, 42, .1); }
.tabs button .cnt { font-size: 11px; color: var(--txt3); margin-left: 3px; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 6px; padding-top: 16px; justify-content: flex-end; }
.pg-info { font-size: 12.5px; color: var(--txt3); margin-right: 8px; }
.pg-btn {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--txt2); font-size: 13px;
}
.pg-btn:hover:not([disabled]) { border-color: var(--primary); color: var(--primary); }
.pg-btn.cur { background: var(--grad); border-color: transparent; color: #fff; }
.pg-btn[disabled] { opacity: .4; cursor: not-allowed; }
.pg-dot { color: var(--txt3); }

/* 空状态 */
.empty { text-align: center; padding: 46px 0; color: var(--txt3); }
.e-ico { font-size: 40px; margin-bottom: 10px; filter: grayscale(.3); opacity: .7; }

/* ==========================================================================
   登录页
   ========================================================================== */
.login-page {
  /* #app 为横向 flex（侧边栏 + 主区），登录页需显式占满整行，否则右侧露出 body 浅色底 */
  flex: 1; width: 100%;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px; position: relative;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
}
.login-page::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cpath d='M0 70h140M70 0v140' stroke='%230f172a' stroke-opacity='.025'/%3E%3C/svg%3E");
}
.login-card {
  position: relative; z-index: 1;
  width: 400px; max-width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 34px 34px 26px;
  box-shadow: 0 12px 40px -20px rgba(15, 23, 42, .28);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.login-brand .brand-logo { width: 40px; height: 40px; border-radius: 10px; }
.login-brand b { font-size: 16px; color: var(--txt); display: block; letter-spacing: .5px; }
.login-brand span { font-size: 12px; color: var(--txt3); }
.login-card h2 { font-size: 18px; margin-bottom: 4px; }
.login-card .lc-sub { color: var(--txt2); font-size: 13px; margin-bottom: 22px; }
.login-card .f-input { height: 44px; background: #f8fafc; }
.cap-row { display: flex; gap: 10px; align-items: center; }
.cap-row .f-input { flex: 1; min-width: 0; }
.cap-img { width: 118px; height: 44px; flex: none; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); background: #f5f7fa; }
.login-card .btn-primary { width: 100%; height: 44px; font-size: 15px; margin-top: 8px; border-radius: 8px; }
.login-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--txt3); }

/* ==========================================================================
   看板
   ========================================================================== */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; position: relative; overflow: hidden; transition: transform .18s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card::after {
  content: ''; position: absolute; right: -20px; top: -20px; width: 80px; height: 80px;
  border-radius: 50%; opacity: .07;
}
.stat-card.sc-blue::after { background: #3b82f6; } .stat-card.sc-violet::after { background: #8b5cf6; }
.stat-card.sc-green::after { background: #10b981; } .stat-card.sc-orange::after { background: #f59e0b; }
.stat-card.sc-cyan::after { background: #06b6d4; }
.sc-head { display: flex; align-items: center; gap: 9px; color: var(--txt2); font-size: 13px; }
.sc-ico { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.sc-ico .ico { width: 17px; height: 17px; }
.sc-blue .sc-ico { background: #dbeafe; color: #2563eb; }
.sc-violet .sc-ico { background: #ede9fe; color: #7c3aed; }
.sc-green .sc-ico { background: #d1fae5; color: #059669; }
.sc-orange .sc-ico { background: #fef3c7; color: #d97706; }
.sc-cyan .sc-ico { background: #cffafe; color: #0891b2; }
.sc-num { font-size: 27px; font-weight: 700; margin: 12px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.sc-num small { font-size: 12px; color: var(--txt3); font-weight: 400; margin-left: 3px; }
.sc-foot { font-size: 11.5px; color: var(--txt3); display: flex; align-items: center; gap: 5px; }
.sc-foot .up { color: var(--ok); } .sc-foot .down { color: var(--err); }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: stretch; }
.grid-2 > .card { margin-top: 0; }
.chart { width: 100%; height: auto; display: block; }
.c-tick { font-size: 9px; fill: #94a3b8; }
.legend-line { display: flex; gap: 16px; font-size: 12px; color: var(--txt2); margin-top: 8px; }
.legend-line i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.donut-wrap { display: flex; align-items: center; gap: 10px; }
.donut-wrap .chart { width: 190px; flex: none; }
.d-num { font-size: 22px; font-weight: 700; fill: var(--txt); }
.d-cap { font-size: 10px; fill: #94a3b8; }
.lg-list { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.lg-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--txt2); }
.lg-item i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.lg-item b { margin-left: auto; color: var(--txt); }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.q-item {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 8px; transition: all .16s; cursor: pointer;
}
.q-item:hover { border-color: #c7d2fe; box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .25); transform: translateY(-2px); }
.q-item .q-ico { width: 34px; height: 34px; border-radius: 10px; background: #eef2ff; color: #4f46e5; display: flex; align-items: center; justify-content: center; }
.q-item .q-ico .ico { width: 17px; height: 17px; }
.q-item b { font-size: 13.5px; }
.q-item span { font-size: 11.5px; color: var(--txt3); }

/* 403 */
.forbidden { text-align: center; padding: 100px 0; }
.f-ico { font-size: 54px; margin-bottom: 16px; }
.forbidden h2 { font-size: 22px; margin-bottom: 10px; }
.forbidden p { color: var(--txt2); margin-bottom: 24px; }

/* ==========================================================================
   首页配置（含手机预览）
   ========================================================================== */
.homecfg-layout { display: grid; grid-template-columns: 1fr 355px; gap: 18px; align-items: start; }
.homecfg-main { min-width: 0; }

.phone-wrap { position: sticky; top: calc(var(--top-h) + 22px); }
.phone {
  width: 340px; margin: 0 auto;
  background: #0b1220; border-radius: 40px; padding: 10px;
  box-shadow: 0 24px 60px -18px rgba(15, 23, 42, .45), 0 0 0 1px rgba(148, 163, 184, .15);
}
.phone-screen {
  background: #f6f7fb; border-radius: 32px; overflow: hidden;
  height: 620px; overflow-y: auto; position: relative;
}
.phone-screen::-webkit-scrollbar { width: 0; }
.p-status { display: flex; justify-content: space-between; padding: 10px 20px 4px; font-size: 11px; font-weight: 600; color: #1e293b; background: #fff; }
.p-nav { display: flex; justify-content: center; padding: 2px 0 8px; background: #fff; }
.p-notch { width: 90px; height: 20px; background: #0b1220; border-radius: 12px; }
.phone-head {
  position: sticky; top: 0; z-index: 5;
  background: linear-gradient(135deg, #4f6ef2, #7c5cf0);
  padding: 10px 14px 14px;
}
.p-citybar { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.p-citybar .loc { font-size: 12px; }
.p-search { background: rgba(255,255,255,.92); border-radius: 17px; height: 34px; display: flex; align-items: center; padding: 0 13px; color: #94a3b8; font-size: 12.5px; gap: 6px; }
.p-banner { margin: 10px 14px 0; position: relative; border-radius: 12px; overflow: hidden; height: 118px; background: linear-gradient(135deg, #64748b, #94a3b8); }
.p-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-banner .pb-txt { position: absolute; left: 12px; bottom: 10px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.p-banner .pb-txt b { display: block; font-size: 15px; }
.p-banner .pb-txt span { font-size: 10.5px; opacity: .9; }
.p-dots { position: absolute; right: 12px; bottom: 10px; display: flex; gap: 4px; }
.p-dots i { width: 5px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.45); transition: all .2s; }
.p-dots i.cur { width: 14px; background: #fff; }
.p-kk { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 4px; background: #fff; margin: 12px 14px 0; border-radius: 12px; padding: 14px 6px 12px; }
.p-kk .kk-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.p-kk .kk-img { width: 44px; height: 44px; border-radius: 13px; overflow: hidden; background: linear-gradient(135deg, #dbeafe, #ede9fe); display: flex; align-items: center; justify-content: center; font-size: 20px; position: relative; }
.p-kk .kk-img img { width: 100%; height: 100%; object-fit: cover; }
.p-kk span { font-size: 11.5px; color: #334155; }
.p-sec { display: flex; align-items: center; gap: 6px; padding: 16px 16px 10px; }
.p-sec b { font-size: 15px; }
.p-sec::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, #3b82f6, #8b5cf6); }
.p-flow { display: flex; gap: 9px; padding: 0 14px 20px; align-items: flex-start; }
.p-col { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.p-card { background: #fff; border-radius: 11px; overflow: hidden; box-shadow: 0 1px 4px rgba(15,23,42,.06); }
.p-card .pc-img { width: 100%; height: 92px; background: linear-gradient(135deg, #dbeafe, #ede9fe); display: flex; align-items: center; justify-content: center; font-size: 22px; position: relative; overflow: hidden; }
.p-card .pc-img img { width: 100%; height: 100%; object-fit: cover; }
.p-card .pc-body { padding: 8px 9px 10px; }
.p-card .pc-t { font-size: 12px; color: #1e293b; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-card .pc-p { margin-top: 5px; font-size: 12px; color: #ef4444; font-weight: 700; }
.p-card .pc-p small { font-weight: 400; font-size: 10px; color: #94a3b8; }
.preview-tip { text-align: center; font-size: 12px; color: var(--txt3); margin-top: 12px; }
.preview-tip b { color: var(--primary); }

/* Banner 配置列表 */
.banner-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.banner-item {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px;
  transition: all .15s; background: #fff;
}
.banner-item:hover { border-color: #c7d2fe; box-shadow: 0 4px 14px -6px rgba(79, 70, 229, .2); }
.banner-item .bi-img { width: 150px; height: 66px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #dbeafe, #ede9fe); display: flex; align-items: center; justify-content: center; font-size: 24px; position: relative; flex: none; }
.banner-item .bi-img img { width: 100%; height: 100%; object-fit: cover; }
.banner-item .bi-info { flex: 1; min-width: 0; }
.banner-item .bi-info b { font-size: 14.5px; }
.banner-item .bi-info .bi-sub { font-size: 12.5px; color: var(--txt2); margin-top: 3px; }
.banner-item .bi-info .bi-link { margin-top: 7px; }
.link-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; padding: 3px 9px; border-radius: 7px;
  background: #f0f9ff; color: #0369a1; max-width: 100%;
}
.link-badge.lt-benefit { background: #eff6ff; color: #2563eb; }
.link-badge.lt-category { background: #f0fdf4; color: #16a34a; }
.link-badge.lt-url { background: #fdf4ff; color: #a21caf; }
.link-badge i { font-style: normal; font-size: 10px; opacity: .7; flex: none; }
.link-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 金刚区管理 */
.kk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kk-card { border: 1px solid var(--line); border-radius: 13px; padding: 16px 12px; text-align: center; background: #fff; transition: all .15s; position: relative; }
.kk-card:hover { border-color: #c7d2fe; box-shadow: 0 4px 14px -6px rgba(79, 70, 229, .2); }
.kk-card .kk-icon { width: 52px; height: 52px; border-radius: 15px; overflow: hidden; margin: 0 auto 9px; background: linear-gradient(135deg, #dbeafe, #ede9fe); display: flex; align-items: center; justify-content: center; font-size: 24px; position: relative; }
.kk-card .kk-icon img { width: 100%; height: 100%; object-fit: cover; }
.kk-card b { font-size: 13.5px; display: block; }
.kk-card .kk-desc { font-size: 11px; color: var(--txt3); margin: 4px 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kk-card .kk-idx { position: absolute; left: 9px; top: 9px; width: 18px; height: 18px; border-radius: 6px; background: #eef2ff; color: #4f46e5; font-size: 11px; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.kk-card .kk-ops { display: flex; justify-content: center; gap: 2px; }

/* 瀑布流配置表 */
.weight-input { width: 62px; height: 30px; text-align: center; border: 1px solid var(--line); border-radius: 7px; background: #f8fafc; }
.weight-input:focus { border-color: #93c5fd; background: #fff; }

/* 图片选择预览 */
.img-pick-preview { display: flex; gap: 12px; align-items: center; }
.img-pick-preview .thumb.lg { width: 110px; height: 64px; border-radius: 10px; }

/* ==========================================================================
   Modal / Toast / Confirm
   ========================================================================== */
.ui-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(11, 18, 32, .45); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s;
}
.ui-mask.show { opacity: 1; }
.ui-modal {
  width: 480px; max-width: calc(100vw - 40px); max-height: calc(100vh - 60px);
  background: #fff; border-radius: 18px; display: flex; flex-direction: column;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .4);
  transform: translateY(14px) scale(.98); transition: transform .18s;
  overflow: hidden;
}
.ui-modal.wide { width: 640px; }
.ui-mask.show .ui-modal { transform: none; }
.m-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
.m-head h3 { font-size: 16.5px; }
.m-x { width: 30px; height: 30px; border-radius: 8px; font-size: 18px; color: var(--txt3); }
.m-x:hover { background: #f1f5f9; color: var(--txt); }
.m-body { padding: 18px 22px; overflow-y: auto; }
.m-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 4px 22px 20px; }
.confirm-body { display: flex; gap: 14px; align-items: flex-start; padding: 6px 0 10px; }
.confirm-body p { font-size: 14px; color: var(--txt2); line-height: 1.7; padding-top: 3px; }
.confirm-ico {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  background: #eff6ff; color: #2563eb; font-size: 19px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.confirm-ico.danger { background: #fef2f2; color: #dc2626; }

.ui-toast {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%);
  background: #0f172a; color: #fff; padding: 10px 20px 10px 14px; border-radius: 12px;
  font-size: 13.5px; z-index: 200; display: flex; align-items: center; gap: 9px;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .4);
  animation: toastIn .25s cubic-bezier(.2, .9, .3, 1.3);
}
.ui-toast.out { opacity: 0; transform: translateX(-50%) translateY(-8px); transition: all .3s; }
.t-ico { width: 20px; height: 20px; border-radius: 50%; background: #10b981; font-size: 11px; display: flex; align-items: center; justify-content: center; flex: none; }
.ui-toast.err .t-ico { background: #ef4444; }
.ui-toast.warn .t-ico { background: #f59e0b; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-12px); } }

/* 角色权限矩阵 */
.perm-matrix { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pm-group { border-bottom: 1px solid var(--line); }
.pm-group:last-child { border-bottom: none; }
.pm-head {
  display: flex; align-items: center; gap: 10px; padding: 11px 15px;
  background: #f8fafc; font-weight: 600; font-size: 13.5px;
}
.pm-items { padding: 4px 15px 12px 41px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pm-items .f-check { color: var(--txt2); }

/* 权限标签（角色列表） */
.perm-tags { display: flex; flex-wrap: wrap; gap: 5px; max-width: 360px; }
.perm-tag { font-size: 11px; background: #f1f5f9; color: var(--txt2); padding: 2px 8px; border-radius: 6px; }
.perm-tag.all { background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; }

/* 会员/日志等级 */
.lv-chip { font-size: 11px; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.lv-V1 { background: #f1f5f9; color: #64748b; } .lv-V2 { background: #eff6ff; color: #2563eb; } .lv-V3 { background: #fef3c7; color: #b45309; }

/* 响应式 */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .homecfg-layout { grid-template-columns: 1fr; }
  .phone-wrap { display: none; }
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .kk-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .sidebar { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   图片上传字段（img-field）
   ========================================================================== */
.img-field { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.if-prev {
  width: 130px; height: 72px; border-radius: 10px; overflow: hidden;
  background: #f8fafc; border: 1.5px dashed var(--line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s; position: relative; flex: none;
}
.if-prev:hover, .if-prev.drag { border-color: var(--primary); background: #eff6ff; }
.if-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.if-empty { font-size: 11px; color: var(--txt3); text-align: center; padding: 0 8px; line-height: 1.5; }
.if-ops { display: flex; flex-direction: column; gap: 8px; }
.img-field .f-hint { flex-basis: 100%; margin-top: 0; }

/* 素材库选择器 */
.imglib-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-height: 380px; overflow-y: auto; }
.imglib-item {
  cursor: pointer; border: 2px solid transparent; border-radius: 10px;
  overflow: hidden; background: #f8fafc; transition: all .14s;
}
.imglib-item:hover { border-color: var(--primary); transform: translateY(-1px); }
.imglib-item img { width: 100%; height: 62px; object-fit: cover; display: block; }
.imglib-item span { display: block; font-size: 11px; color: var(--txt2); padding: 5px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   富下拉（可搜索 select）
   ========================================================================== */
.rs { position: relative; }
.rs.mini { width: 170px; }
.rs-input {
  width: 100%; height: 38px; padding: 0 30px 0 12px;
  border: 1px solid var(--line); border-radius: 9px; background: #f8fafc;
  transition: all .15s; cursor: pointer;
}
.rs.mini .rs-input { height: 34px; font-size: 13px; }
.rs-input:focus { border-color: #93c5fd; background: #fff; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); cursor: text; }
.rs-caret {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%) rotate(0deg);
  color: var(--txt3); font-size: 10px; font-style: normal; pointer-events: none; transition: transform .15s;
}
.rs.open .rs-caret { transform: translateY(-50%) rotate(180deg); }
.rs-panel {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; min-width: 180px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, .22);
  max-height: 248px; overflow-y: auto; display: none; z-index: 80;
}
.rs.open .rs-panel { display: block; }
.rs-panel::-webkit-scrollbar { width: 5px; }
.rs-panel::-webkit-scrollbar-thumb { background: #dbe3ee; border-radius: 3px; }
.rs-item { padding: 8px 13px; font-size: 13px; cursor: pointer; transition: background .1s; }
.rs-item:hover { background: #f5f8ff; }
.rs-item.cur { color: #2563eb; font-weight: 600; }
.rs-empty { padding: 16px; text-align: center; color: var(--txt3); font-size: 12.5px; }

/* 经纬度 */
.geo-row { display: flex; gap: 8px; }
.geo-row .f-input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; font-size: 13px; }
.geo-row .btn { flex: none; white-space: nowrap; }
.geo-chip {
  display: inline-block; padding: 3px 9px; border-radius: 7px;
  background: #f0fdf4; color: #16a34a; font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

/* =========================== 运营筛选行（交易 / 日志） =========================== */
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); background: #fafbfd; }
.filter-bar .search-box input { width: 230px; height: 32px; }
.filter-bar .f-select.mini { height: 32px; }
.fl-label { font-size: 12.5px; color: var(--txt3); margin-left: 4px; }
.fl-dash { color: var(--txt3); font-size: 12px; }
.f-date { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12.5px; color: var(--txt1); font-family: inherit; }
.f-date:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59, 130, 246, .1); outline: 0; }
.filter-bar .btn-link { font-size: 12.5px; white-space: nowrap; }

/* 登录页 · 账号体系指引 */
.sys-hint { margin-top: 10px; font-size: 11.5px; color: #94a3b8; line-height: 1.6; }
