/* 小王总 CRM · 暖白商务
 *
 * 三套主题样式始终挂在页面上，本文件只在 data-ui-theme="warm" 时生效。
 * 这样切换器不需要临时启用样式表，也不会出现“主题名变了、颜色没跟上”。
 */

html[data-ui-theme="warm"] {
  --primary: #1f7a5a;
  --primary-strong: #19624a;
  --primary-weak: #eef6f2;
  --primary-line: #bfe0d2;

  --ink: #2b2a26;
  --ink-2: #4a4840;
  --ink-3: #7a766b;
  --ink-4: #a29d92;
  --ink-5: #cfc9be;

  --bg: #f7f3ec;
  --card: #fffdf9;
  --line: #e8e0d3;
  --line-2: #f1ebe1;
  --hover: #faf6ef;

  --side-bg: #2e2b25;
  --side-bg-2: #3a362e;
  --side-ink: #b3ada0;
  --side-line: #454037;

  --shadow-sm: 0 1px 2px rgba(72, 60, 38, .04);
  --shadow: 0 1px 3px rgba(72, 60, 38, .06), 0 12px 32px rgba(72, 60, 38, .07);
  --shadow-lg: 0 18px 48px rgba(72, 60, 38, .18);
}

html[data-ui-theme="warm"] .page-head h1,
html[data-ui-theme="warm"] .card-head h2 {
  font-family: var(--font-display);
  letter-spacing: .025em;
}

html[data-ui-theme="warm"] .topbar {
  background: #fffdf9;
  border-bottom-color: #ece4d7;
}

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

html[data-ui-theme="warm"] .sidebar {
  background:
    radial-gradient(circle at 18% 0%, rgba(31,122,90,.18), transparent 34%),
    linear-gradient(180deg, var(--side-bg) 0%, #38342c 100%);
}

html[data-ui-theme="warm"] .brand-mark {
  background: linear-gradient(135deg, #2f8c69, #1f7a5a);
}

html[data-ui-theme="warm"] .nav a.active,
html[data-ui-theme="warm"] .nav > a.on {
  background: linear-gradient(90deg, rgba(31, 122, 90, .25), rgba(31, 122, 90, .07));
  border-color: rgba(76, 157, 126, .30);
  box-shadow: inset 3px 0 0 var(--primary), 0 8px 22px rgba(0,0,0,.12);
}

html[data-ui-theme="warm"] .card,
html[data-ui-theme="warm"] .panel {
  border-color: #ece4d7;
  background: #fffdf9;
}

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

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

html[data-ui-theme="warm"] .stat::before {
  background: #f2f7f4;
  box-shadow: inset 0 0 0 1px rgba(31, 122, 90, .12);
}

html[data-ui-theme="warm"] .stat:hover {
  border-color: var(--primary-line);
}

html[data-ui-theme="warm"] table.tbl thead th,
html[data-ui-theme="warm"] .tbl th {
  background: #f8f4ec;
  color: #4a4840;
}

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

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

html[data-ui-theme="warm"] .kv-table td {
  border-bottom-color: #f1ebe1;
  color: #4a4840;
}

html[data-ui-theme="warm"] .kv-table td.k {
  color: #7a766b;
}

html[data-ui-theme="warm"] .kv-table td.v {
  color: #2b2a26;
}

html[data-ui-theme="warm"] .kv-table td.v small {
  color: #a29d92;
}

html[data-ui-theme="warm"] .delta.up {
  background: #e8f3ec;
  color: #2d7a5a;
}

html[data-ui-theme="warm"] .delta.down {
  background: #f9e9e4;
  color: #b84a3a;
}

html[data-ui-theme="warm"] .delta.flat {
  background: #f1ebe1;
  color: #8b857a;
}

html[data-ui-theme="warm"] .input {
  background: #fffdf9;
  border-color: #e2d9cb;
  color: #2b2a26;
  box-shadow: 0 1px 2px rgba(72, 60, 38, .02);
}

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

html[data-ui-theme="warm"] .input:focus,
html[data-ui-theme="warm"] textarea.input:focus {
  border-color: #8fc9b1;
  box-shadow: 0 0 0 4px rgba(31, 122, 90, .10);
}

html[data-ui-theme="warm"] .flabel {
  color: #7a766b;
}

html[data-ui-theme="warm"] .btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

html[data-ui-theme="warm"] .seg-tab.on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

html[data-ui-theme="warm"] .modal {
  background: #fffdf9;
  border-color: #e2d7c6;
}

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

html[data-ui-theme="warm"] .chip {
  background: #f8f1e6;
  border-color: #e3d7c5;
}

html[data-ui-theme="warm"] .callout {
  background: #faf6ef;
  border-color: #e8e0d3;
}

html[data-ui-theme="warm"] .theme-switch {
  border-color: #e2d9cb;
  background: #fffdf9;
}

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

html[data-ui-theme="warm"] .theme-switch button.active {
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(72, 60, 38, .16);
}
