:root {
  --bg: #0b1020;
  --bg-2: #0f1630;
  --panel: rgba(255,255,255,0.04);
  --panel-border: rgba(255,255,255,0.10);
  --text: #e8ecf5;
  --text-muted: #9aa6c0;
  --accent: #2f7cf6;
  --accent-2: #19c39c;
  --warn: #fa8c16;
  --danger: #f5444e;
  --glass-bg: rgba(255,255,255,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(1200px 700px at 80% -10%, #16224a 0%, var(--bg) 55%) fixed;
  color: var(--text);
  min-height: 100vh;
}

.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  background: linear-gradient(180deg, var(--bg-2), #0a0f22);
  border-right: 1px solid var(--panel-border);
  padding: 22px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(47,124,246,0.35);
}
.brand-title { font-weight: 700; font-size: 15px; }
.brand-sub { font-size: 11px; color: var(--text-muted); }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px; color: var(--text-muted);
  text-decoration: none; font-size: 13.5px; transition: all .18s ease;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.nav-item.active { background: rgba(47,124,246,0.16); color: #cfe0ff; border-left-color: var(--accent); }
.nav-item.disabled { opacity: .5; cursor: not-allowed; }
.badge-soon {
  font-size: 10px; background: rgba(255,255,255,0.08); color: var(--text-muted);
  padding: 1px 7px; border-radius: 20px;
}
.sidebar-foot { font-size: 11px; color: var(--text-muted); margin-top: 18px; }

/* ---- Sidebar submenu (collapsible) ---- */
.nav-group { display: flex; flex-direction: column; }
.nav-parent {
  width: 100%; background: none; border: none; border-left: 3px solid transparent;
  cursor: pointer; font: inherit; color: inherit; text-align: left;
}
.nav-caret { font-size: 10px; transition: transform .2s ease; opacity: .7; }
.nav-parent.open .nav-caret { transform: rotate(90deg); }
.nav-sub {
  display: none; flex-direction: column; gap: 2px;
  margin: 2px 0 2px 10px; padding-left: 10px;
  border-left: 1px solid var(--panel-border);
}
.nav-sub.open { display: flex; }
.nav-child { padding: 8px 12px; font-size: 12.5px; }
.nav-child.active { background: rgba(47,124,246,0.16); color: #cfe0ff; border-left-color: var(--accent); }

/* ---- Main ---- */
.main { display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; border-bottom: 1px solid var(--panel-border);
  position: sticky; top: 0; background: rgba(11,16,32,0.7); backdrop-filter: blur(12px);
  z-index: 5;
}
.topbar-title { font-weight: 700; font-size: 17px; }
.topbar-team { font-weight: 500; font-size: 13px; color: #8a93a3; }
.env-pill {
  font-size: 11px; padding: 4px 12px; border-radius: 20px;
  background: rgba(25,195,156,0.15); color: #8ff0d6; border: 1px solid rgba(25,195,156,0.3);
}
.content { padding: 28px; max-width: 1200px; width: 100%; }

/* ---- Glass cards ---- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.hero { margin-bottom: 22px; }
.hero h1 { font-size: 26px; font-weight: 800; letter-spacing: .5px; }
.muted { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ---- KPI ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 30px; }
.kpi-card { padding: 18px; text-align: center; transition: transform .25s cubic-bezier(.16,1,.3,1); }
.kpi-card:hover { transform: translateY(-4px) scale(1.02); }
.kpi-num { font-size: 30px; font-weight: 800; background: linear-gradient(135deg,#7db1ff,#19c39c); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.kpi-label { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.kpi-warn .kpi-num { background: linear-gradient(135deg,#ffb86b,#f5444e); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.kpi-ok .kpi-num { background: linear-gradient(135deg,#3fe0a0,#19c39c); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.kpi-accent .kpi-num { background: linear-gradient(135deg,#7db1ff,#a78bfa); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---- Modules ---- */
.section-title { font-size: 16px; margin: 26px 0 14px; font-weight: 700; }
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.module-card { padding: 16px 18px; }
.module-card.on { border-color: rgba(25,195,156,0.4); }
.module-card.off { opacity: .7; }
.module-name { font-weight: 600; font-size: 14px; }
.module-step { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ---- Callout ---- */
.callout {
  padding: 16px 18px; border-radius: 14px; margin-top: 18px; line-height: 1.7;
  background: rgba(47,124,246,0.08); border: 1px solid rgba(47,124,246,0.25); font-size: 13.5px;
}
.callout-info { background: rgba(25,195,156,0.07); border-color: rgba(25,195,156,0.25); }
.callout a { color: #7db1ff; }

/* ---- Map Picker POI List ---- */
.poi-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background .15s; display: flex; flex-direction: column; gap: 2px; }
.poi-item:hover { background: rgba(255,255,255,0.05); }
.poi-item.selected { background: rgba(64,158,255,0.12); border-left: 3px solid #409eff; }
.poi-item.selected .poi-title { color: #409eff; font-weight: 600; }
.poi-title { font-size: 14px; font-weight: 500; }
.poi-addr { color: var(--text-muted); line-height: 1.4; }

/* ---- Tables ---- */
.page-h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
.data-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
.data-table th { text-align: left; padding: 12px 14px; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--panel-border); }
.data-table td { padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.data-table tr:hover td { background: rgba(255,255,255,0.03); }
.data-table code { background: rgba(255,255,255,0.07); padding: 2px 7px; border-radius: 6px; font-size: 12.5px; }
.rowcount { font-weight: 700; color: #8ff0d6; }
.pill { font-size: 11px; padding: 2px 9px; border-radius: 20px; }
.pill-ok { background: rgba(25,195,156,0.15); color: #8ff0d6; }
.pill-info { background: rgba(64,158,255,0.16); color: #8fc4ff; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  /* 表格：隐藏低优先级列（商户负责人/创建人/创建日期） */
  .hide-lg { display: none; }
}
@media (max-width: 900px) {
  /* 表格：再隐藏品牌/所属团队 */
  .hide-md { display: none; }
  .data-table th, .data-table td { padding: 9px 10px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .kpi-grid, .module-grid { grid-template-columns: 1fr 1fr; }
  /* 表格：再隐藏 ID 列 */
  .hide-sm { display: none; }
  .data-table { font-size: 12.5px; min-width: 540px; }
  .data-table th, .data-table td { padding: 7px 8px; }
}

/* ---- 门店列表增强样式 ---- */
.store-stats-bar {
  display: flex; align-items: center; gap: 0; background: var(--glass-bg);
  border: 1px solid var(--panel-border); border-radius: 12px;
  padding: 14px 24px; margin-bottom: 16px;
}
.stat-chip { display: flex; align-items: baseline; gap: 8px; padding: 0 20px; }
.stat-chip:first-child { padding-left: 0; }
.stat-num { font-size: 26px; font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(135deg, #7db1ff, #8ff0d6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-divider { width: 1px; height: 28px; background: var(--panel-border); }

.store-table { border-radius: 10px; overflow: hidden; }
.store-table thead tr { background: rgba(255,255,255,0.03); }
.store-table th { font-size: 12.5px; letter-spacing: 0.4px; text-transform: uppercase; }
.store-table td { padding: 14px 14px; vertical-align: middle; transition: background .15s; }
.store-table tbody tr { transition: all .18s; }
.store-table tbody tr:hover td { background: rgba(125,177,255,0.06); }
.store-table tbody tr + tr td { border-top: 1px solid rgba(255,255,255,0.04); }

.id-badge { display: inline-block; min-width:28px; text-align:center; font-size:12px; font-weight:600;
  color: var(--text-muted); background: rgba(255,255,255,0.06); border-radius: 6px; padding: 2px 6px; }

.store-name-cell strong { font-size: 14.5px; font-weight: 700; letter-spacing: 0.2px; }

.merchant-tag { display: inline-block; font-size: 12.5px; font-weight: 500;
  background: rgba(124,108,255,0.1); color: #b8a9ff; padding: 3px 10px; border-radius: 6px; max-width:180px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }

.region-cell { font-size: 12.5px; max-width:160px; }
.address-cell { font-size: 12.5px; max-width:200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.count-badge { display: inline-flex; align-items: center; justify-content: center;
  min-width:30px; height:26px; padding: 0 8px; border-radius: 8px; font-size:13px; font-weight: 700; }
.count-cashier { background: linear-gradient(135deg, rgba(25,195,156,0.2), rgba(25,195,156,0.08)); color: #8ff0d6; }
.count-box { background: linear-gradient(135deg, rgba(125,177,255,0.2), rgba(125,177,255,0.08)); color: #8fc4ff; }
.count-zero { color: var(--text-muted); opacity: 0.45; font-size: 13px; }

.action-group { display: inline-flex; align-items: center; gap: 8px; }
.btn-edit { background: rgba(255,255,255,0.07); color: var(--text); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; font-weight: 500; transition: all .15s; }
.btn-edit:hover { background: rgba(125,177,255,0.15); border-color: rgba(125,177,255,0.3); color: #8fc4ff; }
.btn-del { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; font-weight: 500; transition: all .15s; }
.btn-del:hover { background: rgba(255,107,107,0.12); border-color: rgba(255,107,107,0.25); color: #ff8a8a; }
.btn-add-equip { background: linear-gradient(135deg, rgba(124,108,255,0.18), rgba(124,108,255,0.08));
  color: #b8a9ff; border: 1px solid rgba(124,108,255,0.25); border-radius: 8px;
  font-weight: 600; white-space: nowrap; transition: all .15s; }
.btn-add-equip:hover { background: linear-gradient(135deg, rgba(124,108,255,0.3), rgba(124,108,255,0.15));
  border-color: rgba(124,108,255,0.45); color: #d0c4ff; transform: translateY(-1px); box-shadow: 0 3px 12px rgba(124,108,255,0.2); }

.empty-state { text-align: center; padding: 50px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.7; }
.empty-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.empty-desc { font-size: 13.5px; color: var(--text-muted); margin-bottom: 18px; }

/* ===== 移动展业端 (Step 6) ===== */
.pill-warn { background: rgba(255,184,107,0.18); color: #ffb86b; }
.pill-danger { background: rgba(245,68,78,0.18); color: #f5444e; }
.pill-off { background: rgba(255,255,255,0.08); color: #9aa3b2; }
/* 沉睡设备数：占比小字 + 高危脉冲（由 sleeping_count 分档触发） */
.cell-sub { font-size: 11px; color: var(--text-muted, #9aa3b2); margin-left: 6px; vertical-align: middle; }
.pill-pulse { animation: pillPulse 1.8s ease-in-out infinite; }
@keyframes pillPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,68,78,0.0); }
  50% { box-shadow: 0 0 0 4px rgba(245,68,78,0.20); }
}
/* 日粒度运营表：每行「更多」展开的明细栅格 */
.dev-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 18px; }
.dd-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; background: rgba(255,255,255,0.035); border: 1px solid var(--panel-border); border-radius: 10px; font-size: 13px; }
.dd-label { color: var(--text-muted); white-space: nowrap; }
.dd-val { font-weight: 600; text-align: right; }
.dev-toggle.active { background: rgba(47,124,246,0.16); border-color: var(--accent); color: #cfe0ff; }
/* 日粒度运营表：每行「详情」展开的每日交易用户数横表 */
.dev-detail-btn.active { background: rgba(47,124,246,0.16); border-color: var(--accent); color: #cfe0ff; }
.dev-daily-detail { font-size: 13px; }
.dev-daily-head { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.dev-daily-head b { color: var(--text, #e6e9ef); font-weight: 600; }
.dev-daily-scroll { display: flex; flex-direction: column; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.dev-daily-seg { display: flex; align-items: stretch; border: 1px solid var(--panel-border); border-radius: 10px; overflow: hidden; width: max-content; min-width: 100%; }
.dev-daily-month { display: flex; align-items: center; padding: 0 12px; background: rgba(255,255,255,0.04); font-size: 12px; font-weight: 600; color: var(--text-muted); border-right: 1px solid var(--panel-border); white-space: nowrap; }
.dev-daily-cells { display: flex; align-items: stretch; }
.dev-daily-cell { min-width: 54px; padding: 8px 6px; text-align: center; border-right: 1px solid var(--panel-border); }
.dev-daily-cell:last-child { border-right: none; }
.dev-daily-cell.is-current { background: rgba(47,124,246,0.18); }
.dev-daily-cell.is-current .ddc-date { color: #cfe0ff; }
.dev-daily-cell.is-current .ddc-num { color: #cfe0ff; font-weight: 700; }
.ddc-date { font-size: 11px; color: var(--text-muted); }
.ddc-num { font-size: 14px; font-weight: 600; margin-top: 2px; }
.dev-daily-total { background: rgba(250,204,117,0.10); }
.dev-daily-total .ddc-date { color: #f0b454; }
.dev-daily-total .ddc-num { color: #f0b454; }
.mobile-body { background: #0e1116; color: #e6e9ef; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; margin: 0; }
.app-mobile { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(160deg, #0e1116, #141a24); }
.m-topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: rgba(255,255,255,0.04); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,0.06); }
.m-topbar-title { font-size: 16px; font-weight: 700; }
.m-topbar-sub { font-size: 11px; color: #9aa3b2; margin-top: 2px; }
.m-topbar-link { color: #7db1ff; font-size: 12px; text-decoration: none; }
.m-topbar-actions { display: flex; align-items: center; gap: 14px; }
.m-topbar-link:active { opacity: 0.6; }
.m-content { flex: 1; padding: 14px 14px 90px; }
.m-tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; background: rgba(20,26,36,0.96); backdrop-filter: blur(14px); border-top: 1px solid rgba(255,255,255,0.08); }
.m-tabbar-2 .m-tab { flex: 1; font-size: 13px; padding: 10px 0; gap: 4px; }
.m-tabbar-2 .m-tab-ico { font-size: 22px; }
.m-tabbar-3 .m-tab { flex: 1; font-size: 12px; padding: 9px 0; gap: 3px; }
.m-tabbar-3 .m-tab-ico { font-size: 20px; }
.m-tab { flex: 1; text-align: center; padding: 8px 0; color: #8a93a3; text-decoration: none; font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.m-tab.active { color: #19c39c; }
.m-tab-ico { font-size: 18px; }
.m-hero { margin-bottom: 14px; }
.m-hero-name { font-size: 20px; font-weight: 800; }
.m-hero-sub { font-size: 12px; color: #9aa3b2; margin-top: 3px; }
.m-sec-title { font-size: 13px; color: #9aa3b2; margin: 16px 0 8px; font-weight: 600; }
.m-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.m-btn-sm.gps { background: rgba(125,177,255,0.22); color: #cfe0ff; white-space: nowrap; }
.m-btn-sm.scan { background: linear-gradient(135deg, #19c39c, #7db1ff); color: #06121f; white-space: nowrap; font-weight: 600; }
.req { color: #f5444e; }
.m-btn.block { width: 100%; margin-top: 4px; }

/* ===== 设备单元卡片（增加收款机/盒子） ===== */
.equip-unit {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}
.equip-unit-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.equip-idx { font-size: 13px; font-weight: 700; color: #19c39c; }
.equip-del { background: none; border: none; color: #f5444e; font-size: 12px; cursor: pointer; padding: 2px 4px; }
.m-stat { padding: 14px; border-radius: 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); }
.m-stat-n { font-size: 24px; font-weight: 800; }
.m-stat-n.warn { color: #ffb86b; } .m-stat-n.danger { color: #f5444e; } .m-stat-n.ok { color: #19c39c; }
.m-stat-l { font-size: 11px; color: #9aa3b2; margin-top: 4px; }
.m-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.m-quick-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 14px 6px; border-radius: 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: #e6e9ef; text-decoration: none; font-size: 12px; }
.m-quick-btn:active { background: rgba(125,177,255,0.15); }
.m-badge { position: absolute; top: 6px; right: 8px; background: #f5444e; color: #fff; font-size: 10px; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; text-align: center; padding: 0 4px; }
.m-list { display: flex; flex-direction: column; gap: 10px; }
.m-card { display: block; padding: 12px; border-radius: 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); text-decoration: none; color: inherit; }
.m-card.danger { border-color: rgba(245,68,78,0.5); }
.m-card.warn { border-color: rgba(255,184,107,0.4); }
.m-card-top { display: flex; justify-content: space-between; align-items: center; }
.m-card-title { font-weight: 700; font-size: 14px; }
.m-card-val { font-weight: 700; color: #19c39c; }
.m-card-sub { font-size: 12px; color: #c3c9d4; margin-top: 4px; }
.m-card-sub.muted, .muted { color: #8a93a3; }
.m-card-actions { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.m-card-actions select { padding: 7px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.12); background: #1a212c; color: #e6e9ef; font-size: 12px; }
.m-field { margin-bottom: 12px; }
.m-field label { display: block; font-size: 12px; color: #9aa3b2; margin-bottom: 5px; }
.m-field input, .m-field select, .m-field textarea { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: #e6e9ef; font-size: 14px; box-sizing: border-box; }
.m-field input:focus, .m-field select:focus, .m-field textarea:focus { outline: none; border-color: #19c39c; }
.m-hint { font-size: 11px; color: #8a93a3; margin-top: 4px; }
.m-form { margin-top: 8px; }
.m-btn { width: 100%; padding: 12px; border-radius: 12px; border: none; background: rgba(255,255,255,0.1); color: #e6e9ef; font-size: 14px; font-weight: 600; cursor: pointer; }
.m-btn.primary { background: linear-gradient(135deg, #19c39c, #7db1ff); color: #06121f; }
.m-btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,0.2); }
.m-btn-sm { padding: 8px 12px; border-radius: 10px; border: none; background: rgba(125,177,255,0.2); color: #cfe0ff; font-size: 13px; cursor: pointer; }
.m-btn-sm.primary { background: linear-gradient(135deg, #19c39c, #7db1ff); color: #06121f; }
.m-row { display: flex; gap: 8px; }
.m-row input { flex: 1; }
.m-steps { display: flex; gap: 4px; margin: 10px 0; }
.m-step { flex: 1; text-align: center; font-size: 11px; padding: 6px 0; border-radius: 8px; background: rgba(255,255,255,0.05); color: #8a93a3; }
.m-step.active { background: rgba(25,195,156,0.2); color: #19c39c; font-weight: 700; }
.m-form-nav { display: flex; gap: 8px; margin-top: 14px; }
.m-form-nav .m-btn { flex: 1; }
.m-flash { background: rgba(25,195,156,0.15); border: 1px solid rgba(25,195,156,0.4); color: #9ff0d6; padding: 10px; border-radius: 10px; font-size: 13px; margin-bottom: 10px; }
.m-info { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 6px 12px; }
.m-info-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 13px; }
.m-info-row:last-child { border-bottom: none; }
.m-info-row span { color: #9aa3b2; }
.m-back { margin-bottom: 8px; }
.m-back a { color: #7db1ff; text-decoration: none; font-size: 13px; }
.m-stat-line { margin: 6px 0 4px; }
.m-search { display: flex; gap: 8px; margin-bottom: 12px; }
.m-search input { flex: 1; padding: 9px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: #e6e9ef; }
.m-search select { padding: 9px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: #1a212c; color: #e6e9ef; }
.m-empty { text-align: center; color: #8a93a3; padding: 30px; font-size: 13px; }
.m-chart { width: 100%; height: 120px; }

/* ===== 日粒度运营（移动端 /m/devrows，与桌面 /monitor 口径一致） ===== */
.m-dev-filter { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 12px; margin-bottom: 4px; }
.m-toggle { display: flex; gap: 8px; margin-top: 10px; }
.m-toggle-btn { flex: 1; text-align: center; padding: 8px 0; border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #c3c9d4; font-size: 13px; text-decoration: none; }
.m-toggle-btn.active { background: rgba(25,195,156,0.18); border-color: rgba(25,195,156,0.5); color: #9ff0d6; font-weight: 700; }
.m-dev-list { display: flex; flex-direction: column; gap: 10px; }
.m-dev { padding: 12px; border-radius: 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); }
.m-dev-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.m-dev-sn { font-weight: 700; font-size: 14px; letter-spacing: .3px; }
.m-dev-sub { font-size: 11px; color: #8a93a3; margin-top: 2px; }
.m-dev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-dev-m { background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.m-dev-m b { font-size: 18px; font-weight: 800; }
.m-dev-m span { font-size: 11px; color: #9aa3b2; }
.m-dev-m .mono { font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.c-warn { color: #ffb86b; } .c-danger { color: #f5444e; }
.m-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.m-pager-info { font-size: 13px; color: #9aa3b2; }
.m-btn-sm.disabled { opacity: .4; pointer-events: none; }

/* ============ Step 2：团队与 RBAC ============ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-actions { display: flex; gap: 10px; }
.btn {
  border: none; cursor: pointer; font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 10px; transition: transform .18s cubic-bezier(.16,1,.3,1), box-shadow .18s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #4f9bff); color: #fff; box-shadow: 0 6px 18px rgba(47,124,246,0.35); }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--panel-border); }
.btn-danger { background: linear-gradient(135deg, #ff5d6c, #f5444e); color: #fff; box-shadow: 0 6px 18px rgba(245,68,78,0.35); }
.btn-danger:disabled { background: rgba(255,255,255,0.08); color: var(--muted); box-shadow: none; cursor: not-allowed; opacity: .55; }
.btn-danger:disabled:hover { transform: none; }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; font-size: 13px; color: var(--text); }
.chk input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.dev-chk { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.filter-bar .filter-label { color: var(--muted); font-size: 13px; }

.flash {
  background: rgba(25,195,156,0.12); border: 1px solid rgba(25,195,156,0.35);
  color: #8ff0d6; padding: 11px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 13.5px;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.tab-btn {
  background: rgba(255,255,255,0.04); border: 1px solid var(--panel-border); color: var(--text-muted);
  padding: 9px 18px; border-radius: 10px; font-size: 13.5px; cursor: pointer; transition: all .18s ease;
}
.tab-btn:hover { color: var(--text); border-color: rgba(47,124,246,0.4); }
.tab-btn.active { background: rgba(47,124,246,0.18); color: #cfe0ff; border-color: var(--accent); }
.tab-panel { display: none; animation: fadeIn .25s ease; }
.tab-panel.active { display: block; }
/* 主 Tab 切换（展业作业 / 商家助手-收款奖励） */
.main-panel { display: none; animation: fadeIn .25s ease; }
.main-panel.active { display: block; }
.tabs-main { margin: 18px 0 6px; }

/* ── 更新日志 (系统设置 · 更新日志 Tab) ─────────────────────────────── */
.cl-current-banner { margin: 14px 0; }
.cl-banner-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cl-badge { background: rgba(47,124,246,0.18); color: #cfe0ff; border: 1px solid var(--accent); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.changelog { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.cl-item { background: rgba(255,255,255,0.04); border: 1px solid var(--panel-border); border-radius: 14px; padding: 16px 18px; transition: border-color .2s ease, transform .2s cubic-bezier(.16,1,.3,1); }
.cl-item:hover { transform: translateY(-2px); border-color: rgba(47,124,246,0.35); }
.cl-item.cl-current { border-color: var(--accent); background: rgba(47,124,246,0.08); box-shadow: 0 6px 22px rgba(47,124,246,0.12); }
.cl-meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cl-version { font-size: 16px; font-weight: 700; color: #fff; }
.cl-current .cl-version { color: #cfe0ff; }
.cl-date { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cl-tag { font-size: 11px; background: var(--accent); color: #fff; padding: 1px 8px; border-radius: 6px; font-weight: 600; }
.cl-title { font-size: 13.5px; color: var(--text); opacity: .85; }
.cl-changes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.cl-changes li { font-size: 13.5px; line-height: 1.55; color: var(--text); }
.cl-changes li::marker { color: var(--accent); }
.toolbar { display: flex; align-items: center; gap: 14px; margin: 16px 0; flex-wrap: wrap; }
.toolbar .muted { font-size: 12.5px; }
.form-grid .full, .form-grid textarea.full { grid-column: 1 / -1; }

/* Team cards */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.team-card { padding: 16px 18px; transition: transform .25s cubic-bezier(.16,1,.3,1); }
.team-card:hover { transform: translateY(-3px); }
.team-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.team-card-top h3 { font-size: 15px; font-weight: 700; flex: 1; }
.lvl-pill { font-size: 10px; background: rgba(47,124,246,0.2); color: #9cc2ff; padding: 2px 8px; border-radius: 20px; }
.team-metrics { display: flex; gap: 18px; }
.metric { display: flex; flex-direction: column; }
.metric-num { font-size: 20px; font-weight: 800; color: #cfe0ff; }
.metric-lbl { font-size: 11px; color: var(--text-muted); }
.team-parent { font-size: 11px; color: var(--text-muted); margin-top: 12px; }

/* Split layout */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.card-pad { padding: 18px 20px; }
.sub-h2 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }

/* Role badges */
.role-badge { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 600; white-space: nowrap; }
.role-super_admin { background: rgba(245,68,78,0.16); color: #ff9aa0; }
.role-region_admin { background: rgba(250,140,22,0.16); color: #ffc078; }
.role-member { background: rgba(25,195,156,0.16); color: #8ff0d6; }
.role-team_admin { background: rgba(47,124,246,0.18); color: #9ec5ff; }
.pill-off { background: rgba(154,166,192,0.14); color: var(--text-muted); }
.pill-warn { background: rgba(250,204,21,0.16); color: #ffe08a; }

/* 团队卡片内：本团队管理员信息条 */
.team-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,0.08); font-size: 12.5px; }
.team-admin-label { color: var(--text-muted); font-size: 11px; }
.team-admin-name { font-weight: 700; color: var(--text); }
.team-admin-phone { color: var(--text-muted); font-family: ui-monospace, monospace; }
.team-admin-none { color: var(--text-muted); font-style: italic; }
.team-admin-btn { margin-top: 10px; }
.team-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.team-card-actions .team-admin-btn { margin-top: 0; }

/* Team table (row-by-row layout) */
.team-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.team-table thead th { background: rgba(255,255,255,0.04); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.08); white-space: nowrap; }
.team-table tbody tr { transition: background .15s; }
.team-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.team-table tbody td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; }

/* Permission matrix */
.perm-block { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.perm-block:last-child { border-bottom: none; }
.perm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.perm-desc { font-size: 12px; color: var(--text-muted); }
.perm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11.5px; background: rgba(255,255,255,0.06); border: 1px solid var(--panel-border); padding: 3px 10px; border-radius: 8px; color: var(--text); cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.chip:hover { background: rgba(255,255,255,0.12); }
.chip.active { background: rgba(47,124,246,0.16); border-color: var(--accent); color: #cfe0ff; font-weight: 600; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5,8,18,0.65);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal-backdrop.open { display: flex; animation: fadeIn .2s ease; }
.modal { width: 100%; max-width: 460px; padding: 22px;
  background: #141c2f; border: 1px solid rgba(255,255,255,0.10); border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45); }
/* 商户类别管理弹窗 */
#modal-category .modal { max-width: 560px; }
.cat-tree { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.cat-l1 { border: 1px solid var(--border, rgba(255,255,255,0.08)); border-radius: 10px; padding: 10px 12px; background: rgba(255,255,255,0.02); }
.cat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cat-name { font-weight: 600; font-size: 14px; }
.cat-l2-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cat-l2 { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,0.06); font-size: 12.5px; }
.cat-l2-x { border: none; background: rgba(255,255,255,0.12); color: var(--text-muted, #9aa3b2); cursor: pointer; width: 16px; height: 16px; line-height: 14px; border-radius: 50%; font-size: 12px; padding: 0; }
.cat-l2-x:hover { background: rgba(255,80,80,0.4); color: #fff; }
.btn-del { padding: 3px 10px; font-size: 12px; }
.cat-add { border-top: 1px dashed var(--border, rgba(255,255,255,0.12)); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.cat-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cat-add-row input, .cat-add-row select { flex: 1; min-width: 140px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border, rgba(255,255,255,0.12)); background: rgba(255,255,255,0.04); color: inherit; font-size: 13px; }
/* PC 端宽弹窗（凭证/商户等字段多的表单） */
.modal.wide { max-width: 780px; }
@media (min-width: 960px) {
  .modal.wide { padding: 24px 28px; }
  /* 宽弹窗用 3 列网格，充分利用横向空间 */
  .modal.wide .form-grid { gap: 12px 16px; grid-template-columns: 1fr 1fr 1fr; }
  .modal.wide .form-grid label { font-size: 12.5px; gap: 4px; }
  .modal.wide .form-grid input,
  .modal.wide .form-grid select { padding: 8px 10px; font-size: 13px; }
  .modal.wide .form-grid textarea { padding: 8px 10px; font-size: 12.5px; line-height: 1.45; }
  /* 分组标题紧凑 */
  .modal.wide .form-section { margin-top: 4px; padding-top: 10px; font-size: 12.5px; }
  /* 表单区域限高可滚动，防止弹窗超出视口 */
  .modal.wide .form-grid { max-height: 65vh; overflow-y: auto; padding-right: 4px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent;
  }
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-x { background: none; border: none; color: var(--text-muted); font-size: 24px; cursor: pointer; line-height: 1; }
.modal-x:hover { color: var(--text); }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: flex; flex-direction: column; font-size: 12.5px; color: var(--text-muted); gap: 6px; }
.form-grid label.full, .form-actions.full { grid-column: 1 / -1; }
.form-grid input, .form-grid select {
  background: rgba(255,255,255,0.05); border: 1px solid var(--panel-border); color: var(--text);
  padding: 9px 11px; border-radius: 9px; font-size: 13.5px; font-family: inherit;
}
.form-grid input:focus, .form-grid select:focus { outline: none; border-color: var(--accent); }
.form-grid textarea {
  background: rgba(255,255,255,0.05); border: 1px solid var(--panel-border); color: var(--text);
  padding: 9px 11px; border-radius: 9px; font-size: 13px; font-family: 'Cascadia Code','Fira Code',monospace; resize: vertical;
}
.form-grid textarea:focus { outline: none; border-color: var(--accent); }
/* 表单分组标题 */
.form-section { grid-column: 1 / -1; font-size: 13px; font-weight: 600; color: var(--text); margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--panel-border); }
.form-section:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .grid-2col { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ============ 登录页 ============ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; padding: 32px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.login-title { font-size: 22px; font-weight: 800; }
.login-sub { font-size: 13px; color: var(--text-muted); margin-top: 6px; margin-bottom: 20px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12.5px; color: var(--text-muted); }
.field input, .form input, .form select {
  background: rgba(255,255,255,0.05); border: 1px solid var(--panel-border); color: var(--text);
  padding: 11px 13px; border-radius: 10px; font-size: 14px; font-family: inherit;
}
.field input:focus, .form input:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,124,246,0.18); }
.btn-block { width: 100%; padding: 12px; font-size: 14px; }
.alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.alert-error { background: rgba(245,68,78,0.12); border: 1px solid rgba(245,68,78,0.35); color: #ff9aa0; }
.alert-ok { background: rgba(25,195,156,0.12); border: 1px solid rgba(25,195,156,0.35); color: #8ff0d6; }
.login-demo { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--panel-border); font-size: 12.5px; color: var(--text-muted); }
.login-demo-title { margin-bottom: 8px; color: var(--text); font-weight: 600; }
.login-demo ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.login-demo li b { color: #cfe0ff; }

/* ============ 登录验证码 + 记住登录 ============ */
.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-row input { flex: 1; }
.captcha-img { width: 120px; height: 44px; border-radius: 8px; border: 1px solid var(--panel-border); cursor: pointer; flex-shrink: 0; background: #1a1f2e; display: grid; place-items: center; overflow: hidden; }
.captcha-img svg { display: block; border-radius: 8px; }
.captcha-timer { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.captcha-refresh { flex-shrink: 0; width: 36px; height: 44px; border: 1px solid var(--panel-border); border-radius: 8px; background: rgba(255,255,255,0.04); color: var(--text-muted); font-size: 18px; cursor: pointer; display: grid; place-items: center; transition: all 0.2s; }
.captcha-refresh:hover { border-color: var(--accent); color: var(--accent); background: rgba(47,124,246,0.1); }
.remember-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); cursor: pointer; user-select: none; }
.remember-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ============ 移动端 / 微信·企业微信 WebView 适配 ============ */
/* 刘海屏安全区（iPhone 刘海/灵动岛、安卓挖孔），避免内容被遮挡 */
@supports (padding: env(safe-area-inset-top)) {
  .login-wrap {
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}
/* 窄屏（手机）微调：缩小留白、输入框字号≥16px 防止 iOS 聚焦自动放大、验证码行可换行 */
@media (max-width: 480px) {
  .login-wrap { padding: 16px; }
  .login-card { padding: 22px 18px; border-radius: 16px; }
  .login-title { font-size: 20px; }
  .login-sub { font-size: 12.5px; }
  .field input, .form input, .form select {
    font-size: 16px;            /* ≥16px 防止 iOS Safari 聚焦时整页缩放 */
    padding: 12px 13px;
  }
  .btn-block { padding: 14px; font-size: 15px; }
  .captcha-row { flex-wrap: wrap; gap: 8px; }
  .captcha-row input { flex: 1 1 100%; order: 1; }
  .captcha-img { order: 2; width: 132px; height: 46px; }
  .captcha-refresh { order: 3; width: 40px; height: 46px; }
  .captcha-timer { order: 4; flex: 1 1 100%; }
}

/* ============ 顶栏用户区 ============ */
.user-chip { display: flex; align-items: center; gap: 12px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; font-size: 15px;
}
.user-meta { line-height: 1.25; }
.user-name { font-size: 13.5px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text-muted); }
.logout-form { display: inline; }
.user-chip .btn-ghost { padding: 6px 12px; font-size: 12.5px; text-decoration: none; }

/* 默认密码提示横幅 */
.pwd-banner {
  background: rgba(250,140,22,0.12); border: 1px solid rgba(250,140,22,0.4); color: #ffc078;
  padding: 11px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 13.5px;
}
.pwd-banner a { color: #ffd8a8; font-weight: 700; text-decoration: underline; }

/* ============ 个人中心 ============ */
.page-title { font-size: 22px; font-weight: 800; }
.page-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.card { padding: 20px 22px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.manage-links { display: flex; flex-direction: column; gap: 10px; }
.manage-link { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: rgba(125,177,255,0.08); border: 1px solid rgba(125,177,255,0.18); border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; transition: background .18s, transform .18s; }
.manage-link:hover { background: rgba(125,177,255,0.14); transform: translateY(-1px); }
.info-list { display: flex; flex-direction: column; gap: 2px; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 13.5px; }
.info-row:last-child { border-bottom: none; }
.info-k { color: var(--text-muted); }
.info-v { font-weight: 600; }
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.pill-warn { background: rgba(250,140,22,0.16); color: #ffc078; }

@media (max-width: 760px) {
  .profile-grid { grid-template-columns: 1fr; }
  .user-meta { display: none; }
}

/* ============ 参数系统页 ============ */
.param-group { padding: 18px 20px; margin-bottom: 18px; }
.param-group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.group-code { font-size: 12px; color: var(--text-muted); }
.group-code code { background: rgba(255,255,255,0.07); padding: 2px 7px; border-radius: 6px; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.rbac-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.perm-chips td { vertical-align: top; }
.modal textarea {
  background: rgba(255,255,255,0.05); border: 1px solid var(--panel-border); color: var(--text);
  padding: 9px 11px; border-radius: 9px; font-size: 13.5px; font-family: inherit; resize: vertical; width: 100%;
}
.modal textarea:focus { outline: none; border-color: var(--accent); }
.modal .form-grid label { color: var(--text); }

/* 数据权限（可见范围）横幅 */
.scope-banner {
  background: rgba(250,140,22,0.12);
  border: 1px solid rgba(250,140,22,0.35);
  color: #ffd591;
  padding: 9px 14px;
  border-radius: 11px;
  font-size: 13.5px;
  margin-bottom: 14px;
}
.scope-banner b { color: #fff; }
.scope-banner.scope-all {
  background: rgba(25,195,156,0.10);
  border-color: rgba(25,195,156,0.30);
  color: #8ff0d6;
}

/* ============ Step 3：设备管理 ============ */
/* 设备生命周期状态徽章 */
.st-inbound  { background: rgba(154,166,192,0.16); color: var(--text-muted); }
.st-approved { background: rgba(47,124,246,0.18);  color: #9ec5ff; }
.st-assigned { background: rgba(25,195,156,0.16);  color: #8ff0d6; }
.st-deployed { background: rgba(25,195,156,0.24);  color: #6ff0c8; font-weight: 700; }
.st-active   { background: linear-gradient(135deg, rgba(25,195,156,0.30), rgba(47,124,246,0.25)); color: #aef7e0; font-weight: 700; }
.st-faulty   { background: rgba(245,68,78,0.16);   color: #ff9aa0; }
.st-removed  { background: rgba(154,166,192,0.10); color: var(--text-muted); opacity: .8; }

/* 筛选条 */
.filter-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-label { font-size: 13px; color: var(--text-muted); }
.filter-bar select {
  background: rgba(255,255,255,0.05); border: 1px solid var(--panel-border); color: var(--text);
  padding: 7px 11px; border-radius: 9px; font-size: 13px; font-family: inherit;
}
.filter-bar select:focus { outline: none; border-color: var(--accent); }
.filter-count { font-size: 13px; color: var(--text-muted); margin-left: auto; }

/* 入库批次报表：筛选表单（label 包裹 input/select，紧凑内联） */
.report-form { align-items: flex-end; gap: 12px; }
.report-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-muted); }
.report-form input[type=text], .report-form input[type=date], .report-form select {
  background: rgba(255,255,255,0.05); border: 1px solid var(--panel-border); color: var(--text);
  padding: 7px 11px; border-radius: 9px; font-size: 13px; font-family: inherit; min-width: 130px;
}
.report-form input:focus, .report-form select:focus { outline: none; border-color: var(--accent); }
.report-kpi { margin-top: 16px; }


/* 1:1 绑定可视化 */
.bind-summary { margin-bottom: 16px; font-size: 13.5px; }
.bind-summary b { color: #8ff0d6; }
.bind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.bind-card {
  padding: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.bind-card:hover { transform: translateY(-3px); }
.bind-side { flex: 1; min-width: 120px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--panel-border); }
.bind-box { cursor: pointer; border-color: rgba(47,124,246,0.30); }
.bind-machine { border-color: rgba(25,195,156,0.30); }
.bind-side-title { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.bind-sn code { font-size: 13px; }
.bind-model { font-size: 12.5px; color: var(--text-muted); margin: 6px 0 8px; }
.bind-link {
  align-self: center; font-size: 11px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 4px 9px; border-radius: 20px; box-shadow: 0 4px 14px rgba(47,124,246,0.4);
}
.bind-foot {
  flex-basis: 100%; display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-muted); border-top: 1px dashed rgba(255,255,255,0.08); padding-top: 10px; margin-top: 4px;
}

/* 设备详情 Modal */
.detail-sn { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.detail-sn code { font-size: 15px; }
.detail-grid { display: flex; flex-direction: column; gap: 2px; }
.detail-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 13.5px; }
.detail-row:last-child { border-bottom: none; }
.detail-k { color: var(--text-muted); }
.detail-v { font-weight: 600; text-align: right; }

/* 设备运营数据卡片 */
.op-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.op-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.op-icon { font-size: 20px; }
.op-label { font-size: 12px; color: var(--text-muted); }
.op-value { font-size: 18px; font-weight: 700; }
@media (max-width: 520px) { .op-grid { grid-template-columns: 1fr; } }

.empty { grid-column: 1 / -1; text-align: center; padding: 32px; font-size: 13.5px; }

/* ============ 同步页面 ============ */
.card-header {
  font-size: 14px; font-weight: 700; padding: 14px 20px;
  border-bottom: 1px solid var(--panel-border);
  display: flex; align-items: center;
}
.card-body { padding: 18px 20px; }
.mb { margin-bottom: 18px; }
.row { display: flex; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-label { font-size: 12.5px; color: var(--text-muted); }
.form-input {
  background: rgba(255,255,255,0.06); border: 1px solid var(--panel-border); color: var(--text);
  padding: 8px 12px; border-radius: 9px; font-size: 13.5px; font-family: inherit; width: 100%; box-sizing: border-box;
}
textarea.form-input { resize: vertical; min-height: 80px; }
.form-input:focus { outline: none; border-color: var(--accent); }
.form-group select.form-input { width: auto; }

/* Toast 提示 */
.toast {
  padding: 12px 18px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; font-weight: 600;
  animation: fadeIn .3s ease;
}
.toast-success { background: rgba(25,195,156,0.15); color: #8ff0d6; border: 1px solid rgba(25,195,156,0.3); }
.toast-error   { background: rgba(245,68,78,0.15); color: #ff9aa0; border: 1px solid rgba(245,68,78,0.3); }

/* 状态标签 */
.tag {
  display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600;
  background: rgba(255,255,255,0.08); color: var(--text-muted);
}
.tag-green { background: rgba(25,195,156,0.18); color: #8ff0d6; }
.tag-red   { background: rgba(245,68,78,0.18); color: #ff9aa0; }
.tag-blue  { background: rgba(47,124,246,0.18); color: #9ec5ff; }

/* 空状态 */
.empty-state { text-align: center; padding: 36px 20px; color: var(--text-muted); font-size: 13.5px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* 微信审批（6.2）：状态徽章 + 操作区 */
.pill-danger { background: rgba(245,68,78,0.16); color: #ff9aa0; }
.inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.inline-form select {
  background: rgba(255,255,255,0.05); border: 1px solid var(--panel-border); color: var(--text);
  padding: 9px 11px; border-radius: 9px; font-size: 13.5px; font-family: inherit; min-width: 240px;
}
.inline-form select:focus { outline: none; border-color: var(--accent); }
.approval-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sn-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sn-list code { background: rgba(255,255,255,0.07); padding: 3px 9px; border-radius: 6px; font-size: 12.5px; }

@media (max-width: 760px) {
  .bind-grid { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .inline-form select { width: 100%; }
}

/* 入库文件清单 */
.filelist { margin-top: 6px; display: flex; flex-direction: column; gap: 5px; }
.filechip {
  background: rgba(25,195,156,0.08); border: 1px solid rgba(25,195,156,0.28);
  color: var(--text); padding: 6px 10px; border-radius: 8px; font-size: 12.5px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ============ Step 5：设备监控与考核 ============ */
/* 沉睡等级配色（设计 8.5.1） */
.tier-normal  { border-top: 3px solid #19c39c; }
.tier-normal  .kpi-num, .tier-normal  .funnel-val b { color: #19c39c; }
.tier-watch   { border-top: 3px solid #ffb86b; }
.tier-watch   .kpi-num, .tier-watch   .funnel-val b { color: #ffb86b; }
.tier-warn    { border-top: 3px solid #fa8c16; }
.tier-warn    .kpi-num, .tier-warn    .funnel-val b { color: #fa8c16; }
.tier-urgent  { border-top: 3px solid #f5444e; }
.tier-urgent  .kpi-num, .tier-urgent  .funnel-val b { color: #f5444e; }
.tier-recover { border-top: 3px solid #a8071a; }
.tier-recover .kpi-num, .tier-recover .funnel-val b { color: #ff6b6b; }

/* 分级漏斗 */
.funnel { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.funnel-row { display: grid; grid-template-columns: 170px 1fr 130px; align-items: center; gap: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--panel-border); border-radius: 12px; padding: 10px 14px; }
.funnel-label { font-weight: 600; font-size: 13px; }
.funnel-label small { color: var(--text-muted); font-weight: 400; }
.funnel-bar { background: rgba(255,255,255,.06); border-radius: 8px; height: 14px; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg,#7db1ff,#19c39c); transition: width .4s; }
.funnel-val { text-align: right; font-size: 13px; color: var(--text-muted); }
.funnel-val b { font-size: 15px; }

/* 趋势图 */
.chart-box { width: 100%; background: rgba(255,255,255,.02); border-radius: 12px; }
.chart-legend { margin-top: 8px; font-size: 12px; color: var(--text-muted); display: flex; gap: 18px; }
.chart-legend .lg-cnt { color: #7db1ff; } .chart-legend .lg-amt { color: #19c39c; }

/* 商户-门店-设备层级 */
.merchant-tree { display: flex; flex-direction: column; gap: 10px; }
.m-node, .s-node { background: rgba(255,255,255,.03); border: 1px solid var(--panel-border); border-radius: 12px; overflow: hidden; }
.m-summary, .s-summary { cursor: pointer; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
.m-summary:hover, .s-summary:hover { background: rgba(255,255,255,.04); }
.m-summary::-webkit-details-marker, .s-summary::-webkit-details-marker { display: none; }
.m-title { font-weight: 700; font-size: 15px; }
.m-metrics { display: flex; gap: 8px; flex-wrap: wrap; }
.m-body { padding: 0 16px 12px; }
.s-body { padding: 0 0 10px 18px; }

/* 健康度考核 */
.assess-card { margin-bottom: 14px; }
.assess-head { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.level-badge { font-weight: 800; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,.06); }
.dim-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 22px; }
.dim-row { display: grid; grid-template-columns: 1fr 120px auto; align-items: center; gap: 10px; font-size: 12.5px; }
.dim-name { color: var(--text-muted); }
.dim-bar { background: rgba(255,255,255,.06); border-radius: 6px; height: 8px; overflow: hidden; }
.dim-fill { height: 100%; background: linear-gradient(90deg,#3fe0a0,#19c39c); border-radius: 6px; }
.dim-val { white-space: nowrap; }
.level-A { color: #19c39c; } .level-B { color: #7db1ff; } .level-C { color: #ffb86b; } .level-D { color: #f5444e; }

/* 风险商户 / 异常检测 / 导入 */
.risk-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.anomaly-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.anomaly-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; }
.anomaly-idx { width: 26px; height: 26px; border-radius: 8px; background: rgba(245,68,78,.15); color: #f5444e; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.anomaly-name { font-weight: 700; margin-bottom: 3px; }
.anomaly-desc { font-size: 12.5px; color: var(--text-muted); }
.import-box { max-width: 560px; }
.import-drop { padding: 22px; border: 1.5px dashed rgba(125,177,255,.4); border-radius: 12px; text-align: center; color: var(--text-muted); margin-bottom: 10px; }
.import-box input[type=file] { color: var(--text-muted); }

@media (max-width: 900px) { .dim-grid { grid-template-columns: 1fr 1fr; } .anomaly-list { grid-template-columns: 1fr; } .funnel-row { grid-template-columns: 110px 1fr 90px; } }

/* ============ 门店作业 · 交互增强（移动端） ============ */
/* 步骤指示器（可点击、带进度条与完成态） */
.m-stepper { position: relative; margin: 12px 0 18px; }
.m-stepper-track { position: absolute; top: 14px; left: 16%; right: 16%; height: 3px; background: rgba(255,255,255,0.1); border-radius: 3px; z-index: 0; }
.m-stepper-fill { height: 100%; width: 0%; background: linear-gradient(90deg,#19c39c,#7db1ff); border-radius: 3px; transition: width .45s cubic-bezier(.16,1,.3,1); }
.m-stepper-steps { position: relative; z-index: 1; display: flex; }
.ms-step { flex: 1; background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: #8a93a3; font-family: inherit; padding: 0; }
.ms-step:disabled { opacity: .45; cursor: default; }
.ms-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: rgba(255,255,255,0.08); border: 2px solid rgba(255,255,255,0.15); transition: all .35s cubic-bezier(.16,1,.3,1); }
.ms-txt { font-size: 11px; }
.ms-step.active .ms-dot { background: linear-gradient(135deg,#19c39c,#7db1ff); color: #06121f; border-color: transparent; box-shadow: 0 0 0 4px rgba(25,195,156,0.18); }
.ms-step.active { color: #19c39c; }
.ms-step.done .ms-dot { background: #19c39c; color: #06121f; border-color: transparent; }
.ms-step.done { color: #19c39c; }

/* 按钮水波纹 + loading */
.m-btn, .m-btn-sm, .ms-step { position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,0.4); animation: rippleAnim .6s ease-out; pointer-events: none; }
@keyframes rippleAnim { to { transform: scale(2.6); opacity: 0; } }
.m-btn.loading, .m-btn-sm.loading { position: relative; color: transparent !important; pointer-events: none; }
.m-btn.loading::after, .m-btn-sm.loading::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.45); border-top-color: #fff; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%); animation: spin .7s linear infinite; }
.m-btn-sm.loading::after { width: 14px; height: 14px; }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* 字段校验态 */
.m-field.invalid input, .m-field.invalid select { border-color: #f5444e; box-shadow: 0 0 0 3px rgba(245,68,78,0.15); }
.m-field.valid input, .m-field.valid select { border-color: #19c39c; }
.m-err { font-size: 11px; color: #f5444e; margin-top: 4px; display: none; }
.m-field.invalid .m-err { display: block; }
.shake { animation: shakeAnim .42s; }

/* 盒子SN实时校验提示（桌面 / 移动共用） */
.sn-check { font-size: 12px; min-height: 16px; margin: 4px 0 2px; line-height: 1.4; }
.sn-check:empty { display: none; }
.sn-ok { color: #19c39c; font-weight: 600; }
.sn-bad { color: #f5444e; font-weight: 600; }
.sn-checking { color: #7db1ff; }
label.full.invalid input, label.full.invalid select { border-color: #f5444e; box-shadow: 0 0 0 3px rgba(245,68,78,0.15); }
label.full.valid input, label.full.valid select { border-color: #19c39c; }

/* 品牌关联商户 — 模糊搜索下拉 + 标签 */
.bm-dd-item { cursor: pointer; }
.bm-dd-item.active { background: rgba(59,130,246,0.12); }
.bm-dd-item:hover { background: rgba(255,255,255,0.06); }
.bm-tag { display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;background:rgba(59,130,246,0.14);color:#7db1ff;font-size:12px;line-height:1.6;cursor:pointer;border:1px solid rgba(59,130,246,0.25);transition:background .15s }
.bm-tag:hover { background: rgba(245,68,78,0.12); color:#f5444e; border-color: rgba(245,68,78,0.3); }
.bm-dd-empty { padding:10px 12px;font-size:12px;color:var(--text-muted); }
@keyframes shakeAnim { 0%,100%{transform:none} 20%{transform:translateX(-7px)} 40%{transform:translateX(7px)} 60%{transform:translateX(-5px)} 80%{transform:translateX(5px)} }

/* 步骤切换过渡 */
.step-anim { animation: stepIn .35s cubic-bezier(.16,1,.3,1); }
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 设备单元进出场动画 */
.equip-unit { animation: unitIn .3s cubic-bezier(.16,1,.3,1); }
@keyframes unitIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.equip-unit.removing { animation: unitOut .25s ease forwards; overflow: hidden; }
@keyframes unitOut { to { opacity: 0; transform: scale(.96); height: 0; margin: 0; padding: 0; } }

/* 照片拖放区 / 预览 */
.photo-drop { position: relative; border: 1.5px dashed rgba(255,255,255,0.22); border-radius: 12px; padding: 16px; text-align: center; cursor: pointer; transition: border-color .2s, background .2s, transform .12s; }
.photo-drop:active { transform: scale(.99); }
.photo-drop.has-photo { border-style: solid; border-color: #19c39c; padding: 8px; }
.photo-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.photo-empty { color: #8a93a3; font-size: 13px; }
.photo-preview { position: relative; }
.photo-preview img { width: 100%; border-radius: 10px; display: block; max-height: 200px; object-fit: cover; }
.photo-rm { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0,0,0,0.6); color: #fff; font-size: 14px; cursor: pointer; line-height: 1; }
.photo-rm:active { transform: scale(.9); }

/* 移动端 Toast（浮层，自动消失） */
.toast-wrap { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 36px); max-width: 360px; pointer-events: none; }
.toast-wrap .toast { padding: 12px 15px; border-radius: 12px; font-size: 13px; font-weight: 600; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.35); backdrop-filter: blur(10px); animation: toastIn .26s ease, toastOut .3s ease 2.8s forwards; margin: 0; }
.toast-wrap .toast-success { background: linear-gradient(135deg, rgba(25,195,156,0.96), rgba(25,195,156,0.82)); }
.toast-wrap .toast-error { background: linear-gradient(135deg, rgba(245,68,78,0.96), rgba(245,68,78,0.82)); }
.toast-wrap .toast-info { background: linear-gradient(135deg, rgba(125,177,255,0.96), rgba(125,177,255,0.82)); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* 扫码浮层 */
.scan-overlay { position: fixed; inset: 0; z-index: 9998; background: #000; }
.scan-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 72%; max-width: 320px; height: 170px; border: 2px solid #19c39c; border-radius: 14px; box-shadow: 0 0 0 4000px rgba(0,0,0,0.45); overflow: hidden; }
.scan-line { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #19c39c; box-shadow: 0 0 14px #19c39c; animation: scanMove 1.8s ease-in-out infinite; }
@keyframes scanMove { 0%,100% { top: 8px; } 50% { top: calc(100% - 11px); } }
.scan-tip { position: absolute; bottom: 64px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; text-shadow: 0 1px 3px #000; padding: 0 20px; }
.scan-cancel { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 10px 24px; border-radius: 24px; border: none; background: rgba(255,255,255,0.15); color: #fff; font-size: 14px; font-family: inherit; }
.scan-found { animation: scanFound .5s ease; }
@keyframes scanFound { 0% { box-shadow: 0 0 0 4000px rgba(0,0,0,0.45); } 50% { box-shadow: 0 0 0 4000px rgba(25,195,156,0.28); } 100% { box-shadow: 0 0 0 4000px rgba(0,0,0,0.45); } }

/* ---- 服务商管理页新增类（2026-08-06 SaaS 多服务商）---- */
.head-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.row-actions { display:flex; gap:6px; flex-wrap:wrap; }
.pill-primary { background: rgba(124,108,255,0.18); color: #b9aaff; }
.flash-ok { background: rgba(25,195,156,0.12); border:1px solid rgba(25,195,156,0.35); color:#8ff0d6; }
.flash-err { background: rgba(245,68,78,0.12); border:1px solid rgba(245,68,78,0.35); color:#ff9aa0; }
.req { color:#ff7b85; font-weight:600; }
.sp-tag { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size:11.5px; background:rgba(124,108,255,0.12); color:#b9aaff; padding:1px 7px; border-radius:6px; }

/* ---- 三级联动模糊搜索 + 地图点选（2026-08-13）---- */
.region-search { width:100%; padding:7px 10px; margin-bottom:6px; border-radius:8px; border:1px solid var(--border, #2a2f3a); background:#1a1e27; color:var(--text, #e7ebf2); font-size:13px; }
.region-search:focus { outline:none; border-color:var(--accent, #7db1ff); }
.region-pick-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:2px 0 6px; }
.region-pick-row .muted { font-size:12px; }
.region-cell { display:flex; flex-direction:column; min-width:0; }
.region-cell .m-search { width:100%; padding:6px 8px; margin-bottom:5px; border-radius:7px; border:1px solid var(--border, #2a2f3a); background:#10131a; color:#e7ebf2; font-size:12px; box-sizing:border-box; }
.region-cell .m-search:focus { outline:none; border-color:#19c39c; }
#map-picker-canvas { box-shadow: inset 0 0 0 1px var(--border, #2a2f3a); }

/* ---- 门店弹窗内「+ 新增商户」快捷面板（2026-08-13）---- */
.merchant-select-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.merchant-select-row select { flex:1; min-width:0; }
.merchant-select-row .btn-accent { white-space:nowrap; font-size:12px; padding:6px 12px;
  background: rgba(124,108,255,0.15); color:#b9aaff; border:1px solid rgba(124,108,255,0.3); border-radius:8px; cursor:pointer; }
.merchant-select-row .btn-accent:hover { background: rgba(124,108,255,0.28); }
.quick-merchant-panel { margin:10px 0 14px; padding:14px 16px; border-radius:10px;
  background: rgba(124,108,255,0.06); border:1px dashed rgba(124,108,255,0.3); }
.quick-merchant-panel .qm-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid rgba(124,108,255,0.15); }
.quick-merchant-panel .qm-hint { font-size:11.5px; }
.quick-merchant-panel label { margin-bottom:8px; }
.quick-merchant-panel input, .quick-merchant-panel select { font-size:13px; }
.quick-merchant-panel .m-hint { font-size:11px; color:var(--text-muted); display:block; margin-top:2px; }
.qm-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:10px; padding-top:10px; border-top:1px solid rgba(124,108,255,0.15); }

/* ================================================================
   桌面端 vs 移动端 视觉区分（2026-08-13）
   桌面(biz/)：宽屏多列、侧边导航、数据密集表格
   移动(m/)：触控优化、卡片布局、底部Tab栏、大点击区域
   ================================================================ */

/* ---- 桌面端专属增强（.app 非 .app-mobile）---- */
.app:not(.app-mobile) .sidebar { width:236px; min-width:236px; }
.app:not(.app-mobile) .main { max-width:1440px; }
.app:not(.app-mobile) .content { padding:24px 28px; }
.app:not(.app-mobile) .page-head { margin-bottom:20px; }
.app:not(.app-mobile) .page-h1 { font-size:22px; font-weight:700; letter-spacing:-0.3px; }
.app:not(.app-mobile) .data-table { font-size:13.5px; }
.app:not(.app-mobile) .data-table th { padding:12px 14px; font-weight:600; text-transform:none; letter-spacing:0.3px; }
.app:not(.app-mobile) .data-table td { padding:10px 14px; }
.app:not(.app-mobile) .form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px 18px; }
.app:not(.app-mobile) .form-grid label.full { grid-column:1 / -1; }
.app:not(.app-mobile) .modal { max-width:680px; width:92%; }
.app:not(.app-home) .glass { border-radius:14px; }

/* ---- 移动端专属增强（.mobile-body / .app-mobile）---- */
.mobile-body { -webkit-tap-highlight-color:transparent; -webkit-touch-callout:none; user-select:none; }
.mobile-body input, .mobile-body textarea, .mobile-body select { user-select:auto; }
.app-mobile { box-shadow:none; }

/* 移动端大点击区域 */
.mobile-body button, .mobile-body .btn { min-height:44px; padding:10px 16px; border-radius:10px; }
.mobile-body select, .mobile-body input[type="text"], .mobile-body input[type="number"],
.mobile-body input[type="tel"], .mobile-body textarea {
  min-height:44px; padding:10px 14px; font-size:16px; /* iOS 防止缩放 */
  border-radius:10px;
}
.mobile-body label { margin-bottom:6px; font-size:14px; font-weight:600; color:#c8cdd8; }

/* 移动端卡片列表 */
.mobile-body .m-card { background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.07);
  border-radius:14px; padding:16px; margin-bottom:12px; }
.mobile-body .m-card-title { font-size:15px; font-weight:700; margin-bottom:10px; }
.mobile-body .m-card-row { display:flex; justify-content:space-between; align-items:center;
  padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.05); font-size:13.5px; }
.mobile-body .m-card-row:last-child { border-bottom:none; }
.mobile-body .m-card-label { color:#9aa3b2; }
.mobile-body .m-card-val { font-weight:600; text-align:right; }

/* 移动端表单全宽单列 */
.mobile-body .form-grid { display:flex; flex-direction:column; gap:10px; }
.mobile-body .form-grid label { width:100%; }

/* 移动端底部安全区（iPhone X+ 刘海屏） */
.m-content { padding-bottom:max(90px, env(safe-area-inset-bottom, 20px)); }
.m-tabbar { padding-bottom:env(safe-area-inset-bottom, 0); height:auto; }

/* 移动端弹窗全屏感 */
.mobile-body .modal-backdrop .modal { width:96%; max-height:85vh; overflow-y:auto;
  border-radius:16px 16px 0 0; margin:auto; position:absolute; bottom:0; left:50%;
  transform:translateX(-50%); }
.mobile-body .modal-head { padding:16px 18px 12px; position:sticky; top:0;
  background:inherit; z-index:2; border-bottom:1px solid rgba(255,255,255,0.06); }
.mobile-body .form-actions { position:sticky; bottom:0; background:inherit; padding:14px 16px;
  border-top:1px solid rgba(255,255,255,0.06); display:flex; gap:10px; }
.mobile-body .form-actions .btn { flex:1; }

/* 移动端顶部栏增强 */
.m-topbar { padding:14px 16px; padding-top:calc(14px + env(safe-area-inset-top, 0)); }
.m-home-pad { padding-top:8px; }

/* 桌面端隐藏移动端顶部栏的部分元素（底部导航/返回链接在桌面下无意义），但保留 .app-mobile 可见（移动端页面在桌面居中显示，便于测试与宽屏手机） */
@media (min-width:761px) {
  .m-topbar-link, .m-topbar-actions { display:none !important; }
}
@media (max-width:760px) {
  .sidebar { display:none !important; }
  .app:not(.app-mobile) .main { margin-left:0; }
  .topbar { padding:10px 14px; }
  .topbar-right .user-chip > *:not(.user-avatar):not(.user-meta):not(a) { display:none; }
}
