:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --accent: #f97316;
  --accent-soft: #fff7ed;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --info: #0891b2;
  --info-soft: #ecfeff;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }

/* ---------- 登录 ---------- */
.login-view {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4f46e5 100%);
  padding: 20px;
}
.login-card {
  background: var(--panel); border-radius: var(--radius-xl); padding: 44px 36px; width: 100%;
  max-width: 400px; text-align: center; box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}
.login-logo {
  width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 30px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg);
}
.login-card h1 { font-size: 22px; margin: 0 0 8px; font-weight: 700; }
.login-sub { color: var(--text-secondary); margin: 0 0 28px; font-size: 14px; }
#login-form { display: flex; flex-direction: column; gap: 14px; }
#login-password {
  padding: 13px 16px; border: 1px solid var(--border); border-radius: var(--radius); outline: none;
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
#login-password:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: #fff; }
#login-btn {
  padding: 13px; border: none; border-radius: var(--radius); background: var(--primary); color: #fff;
  font-weight: 600; font-size: 15px; transition: background .15s, transform .05s;
}
#login-btn:hover { background: var(--primary-dark); }
#login-btn:active { transform: translateY(1px); }
#login-btn:disabled { opacity: .65; cursor: not-allowed; }
.login-error { color: var(--danger); font-size: 13px; min-height: 18px; text-align: left; }

/* ---------- 顶栏 ---------- */
.topbar {
  height: 64px; background: var(--panel); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: sticky; top: 0; z-index: 30; box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.brand {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
  font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.brand-title { font-weight: 700; font-size: 16px; letter-spacing: -.2px; }
.brand-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.sync-indicator {
  font-size: 12px; color: var(--text-secondary); padding: 5px 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; white-space: nowrap;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  padding: 8px 16px; border: 1px solid var(--border); background: #fff; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 14px; font-weight: 500; transition: all .15s; white-space: nowrap;
}
.btn:hover { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-text { background: transparent; border-color: transparent; color: var(--primary); padding: 6px 10px; font-weight: 600; }
.btn-text:hover { background: var(--primary-soft); }
.link-btn { background: none; border: none; color: var(--primary); font-size: 13px; padding: 0; font-weight: 500; }
.icon-btn { background: none; border: none; font-size: 18px; color: var(--text-secondary); line-height: 1; padding: 4px; border-radius: 6px; }
.icon-btn:hover { background: var(--surface); color: var(--text); }

/* ---------- 主布局 ---------- */
.app-view { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; padding: 20px 24px 32px; max-width: 1600px; width: 100%; margin: 0 auto; }

/* ---------- 筛选面板 ---------- */
.filter-panel { margin-bottom: 18px; }
.filter-panel-inner {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.filter-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; border-bottom: 1px solid transparent; transition: border-color .2s;
}
.filter-panel.expanded .filter-head { border-bottom-color: var(--border); }
.filter-quick { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.filter-title { font-weight: 700; font-size: 15px; white-space: nowrap; }
.filter-summary { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.filter-summary:empty::before { content: ''; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px;
  background: var(--primary-soft); color: var(--primary-dark); font-size: 12px; font-weight: 500;
}
.filter-chip .rm { background: none; border: none; color: inherit; font-size: 13px; padding: 0; line-height: 1; cursor: pointer; }
.filter-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
#btn-toggle-filter { display: inline-flex; align-items: center; gap: 6px; }
.toggle-arrow { display: inline-block; transition: transform .25s; font-size: 11px; color: var(--primary); }
.filter-panel.expanded .toggle-arrow { transform: rotate(180deg); }

.quick-search {
  width: 200px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 20px;
  outline: none; background: var(--surface); transition: border-color .15s, box-shadow .15s, width .2s;
}
.quick-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); background: #fff; width: 260px; }

.filter-body {
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height .35s ease, opacity .25s ease, padding .25s ease;
}
.filter-panel.expanded .filter-body {
  max-height: 900px; opacity: 1; padding: 10px 18px 18px;
}
.filter-row { display: flex; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.filter-row:last-child { border-bottom: none; }
.filter-row-half { gap: 24px; }
.filter-half { display: flex; align-items: flex-start; flex: 1; }
.filter-label {
  width: 110px; flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--text-secondary);
  padding-top: 7px; line-height: 1.4;
}
.filter-content { flex: 1; min-width: 0; }
.filter-keyword {
  width: 100%; max-width: 360px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  outline: none; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.filter-keyword:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.filter-select {
  padding: 8px 28px 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; outline: none; min-width: 160px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.filter-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.province-select {
  padding: 8px 28px 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; outline: none; min-width: 160px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.province-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.region-filter { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }

.pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-group label {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13px; padding: 5px 12px;
  border: 1px solid var(--border); border-radius: 20px; cursor: pointer; user-select: none;
  background: #fff; color: var(--text-secondary); transition: all .12s;
}
.pill-group label:hover { border-color: var(--primary); color: var(--primary); }
.pill-group input[type="checkbox"] { margin: 0; width: 14px; height: 14px; accent-color: var(--primary); }
.pill-group label.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); font-weight: 500; }
.city-list { max-height: 120px; overflow-y: auto; padding-right: 4px; flex: 1; min-width: 220px; }

.range-filter { display: flex; align-items: center; gap: 10px; max-width: 320px; }
.range-filter input {
  flex: 1; min-width: 80px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none;
}
.range-filter input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.range-sep { color: var(--text-muted); font-weight: 500; }

/* ---------- 内容卡片 ---------- */
.content-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.main-head {
  display: flex; justify-content: space-between; align-items: center; padding: 14px 18px;
  border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap;
}
.count-info { color: var(--text-secondary); font-size: 13px; }
.count-info b { color: var(--text); }
.stats-bar {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 10px 18px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  font-size: 12px; color: var(--text-secondary); min-height: 40px;
}
.stats-bar:empty::before { content: '统计加载中…'; color: var(--text-muted); }
.stats-bar .stat b { color: var(--text); font-weight: 700; }
.stats-bar .stat-sep { color: var(--text-muted); }
@media (max-width: 768px) {
  .stats-bar { padding: 10px 14px; font-size: 11px; gap: 6px; }
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.grid {
  width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; font-size: 13px;
  table-layout: auto;
}
.grid thead th {
  text-align: left; padding: 13px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
  font-weight: 600; color: var(--text-secondary); white-space: nowrap; position: sticky; top: 0; z-index: 10;
  font-size: 12px; text-transform: uppercase; letter-spacing: .3px;
}
.grid thead th[data-sort] { cursor: pointer; user-select: none; }
.grid thead th[data-sort]:hover { color: var(--primary); }
.grid thead th[data-sort]::after { content: ' ⇅'; color: var(--text-muted); font-size: 11px; }
.grid thead th[data-sort].sort-asc::after { content: ' ↑'; color: var(--primary); }
.grid thead th[data-sort].sort-desc::after { content: ' ↓'; color: var(--primary); }
.grid tbody td {
  padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top;
  color: var(--text-secondary); transition: background .12s;
}
.grid tbody tr:hover td { background: #fafbff; }
.grid tbody tr:last-child td { border-bottom: none; }

.col-name { min-width: 140px; max-width: 260px; }
.col-name .cell-inner { font-weight: 600; color: var(--text); word-break: break-word; }
.col-type { white-space: nowrap; }
.col-modes { min-width: 120px; }
.col-cats { min-width: 120px; }
.col-regions { min-width: 140px; }
.col-cost { white-space: nowrap; }
.col-contact { min-width: 140px; max-width: 220px; }
.col-contact .cell-inner { word-break: break-word; }
.col-risk { min-width: 120px; }
.col-status { white-space: nowrap; }
.col-time { white-space: nowrap; }
.col-actions { white-space: nowrap; width: 1%; }

.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-size: 12px; padding: 3px 9px; background: var(--surface); border-radius: 14px;
  color: var(--text-secondary); white-space: nowrap; border: 1px solid var(--border);
}
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-可展业 { background: var(--success-soft); color: var(--success); }
.badge-线索对接 { background: var(--info-soft); color: var(--info); }
.badge-开发中 { background: var(--warn-soft); color: var(--warn); }
.cost { font-weight: 700; color: var(--text); }
.risk-cell { display: flex; flex-direction: column; gap: 5px; }
.qual-text { font-size: 12px; color: var(--text-muted); line-height: 1.45; word-break: break-word; }
.row-actions { display: flex; gap: 6px; }
.row-actions button {
  padding: 5px 10px; font-size: 12px; border: 1px solid var(--border); background: #fff;
  border-radius: var(--radius-sm); color: var(--text-secondary); transition: all .12s;
}
.row-actions button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.row-actions .del:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }

/* 图标按钮（PC 紧凑操作列） */
.row-actions.icon-actions { flex-direction: column; gap: 4px; align-items: stretch; }
.row-actions.icon-actions button {
  width: 100%; min-height: 26px; padding: 4px 0; font-size: 15px; line-height: 1;
  border: none; background: transparent; border-radius: 6px; position: relative;
}
.row-actions.icon-actions button:hover { background: var(--primary-soft); color: var(--primary); }
.row-actions.icon-actions button.del:hover { background: var(--danger-soft); color: var(--danger); }
/* tooltip */
.row-actions.icon-actions button::after {
  content: attr(data-tip); position: absolute; right: calc(100% + 8px); top: 50%;
  transform: translateY(-50%) scale(.95); opacity: 0; pointer-events: none;
  background: rgba(15, 23, 42, .85); color: #fff; padding: 4px 8px; border-radius: 5px;
  font-size: 11px; white-space: nowrap; transition: all .15s; backdrop-filter: blur(4px);
}
.row-actions.icon-actions button:hover::after { opacity: 1; transform: translateY(-50%) scale(1); }
.desktop-ops { display: flex; }
.mobile-ops { display: none; }
@media (max-width: 768px) {
  .desktop-ops { display: none !important; }
  .mobile-ops { display: flex; }
}

.empty-state { padding: 64px 20px; text-align: center; color: var(--text-secondary); }
.empty-icon { font-size: 42px; margin-bottom: 12px; opacity: .7; }
.empty-state p { margin: 0; font-size: 15px; font-weight: 500; }
.empty-hint { font-size: 13px; color: var(--text-muted); margin-top: 6px !important; }

/* ---------- 抽屉/弹窗 ---------- */
.mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; z-index: 50; }
.drawer {
  margin-left: auto; width: 540px; max-width: 100%; height: 100%; background: var(--panel);
  display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0, 0, 0, .15); animation: slideIn .2s ease;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head, .modal-head {
  display: flex; justify-content: space-between; align-items: center; padding: 18px 22px;
  border-bottom: 1px solid var(--border); font-weight: 700; font-size: 16px;
}
.drawer-body { padding: 22px; overflow-y: auto; flex: 1 1 auto; }
.drawer-foot, .modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }
.form-row { margin-bottom: 18px; }
.form-row > label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 7px; }
.form-row input[type=text], .form-row input[type=number], .form-row select, .form-row textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-row.two, .two { display: flex; gap: 14px; }
.form-row.two > div { flex: 1; }
.sub-form {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--surface); display: flex;
  flex-direction: column; gap: 14px;
}
.sub-form label.inline { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; color: var(--text-secondary); }
.chip-input {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px; min-height: 44px; background: #fff;
}
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--primary-soft); color: var(--primary-dark); padding: 4px 10px; border-radius: 16px; font-size: 13px; }
.chip button { background: none; border: none; color: inherit; font-size: 13px; line-height: 1; padding: 0; cursor: pointer; }
.chip-input input { border: none; outline: none; flex: 1; min-width: 100px; padding: 5px; background: transparent; }
.suggest-btns { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.suggest-btns .link-btn { padding: 3px 8px; background: var(--surface); border-radius: 12px; }
.regions-box { display: flex; flex-direction: column; gap: 10px; }
.region-row { display: flex; gap: 10px; align-items: center; }
.region-row select { flex: 1; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.region-row input.region-city { flex: 1; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.region-row input.region-city:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.filter-city-manual { padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); width: 170px; background: #fff; outline: none; }
.filter-city-manual:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.region-row .rm { color: var(--danger); background: none; border: none; font-size: 16px; padding: 4px; border-radius: 6px; }
.region-row .rm:hover { background: var(--danger-soft); }

.modal { background: var(--panel); border-radius: var(--radius-lg); width: 480px; max-width: 94vw; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); display: flex; flex-direction: column; margin: auto; }
.modal-body { padding: 22px; }
.hint { color: var(--text-secondary); font-size: 13px; margin: 0 0 16px; line-height: 1.6; }
.hint code { background: var(--surface); padding: 2px 7px; border-radius: 4px; font-size: 12px; border: 1px solid var(--border); }
.import-msg { font-size: 13px; min-height: 18px; }
.import-msg.ok { color: var(--success); }
.import-msg.err { color: var(--danger); }
.draft-badge {
  display: flex; align-items: center; gap: 12px; margin: 0 0 18px;
  padding: 9px 14px; background: var(--accent-soft); border: 1px solid #fed7aa;
  border-radius: var(--radius); font-size: 13px; color: #9a3412;
}
.draft-badge .btn-text { color: var(--accent); margin-left: auto; }

/* ---------- 移动端 FAB（科技感悬浮按钮） ---------- */
.fab-wrap { position: fixed; right: 18px; bottom: 22px; z-index: 80; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; }
.fab-wrap:not(.hidden) { pointer-events: auto; }
.fab-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .25);
  opacity: 0; pointer-events: none; transition: opacity .25s ease; backdrop-filter: blur(2px);
}
.fab-wrap.open .fab-backdrop { opacity: 1; pointer-events: auto; }
.fab-menu {
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  margin-bottom: 14px; transform: translateY(10px); opacity: 0; pointer-events: none;
  transition: all .25s cubic-bezier(.34, 1.56, .64, 1);
}
.fab-wrap.open .fab-menu { transform: none; opacity: 1; pointer-events: auto; }
.fab-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px;
  border: none; border-radius: 28px; background: rgba(255, 255, 255, .92);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .14); backdrop-filter: blur(8px);
  transition: all .18s ease; transform: translateX(20px); opacity: 0;
}
.fab-wrap.open .fab-item { transform: none; opacity: 1; }
.fab-wrap.open .fab-item:nth-child(1) { transition-delay: 0ms; }
.fab-wrap.open .fab-item:nth-child(2) { transition-delay: 35ms; }
.fab-wrap.open .fab-item:nth-child(3) { transition-delay: 70ms; }
.fab-wrap.open .fab-item:nth-child(4) { transition-delay: 105ms; }
.fab-item:active { transform: scale(.96) !important; }
.fab-item-primary { background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff; }
.fab-item-primary .fab-label { color: #fff; }
.fab-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.fab-label { color: var(--text-secondary); }
.fab-toggle {
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 55%, var(--accent) 100%);
  color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
  box-shadow: 0 8px 24px rgba(79, 70, 229, .45), 0 4px 10px rgba(0, 0, 0, .2);
  transition: all .25s cubic-bezier(.34, 1.56, .64, 1); display: flex; align-items: center; justify-content: center;
}
.fab-toggle:hover { transform: scale(1.05); box-shadow: 0 10px 28px rgba(79, 70, 229, .55); }
.fab-toggle:active { transform: scale(.95); }
.fab-toggle-icon { display: inline-block; transition: transform .25s ease; }
.fab-wrap.open .fab-toggle-icon { transform: rotate(45deg); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 11px 20px; border-radius: var(--radius); font-size: 14px; z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: toastIn .2s ease;
}
.toast-err { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- PC 紧凑布局（不影响移动端） ---------- */
@media (min-width: 1025px) {
  .topbar { height: 56px; padding: 0 18px; }
  .brand { width: 34px; height: 34px; font-size: 14px; border-radius: 9px; }
  .brand-title { font-size: 15px; }
  .main { padding: 14px 18px 26px; }
  .filter-panel { margin-bottom: 14px; }
  .filter-head { padding: 11px 16px; }
  .filter-row { padding: 8px 0; }
  .main-head { padding: 11px 16px; }
  .grid thead th { padding: 10px 14px; }
  .grid tbody td { padding: 10px 14px; }
  .drawer-body { padding: 18px; }
  .form-row { margin-bottom: 14px; }
  .form-row input[type=text], .form-row input[type=number], .form-row select, .form-row textarea { padding: 9px 12px; }
  .topbar-actions .btn { padding: 7px 14px; }
  /* 操作按钮 PC 端纵向紧凑图标堆叠 */
  .col-actions { width: 1%; min-width: 34px; white-space: normal; padding-left: 8px !important; padding-right: 8px !important; }
  .grid tbody td.col-actions { vertical-align: middle; }
  .row-actions { flex-direction: column; gap: 3px; align-items: stretch; }
  .row-actions button { width: 100%; text-align: center; padding: 4px 0; font-size: 15px; line-height: 1; min-height: 26px; border: none; background: transparent; border-radius: 6px; }
  .row-actions button:hover { background: var(--primary-soft); color: var(--primary); }
  .row-actions button.del:hover { background: var(--danger-soft); color: var(--danger); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .main { padding: 16px; }
  .grid { min-width: 900px; }
}

@media (max-width: 768px) {
  .topbar { height: auto; padding: 12px 14px; flex-wrap: wrap; gap: 10px; }
  .topbar-left { gap: 0; }
  .topbar-right { width: 100%; justify-content: space-between; }
  .topbar-actions { gap: 8px; }
  .topbar-actions .btn { padding: 7px 12px; font-size: 13px; }
  .desktop-actions { display: none !important; }
  .fab-wrap { display: flex; }
  .brand { display: none; }
  .brand-text { display: none; }
  .main { padding: 12px 12px 80px; }

  .filter-head { flex-wrap: wrap; gap: 10px; }
  .filter-quick { width: 100%; }
  .filter-title { display: none; }
  .filter-actions { margin-left: auto; }
  .quick-search { width: 100%; }
  .quick-search:focus { width: 100%; }
  .btn, input, select, textarea { min-height: 40px; }

  .filter-row, .filter-row-half, .filter-half { flex-direction: column; gap: 8px; }
  .filter-label { width: auto; padding-top: 0; }
  .filter-content { width: 100%; }
  .region-filter { flex-direction: column; }
  .province-select { width: 100%; }
  .range-filter { max-width: 100%; }
  .filter-select { width: 100%; }

  .main-head { padding: 12px 14px; }

  /* 表格转卡片 */
  .table-wrap { padding: 12px; background: var(--bg); }
  .grid { min-width: 0; display: block; background: transparent; }
  .grid thead { display: none; }
  .grid tbody { display: block; }
  .grid tbody tr {
    display: block; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 12px; padding: 14px; box-shadow: var(--shadow-sm);
  }
  .grid tbody td {
    display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 0;
    border-bottom: 1px dashed var(--border); color: var(--text-secondary);
  }
  .grid tbody td::before {
    content: attr(data-label); font-weight: 600; color: var(--text-secondary); margin-right: 16px;
    flex-shrink: 0; font-size: 12px;
  }
  .grid tbody td:last-child { border-bottom: none; }
  .grid tbody td.col-actions { justify-content: flex-start; padding-top: 12px; }
  .grid tbody td.col-actions::before { display: none; }
  .col-name, .col-contact { max-width: none; }
  .col-name .cell-inner { text-align: right; }
  .col-contact .cell-inner { text-align: right; }

  .drawer { width: 100%; }
  .modal { width: 92vw; }
  .form-row.two { flex-direction: column; gap: 0; }
}

@media (max-width: 480px) {
  .login-card { padding: 36px 24px; }
  .topbar-actions .btn { padding: 6px 10px; font-size: 12px; }
  .sync-indicator { display: none; }
  .filter-title { display: none; }
  .filter-chip { font-size: 11px; padding: 2px 8px; }
}
