/* ==========================================================================
   开心农场（kx_farm）— 前台与后台样式
   颜色全部取自核心 --mn-* 变量；前台按钮/输入使用 mn-btn / mn-input。
   ========================================================================== */

/* ---------- 容器 ---------- */
.kf-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 20px 24px;
}
.kf-wrap > * + * { margin-top: 18px; }

.kf-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.kf-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--mn-text);
}
.kf-title .fa { color: var(--mn-primary); }
.kf-tools { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 二级导航 ---------- */
.kf-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.kf-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--mn-border);
    border-radius: 999px;
    background: var(--mn-bg-card);
    color: var(--mn-text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: all .15s ease;
}
.kf-nav-item:hover { border-color: var(--mn-primary); color: var(--mn-primary); }
.kf-nav-active {
    background: var(--mn-primary);
    border-color: var(--mn-primary);
    color: #fff;
}
.kf-nav-active:hover { color: #fff; }

/* ---------- 顶部数值 ---------- */
.kf-topbar {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border: 1px solid var(--mn-border);
    border-radius: 12px;
    background: var(--mn-bg-card);
}
.kf-stat { display: flex; align-items: baseline; gap: 6px; }
.kf-stat-label { font-size: 12px; color: var(--mn-text-muted); }
.kf-stat-val { font-size: 16px; color: var(--mn-text); font-variant-numeric: tabular-nums; }
.kf-coins { color: var(--mn-primary); }
.kf-quota .kf-stat-val { font-size: 13px; color: var(--mn-text-secondary); }

.kf-expbar-wrap { flex: 1; min-width: 160px; }
.kf-expbar {
    height: 8px;
    border-radius: 999px;
    background: var(--mn-border);
    overflow: hidden;
}
.kf-expbar-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: var(--mn-primary);
    transition: width .3s ease;
}
.kf-exp-text { margin-top: 4px; font-size: 11px; color: var(--mn-text-muted); }

/* ---------- 农场场景（等距菱形地块 + 四季背景） ---------- */
.kf-farm {
    position: relative;
    aspect-ratio: 1024 / 768;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--mn-border);
    background-color: #cfe3b6;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, .22),
        inset 0 14px 34px rgba(255, 255, 255, .16),
        0 10px 26px rgba(0, 0, 0, .14);
}
/* 季节背景：3–5 春(2)、6–8 夏(1)、9–11 秋(3)、12–2 冬(4) */
.kf-season-1 { background-image: url("img/bg/season-1.webp"); }
.kf-season-2 { background-image: url("img/bg/season-2.webp"); }
.kf-season-3 { background-image: url("img/bg/season-3.webp"); }
.kf-season-4 { background-image: url("img/bg/season-4.webp"); }

.kf-grid { position: absolute; inset: 0; }

/* 单块地：201×103 的菱形土壤 + 同尺寸作物图精确叠放 */
.kf-cell {
    position: absolute;
    width: 16.699%;
    aspect-ratio: 201 / 103;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    -webkit-appearance: none;
    appearance: none;
    transition: transform .18s ease;
}
.kf-cell-soil,
.kf-cell-crop {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}
.kf-cell-soil {
    filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .24));
    transition: filter .18s ease;
}
.kf-cell-crop { pointer-events: none; }

/* 悬浮：不位移，只做轻微放大 + 白色光晕（贴合菱形轮廓） */
.kf-cell:hover { transform: scale(1.03); }
.kf-grid .kf-cell:hover,
.kf-grid .kf-cell:focus-visible { z-index: 70; }
.kf-cell:hover .kf-cell-soil {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, .5))
            drop-shadow(0 6px 4px rgba(0, 0, 0, .22));
}
.kf-cell:focus-visible { outline: 2px solid var(--mn-primary); outline-offset: 3px; }
.kf-cell.is-locked { cursor: default; }
.kf-cell.is-locked:hover { transform: none; }
.kf-cell.is-locked .kf-cell-soil {
    opacity: .72;
    filter: grayscale(.55) drop-shadow(0 6px 4px rgba(0, 0, 0, .16));
}
.kf-cell.is-withered .kf-cell-crop { filter: grayscale(.85); opacity: .85; }
.kf-cell.is-mature { filter: drop-shadow(0 0 8px rgba(255, 205, 70, .95)); }
.kf-cell.is-mature .kf-cell-crop { animation: kf-bob 1.8s ease-in-out infinite; }
.kf-cell.is-stolen .kf-cell-crop { opacity: .55; }

/* 状态标签：浮在地块前角上方，层级高于所有地块，避免被遮挡 */
.kf-cell-label {
    position: absolute;
    z-index: 80;
    transform: translate(-50%, -45%);
    max-width: 22%;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(24, 34, 18, .62);
    color: #fff;
    font-size: 11px;
    line-height: 1.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}
.kf-cell-label.is-mature { background: rgba(30, 132, 62, .86); }
.kf-cell-label.is-withered { background: rgba(96, 96, 96, .7); }
.kf-cell-label.is-locked { background: rgba(70, 60, 40, .55); }

/* 生长中：作物名 / 倒计时 分两行，整体上提，避免压住作物 */
.kf-cell-label.is-grow {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 9px;
    border-radius: 10px;
    line-height: 1.3;
}
.kf-cell-label-name { font-weight: 700; }
.kf-cell-label-time { font-size: 10px; opacity: .92; font-variant-numeric: tabular-nums; }

/* 未解锁：标签放进地块内部，居中对齐土地中心 */
.kf-cell.is-locked .kf-cell-label {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: none;
}

/* 12 个地块的等距坐标（1024×768 场景基准；行内步进 95.5/53.8px，行间回退 -95.5/+53.8，
   相邻菱形之间留出约 10px 间隙，尖角互不重叠） */
.kf-slot-0  { left: 34.986%; top: 42.184%; z-index: 10; }
.kf-slot-1  { left: 44.312%; top: 48.789%; z-index: 11; }
.kf-slot-2  { left: 53.637%; top: 56.194%; z-index: 12; }
.kf-slot-3  { left: 62.963%; top: 63.199%; z-index: 13; }
.kf-slot-4  { left: 25.659%; top: 48.789%; z-index: 20; }
.kf-slot-5  { left: 34.986%; top: 56.194%; z-index: 21; }
.kf-slot-6  { left: 44.312%; top: 63.199%; z-index: 22; }
.kf-slot-7  { left: 53.637%; top: 70.204%; z-index: 23; }
.kf-slot-8  { left: 16.333%; top: 56.194%; z-index: 30; }
.kf-slot-9  { left: 25.659%; top: 63.199%; z-index: 31; }
.kf-slot-10 { left: 34.986%; top: 70.204%; z-index: 32; }
.kf-slot-11 { left: 44.312%; top: 77.209%; z-index: 33; }

/* 标签坐标 = 地块前角（中心 x，top+11.406%），整体上提 3.4% 避开作物 */
.kf-label-0  { left: 43.335%; top: 50.190%; }
.kf-label-1  { left: 52.661%; top: 57.197%; }
.kf-label-2  { left: 61.987%; top: 64.201%; }
.kf-label-3  { left: 71.313%; top: 71.206%; }
.kf-label-4  { left: 34.009%; top: 57.197%; }
.kf-label-5  { left: 43.335%; top: 64.201%; }
.kf-label-6  { left: 52.661%; top: 71.206%; }
.kf-label-7  { left: 61.987%; top: 78.211%; }
.kf-label-8  { left: 24.682%; top: 64.201%; }
.kf-label-9  { left: 34.009%; top: 71.206%; }
.kf-label-10 { left: 43.335%; top: 78.211%; }
.kf-label-11 { left: 52.661%; top: 85.215%; }

@keyframes kf-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
    .kf-cell.is-mature .kf-cell-crop { animation: none; }
}

/* 土壤等级角标（仅 Lv2+ 显示） */
.kf-cell-lv {
    position: absolute;
    left: -6%;
    top: 6%;
    z-index: 85;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 16px;
    color: #3c2a12;
    background: linear-gradient(#ffe9b0, #f3c565);
    border: 1px solid #c99537;
    pointer-events: none;
}

/* ---------- 场景设施（源程序 1024×768 舞台坐标：设施贴四边，中间留地） ---------- */
.kf-fac-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.kf-fac,
.kf-fac-board { pointer-events: auto; }
.kf-fac {
    position: absolute;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .22));
    transition: transform .18s ease, filter .18s ease;
}
.kf-fac:disabled { cursor: default; }
.kf-fac:not(:disabled):hover { transform: scale(1.02); filter: drop-shadow(0 0 6px rgba(255, 255, 255, .6)) drop-shadow(0 8px 8px rgba(0, 0, 0, .22)); }
.kf-fac:not(:disabled):focus-visible { outline: 2px solid var(--mn-primary); outline-offset: 3px; border-radius: 10px; }
.kf-fac-art { display: block; width: 100%; height: auto; }

.kf-fac-sign  { left: 2.2%;  top: 13.2%; width: 23%;   z-index: 6; }
.kf-fac-house { left: 54.9%; top: 6%;    width: 25.8%; }
.kf-fac-dog   { left: 28.8%; top: 25%;   width: 9%; }
.kf-fac-barn  { left: 5.6%;  top: 36.5%; width: 16.4%; }
.kf-fac-shop  { left: 71.2%; top: 42.1%; width: 15%; }

/* 狗窝上的哈士奇头（源程序 guiRes/gou.PNG） */
.kf-fac-doghead { position: absolute; left: 24%; top: 42%; width: 56%; height: auto; }

/* 招牌文字（压在 paizi.png 的牌面上） */
.kf-fac-sign-txt {
    position: absolute;
    left: 9%;
    right: 13%;
    top: 24%;
    bottom: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    pointer-events: none;
    color: #3b2310;
    text-align: center;
}
.kf-fac-sign-name {
    font-size: clamp(11px, 1.55vw, 17px);
    font-weight: 800;
    letter-spacing: .5px;
    line-height: 1.2;
    color: #33200d;
    text-shadow:
        0 1px 0 rgba(255, 250, 235, .95),
        0 -1px 0 rgba(255, 250, 235, .75),
        1px 0 0 rgba(255, 250, 235, .85),
        -1px 0 0 rgba(255, 250, 235, .85),
        0 2px 3px rgba(60, 35, 10, .35);
}
.kf-fac-sign-owner {
    font-size: clamp(8px, 1vw, 12px);
    font-style: normal;
    color: #5a3a1a;
    line-height: 1.3;
    text-shadow: 0 1px 0 rgba(255, 250, 235, .85), 0 -1px 0 rgba(255, 250, 235, .5);
}
.kf-fac-sign-lv {
    font-size: clamp(8px, .95vw, 11px);
    font-style: normal;
    color: #6b4408;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(255, 250, 235, .8);
}

.kf-fac-tip {
    position: absolute;
    left: 50%;
    bottom: -6%;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.7;
    color: #fff;
    background: rgba(40, 60, 30, .72);
    border: 1px solid rgba(255, 255, 255, .25);
    pointer-events: none;
}

/* 好友排行板 */
.kf-fac-board {
    position: absolute;
    left: 80.8%;
    top: 5.4%;
    width: 17.4%;
    z-index: 6;
    display: block;
    padding: 8px 10px;
    border-radius: 12px;
    background: linear-gradient(#c99356, #a4713a);
    border: 1px solid #7d5427;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(255, 255, 255, .18);
    color: #fff6e3;
    text-decoration: none;
}
.kf-fac-board:hover { color: #fff6e3; filter: brightness(1.06); }
.kf-fac-board-title { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.kf-fac-board-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.kf-fac-board-row { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.kf-fac-board-no {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border-radius: 50%;
    background: #8a5b2c;
    text-align: center;
    line-height: 14px;
    font-size: 10px;
}
.kf-fac-board-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kf-fac-board-lv { font-size: 10px; color: #ffe2a8; }
.kf-fac-board-empty { margin: 0; font-size: 11px; }

.kf-hint { margin: 0; font-size: 13px; color: var(--mn-text-muted); }
.kf-hint a { color: var(--mn-primary); }

/* ---------- 弹层 ---------- */
.kf-modal { position: fixed; inset: 0; z-index: 9998; }
.kf-modal[hidden] { display: none; }
.kf-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}
.kf-modal-card {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(680px, calc(100vw - 32px));
    max-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    background: linear-gradient(#fdf6e6, #f7ecd4);
    border: 1px solid #c8a878;
    box-shadow: 0 18px 50px rgba(60, 40, 20, .35), inset 0 0 0 3px rgba(255, 255, 255, .55);
    overflow: hidden;
}
.kf-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 16px;
    background: linear-gradient(#8b5e34, #6d4423);
    border-bottom: 1px solid #5a3a1e;
}
.kf-modal-title { margin: 0; font-size: 16px; color: #fff5e2; }
.kf-modal-x {
    border: 0;
    background: none;
    color: #f3dfc0;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.kf-modal-x:hover { color: #fff; }
.kf-modal-body {
    padding: 16px 18px 20px;
    overflow-y: auto;
}

/* 弹层内部：木质货架 + 卡片 */
.kf-win-sub { margin: 0 0 12px; font-size: 12px; line-height: 1.6; color: #7d6748; }
.kf-win-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.kf-input-name { width: 100%; height: 36px; }
.kf-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
    gap: 12px;
}
.kf-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1px solid #e0c9a4;
    border-radius: 12px;
    background: linear-gradient(#fffdf7, #fdf3df);
    box-shadow: 0 2px 0 rgba(120, 90, 50, .08), inset 0 1px 0 #fff;
}
.kf-card-art {
    width: 100%;
    height: 72px;
    object-fit: contain;
    border-radius: 10px;
    background: radial-gradient(circle at 50% 45%, #fff 0, #f6e9cd 70%, #efdcb6 100%);
}
.kf-card-name { font-size: 13px; font-weight: 600; color: #4a3a22; text-align: center; }
.kf-card-meta { font-size: 11px; line-height: 1.5; color: #8a7457; text-align: center; }
.kf-card-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.kf-card-foot:empty { display: none; }
.kf-cards-soil { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.kf-cards-soil .kf-card-art { height: auto; aspect-ratio: 201 / 103; background: none; border-radius: 0; }

.kf-store-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.kf-store-pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: #fdf1d8;
    border: 1px solid #e2c99e;
    font-size: 12px;
    color: #6b5334;
}

/* 看家狗面板 */
.kf-dog {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #e0c9a4;
    border-radius: 12px;
    background: linear-gradient(#fffdf7, #fdf3df);
}
.kf-dog-art { width: 64px; height: 64px; flex: 0 0 64px; object-fit: contain; }
.kf-dog-main { flex: 1; min-width: 0; }
.kf-dog-name { font-size: 14px; font-weight: 600; color: #4a3a22; }
.kf-dog-meta { margin-top: 4px; font-size: 11px; color: #8a7457; }
.kf-bar { height: 8px; margin-top: 6px; border-radius: 999px; background: #eadcbe; overflow: hidden; }
.kf-bar-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(#f0b44a, #d98a22);
    transition: width .3s ease;
}

/* 弹层内列表行 */
.kf-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--mn-border);
}
.kf-row:last-child { border-bottom: 0; }
.kf-row-art {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--mn-bg);
}
.kf-row-main { flex: 1; min-width: 0; }
.kf-row-name { font-size: 14px; color: var(--mn-text); }
.kf-row-meta { margin-top: 2px; font-size: 12px; color: var(--mn-text-muted); }
.kf-row-ops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.kf-input-qty { width: 68px; height: 32px; text-align: center; }
.kf-empty-tip { margin: 0; padding: 16px 0; text-align: center; font-size: 13px; color: var(--mn-text-muted); }

/* ---------- Toast ---------- */
.kf-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: calc(100vw - 32px);
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(30, 34, 40, .92);
    color: #fff;
    font-size: 13px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.kf-toast[hidden] { display: none; }
.kf-toast.is-error { background: rgba(190, 46, 46, .95); }

/* ---------- 排行榜 ---------- */
.kf-table-wrap { overflow-x: auto; }
.kf-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--mn-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--mn-bg-card);
    font-size: 14px;
}
.kf-table th, .kf-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--mn-border);
    color: var(--mn-text-secondary);
    white-space: nowrap;
}
.kf-table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--mn-text-muted);
    background: var(--mn-bg);
}
.kf-table tbody tr:last-child td { border-bottom: 0; }
.kf-col-no { width: 56px; text-align: center; }
.kf-rank-name { color: var(--mn-text); text-decoration: none; }
.kf-rank-name:hover { color: var(--mn-primary); }
.kf-rank-1 td { background: rgba(255, 196, 0, .12); }
.kf-rank-2 td { background: rgba(160, 170, 180, .12); }
.kf-rank-3 td { background: rgba(205, 127, 50, .12); }
.kf-rank-1 .kf-col-no { color: #d49b00; font-weight: 700; }
.kf-rank-2 .kf-col-no { color: #7d8894; font-weight: 700; }
.kf-rank-3 .kf-col-no { color: #b87333; font-weight: 700; }

/* ---------- 入口钩子（首页右栏 / 用户主页） ---------- */
.home-sidebar-box.kf-side-card {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--mn-border);
    border-radius: 12px;
    background: var(--mn-bg-card);
}
.kf-side-card .home-sidebar-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mn-text);
}
.kf-side-desc {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--mn-text-muted);
}
.kf-side-btn { display: inline-flex; align-items: center; }
.kf-up-strip { display: inline-block; margin-left: 6px; vertical-align: middle; }
.kf-up-btn { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- 后台 ---------- */
.admin-content .kf-admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.admin-content .kf-admin-stat {
    padding: 14px 16px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 10px;
    background: var(--mn-bg-card, #fff);
}
.admin-content .kf-admin-stat span {
    display: block;
    font-size: 12px;
    color: var(--mn-text-muted, #888);
}
.admin-content .kf-admin-stat b {
    display: block;
    margin-top: 6px;
    font-size: 22px;
    color: var(--mn-text, #222);
}
.admin-content .kf-admin-sub {
    margin: 18px 0 10px;
    font-size: 15px;
    color: var(--mn-text, #222);
}
.admin-content .kf-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--mn-bg-card, #fff);
}
.admin-content .kf-admin-table th,
.admin-content .kf-admin-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--mn-border, #e5e7eb);
    text-align: left;
    vertical-align: middle;
}
.admin-content .kf-admin-table th {
    font-weight: 600;
    color: var(--mn-text-muted, #888);
    background: var(--mn-bg, #f7f8fa);
    white-space: nowrap;
}
.admin-content .kf-input-xs { width: 76px; }
.admin-content .kf-input-sm { width: 180px; }
.kf-admin-ops { white-space: nowrap; }
.kf-inline-form { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; }
.kf-admin-form .kf-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px 18px;
}
.kf-admin-foot { margin-top: 16px; }
.kf-pager {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.kf-pager-info { font-size: 12px; color: var(--mn-text-muted, #888); }
.kf-log-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.kf-log-detail {
    max-width: 460px;
    word-break: break-all;
    color: var(--mn-text-muted, #888);
}
.kf-nowrap { white-space: nowrap; }
.kf-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--mn-bg, #f0f1f3);
    color: var(--mn-text-muted, #666);
    font-size: 12px;
}
.kf-badge-bad { background: rgba(200, 60, 60, .14); color: #b52b2b; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
    .kf-wrap { max-width: 100%; padding: 14px 14px 18px; }
    .kf-title { font-size: 18px; }
    .kf-topbar { gap: 12px; padding: 10px 12px; }
    .kf-modal-card { width: calc(100vw - 24px); max-height: calc(100vh - 40px); }
}
@media (max-width: 560px) {
    .kf-cell-label { font-size: 10px; padding: 0 6px; }
}
@media (max-width: 420px) {
    .kf-cell-label { font-size: 9px; padding: 0 4px; line-height: 1.6; }
}
