/* ==========================================================================
   硅基办公 · 任务中心（产线运行图 + 任务清单）
   类名统一 tk- 前缀。数据与交互在 assets/js/tasks.js。

   这一屏是一间「机房」：三样东西各管一件事，不堆装饰 ——
     上方电力总线 + 下垂导线 = 电从哪来、通到哪一站断了
     工位机箱里咬合的一对齿轮 = 这一站在不在干活
     下方传送带 + 上面的托盘    = 活在往哪走、堵在哪、堆了多少
   颜色只有几种，每种只代表一个状态：电光青=在跑 / 紫=待验收 / 琥珀=排队 / 朱红=卡住。
   ========================================================================== */

.tk {
  --tk-bg: #05090e;
  --tk-panel: #07121a;
  --tk-line: rgba(110, 240, 255, .18);
  --tk-line2: rgba(110, 240, 255, .09);
  --tk-go: #6ef0ff;
  --tk-warn: #e0a83c;
  --tk-stop: #ff5a4d;
  --tk-ok: #7fd8a8;
  --tk-review: #c98be8;
  --tk-ink: #e6f5fa;
  --tk-dim: #8fa6b4;
  --tk-dim2: #5d7280;

  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--tk-line);
  background:
    linear-gradient(rgba(110, 240, 255, .035) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(90deg, rgba(110, 240, 255, .035) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, #07121a, #050c12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(110, 240, 255, .08);
  color: var(--tk-ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- 头 ---------- */

.tk-hd { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--tk-line2); flex: none; }
.tk-tabs { display: flex; gap: 2px; background: #08131b; border: 1px solid var(--tk-line2); border-radius: 8px; padding: 2px; }
.tk-tabs button {
  border: 0; background: none; color: var(--tk-dim);
  font: inherit; font-size: 12.5px; padding: 4px 14px; border-radius: 6px; cursor: pointer;
}
.tk-tabs button:hover { color: #d9eff7; }
.tk-tabs button.is-on { background: rgba(110, 240, 255, .14); color: #eafcff; box-shadow: inset 0 0 0 1px var(--tk-line); }
.tk-sp { flex: 1; }
.tk-badge {
  font-size: 11.5px; color: var(--tk-warn); border: 1px solid rgba(224, 168, 60, .4);
  background: rgba(224, 168, 60, .08); border-radius: 999px; padding: 2px 10px; white-space: nowrap;
}
.tk-ico {
  width: 32px; height: 32px; border: 1px solid var(--tk-line); border-radius: 8px; background: #08131b;
  color: var(--tk-go); cursor: pointer; display: grid; place-items: center; flex: none;
}
.tk-ico:hover { background: rgba(110, 240, 255, .12); }
.tk-ico svg { width: 17px; height: 17px; }

/* ---------- 读数带 ---------- */

.tk-kpi {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--tk-line2); border-bottom: 1px solid var(--tk-line2); flex: none;
}
.tk-kpi > div { background: var(--tk-panel); padding: 10px 16px; }
.tk-kpi b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.4px; line-height: 1.15; }
.tk-kpi span { font-size: 11.5px; color: var(--tk-dim); }
.tk-kpi b.k-run { color: var(--tk-go); }
.tk-kpi b.k-review { color: var(--tk-review); }
.tk-kpi b.k-stop { color: var(--tk-stop); }

/* ---------- 主体：左舞台 + 右栏 ---------- */

.tk-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 1px; background: var(--tk-line2); }
.tk-stage {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  padding: 0 14px 14px; overflow: auto;
  background: radial-gradient(120% 130% at 50% -10%, #0b1c26 0, #050c12 72%);
}
.tk-rail { background: var(--tk-panel); padding: 14px; overflow-y: auto; min-height: 0; }
.tk-rail h2 { margin: 14px 0 8px; font-size: 12px; font-weight: 600; color: var(--tk-dim); letter-spacing: .3px; }
.tk-rail h2:first-child { margin-top: 2px; }
.tk-empty { margin: 26px 4px; font-size: 12.5px; color: var(--tk-dim2); }

/* ============ 产线 ============ */

.tk-flows { display: flex; gap: 6px; padding: 14px 2px 0; flex: none; }
.tk-flows button {
  border: 1px solid var(--tk-line2); background: #08131b; color: var(--tk-dim);
  font: inherit; font-size: 12px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
}
.tk-flows button:hover { color: #d9eff7; }
.tk-flows button.is-on { color: #eafcff; border-color: var(--tk-line); background: rgba(110, 240, 255, .12); }

.tk-ln { position: relative; margin: auto; flex: none; }
.tk-ln > * { position: absolute; }

/* 电力总线：通电那段有电流在走，跳闸之后是死的 */
.tk-bus {
  height: 12px; border-radius: 3px;
  background: linear-gradient(180deg, #152531, #0c1720); border: 1px solid rgba(110, 240, 255, .2);
  box-shadow: inset 0 1px 0 rgba(180, 230, 255, .1);
}
.tk-bus > i {
  position: absolute; inset: 2px 3px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, rgba(170, 250, 255, .95) 0 4px, rgba(110, 240, 255, .22) 4px 11px, transparent 11px 34px);
  animation: tk-flowBus .9s linear infinite;
}
.tk-bus.dead > i { background: repeating-linear-gradient(90deg, rgba(130, 150, 160, .2) 0 4px, transparent 4px 34px); animation: none; }
@keyframes tk-flowBus { to { background-position: 34px 0; } }
.tk-brk {
  width: 15px; height: 15px; border-radius: 3px; background: #2b0f0b;
  border: 1px solid var(--tk-stop); box-shadow: 0 0 12px rgba(255, 90, 77, .55);
}
.tk-brk::after { content: ""; position: absolute; inset: 4px; border-radius: 1px; background: var(--tk-stop); animation: tk-blink 1.1s steps(1, end) infinite; }
@keyframes tk-blink { 50% { opacity: .15; } }

/* 下垂导线：电从总线接到每个工位 */
.tk-wr {
  width: 3px; border-radius: 2px;
  background: repeating-linear-gradient(180deg, rgba(110, 240, 255, .95) 0 4px, rgba(110, 240, 255, .07) 4px 13px);
  animation: tk-flowY .6s linear infinite;
}
.tk-wr.dead { background: repeating-linear-gradient(180deg, rgba(130, 150, 160, .28) 0 4px, rgba(130, 150, 160, .04) 4px 13px); animation: none; }
@keyframes tk-flowY { to { background-position: 0 13px; } }
.tk-lp { width: 10px; height: 10px; border-radius: 50%; }

/* 工位机箱：等高等宽，轮廓是设计出来的 */
.tk-st {
  border-radius: 12px; border: 1px solid rgba(110, 240, 255, .17); cursor: pointer;
  background: linear-gradient(168deg, #16262f, #0b141b 48%, #0f1d25);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(190, 235, 255, .1), inset 0 -20px 26px rgba(0, 0, 0, .38);
}
.tk-st:hover { border-color: rgba(110, 240, 255, .42); }
.tk-st.is-stop {
  border-color: rgba(255, 90, 77, .6);
  box-shadow: 0 0 0 1px rgba(255, 90, 77, .18), 0 14px 32px rgba(255, 90, 77, .2), inset 0 1px 0 rgba(255, 190, 180, .14), inset 0 -20px 26px rgba(60, 10, 8, .5);
}
.tk-st.is-off { border-color: rgba(130, 150, 160, .14); opacity: .62; }
.tk-sth {
  position: absolute; left: 13px; right: 13px; top: 9px;
  display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--tk-dim2);
}
.tk-sth em { font-style: normal; color: #7c93a2; }
.tk-sth em.k-run { color: var(--tk-go); }
.tk-sth em.k-wait { color: var(--tk-warn); }
.tk-sth em.k-stop { color: var(--tk-stop); }
.tk-sth em.k-review { color: var(--tk-review); }
.tk-stn {
  position: absolute; left: 10px; right: 10px; bottom: 8px; text-align: center; padding-top: 6px;
  border-top: 1px solid rgba(110, 240, 255, .11);
}
.tk-stn b { display: block; font-size: 12.5px; font-weight: 600; color: #dceef5; }
.tk-stn i { font-style: normal; font-size: 11.5px; color: var(--tk-dim); }

/* 齿轮：两个共用一个模数所以咬得上，相邻反向转 */
.tk-gr {
  animation: tk-spin var(--d, 18s) linear infinite;
  animation-direction: var(--dir, normal);
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 7px var(--glow, transparent));
  pointer-events: none;
}
.tk-gr svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tk-gr .tk-rim { stroke: var(--c, #5f93a6); stroke-width: 1.4; fill: #0b1a22; }
.tk-gr .tk-hub { stroke: var(--c, #5f93a6); stroke-opacity: .45; stroke-width: 1.1; fill: #060f15; }
.tk-gr .tk-hl { stroke: var(--c, #5f93a6); stroke-opacity: .26; stroke-width: 1.1; fill: #09151d; }
.tk-gr.k-run { --c: var(--tk-go); --glow: rgba(110, 240, 255, .45); }
.tk-gr.k-stop { --c: var(--tk-stop); --glow: rgba(255, 90, 77, .85); animation-play-state: paused; }
.tk-gr.k-off { --c: #4a6270; --glow: transparent; animation-play-state: paused; }
.tk-gr.k-done { animation-duration: calc(var(--d) * 2.8); }
.tk-gr.k-wait { --c: #b8873a; --glow: rgba(224, 168, 60, .22); animation-duration: calc(var(--d) * 4.5); }
.tk-gr.k-review { --c: var(--tk-review); --glow: rgba(201, 139, 232, .3); animation-duration: calc(var(--d) * 3.4); }
@keyframes tk-spin { to { transform: rotate(360deg); } }

/* 仪表：270° 表盘，指针 = 这一步用掉了多少限时（进红区就是快超时 / 已超时） */
.tk-dg { position: absolute; pointer-events: none; }
.tk-dg svg { display: block; width: 100%; height: 100%; }
.tk-dg .tk-tk { stroke: rgba(150, 190, 205, .34); stroke-width: 1; }
.tk-dg .tk-tk.maj { stroke: rgba(200, 240, 250, .7); stroke-width: 1.4; }
.tk-dg .tk-tk.red { stroke: rgba(255, 90, 77, .85); }
.tk-dg .tk-trk { fill: none; stroke: #15242e; stroke-width: 4; stroke-linecap: round; }
.tk-dg .tk-val { fill: none; stroke: var(--c, #5f93a6); stroke-width: 4; stroke-linecap: round; }
.tk-dg .tk-nd { stroke: #eafcff; stroke-width: 1.7; stroke-linecap: round; }
.tk-dg .tk-ct { fill: #0a141b; stroke: rgba(110, 240, 255, .4); stroke-width: 1; }
.tk-dg.k-run { --c: var(--tk-go); }
.tk-dg.k-wait { --c: #b8873a; }
.tk-dg.k-review { --c: var(--tk-review); }
.tk-dg.k-done { --c: #4f8798; }
.tk-dg.k-off { --c: #3f5560; }
.tk-dg.k-stop { --c: var(--tk-stop); }
.tk-dg.k-stop .tk-nd { stroke: #ffd5d0; }
.tk-dg.k-stop .tk-val { animation: tk-blink 1.1s steps(1, end) infinite; }
.tk-dgn { position: absolute; text-align: center; font-size: 10.5px; line-height: 1.2; color: var(--tk-dim2); pointer-events: none; }
.tk-dgn b { font-weight: 600; color: var(--tk-dim); }
.tk-dgn.k-stop b { color: var(--tk-stop); }
.tk-dgn.k-run b { color: var(--tk-go); }

/* 两个齿轮咬合处迸的火花 = 这一站自己在转 */
.tk-spk {
  width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff 0, var(--c, var(--tk-go)) 40%, transparent 72%);
  animation: tk-spk 1.6s ease-in-out infinite;
}
.tk-spk.k-stop { --c: var(--tk-stop); animation-duration: .4s; }
.tk-spk.k-off { background: radial-gradient(circle, #33454f 0, transparent 70%); animation: none; }
.tk-spk.k-wait { --c: var(--tk-warn); animation-duration: 2.6s; }
.tk-spk.k-review { --c: var(--tk-review); }
@keyframes tk-spk { 0%, 100% { opacity: .25; transform: scale(.7); } 45% { opacity: 1; transform: scale(1.25); } }

/* 卡住那一站往外的脉冲 */
.tk-al { width: 0; height: 0; border-radius: 50%; border: 2px solid var(--tk-stop); animation: tk-ring 2s ease-out infinite; pointer-events: none; }
.tk-al.b { animation-delay: 1s; }
@keyframes tk-ring { 0% { opacity: .85; transform: scale(.5); } 100% { opacity: 0; transform: scale(2.4); } }

/* 传送带 + 皮带上的托盘 */
.tk-bl {
  border-radius: 5px; border: 1px solid rgba(110, 240, 255, .16); background: #0a141b; overflow: hidden;
  box-shadow: inset 0 2px 0 rgba(110, 240, 255, .42), inset 0 -8px 12px rgba(0, 0, 0, .5);
}
.tk-bl > i {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(110, 240, 255, .09) 0 3px, transparent 3px 15px);
  animation: tk-flowX .95s linear infinite;
}
.tk-bl.stop > i { animation-play-state: paused; }
.tk-bl > u { position: absolute; top: 0; bottom: 0; text-decoration: none; background: repeating-linear-gradient(115deg, rgba(255, 90, 77, .34) 0 6px, rgba(255, 90, 77, .03) 6px 12px); }
@keyframes tk-flowX { to { background-position: 16px 0; } }
.tk-rl {
  position: absolute; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(110, 240, 255, .42) 0deg 7deg, transparent 7deg 60deg);
  border: 1px solid rgba(110, 240, 255, .22); animation: tk-spin 7s linear infinite;
}
.tk-bl.stop .tk-rl { animation-play-state: paused; }
/* 托盘 = 皮带上的工件，正面写着里面装的是什么 */
.tk-wp {
  border-radius: 4px; border: 1px solid var(--c);
  background: linear-gradient(180deg, rgba(var(--wb-ink-rgb), .1), rgba(8, 18, 24, .96));
  box-shadow: 0 4px 10px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(var(--wb-ink-rgb), .12);
}
.tk-wp::before { content: ""; position: absolute; inset: 0; border-radius: 3px; background: var(--c); opacity: .2; }
.tk-wp i { position: absolute; left: 4px; right: 4px; top: 4px; height: 3px; border-radius: 2px; background: var(--c); opacity: .9; }
.tk-wp b { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 11.5px; font-weight: 600; color: #e2f5fb; letter-spacing: .5px; }
.tk-wp.stop { animation: tk-shake .5s steps(1, end) infinite; }
@keyframes tk-shake { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(1.5px); } }

/* ---------- 右栏卡片 ---------- */

.tk-card { border: 1px solid var(--tk-line2); border-radius: 10px; background: #08131b; padding: 10px 12px; margin-bottom: 9px; }
.tk-card[data-task] { cursor: pointer; }
.tk-card[data-task]:hover { border-color: var(--tk-line); }
.tk-card.warn { border-color: rgba(224, 168, 60, .35); background: rgba(224, 168, 60, .05); }
.tk-card.stop { border-color: rgba(255, 90, 77, .42); background: rgba(255, 90, 77, .06); }
.tk-card p { margin: 0; font-size: 12.5px; color: var(--tk-dim); }
.tk-card p b { color: var(--tk-ink); font-weight: 600; }
.tk-card p.tk-sub { margin-top: 3px; font-size: 11.5px; color: var(--tk-dim2); }
.tk-bar2 { height: 5px; border-radius: 3px; background: #0f222c; margin-top: 7px; overflow: hidden; }
.tk-bar2 i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #2f7d92, var(--tk-go)); }
.tk-card.warn .tk-bar2 i { background: linear-gradient(90deg, #8a6a25, var(--tk-warn)); }
.tk-cat { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--tk-dim); margin-top: 9px; }
.tk-cat:first-of-type { margin-top: 2px; }
.tk-cat b { color: var(--tk-ink); font-weight: 600; }

/* ---------- 清单（第二副面孔） ---------- */

.tk-bar { display: flex; align-items: center; gap: 10px; padding: 14px 0 10px; flex: none; flex-wrap: wrap; }
.tk-seg { display: flex; gap: 2px; background: #08131b; border: 1px solid var(--tk-line2); border-radius: 8px; padding: 2px; }
.tk-seg button { border: 0; background: none; color: var(--tk-dim); font: inherit; font-size: 12px; padding: 4px 12px; border-radius: 6px; cursor: pointer; }
.tk-seg button:hover { color: #d9eff7; }
.tk-seg button.is-on { background: rgba(110, 240, 255, .14); color: #eafcff; box-shadow: inset 0 0 0 1px var(--tk-line); }
.tk-inp {
  height: 32px; min-width: 0; padding: 0 12px; border-radius: 8px; font: inherit; font-size: 12.5px;
  color: var(--tk-ink); background: #08131b; border: 1px solid var(--tk-line2); outline: none;
}
.tk-inp::placeholder { color: var(--tk-dim2); }
.tk-inp:focus { border-color: var(--tk-line); background: #0a1821; }
.tk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px;
  border: 0; border-radius: 8px; cursor: pointer; font: inherit; font-size: 12.5px; white-space: nowrap;
  background: rgba(110, 240, 255, .16); color: #eafcff; box-shadow: inset 0 0 0 1px var(--tk-line); transition: background .16s;
}
.tk-btn:hover { background: rgba(110, 240, 255, .26); }
.tk-btn svg { width: 14px; height: 14px; flex: none; }
.tk-btn--ghost { background: transparent; color: var(--tk-dim); box-shadow: inset 0 0 0 1px var(--tk-line2); }
.tk-btn--ghost:hover { background: rgba(110, 240, 255, .08); color: #d9eff7; }
.tk-btn--danger { background: rgba(255, 90, 77, .18); color: #ffd8d3; box-shadow: inset 0 0 0 1px rgba(255, 90, 77, .45); }
.tk-btn--danger:hover { background: rgba(255, 90, 77, .3); }
.tk-btn.is-armed { background: rgba(255, 90, 77, .3); color: #ffe2de; box-shadow: inset 0 0 0 1px rgba(255, 90, 77, .6); }

.tk-tb { width: 100%; border-collapse: collapse; font-size: 13px; }
.tk-tb th { text-align: left; font-weight: 600; font-size: 11.5px; color: var(--tk-dim2); padding: 7px 10px; border-bottom: 1px solid var(--tk-line2); white-space: nowrap; }
.tk-tb td { padding: 9px 10px; border-bottom: 1px solid rgba(110, 240, 255, .06); color: var(--tk-dim); }
.tk-tb td b { color: var(--tk-ink); font-weight: 600; }
.tk-tb tr[data-task] { cursor: pointer; }
.tk-tb tr[data-task]:hover td { background: rgba(110, 240, 255, .05); }
.tk-p { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; border-radius: 999px; padding: 1.5px 9px; white-space: nowrap; }
.tk-p s { text-decoration: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tk-p.k-run { color: var(--tk-go); background: rgba(110, 240, 255, .1); }
.tk-p.k-wait { color: var(--tk-warn); background: rgba(224, 168, 60, .1); }
.tk-p.k-review { color: var(--tk-review); background: rgba(201, 139, 232, .12); }
.tk-p.k-stop { color: var(--tk-stop); background: rgba(255, 90, 77, .12); }
.tk-p.k-done { color: var(--tk-ok); background: rgba(127, 216, 168, .1); }
.tk-p.k-off { color: var(--tk-dim2); background: rgba(130, 150, 160, .1); }

/* ---------- 任务详情（右栏，不跳 App） ---------- */

.tk-det { border: 1px solid var(--tk-line); border-radius: 12px; background: #08131b; padding: 13px 14px; }
.tk-det__hd { position: relative; padding-right: 26px; }
.tk-det__hd h3 { margin: 0 0 3px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.tk-det__hd p { margin: 0 0 10px; font-size: 11.5px; color: var(--tk-dim2); }
.tk-x {
  position: absolute; right: -4px; top: -4px; width: 26px; height: 26px; border: 0; border-radius: 8px;
  background: none; color: var(--tk-dim); cursor: pointer; display: grid; place-items: center;
  font: inherit; font-size: 17px; line-height: 1;
}
.tk-x:hover { background: rgba(110, 240, 255, .1); color: #eafcff; }
.tk-kv { margin: 0; padding: 10px 0 2px; border-top: 1px solid var(--tk-line2); }
.tk-kv > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 5px 0; }
.tk-kv dt { font-size: 12px; color: var(--tk-dim2); flex: none; }
.tk-kv dd { margin: 0; font-size: 12.5px; color: var(--tk-ink); text-align: right; word-break: break-word; }
.tk-why { color: var(--tk-dim); font-size: 11.5px; }
.tk-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: rgba(110, 240, 255, .06); font-size: 12px; color: var(--tk-dim); }
.tk-rej { margin-top: 10px; padding: 10px; border-radius: 10px; background: rgba(255, 90, 77, .07); border: 1px solid rgba(255, 90, 77, .3); }
.tk-rej p { margin: 0 0 8px; font-size: 11.5px; color: #f0c3bd; }
.tk-dims { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.tk-dims button {
  border: 1px solid var(--tk-line2); background: #0a1821; color: var(--tk-dim);
  font: inherit; font-size: 12px; padding: 3px 11px; border-radius: 999px; cursor: pointer;
}
.tk-dims button:hover { color: #d9eff7; }
.tk-dims button.is-on { background: rgba(255, 90, 77, .22); color: #ffe2de; border-color: rgba(255, 90, 77, .55); }
.tk-rej .tk-inp { width: 100%; margin-bottom: 8px; }
.tk-acts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tk-owner { margin: 10px 0 0; font-size: 11.5px; color: var(--tk-dim2); line-height: 1.5; }

/* ---------- 新建 / 编辑 ---------- */

.tk-form { margin: 16px 20px 20px; padding: 16px 18px 18px; border-radius: 14px; border: 1px solid var(--tk-line); background: #08131b; overflow-y: auto; }
.tk-form__hd { position: relative; padding-right: 26px; margin-bottom: 12px; }
.tk-form__hd h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.tk-fg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.tk-f { display: flex; flex-direction: column; gap: 5px; }
.tk-f--wide { grid-column: 1 / -1; }
.tk-f > span { font-size: 11.5px; color: var(--tk-dim2); }
.tk-form .tk-inp { width: 100%; height: 34px; }
.tk-row2 { display: flex; gap: 8px; margin-top: 14px; }

/* ---------- App 自己的设置 ---------- */

.tk-set {
  position: relative; margin: 0 16px 4px; padding: 13px 16px; border-radius: 12px;
  border: 1px solid var(--tk-line); background: #08131b; flex: none; max-width: 620px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.tk-set h3 { margin: 0 0 3px; font-size: 13px; }
.tk-set > p { margin: 0 0 10px; font-size: 11.5px; color: var(--tk-dim2); }
.tk-srow { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--tk-dim); padding: 7px 0; border-top: 1px solid var(--tk-line2); }
.tk-sel { background: #0c1c26; border: 1px solid var(--tk-line); color: var(--tk-ink); border-radius: 7px; font: inherit; font-size: 12.5px; padding: 3px 8px; }
.tk-sw { width: 38px; height: 21px; border-radius: 999px; background: rgba(110, 240, 255, .3); position: relative; border: 1px solid var(--tk-line); cursor: pointer; padding: 0; flex: none; }
.tk-sw i { position: absolute; top: 2px; right: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--tk-go); transition: .16s; }
.tk-sw.off { background: #152730; }
.tk-sw.off i { right: auto; left: 2px; background: #54697a; }

/* ---------- 省电与窄屏 ---------- */

@media (prefers-reduced-motion: reduce) {
  .tk-gr, .tk-spk, .tk-al, .tk-bl > i, .tk-bus > i, .tk-wr, .tk-rl, .tk-wp.stop, .tk-brk::after, .tk-dg.k-stop .tk-val { animation: none !important; }
}
/* 设置里把「齿轮与皮带动画」关掉：整条线静止，数据照旧 */
.tk-ln.no-anim * { animation: none !important; }

@media (max-width: 1000px) {
  .tk-main { grid-template-columns: minmax(0, 1fr); }
  .tk-rail { border-top: 1px solid var(--tk-line2); max-height: 46%; }
  .tk-kpi { grid-template-columns: repeat(2, 1fr); }
  .tk-fg { grid-template-columns: minmax(0, 1fr); }
}
