/* v2 外壳与版式：左侧导航 + 内容区；页头、指标卡、面板、团队、批次、设置。
   这一层只做布局和视觉，不改任何交互钩子（data-action 等）。放在所有样式之后加载。 */

/* ---------------------------------------------------------- 基础排版 -- */
body { font-size: 14px; line-height: 1.55; background: var(--bg-app); letter-spacing: 0.005em; }
.h1 { font-size: 24px; line-height: 32px; font-weight: 650; letter-spacing: -0.015em; }
.h2 { font-size: 17px; line-height: 26px; font-weight: 650; letter-spacing: -0.005em; }
.h3 { font-size: 15px; line-height: 22px; font-weight: 620; }
.small { font-size: 13px; line-height: 19px; }
.micro { font-size: 12px; line-height: 17px; }
.page { padding: 28px var(--page-pad) 64px; }
.page--narrow { max-width: 1180px; }
.page--dash { max-width: 1280px; }

/* ----------------------------------------------------------------- 外壳 -- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; background: var(--bg-app); }
.main { min-width: 0; display: flex; flex-direction: column; }

.side {
  position: sticky; top: 0; height: 100vh; z-index: 30;
  display: flex; flex-direction: column; gap: 4px; padding: 14px 12px 12px;
  background: var(--bg); border-right: 1px solid var(--line); overflow: visible;
}
/* 很矮的窗口才让侧栏自己滚动（菜单这时改成向下展开也不会被裁掉太多） */
@media (max-height: 620px) and (min-width: 1025px) { .side { overflow-y: auto; } }
.side .brand { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.side .brand__mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(140deg, #16a37b, var(--brand) 60%, #08573f); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.side .brand__mark svg { width: 17px; height: 17px; }
.side .brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.side .brand__text small { font-size: 11px; font-weight: 500; color: var(--ink-3); letter-spacing: 0.02em; }

.side .jump {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; margin: 10px 0 6px; padding: 0 8px 0 10px;
  border-radius: var(--r-2); border: 1px solid var(--line); background: var(--bg-subtle); color: var(--ink-3); font-size: 13px;
}
.side .jump .txt { flex: 1; text-align: left; }
.side .jump:hover { border-color: var(--line-strong); color: var(--ink-2); }

.side__nav { display: flex; flex-direction: column; gap: 1px; }
.side__group { padding: 14px 10px 6px; font-size: 11.5px; font-weight: 650; color: var(--ink-4); letter-spacing: 0.06em; }
.side__item {
  position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--r-2);
  font-size: 14px; font-weight: 520; color: var(--ink-2); white-space: nowrap; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.side__item svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); transition: color var(--fast) var(--ease); }
.side__item:hover { background: var(--bg-hover); color: var(--ink); }
.side__item:hover svg { color: var(--ink-2); }
.side__item[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; }
.side__item[aria-current="page"] svg { color: var(--brand-ink); }
.side__item[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.side__count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink-3); background: var(--bg-sunken); }
.side__item[aria-current="page"] .side__count { background: var(--bg); color: var(--brand-ink); }

.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.side__live {
  display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--r-3);
  background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand-ink); font-size: 12.5px; font-weight: 600; line-height: 18px;
}
.side__live .row { gap: 6px; }
.side__live .meter { height: 4px; background: var(--brand-track); }
.side__live--info { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.side__live--info .meter { background: var(--info-line); }
.side__live--info .meter > i { background: var(--info); }
.side__live small { color: var(--ink-3); font-weight: 500; font-size: 11.5px; }
.side .workspace {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 48px; padding: 0 8px; border-radius: var(--r-2);
  border-top: 0; font-size: 13px; color: var(--ink-2); text-align: left;
}
.side .workspace:hover { background: var(--bg-hover); }
.side .workspace .who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.side .workspace .who b { font-size: 13.5px; color: var(--ink); font-weight: 650; }
.side .workspace .who small { font-size: 11.5px; color: var(--ink-3); }
.side .workspace > svg { width: 16px; height: 16px; color: var(--ink-4); }
.me-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; background: linear-gradient(135deg, #16a37b, var(--brand)); color: #fff; font-size: 14px; font-weight: 700; line-height: 1; }
.side__sep { height: 1px; background: var(--line); margin: 4px 2px; }
.menu--up { top: auto; bottom: calc(100% + 6px); min-width: 320px !important; }

/* 窄屏：侧栏变成顶部一条横向导航 */
@media (max-width: 1024px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { flex-direction: row; align-items: center; height: var(--topbar-h); padding: 0 12px; gap: 6px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side .brand { padding: 0 4px; }
  .side .brand__text { display: none; }
  .side .jump { width: auto; margin: 0; flex: none; }
  .side .jump .txt, .side .jump .kbd { display: none; }
  .side__nav { flex-direction: row; gap: 2px; }
  .side__group, .side__sep { display: none; }
  .side__item { height: 34px; flex: none; }
  .side__item[aria-current="page"]::before { display: none; }
  .side__foot { margin: 0 0 0 auto; flex-direction: row; padding: 0; }
  .side__live { display: none; }
  .side .workspace { height: 40px; width: auto; }
  .side .workspace .who, .side .workspace > svg { display: none; }
}

/* ----------------------------------------------------------------- 页头 -- */
.pagehead { display: flex; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.pagehead__text { flex: 1 1 420px; min-width: 0; }
.pagehead__eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12.5px; font-weight: 650; color: var(--brand-ink); }
.pagehead__sub { margin-top: 4px; font-size: 14px; line-height: 21px; color: var(--ink-3); max-width: 760px; }
.pagehead__acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; color: var(--ink-3); }
.crumbs svg { color: var(--ink-4); }

/* 页内一级标题（板块） */
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 30px 0 12px; flex-wrap: wrap; }
.section-head .h2 { font-size: 16px; line-height: 24px; }
.section-head .muted { font-size: 13px; }
.section-head .link { margin-left: auto; font-size: 13px; }

/* ----------------------------------------------------------- 面板卡片 -- */
.box { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-4); box-shadow: var(--shadow-1); }
.box__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; flex-wrap: wrap; }
.box__head .h2 { font-size: 15.5px; line-height: 24px; }
.box__head .sub { font-size: 13px; color: var(--ink-3); }
.box__head .acts { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.box__body { padding: 14px 20px 18px; }

/* 折叠区：默认收起的说明、记录和高级设置 */
.fold { border: 1px solid var(--line); border-radius: var(--r-3); background: var(--bg); }
.fold > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; cursor: pointer; list-style: none; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-right: 1.6px solid var(--ink-3); border-bottom: 1.6px solid var(--ink-3); transform: rotate(45deg) translate(-2px, -2px); transition: transform var(--base) var(--ease); flex: none; }
.fold[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.fold > summary:hover { color: var(--ink); }
.fold > summary .sum { font-weight: 500; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fold > summary svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.fold__body { padding: 4px 14px 14px; border-top: 1px solid var(--line); }
.fold + .fold { margin-top: 8px; }

/* -------------------------------------------------------- 首页：下达需求 -- */
.cmd { position: relative; padding: 20px 22px 16px; border-radius: var(--r-5); background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.cmd::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; border-radius: var(--r-5) var(--r-5) 0 0; background: linear-gradient(90deg, var(--brand), #2fb98d 55%, transparent); opacity: 0.9; }
.cmd__ask { display: flex; align-items: center; gap: 14px; }
.cmd__ask .avatar { flex: none; border-radius: 12px; overflow: hidden; }
.cmd__ask input {
  flex: 1; min-width: 0; height: 52px; padding: 0 16px; border-radius: var(--r-3); border: 1px solid var(--line-2); background: var(--bg-subtle);
  font-size: 16px; color: var(--ink); transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.cmd__ask input::placeholder { color: var(--ink-4); }
.cmd__ask input:hover { border-color: var(--line-strong); }
.cmd__ask input:focus { outline: none; border-color: var(--brand); background: var(--bg); box-shadow: 0 0 0 4px var(--brand-soft-2); }
.cmd__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-left: 62px; }
.cmd__row .btn--lg { height: 46px; padding: 0 24px; font-size: 15px; border-radius: var(--r-3); margin-left: auto; min-width: 150px; }
.cmd .kcount { height: 46px; border-radius: var(--r-3); padding: 0 8px 0 14px; background: var(--bg); }
.cmd .kcount__label { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.cmd .kcount__opt { min-width: 44px; height: 34px; border-radius: 8px; font-size: 14px; }
.cmd .kcount__custom { margin-left: 6px; padding-left: 10px; border-left: 1px solid var(--line); }
.cmd__foot { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin-top: 14px; padding: 12px 0 0 62px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-3); }
.cmd__foot .fact { display: inline-flex; align-items: center; gap: 6px; }
.cmd__foot .fact svg { width: 15px; height: 15px; color: var(--ink-4); }
.cmd__foot .fact b { color: var(--ink-2); font-weight: 650; }
.cmd__foot .fact--ai svg { color: var(--brand-ink); }
.cmd__opts-btn { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; height: 30px; padding: 0 10px; border-radius: var(--r-2); font-size: 13px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line-2); background: var(--bg); }
.cmd__opts-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.cmd__opts-btn svg { width: 15px; height: 15px; }
.cmd__opts-btn[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
.cmd__opts { margin-top: 12px; margin-left: 62px; padding: 6px 14px 12px; border-radius: var(--r-3); background: var(--bg-subtle); border: 1px solid var(--line); }
.cmd__opts .kmeta__row { margin-top: 8px; }
.cmd__opts .kmeta__k { min-width: 64px; }
.cmd .field-error { margin: 10px 0 0 62px; color: var(--bad); font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.cmd .field-error svg { width: 15px; height: 15px; flex: none; }

/* 首页：指标卡 */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 16px 18px; border-radius: var(--r-4); background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
a.kpi:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.kpi__label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.kpi__label svg { width: 15px; height: 15px; color: var(--ink-4); }
.kpi__value { font-size: 28px; line-height: 36px; font-weight: 680; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi__value small { font-size: 14px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; margin-left: 2px; }
.kpi__note { font-size: 12px; line-height: 17px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi .meter { margin-top: 8px; }
.kpi--live { border-color: var(--brand-line); background: linear-gradient(180deg, var(--brand-soft), var(--bg) 70%); }
.kpi--live .kpi__label { color: var(--brand-ink); }
.kpi--live .kpi__label svg { color: var(--brand-ink); }
.kpi .go { position: absolute; top: 14px; right: 14px; width: 16px; height: 16px; color: var(--ink-4); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 首页：正在进行的一批 */
.live { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-top: 16px; padding: 16px 20px; border-radius: var(--r-4); background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.live__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--info-soft); color: var(--info); }
.live__icon svg { width: 20px; height: 20px; }
.live__main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.live__title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14.5px; font-weight: 650; color: var(--ink); }
.live__title .num { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.live__msg { font-size: 13px; line-height: 19px; color: var(--ink-3); }
.live .meter { height: 6px; }
.live--wait .live__icon { background: var(--pending-soft); color: var(--pending); }

/* 首页：分派单（收紧） */
.order { margin-top: 16px; padding: 16px 20px; border-radius: var(--r-4); border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow-1); gap: 12px; }
.order__head .avatar { border-radius: 12px; overflow: hidden; }
.order__text { font-size: 14px; color: var(--ink); font-weight: 500; }
.order__lines { background: var(--bg-subtle); font-size: 13px; line-height: 21px; color: var(--ink-2); border-radius: var(--r-3); }
.order__task { border-radius: var(--r-3); background: var(--bg); }
.order__who summary, .order__older summary { color: var(--ink-3); }
.order__older { margin: 10px 2px 0; font-size: 13px; }

/* 首页：数字员工团队（紧凑卡片） */
.crew { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.mate {
  position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px; border-radius: var(--r-3);
  background: var(--bg); border: 1px solid var(--line); transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.mate:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.mate__top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mate__face { position: relative; flex: none; line-height: 0; }
.mate__face .avatar { border-radius: 11px; overflow: hidden; }
.mate__dot { position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--bg); background: var(--ink-4); }
.mate__who { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; line-height: 1.25; }
.mate__name { display: flex; align-items: baseline; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.mate__title { font-size: 12px; color: var(--ink-3); font-weight: 550; }
.mate__now { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; line-height: 18px; font-weight: 600; min-height: 36px; }
.mate__now svg { flex: none; margin-top: 2px; }
.mate__now .txt { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mate__now.status--muted { color: var(--ink-2); font-weight: 550; }
.mate__now.status--muted svg { color: var(--ink-4); }
.mate__foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11.5px; line-height: 16px; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mate__model { display: inline-block; max-width: 100%; height: 19px; line-height: 19px; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 650; font-family: var(--font-mono); color: var(--brand-ink); background: var(--brand-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mate__model--none { color: var(--ink-3); background: var(--bg-sunken); font-family: var(--font-sans); }
.mate--working { border-color: var(--brand-line); }
.mate--working .mate__dot { background: var(--brand); animation: worker-pulse 1.4s var(--ease) infinite; }
.mate--blocked { border-color: var(--pending-line); background: linear-gradient(180deg, var(--pending-soft), var(--bg) 75%); }
.mate--blocked .mate__dot { background: var(--pending-fill); }
.mate--waiting .mate__dot { background: var(--info); opacity: 0.7; }
.mate--lead { border-color: var(--brand-line); background: linear-gradient(180deg, var(--brand-soft), var(--bg) 70%); }
@media (max-width: 1280px) { .crew { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .crew { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.crew-note { margin-top: 10px; font-size: 12.5px; line-height: 19px; color: var(--ink-3); display: flex; gap: 6px; align-items: flex-start; }
.crew-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }

/* 首页：最近批次（表格式列表） */
.blist { display: flex; flex-direction: column; }
.blist__row {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 120px 96px 18px; gap: 16px; align-items: center;
  padding: 12px 20px; border-top: 1px solid var(--line); color: inherit; transition: background-color var(--fast) var(--ease);
}
.blist__row:first-child { border-top: 0; }
.blist__row:hover { background: var(--bg-subtle); }
.blist__name { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.blist__name b { font-size: 14px; font-weight: 650; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blist__name span { font-size: 12px; color: var(--ink-3); }
.blist__prog { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.blist__prog span { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.blist__prog span em { font-style: normal; color: var(--ink-3); }
.blist__time { font-size: 12.5px; color: var(--ink-3); text-align: right; white-space: nowrap; }
.blist__row > svg { width: 16px; height: 16px; color: var(--ink-4); }
.blist__head { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 120px 96px 18px; gap: 16px; padding: 10px 20px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 650; color: var(--ink-3); background: var(--bg-subtle); }
.blist__head span:nth-child(4) { text-align: right; }
.box > .blist__head:first-child { border-radius: var(--r-4) var(--r-4) 0 0; }
@media (max-width: 760px) {
  .blist__row, .blist__head { grid-template-columns: minmax(0, 1fr) 96px; }
  .blist__row > :nth-child(2), .blist__row > :nth-child(4), .blist__row > svg, .blist__head > :nth-child(2), .blist__head > :nth-child(4), .blist__head > :nth-child(5) { display: none; }
}

/* 状态徽标（带底色的小胶囊） */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge--ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.badge--info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.badge--info::before { animation: pulse-dot 1.4s var(--ease) infinite; }
.badge--pending { background: var(--pending-soft); color: var(--pending); border-color: var(--pending-line); }
.badge--bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.badge--muted { background: var(--bg-sunken); color: var(--ink-3); border-color: var(--line); }

/* ---------------------------------------------------------------- 设置 -- */
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings__nav { position: sticky; top: calc(var(--topbar-h) + 24px); display: flex; flex-direction: column; gap: 2px; }
.settings__nav a { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: var(--r-2); font-size: 13.5px; font-weight: 550; color: var(--ink-2); }
.settings__nav a:hover { background: var(--bg-hover); color: var(--ink); }
.settings__nav a svg { width: 16px; height: 16px; color: var(--ink-3); }
.settings__body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.settings__body > section { scroll-margin-top: calc(var(--topbar-h) + 20px); }
.settings .setcard { padding: 20px 22px; border-radius: var(--r-4); box-shadow: var(--shadow-1); gap: 12px; }
.settings .setcard__head .h3 { font-size: 15.5px; }
.setcard__desc { font-size: 13px; line-height: 20px; color: var(--ink-3); margin-top: -4px; }
.setlinks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.setlink { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r-3); border: 1px solid var(--line); background: var(--bg-subtle); transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.setlink:hover { border-color: var(--brand-line); background: var(--bg); }
.setlink b { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.setlink b svg { width: 16px; height: 16px; color: var(--brand-ink); }
.setlink span { font-size: 12.5px; line-height: 18px; color: var(--ink-3); }
@media (max-width: 900px) { .settings { grid-template-columns: minmax(0, 1fr); } .settings__nav { display: none; } .setlinks { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------- 全局组件的细化（v2） -- */
.btn { height: 38px; border-radius: var(--r-2); font-weight: 600; }
.btn--sm { height: 32px; }
.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: var(--r-3); }
.searchbar .btn--lg { height: 52px; min-width: 150px; }
.btn--primary { box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.btn--neutral, .btn--secondary { box-shadow: var(--shadow-1); }
.chip { height: 30px; font-weight: 600; }
.callout { border-radius: var(--r-3); font-size: 13.5px; line-height: 21px; }
.tabs .tab { font-size: 14.5px; }
.input, .select, .textarea { border-radius: var(--r-2); }
.menu { border-radius: var(--r-3); box-shadow: var(--shadow-3); }
.modal { border-radius: var(--r-5); }
.empty .art { border-radius: 14px; }
.list-head { margin-bottom: 20px; }
.list-head .sub { font-size: 14px; }
.list-head .h1 { font-size: 24px; }

/* 结果页（一批）：指标条 */
.kstats { gap: 8px; margin: 14px 0 16px; }
.kstats > span { display: inline-flex; align-items: baseline; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; }
.kstats b { font-size: 14px; }
.kprog { height: 8px; margin-top: 6px; }
.krow { border-radius: var(--r-4); background: var(--bg); box-shadow: var(--shadow-1); }
.krow:hover { border-color: var(--line-strong); }
.kresume { border-radius: var(--r-3); background: var(--bg); }
.kreceipts { gap: 6px; }

/* 商品库：卡片收紧、更像产品目录 */
.pcard { border-radius: var(--r-4); box-shadow: var(--shadow-1); padding: 14px; }
.pcard:hover { border-color: var(--line-strong); }
.pcard__img { border-radius: var(--r-3); border: 1px solid var(--line); }
.pcard__name { font-size: 15.5px; }
.pcard__acts { border-top-style: solid; }
.padd { margin-top: 4px; }
.radar-chip { border-radius: var(--r-2); background: var(--bg-subtle); }
.fold .radar-receipts { margin-top: 10px; }
.fold .scope { margin: 10px 0 0; border: 0; padding: 0; background: transparent; }

/* 搜索页：页头与地区切换 */
.home-head { margin-bottom: 18px; }
.home-head .h1 { font-size: 24px; line-height: 32px; }
.seg__opt { height: 36px; min-width: 96px; font-size: 14px; }
.searchbox input { border-radius: var(--r-3); }
.dir-card { border-radius: var(--r-4); }

/* 小屏补充 */
@media (max-width: 900px) {
  .cmd__row, .cmd__foot { padding-left: 0; }
  .cmd__opts, .cmd .field-error { margin-left: 0; }
  .cmd__row .btn--lg { width: 100%; margin-left: 0; }
  .live { grid-template-columns: minmax(0, 1fr); }
  .live__icon { display: none; }
}

/* 窄屏时侧栏在顶部，工作区菜单改成向下展开 */
@media (max-width: 1024px) {
  .menu--up { position: fixed; top: calc(var(--topbar-h) + 6px); bottom: auto; left: auto; right: 10px; }
}

/* 每天自动开工：时间和套数是句子里的小输入框 */
.setcard__line .input { width: auto; }
.setcard__line input[type="time"] { width: 128px; }
.menu .seg__opt { white-space: nowrap; padding: 0 8px; }

/* 内容线索：方向卡片收紧 */
.directions { gap: 14px; }
.dir-card { padding: 18px 20px; gap: 10px 14px; }
.dir-card__icon { width: 40px; height: 40px; border-radius: 11px; }
.dir-card__icon svg { width: 20px; height: 20px; }
.dir-card__title { font-size: 16px; line-height: 24px; font-weight: 680; }
.dir-card__desc { font-size: 13.5px; line-height: 21px; }
.searchbox input { height: 52px; font-size: 15px; }

/* 商品全套页：板块标题与全站一致 */
.psec__head .h2 { font-size: 17px; }
.psec__head .muted { font-size: 13px; }
.phead { border-radius: var(--r-4); box-shadow: var(--shadow-1); }

/* ---------------------------------------------- 实时网页版（公开链接） ---- */
.wv-badge { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-3); background: var(--bg-subtle); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; line-height: 18px; }
.wv-badge b { display: block; color: var(--ink); font-weight: 650; }
.wv-badge small { display: block; color: var(--ink-3); font-size: 12px; }
.wv-badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 5px; flex: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.pub-card { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--r-3); background: var(--bg-subtle); border: 1px solid var(--line); font-size: 12.5px; line-height: 18px; color: var(--ink-2); }
.pub-card__head { display: flex; align-items: center; gap: 8px; }
.pub-card__head b { color: var(--ink); font-weight: 650; }
.pub-card__state { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.pub-card__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.pub-card--ok .pub-card__dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.pub-card--ok .pub-card__state { color: var(--ok); }
.pub-card--pending .pub-card__dot { background: var(--pending); animation: pub-pulse 1.2s ease-in-out infinite; }
.pub-card--bad .pub-card__dot { background: var(--bad); }
.pub-card--bad .pub-card__state, .pub-card--bad small { color: var(--bad); }
.pub-card__url { all: unset; cursor: pointer; display: block; padding: 6px 8px; border-radius: var(--r-2); background: var(--bg); border: 1px solid var(--line); color: var(--brand-ink); font: 600 12px/16px var(--font-mono); overflow-wrap: anywhere; }
.pub-card__url:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.pub-card__url:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pub-card small { color: var(--ink-3); font-size: 12px; }
.pub-card__foot { display: flex; justify-content: flex-end; }
@keyframes pub-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .pub-card--pending .pub-card__dot { animation: none; } }
@media (max-width: 1024px) { .wv-badge, .pub-card { display: none; } }
.wv-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: var(--bg-overlay, rgba(10, 14, 18, .45)); }
.wv-modal__card { width: min(460px, 100%); background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-4); box-shadow: var(--shadow-3); padding: 24px 24px 20px; }
.wv-modal__card h2 { margin: 0 0 10px; font-size: 18px; line-height: 26px; font-weight: 700; }
.wv-modal__card p { margin: 0 0 10px; color: var(--ink-2); font-size: 14.5px; line-height: 23px; }
.wv-modal__foot { display: flex; justify-content: flex-end; margin-top: 16px; }

/* 链接设置弹层：永久域名、开机自动运行、不让电脑睡眠、关闭平台 */
.pl-sec { display: grid; gap: 10px; }
.pl-sec + .pl-sec { padding-top: 16px; border-top: 1px solid var(--line); }
.pl-h { margin: 0; font-size: 14px; line-height: 20px; font-weight: 700; color: var(--ink); }
.pl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pl-form { display: grid; gap: 10px; }
.pl-url { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-3); background: var(--bg-subtle); border: 1px solid var(--line); }
.pl-url a { flex: 1; min-width: 0; color: var(--brand-ink); font: 650 14px/20px var(--font-mono); overflow-wrap: anywhere; text-decoration: none; }
.pl-url a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pl-ok { color: var(--ok); font-weight: 600; }
.pl-note { margin: 0; padding: 10px 12px; border-radius: var(--r-3); background: var(--bg-subtle); color: var(--ink-2); font-size: 13.5px; line-height: 21px; }
.pl-err { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-3); background: var(--bad-soft, rgba(220, 60, 50, .08)); color: var(--bad); font-size: 13.5px; line-height: 21px; }
.pl-err svg { flex: none; margin-top: 2px; }
.pl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pl-step { display: flex; align-items: center; gap: 10px; font-size: 13.5px; line-height: 20px; color: var(--ink-3); }
.pl-step__mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 650 12px/1 var(--font-mono); background: var(--bg-subtle); border: 1px solid var(--line); color: var(--ink-3); }
.pl-step--done { color: var(--ink-2); }
.pl-step--done .pl-step__mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.pl-step--now { color: var(--ink); font-weight: 650; }
.pl-step--now .pl-step__mark { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); animation: pub-pulse 1.2s ease-in-out infinite; }
.pl-opts { display: grid; gap: 4px; }
.pl-opt { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.pl-opt b { display: block; font-size: 14px; line-height: 20px; color: var(--ink); font-weight: 650; }
.pl-opt small { display: block; font-size: 12.5px; line-height: 18px; color: var(--ink-3); }
.pub-card__foot { gap: 10px; }
.pub-card__foot .grow { flex: 1; }
@media (prefers-reduced-motion: reduce) { .pl-step--now .pl-step__mark { animation: none; } }
