/* ============================================================
   潜客星探智能助手 - 深色主题 v3
   ============================================================ */

:root {
  --bg: #0a0e27;
  --bg-2: #060920;
  --panel: #131a3a;
  --panel-2: #1a2249;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #e8ecf4;
  --text-2: #c5cce0;
  --muted: #8a92a9;
  --muted-2: #6b7290;
  --brand: #5b8bff;
  --brand-d: #7c5cff;
  --brand-l: #8aa6ff;
  --brand-15: rgba(91, 139, 255, 0.15);
  --brand-08: rgba(91, 139, 255, 0.08);
  --brand-grad: linear-gradient(135deg, #7c5cff 0%, #5b8bff 50%, #a78bff 100%);
  --accent: #00d4a0;
  --danger: #ff6b6b;
  --warn: #ffb547;
  --radius-sm: 8px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .45);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .55);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
  --sidebar-w: 250px;
  --gap: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; display: flex; }

/* 侧边栏 */
.sidebar { width: var(--sidebar-w); background: linear-gradient(180deg, #060920 0%, #0d1230 100%); color: rgba(255, 255, 255, 0.85); display: flex; flex-direction: column; position: fixed; left: var(--gap); top: var(--gap); bottom: var(--gap); border-radius: var(--radius); overflow: hidden; z-index: 30; transition: transform .25s ease; border: 1px solid var(--line); }
.sidebar-brand { padding: 26px 22px 22px; border-bottom: 1px solid var(--line); text-align: center; display: flex; flex-direction: column; align-items: center; }
.sidebar-logo { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-grad); display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 14px; box-shadow: 0 6px 18px rgba(124, 92, 255, 0.45); }
.sidebar-title { font-size: 19px; font-weight: 700; color: #fff; letter-spacing: -.2px; margin-bottom: 2px; }
.sidebar-subtitle { font-size: 12.5px; color: rgba(255, 255, 255, 0.45); }
.sidebar-nav { flex: 1; padding: 20px 15px; overflow-y: auto; }
.sidebar-nav a { display: flex; align-items: center; gap: 15px; padding: 16px 18px; border-radius: 11px; color: rgba(255, 255, 255, 0.72); text-decoration: none; font-size: 16.5px; font-weight: 500; margin-bottom: 8px; transition: all .18s ease; }
.sidebar-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.sidebar-nav a.active { color: #fff; background: var(--brand-grad); box-shadow: 0 4px 16px rgba(91, 139, 255, 0.45); }
.sidebar-nav a .nav-icon { width: 24px; text-align: center; font-size: 20px; flex: none; }
.sidebar-footer { padding: 14px 18px; border-top: 1px solid var(--line); font-size: 16.5px; }
.user-name { display: block; color: rgba(255, 255, 255, 0.75); margin-bottom: 10px; word-break: break-all; }
.logout-link { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.55); text-decoration: none; font-size: 16.5px; transition: color .15s; }
.logout-link:hover { color: #fff; }
.sidebar-toggle { display: none; background: none; border: none; font-size: 22px; color: var(--text); cursor: pointer; padding: 6px; margin-right: 10px; }
.sidebar-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 25; opacity: 0; visibility: hidden; transition: opacity .2s ease; }
.sidebar-mask.show { opacity: 1; visibility: visible; }

/* 主体 */
.main-wrap { flex: 1; margin: var(--gap) var(--gap) var(--gap) calc(var(--sidebar-w) + var(--gap) * 2); height: calc(100vh - var(--gap) * 2); min-height: 0; display: flex; flex-direction: column; background: var(--bg); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(10, 14, 39, 0.85); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 30px; height: 56px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.user-badge { background: var(--brand-15); color: var(--brand-l); padding: 6px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }

.app { display: flex; flex-direction: column; flex: 1; padding: 68px 22px 40px; overflow-y: auto; }
.app--map { padding: 68px 22px 16px; display: flex; flex-direction: column; }
/* 业务地图：外层搜索工具栏 + 结果列表（不内嵌地图） */
.map-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.map-toolbar .mt-input { flex: 1; min-width: 0; }
.map-results { max-height: 220px; overflow-y: auto; margin-bottom: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; display: none; box-shadow: var(--shadow-sm); }
.map-results.show { display: block; }
.map-results .mr-meta { padding: 7px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.map-results .mr-empty { padding: 18px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.map-results .mr-item { padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.map-results .mr-item:last-child { border-bottom: none; }
.map-results .mr-item:hover { background: rgba(91, 139, 255, .12); }
.map-results .mr-item b { display: block; font-size: 13.5px; color: var(--text); }
.map-results .mr-item span { font-size: 12px; color: var(--text-2); }
.map-results .mr-item em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-frame-wrap { flex: 1; min-height: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.map-frame-wrap iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
/* 轮廓绘制面板（外层，绕开 iframe 内点击） */
.mt-sep { width: 1px; height: 24px; background: var(--line-2); margin: 0 4px; }
.shape-panel { margin-bottom: 10px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.shape-panel .sp-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.shape-panel .sp-head b { font-size: 15px; color: var(--text); }
.shape-panel .sp-head span { font-size: 12px; color: var(--muted); }
.shape-panel .sp-ops { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.shape-panel .sp-list { max-height: 160px; overflow-y: auto; }
.shape-panel .sp-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.shape-panel .sp-row:last-child { border-bottom: none; }
.shape-panel .sp-idx { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--brand-15); color: var(--brand-l); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.shape-panel .sp-region { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: rgba(91, 139, 255, .16); color: var(--brand-l); }
.shape-panel .sp-row code { flex: 1; color: var(--text-2); font-size: 12px; }
.shape-panel .sp-row .btn { padding: 4px 10px; font-size: 12px; }
.app-pw { display: flex !important; flex-direction: column; align-items: center; justify-content: flex-start; }
.app-pw .page-hero { margin-bottom: 24px; }
.app-pw .ios-card { width: 100%; max-width: 480px; margin-bottom: 0; }
.loading { text-align: center; color: var(--muted); padding: 48px 0; font-size: 15px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.page-title { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -.5px; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }

/* 居中页头（截图风格：大标题+副标题） */
.page-hero { text-align: center; margin-bottom: 22px; }
.page-hero-title { font-size: 28px; font-weight: 800; margin: 0; letter-spacing: -.5px; color: var(--text); }
.page-hero-sub { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }

.card { background: var(--panel); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card .k { font-size: 12.5px; color: var(--muted); }
.card .v { font-size: 26px; font-weight: 700; margin-top: 4px; color: var(--text); }

input, select, textarea, button { font-family: inherit; font-size: 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--panel-2); color: var(--text); width: 100%; transition: border-color .2s, box-shadow .2s, background .15s; }
textarea { resize: vertical; min-height: 78px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-15); }
input::placeholder, textarea::placeholder { color: var(--muted-2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; background: var(--brand-grad); color: #fff; cursor: pointer; padding: 10px 18px; border-radius: 10px; font-weight: 600; width: auto; font-size: 14px; box-shadow: 0 2px 8px rgba(91, 139, 255, .35); transition: transform .12s, filter .15s, box-shadow .15s; }
.btn:hover { filter: brightness(1.08); box-shadow: 0 6px 16px rgba(91, 139, 255, .4); }
.btn:active { transform: scale(.96); }
.btn.ghost { background: rgba(91, 139, 255, .12); color: var(--brand-l); box-shadow: none; border: 1px solid rgba(91, 139, 255, .3); }
.btn.ghost:hover { background: rgba(91, 139, 255, .22); }
.btn.danger { background: rgba(255, 107, 107, .12); color: var(--danger); box-shadow: none; border: 1px solid rgba(255, 107, 107, .35); }
.btn.danger:hover { background: rgba(255, 107, 107, .22); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.primary { background: var(--brand-grad); }
.btn.warn { background: linear-gradient(135deg, #FF9500, #FFCC00); color: #3a2400; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.toolbar input, .toolbar select { flex: 1; min-width: 140px; }
.toolbar .btn { white-space: nowrap; padding: 10px 18px; }
.toolbar .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(91, 139, 255, .4); }
.toolbar .btn.ghost { border: 1px solid rgba(91, 139, 255, .3); background: rgba(91, 139, 255, .12); }
.toolbar .btn.ghost:hover { background: rgba(91, 139, 255, .22); }
.toolbar .chk { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; white-space: nowrap; padding: 8px 14px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; user-select: none; }
.toolbar .chk:hover { background: var(--brand-08); border-color: var(--brand); color: var(--brand-l); }
.toolbar .chk:has(input:checked) { background: var(--brand-15); border-color: var(--brand); color: var(--brand-l); font-weight: 600; }
.toolbar .chk input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }

.badge-scope { background: var(--brand-15); color: var(--brand-l); padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.dash-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.dash-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 14px; }
.dash-card { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.dash-card.c1 { --accent: var(--brand); }
.dash-card.c2 { --accent: var(--accent); }
.dash-card.c3 { --accent: #FF9500; }
.dash-card.c4 { --accent: #FF3B30; }
.dash-card.c5 { --accent: var(--brand-d); }
.dash-card .dash-glow { position: absolute; right: -24px; top: -24px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, var(--accent), transparent 70%); opacity: .12; filter: blur(6px); }
.dash-k { font-size: 12.5px; color: var(--muted); position: relative; font-weight: 500; }
.dash-v { font-size: 30px; font-weight: 800; margin: 6px 0 2px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent); }
.dash-sub { font-size: 11.5px; color: var(--muted); position: relative; }
.dash-tip { margin-top: 6px; font-size: 13px; }

.ios-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.ios-card-title { font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -.2px; }
.ios-card-sub { margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.ws-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-bottom: 14px; }

.dashboard-welcome { margin-bottom: 20px; }
.dashboard-welcome h2 { font-size: 22px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.dashboard-welcome p { font-size: 13px; color: var(--muted); margin: 0; }

/* 时间筛选条 */
.db-timebar { margin-bottom: 18px; }
.db-timebar-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; }
.db-timebar-lbl { font-size: 13.5px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.db-timebar-btns { display: flex; gap: 6px; }
.tp-btn { padding: 6px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 13px; cursor: pointer; transition: all .15s; font-family: var(--font); }
.tp-btn:hover { border-color: var(--brand); color: var(--brand-l); }
.tp-btn.on { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(91,139,255,.35); }
.db-custom-range { display: flex; align-items: center; gap: 8px; }
.tp-date { width: auto; flex: 0 0 auto; min-width: 132px; cursor: pointer; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 13px; font-family: var(--font); }
.tp-date:hover { border-color: var(--brand); }
.tp-date::-webkit-calendar-picker-indicator { cursor: pointer; filter: invert(.8); }
.tp-sep { color: var(--muted); font-size: 13px; }

/* 爱企查爬取日期框：覆盖全局 input{width:100%} 拉伸，点击任意部分弹日期选择框 */
.aq-date { width: auto; min-width: 138px; flex: 0 0 auto; cursor: pointer; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 13px; font-family: var(--font); }
.aq-date:hover { border-color: var(--brand); }
.aq-date:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,122,255,.12); }
.aq-date::-webkit-calendar-picker-indicator { cursor: pointer; filter: invert(.6); }

.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi-card-new { background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; transition: transform .2s, box-shadow .2s; }
.kpi-card-new:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-card-new .kpi-text { flex: 1; min-width: 0; }
.kpi-card-new .kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.kpi-card-new .kpi-value { font-size: 28px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1; }
.kpi-card-new .kpi-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.kpi-card-new .kpi-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; margin-left: 12px; }
.kpi-card-new.c-blue .kpi-icon { background: linear-gradient(135deg, rgba(91,139,255,.25), rgba(91,139,255,.1)); color: #8aa6ff; }
.kpi-card-new.c-green .kpi-icon { background: linear-gradient(135deg, rgba(0,212,160,.25), rgba(0,212,160,.1)); color: #4ed8b4; }
.kpi-card-new.c-purple .kpi-icon { background: linear-gradient(135deg, rgba(167,139,255,.25), rgba(167,139,255,.1)); color: #b89dff; }
.kpi-card-new.c-orange .kpi-icon { background: linear-gradient(135deg, rgba(255,149,0,.25), rgba(255,149,0,.1)); color: #ffb547; }
.kpi-card-new.c-red .kpi-icon { background: linear-gradient(135deg, rgba(255,107,107,.25), rgba(255,107,107,.1)); color: #ff8a8a; }
.kpi-card-new.c-teal .kpi-icon { background: linear-gradient(135deg, rgba(0,212,160,.25), rgba(0,212,160,.1)); color: #4ed8b4; }
/* KPI 卡片左侧色条 */
.kpi-card-new.c-blue { border-left: 3px solid #5b8bff; }
.kpi-card-new.c-green { border-left: 3px solid #00d4a0; }
.kpi-card-new.c-purple { border-left: 3px solid #a78bff; }
.kpi-card-new.c-orange { border-left: 3px solid #ff9500; }
.kpi-card-new.c-red { border-left: 3px solid #ff6b6b; }
.kpi-card-new.c-teal { border-left: 3px solid #00d4a0; }

/* 图表网格：区县+行业占左列，城北网格+状态占右列 */
.chart-grid-main { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 16px; margin-bottom: 20px; }
.chart-grid-main #regionCard { grid-column: 1; grid-row: 1; }
.chart-grid-main #pieCard { grid-column: 1; grid-row: 2; }
.chart-grid-main #gridCard { grid-column: 2; grid-row: 1; }
.chart-grid-main #barCard { grid-column: 2; grid-row: 2; }

.chart-grid-2x2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 20px; }
.chart-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.chart-card .chart-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.chart-card .chart-icon { display: none; }
.chart-card .chart-title { font-size: 15.5px; font-weight: 700; color: var(--text); margin: 0; }
.chart-card .chart-title-scope { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.chart-card .chart-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.chart-card .chart-body { flex: 1; min-height: 240px; position: relative; }
.chart-card .chart-body.sm { min-height: 200px; }

.recent-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.recent-card .recent-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.recent-card .recent-title { font-size: 15.5px; font-weight: 700; color: var(--text); margin: 0; }
.recent-card .table-wrap { box-shadow: none; border: none; border-radius: 0; }

.chart-legend-inline { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 10px; }
.legend-inline-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.legend-inline-dot { width: 10px; height: 10px; border-radius: 3px; }
.chart-empty, .fu-empty { text-align: center; color: var(--muted); padding: 28px 0; font-size: 14px; }

.admin-tabs { display: flex; gap: 6px; background: var(--panel-2); padding: 5px; border-radius: 14px; margin-bottom: 14px; width: fit-content; max-width: 100%; border: 1px solid var(--line); }
.admin-tabs button { border: none; background: transparent; padding: 9px 22px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .2s ease; white-space: nowrap; }
.admin-tabs button:hover { color: var(--brand-l); }
.admin-tabs button.active { background: var(--brand-grad); color: #fff; box-shadow: 0 1px 6px rgba(91, 139, 255, .35); }

.pie-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.pie-legend { display: flex; flex-direction: column; gap: 9px; min-width: 130px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.legend-dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.legend-label { flex: 1; color: var(--text); }
.legend-val { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

.fu-list { list-style: none; margin: 0; padding: 0; }
.fu-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.fu-row:last-child { border-bottom: none; }
.fu-avatar { width: 42px; height: 42px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: var(--brand-grad); color: #fff; font-weight: 700; font-size: 17px; }
.fu-main { flex: 1; min-width: 0; }
.fu-line1 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fu-company { color: var(--muted); font-size: 14px; }
.fu-content { color: var(--text-2); font-size: 14px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.fu-time { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* 表格 */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; overflow-y: visible; box-shadow: var(--shadow-sm); scrollbar-width: thin; flex: 1 1 auto; min-height: 220px; }
.table-wrap.dragging { cursor: grabbing; user-select: none; }
.table-wrap.dragging * { pointer-events: none; }
.table-wrap.dragging button { pointer-events: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--panel-2); font-weight: 700; color: var(--text-2); font-size: 14px; white-space: nowrap; letter-spacing: .2px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(91, 139, 255, 0.06); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: rgba(91, 139, 255, 0.06); }
td.ops { white-space: nowrap; }
td.ops .btn-mini { display: inline-flex; align-items: center; gap: 3px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel-2); color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; margin: 2px 3px; transition: all .15s; width: auto; }
td.ops .btn-mini:hover { border-color: var(--brand); color: var(--brand-l); background: var(--brand-15); }
td.ops .btn-mini.primary { background: var(--brand-grad); color: #fff; border-color: transparent; }
td.ops .btn-mini.primary:hover { filter: brightness(1.1); }
td.ops .btn-mini.danger { color: var(--danger); border-color: rgba(255, 107, 107, .35); }
td.ops .btn-mini.danger:hover { border-color: var(--danger); background: rgba(255, 107, 107, .12); }
td.date { white-space: nowrap; font-variant-numeric: tabular-nums; }

.tag { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.tag.new { background: rgba(91, 139, 255, .15); color: var(--brand-l); }
.tag.contacted { background: rgba(255, 181, 71, .15); color: #ffb547; }
.tag.won { background: rgba(52, 199, 89, .18); color: #4ed8b4; }
.tag.lost { background: rgba(255, 107, 107, .14); color: #ff8a8a; }
.tag.cat { background: var(--brand-15); color: var(--brand-l); }
.tag.locked { background: rgba(255, 107, 107, .12); color: #ff8a8a; }
.tag.rec { background: rgba(167, 139, 255, .15); color: #b89dff; }
.tag.archived { background: rgba(0, 212, 160, .15); color: #4ed8b4; }
.tag.claimed { background: rgba(255, 181, 71, .15); color: #ffb547; }
.tag.unclaimed { background: var(--brand-15); color: var(--brand-l); }
.tag.dup { background: rgba(167, 139, 255, .14); color: #b89dff; }
.tag.overdue { background: rgba(255, 107, 107, .14); color: #ff8a8a; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .55; } }
.tag.role-admin { background: rgba(91, 139, 255, .16); color: var(--brand-l); }
.tag.role-user { background: rgba(138, 146, 169, .16); color: var(--muted); }

/* 线索表 */
.leads-toolbar { flex-wrap: wrap; row-gap: 8px; }
.leads-toolbar .kw-input { flex: 1 1 260px; min-width: 200px; max-width: 100%; }
.leads-toolbar select.page-size { flex: none; width: auto; min-width: 96px; padding: 9px 10px; font-size: 14px; }
.leads-toolbar .btn { flex: none; font-size: 14px; }
.leads-count { font-size: 12.5px; margin: -4px 0 10px; padding-left: 13px; color: var(--muted); }

.afilters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.afilters-lbl { font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.achip { display: inline-flex; align-items: center; gap: 5px; background: var(--brand-15); border: 1px solid rgba(91, 139, 255, .35); color: var(--brand-l); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 500; }
.achip i { font-style: normal; cursor: pointer; opacity: .6; font-size: 13px; line-height: 1; }
.achip i:hover { opacity: 1; color: var(--danger); }
.abtn-clear { border: none; background: none; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 2px 4px; text-decoration: underline; width: auto; }
.abtn-clear:hover { color: var(--brand-l); }

table.tbl-compact { table-layout: fixed; width: 100%; min-width: 1100px; font-size: 13.5px; }
.tbl-compact th, .tbl-compact td { padding: 9px 9px; line-height: 1.45; vertical-align: middle; word-break: break-word; overflow-wrap: anywhere; }
.tbl-compact th { padding: 13px 9px; font-size: 15px; white-space: nowrap; position: relative; background: var(--panel-2); font-weight: 700; color: #ffffff; letter-spacing: .4px; border-bottom: 2px solid rgba(91, 139, 255, .45); text-align: center; }
.tbl-compact tbody td { border-bottom: 1px solid var(--line); color: var(--text-2); text-align: center; }
.tbl-compact tbody tr:hover td { background: rgba(91, 139, 255, 0.06); color: var(--text); }
.tbl-compact tbody td.c-name, .tbl-compact tbody td.cap, .tbl-compact tbody td.date { text-align: left; }
.tbl-compact tbody td.ops { text-align: center; }
.tbl-compact tbody td.c-name { text-align: left; }
.tbl-compact tbody td.c-name b { text-align: left; }
.tbl-compact tbody tr:hover td { background: rgba(91, 139, 255, 0.06); color: var(--text); }
.tbl-compact th.th-f, .tbl-compact th.th-s { cursor: pointer; user-select: none; transition: background .15s, color .15s; }
.tbl-compact th.th-f:hover, .tbl-compact th.th-s:hover { background: var(--brand-15); color: var(--brand-l); }
.tbl-compact th .th-in { display: inline-flex; align-items: center; gap: 4px; }
.tbl-compact th .fi { display: inline-flex; color: var(--muted); }
.tbl-compact th.th-f.on .fi { color: var(--brand-l); }
.tbl-compact th.th-f.open { background: var(--brand-15); }
.tbl-compact th.on { color: var(--brand-l); background: var(--brand-15); }
.tbl-compact th .fbadge { background: var(--brand); color: #fff; border-radius: 9px; font-size: 10.5px; line-height: 16px; padding: 0 6px; font-weight: 700; }
.tbl-compact th .si { font-size: 10px; color: var(--muted); margin-left: 1px; }
.tbl-compact th.th-s.on .si { color: var(--brand-l); }
.tbl-compact td.c-name b { display: block; font-weight: 600; color: var(--text); }
.tbl-compact td.cap { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl-compact td.date, .tbl-compact th.date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl-compact td.ops { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 6px; line-height: 1.4; white-space: nowrap; }
.tbl-compact td.ops .btn-mini { padding: 4px 8px; font-size: 13px; margin: 2px; border-radius: 6px; }
.tbl-compact td.c-industry { max-width: 0; overflow: hidden; }
.tbl-compact td.c-industry .tag {
  display: block; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tbl-compact td.c-regtype { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.tbl-compact td.c-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.tbl-compact .tag { padding: 3px 9px; font-size: 12px; }

/* 表头筛选浮层 */
.thf-panel { position: fixed; z-index: 70; width: 240px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; animation: thfIn .14s ease; }
@keyframes thfIn { from { opacity: 0; transform: translateY(-4px); } }
.thf-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; font-size: 13.5px; font-weight: 700; border-bottom: 1px solid var(--line); }
.thf-cnt { font-size: 11.5px; font-weight: 600; color: var(--brand-l); }
.thf-search { padding: 7px 9px; border-bottom: 1px solid var(--line); }
.thf-search input { padding: 6px 9px; font-size: 13px; }
.thf-list { max-height: 320px; overflow-y: auto; overflow-x: hidden; padding: 5px; }
.thf-list::-webkit-scrollbar { width: 8px; }
.thf-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.thf-list::-webkit-scrollbar-thumb:hover { background: var(--brand); }
.thf-empty { padding: 16px 0; text-align: center; color: var(--muted); font-size: 13px; }
.thf-item { display: flex; align-items: center; gap: 7px; padding: 5px 7px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.thf-item:hover { background: var(--brand-08); }
.thf-item input { width: 15px; height: 15px; flex: none; accent-color: var(--brand); cursor: pointer; padding: 0; }
.thf-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thf-item em { font-style: normal; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.thf-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); }
.thf-foot .link { width: auto; border: none; background: none; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 0; }
.thf-foot .link:hover { color: var(--brand-l); }
.thf-foot .btn { width: auto; padding: 5px 16px; font-size: 13px; border-radius: 8px; }

.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.pager-summary { margin-right: auto; }
.pager button[disabled] { opacity: .4; cursor: not-allowed; }
.pager-pages { display: inline-flex; gap: 4px; align-items: center; }
.pager .page-btn { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: all .15s ease; }
.pager .page-btn:hover { background: var(--brand-15); border-color: var(--brand); color: var(--brand-l); }
.pager .page-btn.active { background: var(--brand-grad); color: #fff; border-color: transparent; box-shadow: 0 1px 4px rgba(91, 139, 255, .35); cursor: default; }
.pager-input { width: 62px; height: 34px; padding: 0 8px; text-align: center; font-size: 13px; font-weight: 600; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2); color: var(--text); }
.pager-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-15); }
.pager-jump-lbl { font-size: 13px; }

.modal-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 18px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; width: 100%; max-width: 580px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 17px; }
.modal-head button { width: auto; border: none; background: none; font-size: 26px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-body { padding: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }

.toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); background: rgba(28, 28, 30, .92); color: #fff; padding: 12px 22px; border-radius: 14px; z-index: 60; box-shadow: 0 8px 28px rgba(0, 0, 0, .45); font-size: 14px; backdrop-filter: blur(8px); border: 1px solid var(--line-2); }
.toast.err { background: rgba(255, 107, 107, .95); }
.toast.ok { background: rgba(0, 212, 160, .96); }

.top-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.top-row { display: flex; align-items: center; gap: 12px; }
.top-rank { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; background: #8e8e93; flex-shrink: 0; }
.top-rank.rank-1 { background: linear-gradient(135deg, #FFD60A, #FF9500); color: #3a2400; }
.top-rank.rank-2 { background: linear-gradient(135deg, #c7c7cc, #8e8e93); }
.top-rank.rank-3 { background: linear-gradient(135deg, #FF9F0A, #C77B00); }
.top-name { width: 92px; flex-shrink: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-bar { flex: 1; height: 10px; background: var(--brand-08); border-radius: 999px; overflow: hidden; }
.top-bar i { display: block; height: 100%; background: var(--brand-grad); border-radius: 999px; }
.top-count { width: 38px; text-align: right; font-weight: 700; color: var(--brand-l); }

/* 登录页 v2 — 深色星海 */
body.login-mode { background: #050614; overflow: hidden; }
body.login-mode .sidebar { display: none; }
body.login-mode .topbar { display: none; }
body.login-mode .main-wrap { margin: 0; border-radius: 0; border: none; }
body.login-mode .app { padding: 0; max-width: none; height: 100vh; overflow-y: auto; }

.login-page { position: relative; display: flex; flex-direction: column; width: 100%; min-height: 100vh; background: radial-gradient(900px 500px at 8% 8%, rgba(124, 92, 255, .32) 0%, transparent 60%), radial-gradient(700px 500px at 95% 95%, rgba(91, 139, 255, .22) 0%, transparent 60%), radial-gradient(1100px 600px at 55% 55%, rgba(91, 139, 255, .10) 0%, transparent 70%), linear-gradient(155deg, #06061a 0%, #0a0a2a 50%, #08081a 100%); overflow: hidden; }
.login-page::before, .login-page::after { content: ""; position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; animation: loginFloat 16s ease-in-out infinite; z-index: 0; }
.login-page::before { width: 360px; height: 360px; background: rgba(124, 92, 255, .55); top: -100px; left: 6%; }
.login-page::after { width: 320px; height: 320px; background: rgba(91, 139, 255, .40); bottom: -80px; right: 10%; animation-delay: -8s; }
@keyframes loginFloat { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(50px, -40px) scale(1.15); } }

.lp-topbar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 18px 48px; gap: 24px; }
.lp-brand { display: flex; align-items: center; gap: 10px; }
.lp-logo { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-grad); display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 4px 16px rgba(124, 92, 255, .45); }
.lp-brand-name { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.2px; }
.lp-nav { display: flex; align-items: center; gap: 6px; flex: 1; justify-content: center; }
.lp-nav a { color: rgba(255, 255, 255, .65); font-size: 14.5px; padding: 8px 16px; border-radius: 8px; cursor: pointer; transition: color .15s, background .15s; user-select: none; }
.lp-nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.lp-nav a.active { color: #fff; background: rgba(91, 139, 255, .2); }
.lp-actions { display: flex; align-items: center; gap: 8px; }
.lp-actions a { font-size: 14px; padding: 8px 18px; border-radius: 8px; cursor: pointer; user-select: none; transition: all .15s; }
.lp-actions a.lp-login { color: rgba(255, 255, 255, .8); border: 1px solid rgba(255, 255, 255, .15); }
.lp-actions a.lp-login:hover { color: #fff; border-color: rgba(255, 255, 255, .35); }
.lp-actions a.lp-register { color: #fff; background: var(--brand-grad); box-shadow: 0 4px 14px rgba(124, 92, 255, .4); }
.lp-actions a.lp-register:hover { filter: brightness(1.08); }

.lp-main { position: relative; z-index: 1; display: flex; flex-direction: column; flex: 1; justify-content: center; align-items: center; padding: 0 20px; }
.lp-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 18px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #fff; font-size: 13.5px; margin-bottom: 22px; backdrop-filter: blur(8px); }
.lp-chip-icon { color: #a78bff; }
.lp-title { font-size: 46px; font-weight: 800; color: #fff; letter-spacing: -.8px; line-height: 1.18; margin: 0 0 14px; text-align: center; max-width: 880px; }
.lp-title em { font-style: normal; background: linear-gradient(110deg, #a78bff 0%, #7c5cff 50%, #5b8bff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; background-size: 200% 100%; animation: titleGrad 4s ease-in-out infinite; }
@keyframes titleGrad { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.lp-sub { color: rgba(255, 255, 255, .55); font-size: 15px; margin: 0 0 32px; text-align: center; }

.lp-card { width: 100%; max-width: 440px; background: linear-gradient(180deg, rgba(20, 16, 48, .72) 0%, rgba(12, 10, 36, .72) 100%); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; padding: 30px 32px 24px; backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 2px 4px rgba(0, 0, 0, .4); }
.lp-card-head { text-align: center; }
.lp-card-head h2 { margin: 0 0 4px; color: #fff; font-size: 22px; font-weight: 700; letter-spacing: -.4px; }
.lp-card-head p { color: rgba(255, 255, 255, .5); font-size: 13px; margin: 0 0 22px; }

.lf-field { position: relative; margin-bottom: 14px; }
.lf-label { display: block; color: rgba(255, 255, 255, .7); font-size: 12.5px; margin-bottom: 7px; font-weight: 500; }
.lf-input { width: 100%; padding: 12px 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; color: #fff; font-size: 14.5px; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.lf-input::placeholder { color: rgba(255, 255, 255, .32); }
.lf-input:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .2); }
.lf-input:focus { outline: none; background: rgba(255, 255, 255, .07); border-color: rgba(124, 92, 255, .7); box-shadow: 0 0 0 4px rgba(124, 92, 255, .2); }
.lp-err { display: none; color: #ff8a8a; font-size: 12.5px; margin-top: 6px; padding-left: 2px; }
.lp-err.show { display: flex; align-items: center; gap: 4px; }

.lf-submit { position: relative; width: 100%; padding: 13px 20px; border-radius: 11px; border: none; background: linear-gradient(110deg, #7c5cff 0%, #5b8bff 50%, #a78bff 100%); background-size: 200% 200%; background-position: 0% 50%; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; overflow: hidden; box-shadow: 0 8px 24px rgba(124, 92, 255, .40), 0 0 0 1px rgba(255, 255, 255, .10) inset; transition: background-position .4s ease, transform .12s ease, box-shadow .25s ease; margin-top: 6px; }
.lf-submit:hover { background-position: 100% 50%; box-shadow: 0 14px 36px rgba(124, 92, 255, .55), 0 0 0 1px rgba(255, 255, 255, .20) inset; }
.lf-submit:active { transform: translateY(1px) scale(.99); }
.lf-submit[disabled] { opacity: .65; cursor: not-allowed; }

.lp-foot { text-align: center; color: rgba(255, 255, 255, .45); font-size: 12.5px; margin-top: 16px; }
.lp-foot a { color: rgba(167, 139, 255, .95); text-decoration: none; font-weight: 500; transition: color .15s; }
.lp-foot a:hover { color: #fff; text-decoration: underline; }

.lp-features { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 20px 48px; max-width: 1280px; margin: 0 auto; }
.lp-feat { background: linear-gradient(180deg, rgba(20, 16, 48, .5) 0%, rgba(12, 10, 36, .5) 100%); border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; padding: 22px 22px 18px; }
.lp-feat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; }
.lp-feat-icon.red { background: rgba(255, 88, 88, .15); color: #ff8888; }
.lp-feat-icon.green { background: rgba(0, 212, 160, .15); color: #4ed8b4; }
.lp-feat-icon.purple { background: rgba(167, 139, 255, .18); color: #b89dff; }
.lp-feat-icon.blue { background: rgba(91, 139, 255, .18); color: #8aa6ff; }
.lp-feat h3 { margin: 0 0 12px; color: #fff; font-size: 16px; font-weight: 700; }
.lp-feat ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lp-feat ul li { color: rgba(255, 255, 255, .7); font-size: 13px; display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.lp-feat ul li i { width: 6px; height: 6px; border-radius: 50%; background: #4ed8b4; margin-top: 8px; flex: none; }
.lp-feat:nth-child(2) ul li i { background: #8aa6ff; }
.lp-feat:nth-child(3) ul li i { background: #b89dff; }
.lp-feat:nth-child(4) ul li i { background: #ffb547; }

@media (max-width: 1280px) { .lp-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1200px) { .kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 980px) {
  .ws-grid, .chart-grid, .chart-grid-2x2, .chart-grid-main { grid-template-columns: 1fr; }
  .chart-grid-main #regionCard, .chart-grid-main #gridCard, .chart-grid-main #pieCard, .chart-grid-main #barCard { grid-column: 1; grid-row: auto; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .dash-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .lp-features { grid-template-columns: 1fr; padding: 0 24px 40px; }
  .lp-topbar { padding: 18px 24px; }
  .lp-title { font-size: 34px; }
}
@media (min-width: 861px) {
  .topbar { display: none; }
}

@media (max-width: 860px) {
  .sidebar { left: 0; top: 0; bottom: 0; border-radius: 0; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin: 0; height: 100vh; border-radius: 0; border: none; }
  .sidebar-toggle { display: block; }
  .topbar-inner { height: 56px; padding: 0 18px; }
  .app { padding: 18px 16px 48px; }
  .form-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 24px; }
  .user-badge { display: none; }
  .lp-nav { display: none; }
}
@media (max-width: 540px) {
  .kpi-row, .dash-grid, .dash-grid-5 { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  .lp-card { padding: 24px 22px 20px; border-radius: 16px; }
  .lp-card h2 { font-size: 20px; }
  .lp-title { font-size: 28px; }
}

.modal-mask { animation: fadeIn .18s ease; }
.modal { animation: modalIn .22s cubic-bezier(.2, .8, .3, 1); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: scale(.94) translateY(10px); } }

/* 爱企查爬取：企业名滚动淡入 */
@keyframes aqFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 批量操作条（清单页，admin/网格长/副网格长/商客主管可见） ===== */
.batch-bar {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 10px; padding: 8px 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.batch-bar .bb-sel { display: flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; user-select: none; }
.batch-bar .bb-count b { color: var(--primary, #0089ff); }
.batch-bar .btn.danger { color: #ff4d4f; border-color: rgba(255, 77, 79, .45); }
.tbl-compact td.c-chk, .tbl-compact th.c-chk { text-align: center; vertical-align: middle; }
.tbl-compact input.row-chk, .batch-bar input { cursor: pointer; }

/* ===== 操作表头内嵌批量操作（2026-09-03：批量按钮移入「操作」列表头右侧） ===== */
.tbl-compact th.th-ops { white-space: nowrap; }
.tbl-compact th.th-ops .th-ops-lbl { font-weight: 600; }
.tbl-compact th.th-ops .th-batch { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; vertical-align: middle; }
.tbl-compact th.th-ops .th-batch .bb-count { font-size: 12px; white-space: nowrap; }
.tbl-compact th.th-ops .th-batch .bb-count b { color: var(--primary, #0089ff); }
.tbl-compact th.th-ops .th-batch .btn.sm { padding: 3px 10px; font-size: 12.5px; }
.tbl-compact th.th-ops .th-batch .btn.danger { color: #ff4d4f; border-color: rgba(255, 77, 79, .45); }
/* 地图跳转按钮 */
td.ops .btn-mini[data-map] { font-size: 14px; line-height: 1; padding: 4px 8px; }

/* ===== 看板·跟进明细 ===== */
.fu-detail-card { margin-top: 4px; }
.fu-detail-card .fu-body { max-height: 380px; overflow: auto; }
.fu-tbl .fu-note { max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* ===== 清单页·地图跳转按钮（腾讯地图四色标，突出显示） ===== */
.btn-mini.map-jump { padding: 3px 8px; background: #fff; border: 1px solid rgba(47,107,255,.35); }
.btn-mini.map-jump:hover { box-shadow: 0 2px 10px rgba(47,107,255,.4); transform: translateY(-1px); border-color: #2f6bff; }
.btn-mini.map-jump:active { transform: scale(.94); }

/* ===== 看板右上角·角色所属网格标记 ===== */
.page-hero { position: relative; }
.hero-grid-badge {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.hero-grid-badge.gb-grid { background: rgba(0,137,255,.10); color: #0066d6; border-color: rgba(0,137,255,.28); }
.hero-grid-badge.gb-admin { background: rgba(139,92,246,.10); color: #6d3fd6; border-color: rgba(139,92,246,.28); }
.hero-grid-badge.gb-mine { background: rgba(255,149,0,.10); color: #c96f00; border-color: rgba(255,149,0,.28); }
@media (max-width: 720px) {
  .hero-grid-badge { position: static; transform: none; margin-top: 8px; }
}
