/* ============================================================
   模型微调 · 专属样式（全部 #page-tune 前缀，不污染其他页面）
   ============================================================ */
#page-tune {
    padding-bottom: 1.5rem;
    animation: ftFade .4s ease both;
}
@keyframes ftFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* ---------------- 头部 ---------------- */
#page-tune .ft-hero {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-wrap: wrap;
    padding: 1.05rem 1.25rem;
    border-radius: 1rem;
    border: 1px solid #e6e8ee;
    background:
        radial-gradient(680px 200px at 6% -60%, rgba(79, 70, 229, .09), transparent 70%),
        radial-gradient(520px 180px at 96% -80%, rgba(14, 165, 233, .08), transparent 72%),
        #fff;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}
#page-tune .ft-hero-main { display: flex; align-items: center; gap: .85rem; min-width: 0; flex: 1; }
#page-tune .ft-hero-ic {
    width: 2.7rem; height: 2.7rem; flex-shrink: 0;
    border-radius: .85rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; color: #fff;
    background: linear-gradient(150deg, #2b3444, #10151f);
    box-shadow: 0 14px 26px -18px rgba(17, 24, 39, .95), inset 0 1px 0 rgba(255, 255, 255, .18);
}
#page-tune .ft-hero-txt { min-width: 0; }
#page-tune .ft-hero-txt h2 {
    margin: 0; font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em;
    color: #111827; display: flex; align-items: center; gap: .5rem;
}
#page-tune .ft-tag {
    font-size: .62rem; font-weight: 700; letter-spacing: .1em;
    padding: .16rem .42rem; border-radius: .35rem;
    color: #4338ca; background: #eef0ff; border: 1px solid #dfe3ff;
}
#page-tune .ft-hero-txt p {
    margin: .28rem 0 0; font-size: .78rem; line-height: 1.65; color: #8b93a1;
    max-width: 46rem;
}
#page-tune .ft-hero-meta { display: flex; align-items: center; gap: .35rem; }
#page-tune .ft-meta-i {
    min-width: 4.5rem; padding: .42rem .7rem; text-align: center;
    border-radius: .7rem; border: 1px solid #eef0f4; background: rgba(255, 255, 255, .72);
}
#page-tune .ft-meta-i b { display: block; font-size: .88rem; font-weight: 800; color: #111827; letter-spacing: -.01em; }
#page-tune .ft-meta-i span { display: block; margin-top: .1rem; font-size: .66rem; color: #9aa2af; }

/* ---------------- 布局 ---------------- */
#page-tune .ft-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 1rem;
    margin-top: 1rem;
    align-items: start;
}
#page-tune .ft-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 1rem; }

#page-tune .ft-card {
    border: 1px solid #e6e8ee;
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}
#page-tune .ft-card-h {
    display: flex; align-items: center; gap: .6rem;
    padding: .85rem 1.15rem;
    border-bottom: 1px solid #f1f3f6;
    background: linear-gradient(180deg, #fcfdff, #fff);
}
#page-tune .ft-card-h h3 { margin: 0; font-size: .9rem; font-weight: 800; color: #111827; letter-spacing: -.005em; }
#page-tune .ft-card-h .ft-sp { flex: 1; }
#page-tune .ft-card-sub { font-size: .72rem; color: #9aa2af; }
#page-tune .ft-body { padding: 1.05rem 1.15rem 1.15rem; }

/* ---------------- 表单 ---------------- */
#page-tune .ft-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
#page-tune .ft-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
#page-tune .ft-row3 + .ft-row3, #page-tune .ft-row2 + .ft-field { margin-top: .85rem; }
#page-tune .ft-field { display: block; }
#page-tune .ft-field > label {
    display: flex; align-items: center; gap: .35rem;
    margin-bottom: .38rem; font-size: .76rem; font-weight: 600; color: #4b5563;
}
#page-tune .ft-field > label em { font-style: normal; font-weight: 400; font-size: .68rem; color: #9aa2af; }
#page-tune .ft-pill {
    font-size: .6rem; font-weight: 700; letter-spacing: .06em;
    padding: .1rem .34rem; border-radius: .3rem;
    color: #6b7280; background: #f2f4f7; border: 1px solid #e8eaef;
}
#page-tune .ft-input {
    width: 100%; box-sizing: border-box;
    padding: .55rem .72rem;
    font-size: .82rem; color: #111827;
    border: 1px solid #e2e5eb;
    border-radius: .6rem;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
    outline: none;
}
#page-tune .ft-input::placeholder { color: #b6bcc6; }
#page-tune .ft-input:hover { border-color: #cfd4dd; }
#page-tune .ft-input:focus { border-color: rgba(17, 24, 39, .32); box-shadow: 0 0 0 3.5px rgba(17, 24, 39, .055); }
#page-tune .ft-hint { margin-top: .3rem; font-size: .68rem; color: #9aa2af; }

/* 下拉：去掉原生外观，自绘图标 */
#page-tune .ft-select { position: relative; }
#page-tune .ft-select select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    width: 100%; box-sizing: border-box;
    padding: .55rem 1.9rem .55rem 1.95rem;
    font-size: .82rem; color: #111827;
    border: 1px solid #e2e5eb; border-radius: .6rem;
    background: #fff; outline: none; cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease;
}
#page-tune .ft-select select:hover { border-color: #cfd4dd; }
#page-tune .ft-select select:focus { border-color: rgba(17, 24, 39, .32); box-shadow: 0 0 0 3.5px rgba(17, 24, 39, .055); }
#page-tune .ft-select .lead {
    position: absolute; left: .68rem; top: 50%; transform: translateY(-50%);
    font-size: .74rem; color: #9aa2af; pointer-events: none;
}
#page-tune .ft-select .caret {
    position: absolute; right: .7rem; top: 50%; transform: translateY(-50%);
    font-size: .7rem; color: #9aa2af; pointer-events: none;
}

/* 上传区 */
#page-tune .ft-drop {
    position: relative;
    padding: 1.5rem 1rem 1.25rem;
    text-align: center;
    border: 1.5px dashed #dde1e8;
    border-radius: .85rem;
    background:
        radial-gradient(rgba(17, 24, 39, .032) 1px, transparent 1px) 0 0 / 18px 18px,
        linear-gradient(180deg, #fbfcfe, #fff);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
#page-tune .ft-drop:hover,
#page-tune .ft-drop.border-primary {
    border-color: rgba(79, 70, 229, .5);
    background: linear-gradient(180deg, #f7f8ff, #fff);
}
#page-tune .ft-drop:hover .ft-drop-ic { transform: translateY(-2px); }
#page-tune .ft-drop-ic {
    width: 2.35rem; height: 2.35rem; margin: 0 auto .6rem;
    border-radius: .75rem;
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem; color: #4b5563;
    background: #f2f4f8; border: 1px solid #e6e9ef;
    transition: transform .2s ease;
}
#page-tune .ft-drop-t { margin: 0; font-size: .84rem; font-weight: 600; color: #374151; }
#page-tune .ft-drop-t.ok { color: #15803d; }
#page-tune .ft-drop-s {
    margin: .3rem auto 0; max-width: 34rem;
    font-size: .68rem; line-height: 1.6; color: #9aa2af;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    word-break: break-all;
}
#page-tune .ft-drop-tags { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin-top: .7rem; }
#page-tune .ft-drop-tags span {
    font-size: .64rem; color: #8b93a1;
    padding: .14rem .46rem; border-radius: 99px;
    background: #f4f6f9; border: 1px solid #eceff3;
}

/* 分组标题 */
#page-tune .ft-sect {
    display: flex; align-items: center; gap: .6rem;
    margin: 1.15rem 0 .7rem;
}
#page-tune .ft-sect span {
    font-size: .7rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: #9aa2af;
}
#page-tune .ft-sect i { flex: 1; height: 1px; background: linear-gradient(90deg, #eceff4, transparent); }

/* 操作区 */
#page-tune .ft-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1.15rem; }
#page-tune .ft-btn {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .6rem 1.15rem;
    font-size: .82rem; font-weight: 600; color: #fff;
    border: 0; border-radius: .6rem; cursor: pointer;
    background: linear-gradient(180deg, #2b3444, #141922);
    box-shadow: 0 10px 20px -14px rgba(17, 24, 39, .95), inset 0 1px 0 rgba(255, 255, 255, .14);
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
#page-tune .ft-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 24px -14px rgba(17, 24, 39, .95), inset 0 1px 0 rgba(255, 255, 255, .18); }
#page-tune .ft-btn:active { transform: none; }
#page-tune .ft-btn i { font-size: .72rem; }
#page-tune .ft-btn-ghost {
    padding: .6rem .95rem; font-size: .78rem; font-weight: 600;
    color: #6b7280; background: #fff;
    border: 1px solid #e2e5eb; border-radius: .6rem; cursor: pointer;
    transition: color .16s ease, border-color .16s ease, background .16s ease;
}
#page-tune .ft-btn-ghost:hover { color: #111827; border-color: #cfd4dd; background: #fafbfc; }
#page-tune .ft-msg { font-size: .76rem; color: #8b93a1; }
#page-tune .ft-msg.err { color: #dc2626; }
#page-tune .ft-msg.ok { color: #15803d; }

/* ---------------- 右侧 ---------------- */
#page-tune .ft-tips { padding: .3rem 1.1rem .9rem; }
#page-tune .ft-tip { display: flex; gap: .55rem; padding: .58rem 0; border-bottom: 1px dashed #f0f2f5; }
#page-tune .ft-tip:last-child { border-bottom: 0; }
#page-tune .ft-tip > i {
    flex-shrink: 0; margin-top: .12rem;
    width: 1.05rem; height: 1.05rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .52rem; color: #15803d; background: #eafaf0; border: 1px solid #d6f0e2;
}
#page-tune .ft-tip b { display: block; font-size: .76rem; font-weight: 700; color: #1f2329; }
#page-tune .ft-tip p { margin: .16rem 0 0; font-size: .72rem; line-height: 1.62; color: #8b93a1; }

#page-tune .ft-refresh {
    width: 1.65rem; height: 1.65rem; border-radius: .45rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .7rem; color: #8b93a1; background: #f5f7fa;
    border: 1px solid #eaedf2; cursor: pointer;
    transition: all .16s ease;
}
#page-tune .ft-refresh:hover { color: #111827; background: #eef1f6; transform: rotate(45deg); }

#page-tune .ft-jobs { padding: .75rem 1rem 1rem; max-height: 24rem; overflow-y: auto; }
#page-tune .ft-jobs::-webkit-scrollbar { width: 6px; }
#page-tune .ft-jobs::-webkit-scrollbar-thumb { background: #e2e6ee; border-radius: 99px; }
#page-tune .ft-empty { padding: 1.6rem 0; text-align: center; font-size: .76rem; color: #9aa2af; }
#page-tune .ft-empty i { display: block; font-size: 1.15rem; color: #ccd2db; margin-bottom: .45rem; }

#page-tune .ft-job {
    padding: .7rem .8rem;
    border: 1px solid #eef0f4;
    border-radius: .7rem;
    background: #fcfdfe;
    transition: border-color .16s ease, box-shadow .16s ease;
}
#page-tune .ft-job + .ft-job { margin-top: .55rem; }
#page-tune .ft-job:hover { border-color: #e2e6ee; box-shadow: 0 8px 18px -16px rgba(17, 24, 39, .7); }
#page-tune .ft-job-h { display: flex; align-items: center; gap: .45rem; }
#page-tune .ft-job-h .nm { font-size: .8rem; font-weight: 700; color: #1f2329; }
#page-tune .ft-job-h .tk { font-size: .7rem; color: #9aa2af; }
#page-tune .ft-job-h .sp { flex: 1; }
#page-tune .ft-job-meta { margin-top: .3rem; font-size: .68rem; color: #9aa2af; line-height: 1.55; }
#page-tune .ft-job-meta code {
    font-family: ui-monospace, Menlo, monospace; font-size: .66rem;
    background: #f1f4f8; color: #4b5563; border-radius: .25rem; padding: .05rem .28rem;
}
#page-tune .ft-job-err { margin-top: .3rem; font-size: .68rem; color: #dc2626; line-height: 1.55; }
#page-tune .ft-job-act { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; }
#page-tune .ft-job-act button {
    font-size: .7rem; font-weight: 600; cursor: pointer;
    padding: .26rem .6rem; border-radius: .4rem;
    border: 1px solid #e6e9ef; background: #fff; color: #4b5563;
    display: inline-flex; align-items: center; gap: .3rem;
    transition: all .16s ease;
}
#page-tune .ft-job-act button:hover { border-color: #cfd4dd; color: #111827; }
#page-tune .ft-job-act button.danger { color: #dc2626; border-color: #f5d9dc; background: #fff8f8; }
#page-tune .ft-job-act button.danger:hover { background: #feecec; }

/* 状态徽标 */
#page-tune .ft-badge {
    display: inline-flex; align-items: center; gap: .28rem;
    font-size: .66rem; font-weight: 600;
    padding: .16rem .5rem; border-radius: 99px;
    background: #f2f4f7; color: #6b7280; border: 1px solid #e9ecf1;
}
#page-tune .ft-badge::before {
    content: ''; width: .3rem; height: .3rem; border-radius: 50%; background: currentColor;
}
#page-tune .ft-badge.blue { background: #eff5ff; color: #1d63e0; border-color: #dbe8ff; }
#page-tune .ft-badge.green { background: #ecfbf2; color: #15803d; border-color: #d3f0e0; }
#page-tune .ft-badge.red { background: #fef3f3; color: #dc2626; border-color: #f8dcde; }
#page-tune .ft-badge.yellow { background: #fff9ec; color: #b45309; border-color: #f7eccd; }

/* ---------------- 深色模式 ---------------- */
.dark #page-tune .ft-hero {
    border-color: #232c3a;
    background:
        radial-gradient(680px 200px at 6% -60%, rgba(99, 102, 241, .16), transparent 70%),
        radial-gradient(520px 180px at 96% -80%, rgba(14, 165, 233, .12), transparent 72%),
        #101722;
}
.dark #page-tune .ft-hero-txt h2 { color: #f3f4f6; }
.dark #page-tune .ft-hero-txt p { color: #8b95a5; }
.dark #page-tune .ft-tag { color: #c7cdff; background: #1d2340; border-color: #2c3560; }
.dark #page-tune .ft-meta-i { background: rgba(255, 255, 255, .03); border-color: #232c3a; }
.dark #page-tune .ft-meta-i b { color: #eef1f5; }
.dark #page-tune .ft-meta-i span { color: #7b8697; }
.dark #page-tune .ft-card { background: #121a26; border-color: #232c3a; }
.dark #page-tune .ft-card-h { background: #141d2a; border-color: #212a37; }
.dark #page-tune .ft-card-h h3 { color: #f1f3f7; }
.dark #page-tune .ft-card-sub { color: #7b8697; }
.dark #page-tune .ft-field > label { color: #b6bfcc; }
.dark #page-tune .ft-field > label em,
.dark #page-tune .ft-hint { color: #7b8697; }
.dark #page-tune .ft-pill { color: #9aa5b5; background: #1a2431; border-color: #29333f; }
.dark #page-tune .ft-input,
.dark #page-tune .ft-select select {
    background: #0e1520; color: #eef1f5; border-color: #28323f;
}
.dark #page-tune .ft-input::placeholder { color: #5d6775; }
.dark #page-tune .ft-input:hover,
.dark #page-tune .ft-select select:hover { border-color: #35414f; }
.dark #page-tune .ft-input:focus,
.dark #page-tune .ft-select select:focus { border-color: #3b4757; box-shadow: 0 0 0 3.5px rgba(255, 255, 255, .05); }
.dark #page-tune .ft-select .lead,
.dark #page-tune .ft-select .caret { color: #6b7684; }
.dark #page-tune .ft-drop {
    border-color: #2a3441;
    background:
        radial-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 18px 18px,
        linear-gradient(180deg, #0e1621, #101a26);
}
.dark #page-tune .ft-drop:hover,
.dark #page-tune .ft-drop.border-primary { border-color: rgba(129, 140, 248, .55); background: linear-gradient(180deg, #131c33, #101a26); }
.dark #page-tune .ft-drop-ic { color: #9aa5b5; background: #17212e; border-color: #253039; }
.dark #page-tune .ft-drop-t { color: #d7dce4; }
.dark #page-tune .ft-drop-t.ok { color: #15803d; }
#page-tune .ft-drop-s { color: #79838f; }
.dark #page-tune .ft-drop-tags span { color: #8b95a2; background: #16202d; border-color: #232d3a; }
.dark #page-tune .ft-sect span { color: #6f7a88; }
.dark #page-tune .ft-sect i { background: linear-gradient(90deg, #253040, transparent); }
.dark #page-tune .ft-btn { background: linear-gradient(180deg, #f2f4f7, #dfe4ea); color: #161b22; box-shadow: 0 10px 20px -14px rgba(0, 0, 0, .9); }
.dark #page-tune .ft-btn-ghost { background: #141d2a; border-color: #29333f; color: #b6bfcc; }
.dark #page-tune .ft-btn-ghost:hover { background: #18222f; color: #fff; border-color: #3a4553; }
.dark #page-tune .ft-msg { color: #8b95a2; }
.dark #page-tune .ft-tip { border-color: #1f2833; }
.dark #page-tune .ft-tip b { color: #e6eaf0; }
.dark #page-tune .ft-tip p { color: #818b99; }
.dark #page-tune .ft-tip > i { color: #4ade80; background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .22); }
.dark #page-tune .ft-refresh { background: #17212e; border-color: #253039; color: #8b95a2; }
.dark #page-tune .ft-refresh:hover { background: #1c2836; color: #fff; }
.dark #page-tune .ft-empty { color: #78828f; }
.dark #page-tune .ft-job { background: #0f1722; border-color: #232d3a; }
.dark #page-tune .ft-job:hover { border-color: #2e3947; box-shadow: none; }
.dark #page-tune .ft-job-h .nm { color: #e6eaf0; }
.dark #page-tune .ft-job-h .tk,
.dark #page-tune .ft-job-meta { color: #7f8a98; }
.dark #page-tune .ft-job-meta code { background: #1a2431; color: #a9b3c1; }
.dark #page-tune .ft-job-act button { background: #16202d; border-color: #28323f; color: #b6bfcc; }
.dark #page-tune .ft-job-act button:hover { color: #fff; border-color: #3a4553; }
.dark #page-tune .ft-badge { background: #1a2431; border-color: #28323f; color: #9aa5b5; }
.dark #page-tune .ft-badge.blue { background: rgba(29, 99, 224, .16); border-color: rgba(29, 99, 224, .3); color: #7fb0ff; }
.dark #page-tune .ft-badge.green { background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .26); color: #5ee08b; }
.dark #page-tune .ft-badge.red { background: rgba(220, 38, 38, .15); border-color: rgba(220, 38, 38, .28); color: #ff8b8b; }
.dark #page-tune .ft-badge.yellow { background: rgba(180, 83, 9, .16); border-color: rgba(180, 83, 9, .3); color: #f0b357; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
    #page-tune .ft-grid { grid-template-columns: minmax(0, 1fr); }
    #page-tune .ft-side { position: static; }
}
@media (max-width: 760px) {
    #page-tune .ft-row2, #page-tune .ft-row3 { grid-template-columns: minmax(0, 1fr); }
    #page-tune .ft-row3 + .ft-row3 { margin-top: .85rem; }
    #page-tune .ft-hero-meta { display: none; }
    #page-tune .ft-card-sub { display: none; }
}
