/* ==========================================================================
   房管家 · 房源登记与查询系统
   ========================================================================== */

:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e6ebf3;
  --line-2: #eef2f7;
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --brand-700: #1e40af;
  --brand-soft: #eff4ff;
  --red: #e5484d;
  --red-soft: #fff1f1;
  --green: #12a150;
  --green-soft: #e9f9f0;
  --amber: #f59e0b;
  --amber-soft: #fff8e6;
  --purple: #7c3aed;
  --purple-soft: #f4efff;
  --cyan: #0891b2;
  --cyan-soft: #e7f8fc;
  --slate-soft: #f1f5f9;
  --sidebar: #0b1425;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px -12px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 24px 64px -20px rgba(15, 23, 42, 0.28);
  --sidebar-w: 240px;
  --topbar-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
img, svg { display: block; }
::selection { background: #c7dbff; color: var(--ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border: 3px solid transparent; background-clip: content-box; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.icon { width: 18px; height: 18px; flex: none; }
.icon-sm { width: 15px; height: 15px; flex: none; }
.icon-lg { width: 22px; height: 22px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------------------- */
/* 启动屏                                                                      */
/* -------------------------------------------------------------------------- */
.boot-screen {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(800px 500px at 50% 20%, #e8efff 0%, transparent 70%), var(--bg);
  color: var(--muted);
}
.boot-logo {
  width: 64px; height: 64px; border-radius: 18px; color: #fff;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8 55%, #0ea5e9);
  display: grid; place-items: center; box-shadow: 0 18px 38px -12px rgba(37, 99, 235, 0.55);
  animation: boot-float 2.4s ease-in-out infinite;
}
.boot-logo svg { width: 38px; height: 38px; }
.boot-name { margin-top: 18px; font-size: 22px; font-weight: 750; color: var(--ink); letter-spacing: 2px; }
.boot-bar { width: 156px; height: 4px; border-radius: 99px; background: #e2e8f0; margin-top: 22px; overflow: hidden; }
.boot-bar span { display: block; width: 45%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #60a5fa, #2563eb); animation: boot-slide 1.2s ease-in-out infinite; }
.boot-screen p { font-size: 12px; color: var(--muted-2); margin: 12px 0 0; }
@keyframes boot-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(360%); } }
@keyframes boot-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* -------------------------------------------------------------------------- */
/* 应用骨架                                                                    */
/* -------------------------------------------------------------------------- */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; z-index: 50; inset: 0 auto 0 0; width: var(--sidebar-w);
  display: flex; flex-direction: column;
  color: #9aa9c2;
  background:
    radial-gradient(680px 320px at -20% -10%, rgba(37, 99, 235, 0.42), transparent 62%),
    radial-gradient(420px 300px at 120% 100%, rgba(14, 165, 233, 0.12), transparent 70%),
    linear-gradient(180deg, #0b1425 0%, #0a111f 58%, #080e19 100%);
  border-right: 1px solid rgba(148, 163, 184, 0.1);
}
.sidebar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 100% 32px;
}
.sidebar-brand {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 11px;
  height: var(--topbar-h); padding: 0 20px; flex: none;
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #3b82f6, #2563eb 58%, #0ea5e9);
  box-shadow: 0 8px 22px -8px rgba(59, 130, 246, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 17px; font-weight: 750; color: #fff; letter-spacing: 1.5px; }
.brand-text span { font-size: 9px; letter-spacing: 2.1px; color: #7387a6; margin-top: 4px; }
.store-switch {
  position: relative; z-index: 1; margin: 14px 14px 6px; padding: 10px 12px;
  display: flex; align-items: center; gap: 10px; border-radius: 11px;
  background: rgba(148, 163, 184, 0.08); border: 1px solid rgba(148, 163, 184, 0.12);
}
.store-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: rgba(59, 130, 246, 0.16); color: #8ab8ff; flex: none; }
.store-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.store-meta strong { color: #e2e8f0; font-size: 12.5px; font-weight: 600; }
.store-meta span { font-size: 10px; color: #6e819e; }
.store-switch .chev { margin-left: auto; color: #526582; }
.nav-scroll { position: relative; z-index: 1; flex: 1; overflow-y: auto; padding: 10px 12px 8px; }
.nav-scroll::-webkit-scrollbar { width: 5px; }
.nav-scroll::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.25); border: 0; border-radius: 99px; }
.nav-group-label { padding: 16px 12px 6px; font-size: 10px; letter-spacing: 1.4px; color: #556780; font-weight: 600; }
.nav-item {
  position: relative; width: 100%; height: 43px; margin: 3px 0; padding: 0 12px;
  display: flex; align-items: center; gap: 11px; border: 0; border-radius: 10px;
  background: transparent; color: #9aa9c2; font-size: 13.5px; text-align: left; transition: 0.16s ease;
}
.nav-item:hover { background: rgba(148, 163, 184, 0.08); color: #e2e8f0; }
.nav-item.active {
  color: #fff; background: linear-gradient(90deg, rgba(59, 130, 246, 0.26), rgba(59, 130, 246, 0.07));
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.12);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 11px; bottom: 11px; width: 3px;
  border-radius: 0 4px 4px 0; background: #60a5fa; box-shadow: 0 0 12px rgba(96, 165, 250, 0.7);
}
.nav-item .nav-icon { color: #7e91ad; transition: color 0.16s; }
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { color: #bfdbfe; }
.nav-label { flex: 1; white-space: nowrap; }
.nav-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; color: #bfdbfe; background: rgba(59, 130, 246, 0.22); font-variant-numeric: tabular-nums;
}
.nav-badge.alert { color: #fecaca; background: rgba(239, 68, 68, 0.22); }
.sidebar-goal {
  position: relative; z-index: 1; margin: 8px 14px 10px; padding: 13px 14px 14px;
  border-radius: 12px; background: linear-gradient(150deg, rgba(37, 99, 235, 0.17), rgba(15, 23, 42, 0.18));
  border: 1px solid rgba(96, 165, 250, 0.13);
}
.goal-top { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: #93a6c0; }
.goal-top strong { color: #dbeafe; font-weight: 600; }
.goal-top b { color: #93c5fd; font-size: 10px; }
.goal-bar { height: 5px; border-radius: 99px; background: rgba(148, 163, 184, 0.17); margin: 9px 0 7px; overflow: hidden; }
.goal-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3b82f6, #22d3ee); transition: width 0.5s ease; }
.goal-foot { font-size: 9.5px; color: #5d728f; }
.sidebar-user {
  position: relative; z-index: 1; flex: none; display: flex; align-items: center; gap: 10px;
  padding: 13px 16px 15px; border-top: 1px solid rgba(148, 163, 184, 0.1);
}
.avatar {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff; flex: none;
  background: linear-gradient(145deg, #38bdf8, #2563eb);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.user-meta strong { color: #e2e8f0; font-size: 12.5px; font-weight: 600; }
.user-meta span { color: #64748b; font-size: 10px; }
.sidebar-user .icon-btn { margin-left: auto; color: #64748b; border-color: transparent; background: transparent; }
.sidebar-user .icon-btn:hover { color: #cbd5e1; background: rgba(148, 163, 184, 0.1); }

.main-area { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 18px; padding: 0 28px;
  background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.icon-btn.mobile-menu { display: none; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.crumb strong { color: var(--ink-2); font-weight: 600; font-size: 13px; }
.crumb .sep { color: #cbd5e1; }
.topbar-search { position: relative; margin-left: auto; width: 330px; max-width: 38vw; }
.search-field {
  height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; color: var(--muted-2);
  transition: 0.16s ease;
}
.search-field:focus-within { background: #fff; border-color: #a9c6ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12.5px; color: var(--ink); }
.search-field input::placeholder { color: #9aa8bc; }
.kbd {
  height: 20px; min-width: 20px; padding: 0 5px; border-radius: 5px; border: 1px solid #e2e8f0;
  background: #fff; color: #94a3b8; font-size: 10px; display: grid; place-items: center; box-shadow: 0 1px 0 #e2e8f0;
}
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 80;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 6px; overflow: hidden;
}
.search-result {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 8px;
  background: transparent; text-align: left; transition: background 0.14s;
}
.search-result:hover { background: var(--brand-soft); }
.search-result .sr-main { min-width: 0; flex: 1; }
.search-result .sr-main strong { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result .sr-main span { display: block; color: var(--muted-2); font-size: 10.5px; margin-top: 1px; }
.search-result .sr-price { font-size: 12px; font-weight: 700; color: var(--red); white-space: nowrap; }
.search-empty { padding: 20px 12px; text-align: center; color: var(--muted-2); font-size: 12px; }
.search-foot { border-top: 1px solid var(--line-2); margin-top: 4px; padding: 8px 10px 4px; font-size: 10.5px; color: var(--muted-2); display: flex; justify-content: space-between; }
.topbar-actions { display: flex; align-items: center; gap: 9px; flex: none; }
.topbar-divider { width: 1px; height: 24px; background: var(--line); margin: 0 2px; }
.topbar-user { display: flex; align-items: center; gap: 9px; padding-left: 3px; }
.topbar-user .avatar { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.topbar-user .user-name { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.topbar-user .user-role { font-size: 10px; color: var(--muted-2); line-height: 1.2; }
.notif-wrap { position: relative; }
.notif-dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 99px; background: var(--red); border: 1.5px solid #fff; }
.notif-pop {
  position: absolute; top: calc(100% + 12px); right: 0; width: 310px; z-index: 90;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: pop-in 0.16s ease;
}
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--line-2); }
.pop-head strong { font-size: 13px; }
.pop-head span { font-size: 10.5px; color: var(--muted-2); }
.notif-item { width: 100%; display: flex; gap: 11px; padding: 12px 15px; border: 0; border-bottom: 1px solid var(--line-2); background: #fff; text-align: left; }
.notif-item:hover { background: #f8faff; }
.notif-item .ni-icon { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.notif-item .ni-body { min-width: 0; }
.notif-item strong { display: block; font-size: 12px; font-weight: 600; }
.notif-item span { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.notif-empty { padding: 28px 16px; text-align: center; color: var(--muted-2); font-size: 12px; }

.view { flex: 1; width: 100%; max-width: 1560px; margin: 0 auto; padding: 26px 28px 48px; }

/* -------------------------------------------------------------------------- */
/* 通用组件                                                                    */
/* -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 12.5px; font-weight: 550; white-space: nowrap;
  box-shadow: var(--shadow-sm); transition: 0.15s ease;
}
.btn:hover { border-color: #cdd8e8; background: #fbfcfe; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary {
  color: #fff; border-color: #1d4ed8;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  box-shadow: 0 7px 16px -6px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:hover { background: linear-gradient(180deg, #2f76f5, #1d4ed8); border-color: #1e40af; color: #fff; }
.btn-soft { background: var(--brand-soft); border-color: #dbe7ff; color: var(--brand-600); box-shadow: none; }
.btn-soft:hover { background: #e6efff; border-color: #c5d9ff; color: var(--brand-700); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn-ghost:hover { background: var(--slate-soft); border-color: transparent; color: var(--ink-2); }
.btn-danger { background: #fff; border-color: #f3c6c8; color: #cf3438; box-shadow: none; }
.btn-danger:hover { background: #fff5f5; border-color: #eaa9ac; color: #b91c1c; }
.btn-sm { height: 31px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.btn-lg { height: 42px; padding: 0 18px; font-size: 13px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  display: inline-grid; place-items: center; color: var(--muted); transition: 0.15s ease; flex: none;
}
.icon-btn:hover { color: var(--ink); border-color: #cdd8e8; background: #fbfcfe; }
.icon-btn.active { background: var(--brand-soft); color: var(--brand); border-color: #d6e4ff; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-title h1 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 720; letter-spacing: -0.3px; color: var(--ink); }
.page-title p { margin: 6px 0 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.page-actions { display: flex; align-items: center; gap: 9px; flex: none; }
.page-actions .btn { height: 39px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px 14px; }
.card-title { margin: 0; font-size: 14px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.card-title .badge-soft { font-size: 10px; font-weight: 600; color: var(--brand); background: var(--brand-soft); padding: 2px 7px; border-radius: 99px; }
.card-sub { font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.card-link { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; background: none; border: 0; padding: 4px 2px; border-radius: 5px; }
.card-link:hover { color: var(--brand); }
.card-body { padding: 0 20px 20px; }

.section-gap { margin-top: 18px; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card {
  position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 13px;
  padding: 16px 17px 15px; box-shadow: var(--shadow); min-width: 0;
}
.kpi-card::after {
  content: ""; position: absolute; right: -26px; top: -34px; width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.07), transparent 68%);
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.kpi-icon.blue { color: var(--brand); background: var(--brand-soft); }
.kpi-icon.green { color: var(--green); background: var(--green-soft); }
.kpi-icon.amber { color: #d97706; background: var(--amber-soft); }
.kpi-icon.purple { color: var(--purple); background: var(--purple-soft); }
.kpi-icon.cyan { color: var(--cyan); background: var(--cyan-soft); }
.kpi-value { margin-top: 8px; font-size: 28px; line-height: 1.1; font-weight: 730; letter-spacing: -0.6px; color: var(--ink); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 4px; }
.kpi-value small { font-size: 11px; font-weight: 500; color: var(--muted-2); letter-spacing: 0; }
.kpi-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }
.kpi-foot .up { color: var(--green); font-weight: 650; display: inline-flex; align-items: center; gap: 2px; }
.kpi-foot .down { color: var(--red); font-weight: 650; }
.kpi-foot .pill { padding: 1px 6px; border-radius: 99px; background: var(--slate-soft); color: var(--muted); }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 16px; margin-bottom: 16px; }
.dash-grid.three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.chart-box { position: relative; height: 230px; padding: 4px 4px 0; }
.chart-box svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid-line { stroke: #eef2f7; stroke-width: 1; }
.chart-label { fill: #94a3b8; font-size: 9.5px; font-family: var(--font); }
.chart-dot { fill: #fff; stroke: var(--brand); stroke-width: 2; }
.chart-legend { display: flex; align-items: center; gap: 14px; padding: 0 20px 16px; font-size: 10.5px; color: var(--muted); }
.legend-key { display: inline-flex; align-items: center; gap: 5px; }
.legend-key i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.chart-summary { display: flex; align-items: baseline; gap: 7px; padding: 0 20px; margin-top: -4px; }
.chart-summary b { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }
.chart-summary span { font-size: 10.5px; color: var(--muted-2); }

.donut-body { display: flex; align-items: center; gap: 22px; padding: 6px 20px 20px; }
.donut {
  position: relative; width: 148px; height: 148px; border-radius: 50%; flex: none;
  background: conic-gradient(#22c55e 0 0); transition: background 0.4s;
}
.donut::before { content: ""; position: absolute; inset: 17px; background: #fff; border-radius: 50%; box-shadow: inset 0 0 0 1px #f1f5f9; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.donut-center b { font-size: 25px; font-weight: 720; letter-spacing: -0.5px; }
.donut-center span { font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.legend-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.legend-item i { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.legend-item .lg-name { flex: 1; }
.legend-item b { color: var(--ink-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.legend-item small { width: 30px; text-align: right; color: var(--muted-2); font-size: 10px; }

.region-list { padding: 2px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.region-row { display: grid; grid-template-columns: 66px minmax(0, 1fr) 40px; align-items: center; gap: 10px; }
.region-name { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-track { height: 8px; border-radius: 99px; background: #f1f5f9; overflow: hidden; }
.region-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #60a5fa, #2563eb); }
.region-count { font-size: 10.5px; color: var(--muted-2); text-align: right; font-variant-numeric: tabular-nums; }
.region-count b { color: var(--ink-2); }

.recent-table { width: 100%; border-collapse: collapse; }
.recent-table td { padding: 9px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.recent-table tr:last-child td { border-bottom: 0; }
.recent-table tr { cursor: pointer; }
.recent-table tr:hover td { background: #f8faff; }
.recent-table td:first-child { padding-left: 20px; }
.recent-table td:last-child { padding-right: 20px; text-align: right; }
.recent-comm { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-sub { font-size: 10px; color: var(--muted-2); margin-top: 1px; }
.recent-price { font-size: 12.5px; font-weight: 700; color: var(--red); white-space: nowrap; }
.recent-price small { font-size: 9px; font-weight: 500; color: var(--muted-2); margin-left: 2px; }
.recent-time { font-size: 10px; color: var(--muted-2); margin-top: 2px; white-space: nowrap; }

.mini-todos { padding: 2px 20px 16px; display: flex; flex-direction: column; }
.mini-todo { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.mini-todo:last-child { border-bottom: 0; }
.mini-todo:hover .mt-title { color: var(--brand); }
.mt-date { width: 42px; height: 42px; border-radius: 9px; background: #f8fafc; border: 1px solid var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; line-height: 1.15; }
.mt-date b { font-size: 14px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mt-date span { font-size: 8px; color: var(--muted-2); }
.mt-date.overdue { background: var(--red-soft); border-color: #fbd5d6; }
.mt-date.overdue b { color: #cf3438; }
.mt-date.today { background: var(--brand-soft); border-color: #dbe7ff; }
.mt-date.today b { color: var(--brand); }
.mt-body { flex: 1; min-width: 0; }
.mt-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.14s; }
.mt-sub { font-size: 10px; color: var(--muted-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-right { text-align: right; flex: none; }
.mt-right b { display: block; font-size: 11px; color: var(--ink-2); font-weight: 600; }
.mt-right span { display: block; font-size: 9px; color: var(--muted-2); margin-top: 2px; }
.todo-empty { padding: 28px 0 22px; text-align: center; color: var(--muted-2); font-size: 11.5px; }
.todo-empty .icon { margin: 0 auto 8px; color: #86efac; width: 26px; height: 26px; }

.activity-list { padding: 4px 20px 18px; }
.activity-item { position: relative; display: flex; gap: 11px; padding: 8px 0 10px; }
.activity-item:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 22px; bottom: -2px; width: 1px; background: #edf1f7; }
.activity-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px #dbe4f0; background: #cbd5e1; margin-top: 5px; flex: none; position: relative; z-index: 1; }
.activity-dot.create { background: #60a5fa; box-shadow: 0 0 0 1.5px #bfdbfe; }
.activity-dot.follow { background: #34d399; box-shadow: 0 0 0 1.5px #a7f3d0; }
.activity-dot.status { background: #a78bfa; box-shadow: 0 0 0 1.5px #ddd6fe; }
.activity-body { min-width: 0; flex: 1; }
.activity-body strong { display: block; font-size: 11.5px; font-weight: 600; }
.activity-body p { margin: 1px 0 0; font-size: 10.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-time { font-size: 9px; color: #b0bccd; flex: none; margin-top: 2px; }

/* -------------------------------------------------------------------------- */
/* 房源列表                                                                    */
/* -------------------------------------------------------------------------- */
.tabs { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border-radius: 10px; background: #e9eef6; margin-bottom: 15px; }
.tab { height: 33px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 550; display: inline-flex; align-items: center; gap: 6px; transition: 0.15s; }
.tab:hover { color: var(--ink-2); }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1); font-weight: 650; }
.tab .tab-count { font-size: 10px; color: var(--muted-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.tab.active .tab-count { color: var(--brand); }

.filter-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 13px; margin-bottom: 14px; }
.filter-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.filter-row + .filter-row { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.filter-search { width: 238px; flex: none; }
.filter-search .search-field { height: 36px; background: #fff; }
.filter-control { height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 9px; font-size: 12px; color: var(--ink-2); outline: 0; transition: 0.15s; min-width: 108px; }
.filter-control:focus { border-color: #a9c6ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09); }
.filter-control:disabled { background: #f8fafc; color: #b0bccd; cursor: not-allowed; }
select.filter-control { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.filter-more { margin-left: auto; }
.filter-more .icon { transition: transform 0.2s; }
.filter-more.open .icon { transform: rotate(180deg); }
.filter-advanced { display: none; }
.filter-advanced.open { display: flex; }
.range-group { display: flex; align-items: center; gap: 5px; height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: #fff; }
.range-group:focus-within { border-color: #a9c6ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09); }
.range-group input { width: 58px; border: 0; outline: 0; font-size: 12px; text-align: center; background: transparent; font-variant-numeric: tabular-nums; }
.range-group input::placeholder { color: #b0bccd; }
.range-group span { color: #cbd5e1; font-size: 11px; }
.range-unit { font-size: 10.5px; color: var(--muted-2); margin-left: 1px; white-space: nowrap; }
.active-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 8px; border-radius: 6px; background: #fff; border: 1px solid #dce6f5; color: var(--ink-2); font-size: 10.5px; box-shadow: var(--shadow-sm); }
.chip b { font-weight: 650; color: var(--brand); }
.chip button { display: grid; place-items: center; width: 15px; height: 15px; border: 0; padding: 0; border-radius: 4px; background: transparent; color: #9aa8bc; }
.chip button:hover { background: #eef2f7; color: var(--ink); }
.chip-clear { border: 0; background: transparent; color: var(--muted-2); font-size: 10.5px; padding: 0 4px; }
.chip-clear:hover { color: var(--brand); }

.pending-banner {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px;
  border: 1px solid #fde7bd; background: linear-gradient(90deg, #fffaf0, #fffdf8); border-radius: 10px;
  color: #92620a; font-size: 11.5px;
}
.pending-banner .pb-icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #fff0d1; color: #d97706; flex: none; }
.pending-banner strong { font-weight: 650; }
.pending-banner .btn { margin-left: auto; height: 28px; background: #fff; border-color: #f5d79c; color: #a16207; }

.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-toolbar { min-height: 54px; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.result-count { font-size: 11.5px; color: var(--muted); }
.result-count b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.result-count .sub { margin-left: 8px; color: var(--muted-2); }
.table-toolbar .spacer { flex: 1; }
.toolbar-select { height: 30px; padding: 0 26px 0 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 11px; color: var(--ink-2); background: #fff; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; outline: 0; }
.selection-bar { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--brand-soft); border: 1px solid #dbe7ff; border-radius: 8px; font-size: 11.5px; color: var(--brand-700); }
.selection-bar b { font-variant-numeric: tabular-nums; }
.table-scroll-hint { display: none; font-size: 9.5px; color: var(--muted-2); margin-left: auto; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1050px; }
.data-table thead th {
  position: sticky; top: 0; z-index: 2; padding: 10px 10px; background: #f8fafc; border-bottom: 1px solid var(--line);
  font-size: 10.5px; font-weight: 600; color: var(--muted); text-align: left; white-space: nowrap;
}
.data-table thead th:first-child { padding-left: 16px; width: 42px; }
.data-table tbody td { padding: 12px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: 12px; color: var(--ink-2); }
.data-table tbody tr { cursor: pointer; transition: background 0.12s; }
.data-table tbody tr:hover td { background: #f8faff; }
.data-table tbody tr.selected td { background: #f1f6ff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td:first-child { padding-left: 16px; }
.checkbox { appearance: none; width: 15px; height: 15px; border: 1.5px solid #cbd5e1; border-radius: 4px; background: #fff; display: inline-grid; place-items: center; cursor: pointer; margin: 0; vertical-align: middle; transition: 0.12s; }
.checkbox:hover { border-color: #93b4f8; }
.checkbox:checked { background: var(--brand); border-color: var(--brand); }
.checkbox:checked::after { content: ""; width: 7px; height: 4px; border-left: 1.8px solid #fff; border-bottom: 1.8px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.listing-cell { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.listing-main { min-width: 0; }
.listing-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.listing-name:hover { color: var(--brand); }
.listing-name .deal { font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 4px; flex: none; }
.deal.sale { color: #b45309; background: #fff7e6; }
.deal.rent { color: #0e7490; background: #ecfeff; }
.listing-sub { font-size: 10px; color: var(--muted-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 270px; }
.tag-mini { display: inline-flex; align-items: center; height: 17px; padding: 0 4px; border-radius: 3px; background: #f1f5f9; color: #64748b; font-size: 9px; font-weight: 500; margin-top: 4px; margin-right: 3px; }
.tag-mini.hot { background: #fff3e8; color: #c2410c; }
.cell-strong { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.price-cell { white-space: nowrap; }
.price-main { font-size: 14px; font-weight: 720; color: var(--red); letter-spacing: -0.2px; font-variant-numeric: tabular-nums; }
.price-main small { font-size: 9px; font-weight: 500; color: #c26a6d; margin-left: 1px; }
.price-sub { font-size: 9.5px; color: var(--muted-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.status-pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.pending { color: #b45309; background: #fff7e6; }
.status-pill.active { color: #15803d; background: #ecfdf3; }
.status-pill.reserved { color: #1d4ed8; background: #eff4ff; }
.status-pill.sold { color: #6d28d9; background: #f5f0ff; }
.status-pill.offline { color: #64748b; background: #f1f5f9; }
.person-cell { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.mini-avatar { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: #e8efff; color: #2563eb; font-size: 9px; font-weight: 650; flex: none; }
.row-actions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; opacity: 0.35; transition: opacity 0.15s; }
.data-table tr:hover .row-actions { opacity: 1; }
.row-action { width: 27px; height: 27px; border: 0; border-radius: 6px; background: transparent; color: var(--muted-2); display: grid; place-items: center; }
.row-action:hover { background: #edf3ff; color: var(--brand); }
.row-action.danger:hover { background: var(--red-soft); color: var(--red); }
.empty-state { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty-icon { width: 54px; height: 54px; border-radius: 16px; background: #f1f5fb; color: #9db1cc; display: grid; place-items: center; margin: 0 auto 13px; }
.empty-state h3 { margin: 0; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.empty-state p { margin: 5px 0 16px; font-size: 11.5px; color: var(--muted-2); }
.pagination { display: flex; align-items: center; gap: 6px; padding: 13px 16px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pagination .page-info { font-size: 10.5px; color: var(--muted-2); margin-right: auto; }
.page-btn { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 11px; color: var(--muted); display: inline-grid; place-items: center; transition: 0.14s; }
.page-btn:hover:not(:disabled) { border-color: #c7d6ec; color: var(--ink); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 650; }
.page-ellipsis { color: var(--muted-2); font-size: 11px; padding: 0 2px; }
.page-size { height: 30px; border: 1px solid var(--line); border-radius: 7px; font-size: 10.5px; padding: 0 6px; background: #fff; color: var(--muted); }

.skeleton { position: relative; overflow: hidden; background: #f1f5f9; border-radius: 5px; color: transparent !important; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skeleton-row td { padding: 17px 10px !important; }

/* -------------------------------------------------------------------------- */
/* 房源详情抽屉                                                                */
/* -------------------------------------------------------------------------- */
.drawer-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.42); backdrop-filter: blur(2px); animation: fade-in 0.18s ease; }
.drawer {
  position: fixed; z-index: 101; top: 0; right: 0; bottom: 0; width: 780px; max-width: 94vw;
  background: #fff; box-shadow: -20px 0 60px -20px rgba(15, 23, 42, 0.3);
  display: flex; flex-direction: column; animation: drawer-in 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes drawer-in { from { transform: translateX(48px); opacity: 0.5; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.drawer-head { position: relative; flex: none; padding: 24px 28px 0; border-bottom: 1px solid var(--line); background: radial-gradient(600px 220px at 100% 0%, #f0f6ff, transparent 70%), #fff; }
.drawer-close { position: absolute; top: 18px; right: 20px; }
.drawer-kicker { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted-2); }
.drawer-kicker .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.3px; color: #64748b; background: #f1f5f9; padding: 1px 6px; border-radius: 4px; }
.drawer-title-row { display: flex; align-items: center; gap: 10px; margin-top: 9px; padding-right: 48px; }
.drawer-title-row h2 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 720; letter-spacing: -0.4px; color: var(--ink); }
.drawer-address { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.drawer-price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 16px; }
.drawer-price { font-size: 34px; line-height: 1; font-weight: 750; color: var(--red); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.drawer-price span { font-size: 16px; font-weight: 600; margin-left: 2px; letter-spacing: 0; }
.drawer-price em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 10px; letter-spacing: 0; }
.drawer-tags { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 11px; padding-bottom: 15px; }
.tag { display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 5px; background: #f4f7fb; border: 1px solid #e9eef6; color: #5b6b82; font-size: 9.5px; }
.tag.blue { background: #eff5ff; border-color: #dfeaff; color: #2563eb; }
.tag.amber { background: #fff8e8; border-color: #fcebc8; color: #b45309; }
.drawer-actions { display: flex; align-items: center; gap: 7px; flex: none; padding-bottom: 3px; }
.drawer-actions .btn { height: 34px; font-size: 11.5px; }
.drawer-tabs { display: flex; gap: 24px; margin-top: 4px; }
.drawer-tab { position: relative; height: 42px; padding: 0 1px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 550; display: inline-flex; align-items: center; gap: 5px; }
.drawer-tab:hover { color: var(--ink-2); }
.drawer-tab.active { color: var(--brand); font-weight: 650; }
.drawer-tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--brand); }
.drawer-tab .cnt { font-size: 9px; background: #f1f5f9; color: var(--muted); border-radius: 99px; padding: 1px 5px; font-weight: 600; }
.drawer-tab.active .cnt { background: var(--brand-soft); color: var(--brand); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 28px 30px; scroll-behavior: smooth; }
.drawer-section { margin-bottom: 22px; }
.drawer-section:last-child { margin-bottom: 0; }
.drawer-section-title { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 12px; font-weight: 650; color: var(--ink); }
.drawer-section-title::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: linear-gradient(180deg, #60a5fa, #2563eb); }
.fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.fact { background: #fff; padding: 10px 12px; min-width: 0; }
.fact-label { font-size: 9.5px; color: var(--muted-2); }
.fact-value { margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fact-value.price { color: var(--red); }
.info-rows { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.info-row { display: flex; align-items: flex-start; gap: 14px; padding: 9px 12px; font-size: 11.5px; }
.info-row + .info-row { border-top: 1px solid var(--line-2); }
.info-row .ir-label { width: 74px; flex: none; color: var(--muted-2); font-size: 10.5px; padding-top: 1px; }
.info-row .ir-value { flex: 1; min-width: 0; color: var(--ink-2); line-height: 1.6; }
.owner-box { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: #fbfcfe; }
.owner-avatar { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(145deg, #e0edff, #cfe0ff); color: var(--brand-600); font-size: 14px; font-weight: 700; flex: none; }
.owner-main { flex: 1; min-width: 0; }
.owner-main strong { display: block; font-size: 13px; font-weight: 650; }
.owner-main span { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.phone-line { display: flex; align-items: center; gap: 5px; font-size: 12px; font-variant-numeric: tabular-nums; }
.phone-line .phone { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.4px; }
.phone-toggle { width: 24px; height: 24px; border: 0; border-radius: 5px; background: transparent; color: var(--muted-2); display: grid; place-items: center; }
.phone-toggle:hover { background: #eef2f7; color: var(--ink-2); }
.remark-box { padding: 12px 14px; border-radius: 10px; background: #fafbfd; border: 1px dashed #e3eaf4; font-size: 11.5px; line-height: 1.75; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.follow-compose { padding: 14px; border: 1px solid #dbe7ff; border-radius: 12px; background: linear-gradient(180deg, #f7faff, #fff); margin-bottom: 18px; }
.follow-types { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 9px; }
.follow-type { height: 27px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font-size: 10.5px; transition: 0.14s; }
.follow-type:hover { border-color: #c7d6ec; color: var(--ink-2); }
.follow-type.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.follow-compose textarea { width: 100%; min-height: 72px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: 12px; outline: 0; resize: vertical; background: #fff; }
.follow-compose textarea:focus { border-color: #a9c6ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08); }
.follow-compose textarea::placeholder { color: #b0bccd; }
.compose-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.compose-foot label { font-size: 10px; color: var(--muted-2); display: inline-flex; align-items: center; gap: 5px; }
.compose-foot input[type="date"] { height: 28px; border: 1px solid var(--line); border-radius: 6px; padding: 0 7px; font-size: 10.5px; color: var(--ink-2); background: #fff; outline: 0; }
.compose-foot .btn { margin-left: auto; }
.timeline { position: relative; padding-left: 1px; }
.timeline-item { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 7px; top: 22px; bottom: 0; width: 1px; background: #edf1f7; }
.timeline-dot { width: 15px; height: 15px; border-radius: 50%; border: 3px solid #fff; background: #a7c4f8; box-shadow: 0 0 0 1.5px #dbeafe; flex: none; margin-top: 3px; position: relative; z-index: 1; }
.timeline-content { flex: 1; min-width: 0; }
.timeline-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.timeline-top strong { font-size: 11.5px; font-weight: 650; }
.follow-badge { font-size: 9px; padding: 1px 5px; border-radius: 3px; background: #eef5ff; color: #2563eb; font-weight: 600; }
.timeline-time { font-size: 9.5px; color: #a8b5c7; margin-left: auto; white-space: nowrap; }
.timeline-content p { margin: 5px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.timeline-meta { margin-top: 4px; font-size: 9.5px; color: var(--muted-2); }
.next-follow { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 9.5px; color: #b45309; background: #fffbeb; border: 1px solid #fdecc8; padding: 1px 6px; border-radius: 4px; }
.log-list { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.log-item { display: flex; gap: 10px; padding: 11px 13px; font-size: 11px; background: #fff; }
.log-item + .log-item { border-top: 1px solid var(--line-2); }
.log-dot { width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; margin-top: 6px; flex: none; }
.log-main { flex: 1; min-width: 0; }
.log-main strong { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.log-main p { margin: 2px 0 0; color: var(--muted); font-size: 10.5px; }
.log-time { font-size: 9.5px; color: #b0bccd; white-space: nowrap; }
.drawer-empty { padding: 40px 0; text-align: center; color: var(--muted-2); font-size: 11.5px; }

/* -------------------------------------------------------------------------- */
/* 弹窗 / 表单                                                                 */
/* -------------------------------------------------------------------------- */
.modal-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade-in 0.16s ease; }
.modal {
  width: 100%; max-width: 900px; max-height: min(92vh, 940px); background: #fff; border-radius: 16px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  animation: modal-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal.sm { max-width: 520px; }
.modal.md { max-width: 640px; }
.modal.lg { max-width: 940px; }
@keyframes modal-in { from { transform: translateY(12px) scale(0.985); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { flex: none; display: flex; align-items: flex-start; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.modal-title { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.2px; }
.modal-sub { margin: 3px 0 0; font-size: 11px; color: var(--muted-2); }
.modal-close { margin-left: auto; flex: none; }
.modal-body { flex: 1; overflow-y: auto; padding: 20px 24px 24px; }
.modal-foot { flex: none; display: flex; align-items: center; gap: 9px; justify-content: flex-end; padding: 13px 24px; border-top: 1px solid var(--line); background: #fbfcfe; }
.modal-foot .foot-left { margin-right: auto; display: flex; align-items: center; gap: 7px; }
.form-section { margin-bottom: 22px; }
.form-section:last-child { margin-bottom: 4px; }
.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.section-no { width: 20px; height: 20px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.section-head h3 { margin: 0; font-size: 12.5px; font-weight: 650; color: var(--ink); }
.section-head span { font-size: 10px; color: var(--muted-2); }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px 14px; }
.field { min-width: 0; }
.field.span2 { grid-column: span 2; }
.field.span3 { grid-column: span 3; }
.field.span4 { grid-column: span 4; }
.field label, .field .label-text { display: flex; align-items: center; gap: 3px; font-size: 10.5px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.req { color: var(--red); font-size: 10px; }
.field input, .field select, .field textarea {
  width: 100%; height: 36px; border: 1px solid #dfe6f0; border-radius: 8px; padding: 0 10px;
  font-size: 12px; color: var(--ink); background: #fff; outline: 0; transition: 0.15s;
}
.field textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; line-height: 1.65; }
.field input::placeholder, .field textarea::placeholder { color: #b3bfd0; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #9dbffb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09); }
.field select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #f0a5a7; background: #fffafa; }
.field-error { display: none; margin-top: 4px; font-size: 9.5px; color: #cf3438; }
.field.has-error .field-error { display: block; }
.field-hint { margin-top: 4px; font-size: 9.5px; color: var(--muted-2); }
.inline-fields { display: flex; align-items: center; gap: 5px; }
.inline-fields select { width: auto; min-width: 58px; padding: 0 24px 0 8px; }
.inline-fields span { color: var(--muted-2); font-size: 10px; white-space: nowrap; }
.unit-wrap { position: relative; }
.unit-wrap input { padding-right: 40px; }
.unit-wrap .unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--muted-2); pointer-events: none; }
.unit-price-hint { display: flex; align-items: center; height: 36px; padding: 0 10px; border-radius: 8px; background: #f8fafc; border: 1px dashed #e2e8f0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.unit-price-hint b { color: var(--ink-2); margin-left: 3px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 8px; background: #eef2f8; gap: 2px; }
.seg-btn { height: 29px; padding: 0 16px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 550; transition: 0.14s; }
.seg-btn.active { background: #fff; color: var(--brand); font-weight: 650; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1); }
.deal-seg { height: 36px; display: flex; align-items: center; }
.deal-seg .seg-btn { height: 30px; }
.tag-checks { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.tag-check { position: relative; display: inline-flex; align-items: center; height: 27px; padding: 0 10px; border: 1px solid #dfe6f0; border-radius: 6px; background: #fff; font-size: 10.5px; color: var(--muted); cursor: pointer; transition: 0.14s; user-select: none; }
.tag-check input { position: absolute; opacity: 0; pointer-events: none; }
.tag-check:hover { border-color: #c2d5f3; color: var(--ink-2); }
.tag-check.checked { border-color: #b6cffb; background: var(--brand-soft); color: var(--brand-600); font-weight: 600; }
.switch-field { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 10px; border: 1px solid #dfe6f0; border-radius: 8px; background: #fff; }
.switch-field span { font-size: 11px; color: var(--muted); }
.switch { position: relative; width: 34px; height: 19px; border-radius: 99px; background: #d6deea; border: 0; padding: 0; transition: 0.18s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25); transition: 0.18s; }
.switch.on { background: var(--brand); }
.switch.on::after { left: 17px; }
.form-alert { display: flex; align-items: flex-start; gap: 8px; padding: 9px 11px; border-radius: 8px; background: #fffaf0; border: 1px solid #fdecc8; color: #92620a; font-size: 10.5px; line-height: 1.55; margin-bottom: 14px; }
.form-alert .icon { margin-top: 1px; color: #d97706; }

/* -------------------------------------------------------------------------- */
/* 跟进待办 / 小区字典                                                          */
/* -------------------------------------------------------------------------- */
.todo-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.todo-stat { display: flex; align-items: center; gap: 13px; padding: 15px 17px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.todo-stat .ts-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.todo-stat .ts-icon.blue { background: var(--brand-soft); color: var(--brand); }
.todo-stat .ts-icon.red { background: var(--red-soft); color: var(--red); }
.todo-stat .ts-icon.slate { background: #f1f5f9; color: #64748b; }
.todo-stat .ts-body { min-width: 0; }
.todo-stat b { display: block; font-size: 23px; font-weight: 720; line-height: 1.15; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.todo-stat span { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 1px; }
.todo-list-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.todo-list { display: flex; flex-direction: column; }
.todo-row { display: flex; align-items: center; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background 0.14s; }
.todo-row:last-child { border-bottom: 0; }
.todo-row:hover { background: #f8faff; }
.todo-date-block { width: 48px; flex: none; text-align: center; border-right: 1px solid var(--line-2); padding-right: 13px; }
.todo-date-block b { display: block; font-size: 15px; font-weight: 720; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.todo-date-block span { display: block; font-size: 8.5px; color: var(--muted-2); margin-top: 1px; }
.todo-date-block.overdue b { color: var(--red); }
.todo-date-block.overdue span { color: #d97706; }
.todo-main { flex: 1; min-width: 0; }
.todo-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; color: var(--ink); }
.todo-title .status-pill { height: 18px; font-size: 9px; }
.todo-sub { font-size: 10.5px; color: var(--muted-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-last { max-width: 320px; font-size: 11px; color: var(--muted); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-last span { color: #b0bccd; margin-right: 4px; }
.todo-side { text-align: right; flex: none; display: flex; align-items: center; gap: 14px; }
.todo-side .price { font-size: 12.5px; font-weight: 700; color: var(--red); white-space: nowrap; }
.todo-side .price small { font-size: 9px; font-weight: 500; color: var(--muted-2); margin-left: 1px; }
.todo-side .owner { font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.todo-actions { display: flex; gap: 5px; }

.community-intro { display: flex; align-items: center; gap: 22px; padding: 18px 20px; background: linear-gradient(115deg, #0f1c35, #16294a 58%, #123057); border-radius: var(--radius); color: #fff; margin-bottom: 16px; overflow: hidden; position: relative; box-shadow: 0 14px 32px -18px rgba(15, 23, 42, 0.55); }
.community-intro::after { content: ""; position: absolute; right: -40px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(59, 130, 246, 0.4), transparent 65%); }
.community-intro .ci-icon { width: 48px; height: 48px; border-radius: 13px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.13); display: grid; place-items: center; color: #93c5fd; flex: none; }
.community-intro .ci-text { flex: 1; min-width: 0; z-index: 1; }
.community-intro h2 { margin: 0; font-size: 16px; font-weight: 650; }
.community-intro p { margin: 3px 0 0; font-size: 10.5px; color: #93a6c0; }
.ci-stats { display: flex; gap: 32px; z-index: 1; flex: none; }
.ci-stat b { display: block; font-size: 21px; font-weight: 720; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; }
.ci-stat span { display: block; font-size: 9.5px; color: #8fa3bf; margin-top: 1px; }
.community-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.community-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); cursor: pointer; transition: 0.17s ease; position: relative; overflow: hidden; }
.community-card:hover { transform: translateY(-2px); border-color: #c9d9f3; box-shadow: 0 16px 30px -18px rgba(37, 99, 235, 0.35); }
.community-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #60a5fa, #2563eb); opacity: 0; transition: opacity 0.17s; }
.community-card:hover::before { opacity: 1; }
.community-top { display: flex; align-items: flex-start; gap: 10px; }
.community-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(145deg, #eef5ff, #e1ecff); color: #3b6fd4; flex: none; }
.community-meta { min-width: 0; flex: 1; }
.community-meta h3 { margin: 0; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.community-meta p { margin: 2px 0 0; font-size: 9.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.community-badge { font-size: 9px; color: #15803d; background: #ecfdf3; border-radius: 4px; padding: 1px 5px; flex: none; }
.community-stats { display: flex; gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.community-stat b { display: block; font-size: 15px; font-weight: 700; color: var(--ink-2); letter-spacing: -0.3px; font-variant-numeric: tabular-nums; }
.community-stat b small { font-size: 9px; font-weight: 500; color: var(--muted-2); margin-left: 1px; }
.community-stat span { display: block; font-size: 8.5px; color: var(--muted-2); margin-top: 1px; }
.community-stat.price b { color: var(--red); }
.community-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; font-size: 9.5px; color: var(--muted-2); }
.community-foot .go { color: var(--brand); display: inline-flex; align-items: center; gap: 2px; opacity: 0; transform: translateX(-3px); transition: 0.16s; }
.community-card:hover .community-foot .go { opacity: 1; transform: none; }

/* -------------------------------------------------------------------------- */
/* 提示 / 确认 / 备份                                                          */
/* -------------------------------------------------------------------------- */
.toast-root { position: fixed; z-index: 300; top: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 8px; min-width: 220px; max-width: 460px; padding: 10px 14px;
  border-radius: 10px; background: #0f1c32; color: #e2e8f0; font-size: 12px; box-shadow: 0 12px 32px -10px rgba(15, 23, 42, 0.5);
  animation: toast-in 0.22s cubic-bezier(0.22, 1, 0.36, 1); pointer-events: auto;
}
.toast .t-icon { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.toast.success .t-icon { background: rgba(34, 197, 94, 0.18); color: #4ade80; }
.toast.error .t-icon { background: rgba(239, 68, 68, 0.18); color: #f87171; }
.toast.info .t-icon { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.toast .t-action { margin-left: 8px; color: #93c5fd; font-size: 11px; font-weight: 600; background: none; border: 0; padding: 2px 0; white-space: nowrap; }
.toast.out { animation: toast-out 0.18s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px); } }
.confirm-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 20px; animation: fade-in 0.14s ease; }
.confirm-box { width: 100%; max-width: 390px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 22px 22px 18px; animation: modal-in 0.18s ease; }
.confirm-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--amber-soft); color: #d97706; margin-bottom: 12px; }
.confirm-icon.danger { background: var(--red-soft); color: var(--red); }
.confirm-box h3 { margin: 0; font-size: 15px; font-weight: 650; }
.confirm-box p { margin: 6px 0 18px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.backup-item { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.backup-item:last-child { border-bottom: 0; }
.backup-item .bi-icon { width: 38px; height: 38px; border-radius: 10px; background: #f1f5fb; color: #4b6b9a; display: grid; place-items: center; flex: none; }
.backup-item .bi-main { flex: 1; min-width: 0; }
.backup-item strong { display: block; font-size: 12px; font-weight: 600; }
.backup-item p { margin: 1px 0 0; font-size: 10px; color: var(--muted-2); line-height: 1.55; }
.backup-meta { display: flex; gap: 18px; padding: 12px 14px; background: #f8fafc; border-radius: 9px; margin-bottom: 6px; }
.backup-meta div { font-size: 10.5px; color: var(--muted-2); }
.backup-meta b { display: block; font-size: 13px; color: var(--ink-2); font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------------------- */
/* 下拉菜单                                                                    */
/* -------------------------------------------------------------------------- */
.menu {
  position: absolute; z-index: 110; min-width: 160px; padding: 5px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); animation: pop-in 0.14s ease;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-item { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 11.5px; text-align: left; }
.menu-item:hover { background: #f5f8fd; }
.menu-item.danger { color: #cf3438; }
.menu-item.danger:hover { background: var(--red-soft); }
.menu-item .icon { color: var(--muted-2); }
.menu-item.danger .icon { color: #e06a6d; }
.menu-divider { height: 1px; background: var(--line-2); margin: 4px 2px; }
.menu-label { padding: 6px 9px 3px; font-size: 9px; color: var(--muted-2); letter-spacing: 0.6px; }

/* -------------------------------------------------------------------------- */
/* 响应式                                                                      */
/* -------------------------------------------------------------------------- */
@media (max-width: 1320px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .community-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar-search { width: 280px; }
}
@media (max-width: 1180px) {
  :root { --sidebar-w: 76px; }
  .brand-text, .store-meta, .store-switch .chev, .nav-label, .nav-badge, .sidebar-goal, .user-meta, .sidebar-user .icon-btn { display: none; }
  .sidebar-brand { justify-content: center; padding: 0; }
  .store-switch { justify-content: center; padding: 8px; margin: 12px 10px 4px; }
  .nav-scroll { padding: 8px 9px; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item.active::before { left: -9px; }
  .nav-group-label { text-align: center; padding: 14px 0 4px; font-size: 8px; letter-spacing: 1px; }
  .sidebar-user { justify-content: center; padding: 12px 0; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-grid.three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .topbar { padding: 0 20px; }
  .view { padding: 22px 20px 40px; }
  .fact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 0px; }
  .sidebar { width: 240px; transform: translateX(-100%); transition: transform 0.24s ease; }
  body.sidebar-open .sidebar { transform: none; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(15, 23, 42, 0.45); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
  body.sidebar-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .brand-text, .store-meta, .store-switch .chev, .nav-label, .nav-badge, .sidebar-goal, .user-meta { display: flex; }
  .sidebar-goal { display: block; }
  .sidebar-brand { justify-content: flex-start; padding: 0 20px; }
  .store-switch { justify-content: flex-start; padding: 10px 12px; margin: 14px 14px 6px; }
  .nav-scroll { padding: 10px 12px 8px; }
  .nav-item { justify-content: flex-start; padding: 0 12px; }
  .nav-item.active::before { left: -12px; }
  .nav-group-label { text-align: left; padding: 16px 12px 6px; font-size: 10px; }
  .sidebar-user { justify-content: flex-start; padding: 13px 16px 15px; }
  .sidebar-user .icon-btn { display: grid; }
  .topbar-search { display: none; }
  .icon-btn.mobile-menu { display: inline-grid; }
  .topbar-actions > .btn-primary { display: none; }
  .table-scroll-hint { display: inline; }
  .topbar { gap: 10px; padding: 0 14px; }
  .topbar-user .user-name, .topbar-user .user-role { display: none; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .todo-stats { grid-template-columns: 1fr; gap: 9px; }
  .drawer { width: 100%; max-width: 100%; }
  .drawer-head { padding: 20px 18px 0; }
  .drawer-body { padding: 18px; }
  .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-value { white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field.span3, .field.span4 { grid-column: span 2; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { max-height: 94vh; border-radius: 16px 16px 0 0; }
  .modal-body { padding: 16px 16px 20px; }
  .modal-head, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .filter-search { width: 100%; }
  .filter-control { flex: 1; min-width: 90px; }
  .filter-more { margin-left: 0; }
  .community-intro { flex-wrap: wrap; gap: 14px; }
  .ci-stats { width: 100%; justify-content: space-between; gap: 12px; }
  .view { padding: 18px 14px 36px; }
  .topbar { height: 60px; }
  .crumb .sep, .crumb span:first-child { display: none; }
}
@media (max-width: 620px) {
  .kpi-grid { gap: 9px; }
  .kpi-card { padding: 13px; }
  .kpi-card:last-child { grid-column: span 2; }
  .kpi-value { font-size: 23px; }
  .kpi-icon { width: 30px; height: 30px; }
  .kpi-foot { white-space: normal; line-height: 1.55; flex-wrap: wrap; }
  .chart-box { height: 190px; overflow-x: auto; overflow-y: hidden; }
  .chart-box svg { min-width: 540px; }
  .dash-grid.three { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .donut-body { flex-direction: column; align-items: flex-start; gap: 14px; }
  .donut { width: 130px; height: 130px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.span2, .field.span3, .field.span4 { grid-column: span 1; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1; }
  .todo-row { flex-wrap: wrap; }
  .todo-side { width: 100%; justify-content: space-between; padding-left: 62px; }
  .todo-last { max-width: 100%; }
  .drawer-price-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .drawer-actions { padding-bottom: 0; }
  .page-title h1 { font-size: 21px; }
  .danger-mobile { display: none; }
}
