/* ==========================================================================
   kf-next 前端公共样式（工作台 / 后台）
   不引第三方 UI 框架，保持零构建、零依赖，便于部署与二次开发
   ========================================================================== */

:root {
  --c-primary: #6366f1;
  --c-primary-hover: #818cf8;
  --c-primary-soft: #eef2ff;
  --c-success: #52c41a;
  --c-warning: #faad14;
  --c-danger: #f5222d;
  --c-text: #1f2329;
  --c-text-2: #5a6270;
  --c-text-3: #8c8c8c;
  --c-border: #e3e5e8;
  --c-border-soft: #eef0f2;
  --c-bg: #f5f6f8;
  --c-bg-card: #ffffff;
  --c-bg-hover: #f2f4f7;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, .12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  /* ---------------------------------------------------------------- 升级：大厂质感
     在尽量不动旧类的前提下，新增一套现代设计语言：统一阴影、品牌渐变、
     扁平卡片与渐变卡片两种风格。旧的工具类全部保留，新页面/页面头直接复用。 */
  --c-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --c-grad-soft: linear-gradient(135deg, #eef2ff 0%, #f5f0ff 100%);
  --c-grad-2: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
  --c-grad-violet: linear-gradient(135deg, #7c5cff 0%, #a47bff 100%);
  --c-grad-green: linear-gradient(135deg, #19c37d 0%, #4fd99b 100%);
  --c-grad-orange: linear-gradient(135deg, #ff9a3c 0%, #ffb86b 100%);
  --c-grad-rose: linear-gradient(135deg, #ff5c8a 0%, #ff8fb0 100%);
  --c-grad-cyan: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
  --c-grad-amber: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --c-grad-indigo: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  --c-surface: #ffffff;
  --c-surface-2: #f7f9fc;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-md: 0 2px 8px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-grad: 0 8px 24px rgba(99, 102, 241, .32);
  --radius-xl: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ 布局 */
.kf-app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

.kf-topbar {
  flex: 0 0 auto; height: 52px; background: var(--c-bg-card);
  border-bottom: 1px solid var(--c-border); display: flex; align-items: center;
  padding: 0 18px; gap: 14px; box-shadow: var(--shadow); z-index: 10;
}
.kf-topbar .logo { font-weight: 700; font-size: 16px; color: var(--c-primary); }
.kf-topbar .spacer { flex: 1; }
/* 顶栏左侧不再写「客服后台」四个字（商户名已经说明了一切），
   logo 右移到原来那行文字的位置上，直接领起商户名胶囊 */
.kf-topbar .kf-brand { margin-left: 42px; }
/* 顶栏里的商户名做成浅色胶囊：它和品牌名是两类信息，
   平铺在「客服后台」后面会被读成一整串「客服后台演示商户」。
   没有商户名时整块隐藏，不留空胶囊。 */
#tenantInfo:empty { display: none; }
#tenantInfo:not(:empty) {
  font-size: 12px; color: var(--c-text-2); background: var(--c-surface-2);
  border: 1px solid var(--c-border-soft); border-radius: 999px; padding: 3px 10px;
}
.kf-topbar .who { font-size: 13px; color: var(--c-text-2); }

.kf-main { flex: 1; display: flex; min-height: 0; }

.kf-side {
  width: 320px; flex: 0 0 auto; background: var(--c-bg-card);
  border-right: 1px solid var(--c-border); display: flex; flex-direction: column; min-height: 0;
}
.kf-side-head { padding: 12px; border-bottom: 1px solid var(--c-border-soft); }
.kf-side-body { flex: 1; overflow-y: auto; min-height: 0; }

.kf-content { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* ------------------------------------------------------------------ 组件 */
.kf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--c-border); background: #fff; color: var(--c-text);
  border-radius: var(--radius); padding: 6px 14px; cursor: pointer; font: inherit;
  font-size: 13px; transition: all .15s; white-space: nowrap;
}
.kf-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.kf-btn.primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.kf-btn.primary:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); color: #fff; }
.kf-btn.danger { color: var(--c-danger); border-color: #ffccc7; }
.kf-btn.danger:hover { background: #fff1f0; border-color: var(--c-danger); }
.kf-btn.sm { padding: 3px 10px; font-size: 12px; }
.kf-btn:disabled { opacity: .5; cursor: not-allowed; }

.kf-input, .kf-select, .kf-textarea {
  width: 100%; border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 6px 10px; font: inherit; font-size: 13px; outline: none; background: #fff;
  color: var(--c-text); transition: border-color .15s;
}
.kf-input:focus, .kf-select:focus, .kf-textarea:focus { border-color: var(--c-primary); }
.kf-textarea { resize: vertical; min-height: 72px; }

.kf-field { margin-bottom: 12px; }
.kf-field label { display: block; font-size: 12px; color: var(--c-text-2); margin-bottom: 4px; }
.kf-field .hint { font-size: 11px; color: var(--c-text-3); margin-top: 3px; }

.kf-card {
  background: var(--c-bg-card); border: 1px solid var(--c-border);
  border-radius: var(--radius-xl); padding: 18px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.kf-card:hover { box-shadow: var(--shadow-md); }
.kf-card > h3 { font-size: 15px; margin-bottom: 12px; font-weight: 600; }

.kf-tag {
  display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px;
  background: var(--c-border-soft); color: var(--c-text-2);
}
.kf-tag.blue { background: var(--c-primary-soft); color: var(--c-primary); }
.kf-tag.green { background: #f6ffed; color: #389e0d; }
.kf-tag.orange { background: #fff7e6; color: #d46b08; }
.kf-tag.red { background: #fff1f0; color: #cf1322; }
.kf-tag.gray { background: #fafafa; color: var(--c-text-3); }

/* ------------------------------------------------------------------ 会话列表 */
.kf-conv {
  padding: 11px 14px; border-bottom: 1px solid var(--c-border-soft);
  cursor: pointer; transition: background .12s;
}
.kf-conv:hover { background: var(--c-bg-hover); }
.kf-conv.active { background: var(--c-primary-soft); border-left: 3px solid var(--c-primary); padding-left: 11px; }
.kf-conv-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.kf-conv-name { font-weight: 600; font-size: 13px; flex: 1; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.kf-conv-time { font-size: 11px; color: var(--c-text-3); flex: 0 0 auto; }
.kf-conv-last { font-size: 12px; color: var(--c-text-2); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; margin-bottom: 5px; }
.kf-conv-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kf-conv-geo { font-size: 11px; color: var(--c-text-3); }
.kf-unread {
  background: var(--c-danger); color: #fff; border-radius: 9px; min-width: 18px;
  height: 18px; line-height: 18px; text-align: center; font-size: 11px;
  padding: 0 5px; font-weight: 600;
}

/* ------------------------------------------------------------------ 聊天区 */
.kf-chat-head {
  flex: 0 0 auto; padding: 10px 16px; background: var(--c-bg-card);
  border-bottom: 1px solid var(--c-border); display: flex; align-items: center; gap: 12px;
}
.kf-chat-head .t { font-weight: 600; font-size: 14px; }
.kf-chat-head .s { font-size: 12px; color: var(--c-text-3); }
.kf-chat-head .spacer { flex: 1; }

.kf-msgs { flex: 1; overflow-y: auto; padding: 16px; background: var(--c-bg); min-height: 0; }

.kf-m { display: flex; gap: 9px; margin-bottom: 14px; align-items: flex-start; }
.kf-m.me { flex-direction: row-reverse; }
.kf-m-av {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; background: #dfe3e8;
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: #666;
  overflow: hidden;
}
.kf-m-av img { width: 100%; height: 100%; object-fit: cover; }
.kf-m-col { max-width: 68%; }
.kf-m-bub {
  padding: 9px 12px; border-radius: 10px; background: #fff; box-shadow: var(--shadow);
  word-break: break-word; white-space: normal;
}
.kf-m.me .kf-m-bub { background: var(--c-primary); color: #fff; }
.kf-m-bub img { max-width: 100%; border-radius: 6px; display: block; cursor: pointer; }
.kf-m-meta { font-size: 11px; color: var(--c-text-3); margin-top: 4px; }
.kf-m.me .kf-m-meta { text-align: right; }
.kf-m.ai .kf-m-av { background: #f0f5ff; color: var(--c-primary); font-weight: 600; }

.kf-sys-line { text-align: center; font-size: 12px; color: var(--c-text-3); margin: 12px 0; }
.kf-sys-line span { background: var(--c-border-soft); padding: 3px 12px; border-radius: 10px; }

.kf-editor { flex: 0 0 auto; border-top: 1px solid var(--c-border); background: var(--c-bg-card); padding: 10px 14px; }
.kf-editor .row { display: flex; gap: 8px; align-items: flex-end; }
.kf-editor .quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 7px; max-height: 62px; overflow-y: auto; }
.kf-quick {
  font-size: 12px; padding: 2px 9px; border-radius: 10px; background: var(--c-border-soft);
  cursor: pointer; color: var(--c-text-2); border: none; font-family: inherit;
}
.kf-quick:hover { background: var(--c-primary-soft); color: var(--c-primary); }

/* ------------------------------------------------------------------ 空态 */
.kf-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: var(--c-text-3); gap: 8px;
}
.kf-empty .big { font-size: 42px; opacity: .35; }

/* ------------------------------------------------------------------ 表格 */
.kf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kf-table th, .kf-table td {
  text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--c-border-soft);
  vertical-align: top;
}
.kf-table th { background: #f5f3ff; font-weight: 600; color: #5b53c4; font-size: 12px; }
.kf-table tr:hover td { background: #f7f5ff; }
.kf-table code { background: var(--c-border-soft); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ------------------------------------------------------- 列表工具条（搜索+每页条数） */
.kf-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px;
}
.kf-toolbar .kf-search { flex: 1; min-width: 180px; max-width: 340px; position: relative; }
.kf-toolbar .kf-search input { padding-left: 30px; }
.kf-toolbar .kf-search::before {
  content: "🔍"; position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  font-size: 12px; opacity: .55; pointer-events: none;
}
/* 每页条数下拉：全局生效（不只工具条内），否则放在 kf-row 分页行里
   会被 .kf-input 的 width:100% 拉满、一路伸到页面最右边 */
.kf-pagesize { width: auto; min-width: 116px; flex: 0 0 auto; }
.kf-row .kf-pagesize { margin-left: auto; }
.kf-toolbar .kf-spacer { flex: 1 1 auto; }
.kf-toolbar .kf-count { color: var(--c-text-3); font-size: 12px; white-space: nowrap; }

/* ------------------------------------------------------- 分页器 */
.kf-pager { display: flex; gap: 6px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
/* 分页信息（"共 X 条，第 X/Y 页"）一律一行显示，数字长也不许折行 */
.kf-pager-info { color: var(--c-text-3); font-size: 12px; white-space: nowrap; }
.kf-pager .kf-pager-info { color: var(--c-text-3); font-size: 12px; margin-right: auto; }
.kf-pager button {
  border: 1px solid var(--c-border); background: #fff; color: var(--c-text);
  border-radius: 7px; min-width: 32px; height: 32px; padding: 0 9px;
  font: inherit; font-size: 13px; cursor: pointer; transition: all .15s;
}
.kf-pager button:hover:not(:disabled) { border-color: var(--c-primary); color: var(--c-primary); }
.kf-pager button.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.kf-pager button:disabled { opacity: .45; cursor: not-allowed; }
.kf-pager .kf-dots { color: var(--c-text-3); padding: 0 2px; align-self: center; }

/* ------------------------------------------------------------------ 弹层 */
.kf-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.kf-modal {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px; max-height: 88vh; display: flex; flex-direction: column;
  /* min-height:0 让这个 flex 列容器自己也能被压缩，否则内容撑高时
     会顶破 max-height，底部的按钮就压到正文上了 */
  min-height: 0;
}
/* 头尾固定不参与压缩；中间正文占满剩余空间并自己滚动。
   这三条缺一不可 —— 少了 min-height:0，正文的 overflow-y 不会生效，
   内容一长整个弹窗就被撑破，底部按钮和上面的文字叠在一起。 */
.kf-modal-head {
  flex: 0 0 auto;
  padding: 14px 18px; border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; font-weight: 600;
}
.kf-modal-head .spacer { flex: 1; }
.kf-modal-body {
  flex: 1 1 auto; min-height: 0;
  padding: 18px; overflow-y: auto;
}
.kf-modal-foot {
  flex: 0 0 auto;
  padding: 12px 18px; border-top: 1px solid var(--c-border);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ------------------------------------------------------------------ 提示 */
.kf-toast-wrap {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.kf-toast {
  padding: 8px 18px; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  background: #fff; font-size: 13px; border-left: 3px solid var(--c-primary);
  animation: kfIn .18s ease;
}
.kf-toast.err { border-left-color: var(--c-danger); }
.kf-toast.ok { border-left-color: var(--c-success); }
@keyframes kfIn { from { opacity: 0; transform: translateY(-8px); } }

/* ------------------------------------------------------------------ 登录页 */
.kf-login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e8f0fe 0%, #f5f6f8 100%);
}
.kf-login {
  width: 360px; background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 32px 28px;
}
.kf-login h1 { font-size: 20px; margin-bottom: 6px; text-align: center; }
.kf-login .sub { font-size: 13px; color: var(--c-text-3); margin-bottom: 22px; text-align: center; }
.kf-login .kf-btn { width: 100%; height: 38px; margin-top: 6px; }

/* ------------------------------------------------------------------ 统计卡（大厂仪表盘风格）
   8 张全彩饱和渐变卡 + 白字 + 图标 + hover 上浮高亮，告别一片惨白 */
/* 概览的统计卡：固定「两行四列」。
   原来用 auto-fill + minmax(180px)，宽屏上会挤成一行 7 张、第二行孤零零 1 张，
   又窄又长反而不像仪表盘。固定 4 列后每张约 280px，配得上里面的字号。
   窄屏逐级降列：≤900px 两列，≤560px 一列。 */
.kf-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .kf-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .kf-stats { grid-template-columns: 1fr; } }
.kf-stat {
  position: relative; overflow: hidden; border: none; border-radius: var(--radius-xl);
  padding: 20px 20px 18px; box-shadow: var(--shadow-sm); background: var(--c-surface);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.kf-stat:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.kf-stat .n { font-size: 30px; font-weight: 700; line-height: 1.12; color: var(--c-text); letter-spacing: .5px; }
.kf-stat .l { font-size: 12.5px; color: var(--c-text-3); margin-top: 6px; }
/* 右上角半透明图标，呼应各大厂仪表盘 */
.kf-stat .ico {
  position: absolute; right: 16px; top: 16px; width: 44px; height: 44px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
  background: var(--c-surface-2); color: var(--c-text-2);
}
/* 渐变卡配色（白字 + 柔光阴影 + 悬停提亮） */
.kf-stat.blue   { background: var(--c-grad);     box-shadow: var(--shadow-grad); }
.kf-stat.green  { background: var(--c-grad-green); box-shadow: 0 8px 24px rgba(25,195,125,.28); }
.kf-stat.violet { background: var(--c-grad-violet); box-shadow: 0 8px 24px rgba(124,92,255,.28); }
.kf-stat.rose   { background: var(--c-grad-rose);  box-shadow: 0 8px 24px rgba(255,92,138,.28); }
.kf-stat.cyan   { background: var(--c-grad-cyan);  box-shadow: 0 8px 24px rgba(6,182,212,.28); }
.kf-stat.orange { background: var(--c-grad-orange); box-shadow: 0 8px 24px rgba(255,154,60,.28); }
.kf-stat.indigo { background: var(--c-grad-indigo); box-shadow: 0 8px 24px rgba(79,70,229,.28); }
.kf-stat.amber  { background: var(--c-grad-amber);  box-shadow: 0 8px 24px rgba(245,158,11,.28); }
.kf-stat.blue .n, .kf-stat.green .n, .kf-stat.violet .n, .kf-stat.rose .n,
.kf-stat.cyan .n, .kf-stat.orange .n, .kf-stat.indigo .n, .kf-stat.amber .n,
.kf-stat.blue .l, .kf-stat.green .l, .kf-stat.violet .l, .kf-stat.rose .l,
.kf-stat.cyan .l, .kf-stat.orange .l, .kf-stat.indigo .l, .kf-stat.amber .l { color: #fff; }
.kf-stat.blue .ico, .kf-stat.green .ico, .kf-stat.violet .ico, .kf-stat.rose .ico,
.kf-stat.cyan .ico, .kf-stat.orange .ico, .kf-stat.indigo .ico, .kf-stat.amber .ico {
  background: rgba(255,255,255,.22); color: #fff;
}
.kf-stat.blue:hover, .kf-stat.green:hover, .kf-stat.violet:hover, .kf-stat.rose:hover,
.kf-stat.cyan:hover, .kf-stat.orange:hover, .kf-stat.indigo:hover, .kf-stat.amber:hover {
  filter: brightness(1.06); transform: translateY(-6px);
}

/* ================================================================== 现代设计增强
   扁平卡片 / 渐变卡片 / 品牌顶栏 / 渐变统计卡 / 圆角表格容器 /
   表单聚焦光环 / 居中的区块标题。纯增量，不改动旧类。 */

/* 品牌标记：渐变圆角方块，用于顶栏 logo */
/* 品牌位：logo + 应用名。
   gap 从 9px 提到 12px —— logo 是实心色块，贴太近时文字像是被压在图标上 */
.kf-brand {
  display: inline-flex; align-items: center; gap: 12px; font-weight: 700;
  font-size: 15px; color: var(--c-text); letter-spacing: .2px;
}
.kf-brand-name { white-space: nowrap; }
.kf-brand .mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--c-grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; box-shadow: var(--shadow-grad);
}
.kf-brand .mark.violet { background: var(--c-grad-violet); box-shadow: 0 8px 24px rgba(124, 92, 255, .28); }
.kf-brand .mark.green { background: var(--c-grad-green); box-shadow: 0 8px 24px rgba(25, 195, 125, .28); }
/* 真实 logo 版品牌位：去掉渐变底与紫色发光——图片本身已经是一张带圆角和底色的方图，
   再垫一层渐变会从透明圆角里透出来，很脏 */
.kf-brand .mark.logo { background: none; box-shadow: none; overflow: hidden; }
.kf-brand .mark.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* 兜底：品牌位里不管放什么图，都不许撑破 30px 的方框。
   之前吃过一次亏——CSS 被浏览器缓存住、HTML 是新的，图片按原始尺寸渲染，
   整个顶栏被撑歪。所以除了 img 上的 width/height 属性，这里再加一道防线。 */
.kf-brand .mark { overflow: hidden; }
.kf-brand .mark img { max-width: 100%; max-height: 100%; }

/* 商户信息页的 Logo 预览：和顶栏品牌位同一个观感 */
.biz-logo-preview {
  width: 48px; height: 48px; border-radius: 12px; flex: 0 0 auto;
  box-shadow: 0 4px 12px rgba(35, 139, 249, .22);
}

/* 登录页顶部的 logo */
.kf-login-logo {
  width: 58px; height: 58px; display: block; margin: 0 auto 16px; border-radius: 16px;
  box-shadow: 0 8px 22px rgba(35, 139, 249, .26);
}
/* 落地页 hero 里的大 logo */
.hero-logo {
  width: 76px; height: 76px; display: block; margin: 0 auto 18px; border-radius: 21px;
  box-shadow: 0 12px 30px rgba(35, 139, 249, .28);
}
/* 手机端顶栏的小 logo —— 顶栏是深蓝底，给白边避免蓝底蓝图标糊在一起 */
.m-top img.m-logo {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55);
}

.kf-topbar { box-shadow: var(--shadow-sm); }

/* 扁平卡片：无边框、柔和留白，适合信息展示类区块 */
.kf-card.flat {
  border: none; box-shadow: var(--shadow-sm); background: var(--c-surface);
}
.kf-card.flat:hover { box-shadow: var(--shadow-md); }
/* 渐变卡片：带品牌色块/标题条，用于强调与引导 */
.kf-card.grad {
  border: none; color: #fff; background: var(--c-grad);
  box-shadow: var(--shadow-grad);
}
.kf-card.grad h3 { color: #fff; }
.kf-card.grad .sub { color: rgba(255, 255, 255, .82); font-size: 12.5px; margin-top: 4px; }

/* 圆角表格容器：整体一个卡片，表头吸顶，行悬停更明显 */
.kf-table-wrap {
  background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  overflow: hidden; margin-bottom: 14px;
}
.kf-table-wrap .kf-table th {
  position: sticky; top: 0; background: #f5f3ff;
  border-bottom: 1px solid var(--c-border); z-index: 1;
}
.kf-table tr:hover td { background: var(--c-surface-2); }

/* 表单聚焦光环：大厂那种靛紫柔光圈 */
.kf-input:focus, .kf-select:focus, .kf-textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

/* 居中的区块标题：落地页/空态用的那种 */
.kf-section-title { text-align: center; margin: 36px 0 16px; }
.kf-section-title h2 { font-size: 20px; letter-spacing: .3px; }
.kf-section-title p { color: var(--c-text-3); font-size: 13px; margin-top: 4px; }

/* 渐变图标芯片：落地页卡片左上角的图标块 */
.kf-ico-chip {
  width: 44px; height: 44px; border-radius: 12px; background: var(--c-grad-soft);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  margin-bottom: 12px;
}

/* 空态放大 + 柔和 */
.kf-empty .big { font-size: 56px; opacity: .28; }

/* 工具类 */
.kf-mt-l { margin-top: 20px; }
.kf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kf-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) {
  .kf-grid-2, .kf-grid-3 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ 工具类 */
.kf-row { display: flex; gap: 10px; align-items: center; }
.kf-row.wrap { flex-wrap: wrap; }
.kf-grow { flex: 1; min-width: 0; }
.kf-mt { margin-top: 12px; }
.kf-mb { margin-bottom: 12px; }
.kf-muted { color: var(--c-text-3); font-size: 12px; }
.kf-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.kf-scroll { overflow-y: auto; }

/* 键值行：商户信息 / 商户标识 / 开通结果等地方用（左标签右值，避免挤成两行） */
.kf-kv { display: flex; gap: 12px; padding: 5px 0; font-size: 13px; align-items: baseline; }
.kf-kv .k { flex: 0 0 104px; color: var(--c-text-3); }
.kf-kv .v { flex: 1; color: var(--c-text); word-break: break-all; }

/* ------------------------------------------------------------------ 分段切换（留言 / 工单 等内部 Tab） */
.kf-seg {
  display: inline-flex; padding: 3px; background: var(--c-surface-2);
  border-radius: 10px; gap: 2px; margin-bottom: 4px;
}
.kf-seg-item {
  border: none; background: transparent; cursor: pointer; font: inherit; font-size: 13px;
  color: var(--c-text-2); padding: 6px 16px; border-radius: 8px; transition: all .15s;
}
.kf-seg-item:hover { color: var(--c-primary); }
.kf-seg-item.active {
  background: #fff; color: var(--c-primary); font-weight: 600;
  box-shadow: var(--shadow-sm);
}
