/* 小王总 CRM · 墨绿金（默认主题）
 *
 * 只在本主题生效：theme-fumao.css 会一直挂在页面里，不能再写裸 :root，
 * 否则它会盖掉后加载的深蓝 / 暖白变量。
 *
 * 全部通过 CSS 变量和现有类名覆盖，列表、详情、弹窗、手机端共用同一套。
 */

html[data-ui-theme="fumao"] {
  --primary: #0e2a2f;
  --primary-strong: #092024;
  --primary-weak: #eef4f3;
  --primary-line: #bfd2ce;

  --ink: #1f2b2b;
  --ink-2: #3c4a49;
  --ink-3: #647270;
  --ink-4: #93a19f;
  --ink-5: #c8d2d0;

  --bg: #f7f5f0;
  --card: #fffdf8;
  --line: #e6ded1;
  --line-2: #f1eadf;
  --hover: #faf6ee;

  --side-bg: #0b2429;
  --side-bg-2: #123e46;
  --side-ink: #a8c0c2;
  --side-line: #1c444b;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(24, 39, 37, .05);
  --shadow: 0 1px 3px rgba(24, 39, 37, .06), 0 12px 32px rgba(24, 39, 37, .08);
  --shadow-lg: 0 18px 48px rgba(24, 39, 37, .18);
}

/* 品牌与导航 */
html[data-ui-theme="fumao"] .brand-text b,
html[data-ui-theme="fumao"] .gate-card h1,
html[data-ui-theme="fumao"] .card-head h2,
html[data-ui-theme="fumao"] .page-head h1 {
  font-family: var(--font-display);
  letter-spacing: .025em;
}

html[data-ui-theme="fumao"] .brand-mark {
  background: linear-gradient(145deg, #e1c47b, #b39349);
  color: #0b2429;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(200, 169, 95, .28);
}

html[data-ui-theme="fumao"] .sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(200,169,95,.17), transparent 34%),
    linear-gradient(170deg, #0b2429, #0f3037 58%, #123e46);
}

html[data-ui-theme="fumao"] .nav a.active,
html[data-ui-theme="fumao"] .nav > a.on {
  background: linear-gradient(90deg, rgba(200, 169, 95, .24), rgba(200, 169, 95, .07));
  border-color: rgba(225, 196, 123, .28);
  color: #f2e9d6;
  box-shadow: inset 3px 0 0 #c8a95f, 0 8px 22px rgba(0,0,0,.13);
}

/* 页头、列表、卡片 */
html[data-ui-theme="fumao"] .page-head {
  background:
    radial-gradient(1100px 240px at 12% -30%, rgba(200, 169, 95, .22), transparent 62%),
    linear-gradient(118deg, #0b2429 0%, #10343a 54%, #17484b 100%);
  background-color: #0b2429;
  color: #fff;
  box-shadow: var(--shadow);
}

html[data-ui-theme="fumao"] .page-head::before {
  background: radial-gradient(circle, rgba(225, 196, 123, .22), transparent 68%);
}

html[data-ui-theme="fumao"] .page-head h1 {
  color: #fffaf0;
}

/* 房源库标题里的“共 N 套房源”也落在深墨绿页头上。
   基础样式用的是深色 ink/primary，在页头里几乎看不见，这里统一提亮成米白 + 金色数字。 */
html[data-ui-theme="fumao"] .house-count {
  color: rgba(255, 250, 240, .78);
}

html[data-ui-theme="fumao"] .house-count b {
  color: #e1c47b;
}

html[data-ui-theme="fumao"] .page-head .ph-sub,
html[data-ui-theme="fumao"] .page-head .ph-right,
html[data-ui-theme="fumao"] .page-head .ph-right .ph-sub {
  color: rgba(232, 240, 236, .82);
}

html[data-ui-theme="fumao"] .page-head .ph-sub b {
  color: #e1c47b;
}

html[data-ui-theme="fumao"] .topbar {
  background: rgba(255, 253, 248, .97);
  border-bottom-color: #ece4d7;
}

html[data-ui-theme="fumao"] .topbar-title b {
  color: var(--primary);
}

html[data-ui-theme="fumao"] .card,
html[data-ui-theme="fumao"] .panel,
html[data-ui-theme="fumao"] .stat {
  background: #fffdf8;
  border-color: #e8e0d3;
}

html[data-ui-theme="fumao"] .card-head,
html[data-ui-theme="fumao"] .modal-head {
  background: linear-gradient(180deg, #fffdf9, #faf6ef);
  border-bottom-color: #f1ebe1;
}

html[data-ui-theme="fumao"] .stat {
  background: linear-gradient(180deg, #fffdf9 0%, #fbf7ef 100%);
}

html[data-ui-theme="fumao"] .stat::before {
  background: #f5efe0;
  box-shadow: inset 0 0 0 1px rgba(200, 169, 95, .16);
}

html[data-ui-theme="fumao"] .stat:hover {
  border-color: #d8c9a7;
}

html[data-ui-theme="fumao"] .tbl thead th,
html[data-ui-theme="fumao"] .tbl th {
  background: #f7f2e8;
  color: #6f6250;
  border-bottom-color: #ece3d4;
}

html[data-ui-theme="fumao"] .tbl tbody tr:nth-child(even) {
  background: #fcfaf5;
}

html[data-ui-theme="fumao"] .tbl tbody tr:hover,
html[data-ui-theme="fumao"] .kv-table tr.clickable:hover td {
  background: #fbf7ee;
}

/* 操作控件 */
html[data-ui-theme="fumao"] .btn.primary {
  background: #0e2a2f;
  border-color: #0e2a2f;
  color: #fff;
}

html[data-ui-theme="fumao"] .btn.primary:hover {
  background: #092024;
  border-color: #092024;
}

html[data-ui-theme="fumao"] .page-head .btn {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(225, 196, 123, .32);
  color: #fffaf0;
}

html[data-ui-theme="fumao"] .page-head .btn:hover {
  background: rgba(255, 255, 255, .2);
}

html[data-ui-theme="fumao"] .page-head .btn.primary {
  background: #e1c47b;
  border-color: #e1c47b;
  color: #0b2429;
}

html[data-ui-theme="fumao"] .seg-tab.on {
  background: #0e2a2f;
  border-color: #0e2a2f;
  color: #fff;
}

html[data-ui-theme="fumao"] .input {
  background: #fffdf9;
  border-color: #e2d9cb;
  color: #1f2b2b;
}

html[data-ui-theme="fumao"] .input::placeholder {
  color: #a49d91;
}

html[data-ui-theme="fumao"] .input:focus,
html[data-ui-theme="fumao"] textarea.input:focus {
  border-color: #8eb1a9;
  box-shadow: 0 0 0 4px rgba(14, 42, 47, .09);
}

/* 弹窗与详情 */
html[data-ui-theme="fumao"] .modal {
  background: #fffdf8;
  border-color: #e4d8c5;
}

html[data-ui-theme="fumao"] .modal-body,
html[data-ui-theme="fumao"] .detail-page {
  background: var(--detail-shell);
}

html[data-ui-theme="fumao"] .detail-head .name,
html[data-ui-theme="fumao"] .section-title {
  color: #4f4537;
}

html[data-ui-theme="fumao"] .chip {
  background: #faf3e0;
  border-color: #e6d9bd;
}

html[data-ui-theme="fumao"] .callout {
  background: #faf6ee;
  border-color: #e6ded1;
}

/* 登录门槛固定墨绿金 */
html[data-ui-theme="fumao"] .gate:not(.gate-login-v2) {
  background:
    radial-gradient(820px 420px at 50% -18%, rgba(200, 169, 95, .18), transparent 64%),
    #0b2429;
}

html[data-ui-theme="fumao"] .gate-card:not(.gate-login-card) {
  background: #fffdf8;
  border: 1px solid #e6ded1;
  border-radius: 16px;
  padding: 44px 40px 36px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

html[data-ui-theme="fumao"] .gate-card:not(.gate-login-card) h1 {
  color: #0e2a2f;
  text-align: center;
}

html[data-ui-theme="fumao"] .gate-card:not(.gate-login-card) .sub {
  color: #8b8271;
  text-align: center;
}

html[data-ui-theme="fumao"] .gate-card .btn {
  background: #0e2a2f;
  border-color: #0e2a2f;
  color: #fff;
}

html[data-ui-theme="fumao"] .theme-switch {
  border-color: #ded2bd;
  background: #fffdf8;
}

html[data-ui-theme="fumao"] .theme-switch button:hover {
  background: #faf6ef;
  color: var(--ink);
}

html[data-ui-theme="fumao"] .theme-switch button.active {
  background: #0e2a2f;
  color: #fffaf0;
  box-shadow: 0 2px 8px rgba(14, 42, 47, .22);
}

html[data-ui-gate="1"] .theme-switch {
  display: none !important;
}

@media (max-width: 860px) {
  html[data-ui-theme="fumao"] .page-head {
    border-radius: 10px;
  }

  html[data-ui-theme="fumao"] .gate-card:not(.gate-login-card) {
    padding: 36px 24px 30px;
  }
}
