/* 运维后台样式：按宝塔面板（Element 配色）实测尺寸——深色左侧菜单 200px、15px 菜单、14px 正文与标签、15px 卡片标题、
   32px 按钮与输入框、4px 圆角、浅灰底白卡片、浅绿次按钮。只用本站资源（CSP），不引外部字体。 */
:root {
  --bg: #F5F7F6;
  --surface: #FFFFFF;
  --ink: #303133;
  --ink-2: #606266;
  --muted: #909399;
  --faint: #C0C4CC;
  --line: #DCDFE6;
  --line-2: #E4E7ED;
  --line-3: #EBEEF5;
  --line-4: #F2F6FC;
  --head: #F7F8FA;
  --hover: #F5F7FA;
  --side: #3C444D;
  --side-2: #384049;
  --side-3: #2F363D;
  --green: #20A53A;
  --green-2: #1B9031;
  --green-soft: #E9F6EB;
  --green-line: #90D29D;
  --green-faint: #F3FAF4;
  --warn: #F0A020;
  --warn-ink: #CF8A0C;
  --warn-soft: #FDF6EC;
  --warn-line: #F5DAB1;
  --bad: #EF0808;
  --bad-ink: #E33E33;
  --bad-soft: #FEF0F0;
  --bad-line: #FBC4C4;
  --info: #3D8EEB;
  --info-soft: #ECF5FF;
  --info-line: #B3D8FF;
  --font: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  --mono: Consolas, "SFMono-Regular", Menlo, "Liberation Mono", monospace;
  --r: 4px;
  --gap: 14px;
  --lw: 150px;   /* 表单标签宽度 */
  --cw: 520px;   /* 表单输入框宽度 */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.6 var(--font); color: var(--ink-2); background: var(--bg); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-2); }
:focus-visible { outline: 2px solid rgba(32, 165, 58, .4); outline-offset: 1px; }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--ink); }
p { margin: 0 0 8px; }
b, strong { font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ========== 框架：左侧菜单（宝塔） ========== */
.shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--side) 200px, transparent 200px); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--side); color: #fff; overflow-y: auto; font-size: 15px; }
.brand { position: relative; display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 14px 0 20px; color: #fff; flex: none; }
.brand-home { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: #fff; }
.brand-home:hover { color: #fff; }
.brand-mark { flex: none; width: 26px; height: 26px; }
.brand-text { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .2px; }
.brand-badge { flex: none; min-width: 24px; height: 22px; padding: 0 7px; border: 0; border-radius: 3px; background: var(--green); color: #fff; font: inherit; font-size: 13px; line-height: 22px; text-align: center; font-weight: 400; cursor: pointer; }
.brand-badge:hover { filter: brightness(1.08); }
.brand-badge.pop { animation: badge-pop .7s ease-out 2; }
@keyframes badge-pop { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(32, 165, 58, .7); } 35% { transform: scale(1.35); } 100% { transform: scale(1); box-shadow: 0 0 0 10px rgba(32, 165, 58, 0); } }
.brand-badge.warn { background: #F0AD4E; }
.nav { flex: 1; padding: 4px 0 10px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 14px; height: 46px; margin: 4px 12px; padding: 0 0 0 22px; border-radius: var(--r); color: rgba(255, 255, 255, .94); font-size: 15px; line-height: 46px; transition: background .15s; }
.nav-item .ico { width: 21px; height: 21px; flex: none; color: #D2D6DA; }
.nav-item:hover { background: var(--side-2); color: #fff; }
.nav-item:hover .ico { color: #fff; }
.nav-item.on { background: var(--side-2); color: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .12); }
.nav-item.on::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 2px; background: var(--green); }
.nav-item.on .ico { color: var(--green); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .07); background: var(--side-3); }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-size: 15px; font-weight: 600; }
.who { flex: 1; min-width: 0; }
.who a { color: #fff; font-size: 15px; display: block; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who a:hover { color: #fff; }
.who small { color: #A4ABB3; font-size: 12px; display: block; line-height: 1.35; }
.side-user form { margin: 0; }
.side-user .link { color: #C9CDD1; font-size: 14px; }
.side-user .link:hover { color: #fff; text-decoration: none; }
.main { min-width: 0; }
.page { padding: var(--gap) var(--gap) 40px; }
.topbar, .side-scrim { display: none; }

/* ========== 页头：标题 + 标签页 + 右侧操作（一条白色栏，宝塔式） ========== */
.pbar { display: flex; align-items: stretch; flex-wrap: wrap; gap: 0 18px; min-height: 54px; padding: 0 20px; margin-bottom: var(--gap); background: var(--surface); border-radius: var(--r); }
.pbar-t { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 0; }
.pbar-t h1 { font-size: 17px; line-height: 1.4; white-space: nowrap; }
.pbar-crumb { color: var(--muted); font-size: 14px; white-space: nowrap; }
.pbar-crumb a { color: var(--muted); }
.pbar-crumb a:hover { color: var(--green); }
.pbar-crumb i { font-style: normal; margin: 0 6px; color: var(--faint); }
.pbar-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptabs { display: flex; align-items: stretch; gap: 2px; position: relative; padding-left: 18px; overflow-x: auto; scrollbar-width: none; }
.ptabs::before { content: ""; position: absolute; left: 0; top: 50%; height: 16px; margin-top: -8px; width: 1px; background: var(--line-2); }
.ptabs a { position: relative; display: flex; align-items: center; padding: 0 16px; font-size: 15px; color: var(--ink-2); white-space: nowrap; }
.ptabs a:hover { color: var(--green); }
.ptabs a.on { color: var(--green); }
.ptabs a.on::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--green); }
.pact { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 0; }
.pact form { margin: 0; }

/* 二级分类（宝塔式按钮组） */
.subtabs { display: flex; flex-wrap: wrap; margin: 0 0 var(--gap); }
.subtabs a { height: 32px; padding: 0 16px; display: inline-flex; align-items: center; border: 1px solid var(--line); margin-left: -1px; background: var(--surface); color: var(--ink-2); font-size: 13px; white-space: nowrap; position: relative; }
.subtabs a:first-child { margin-left: 0; border-radius: var(--r) 0 0 var(--r); }
.subtabs a:last-child { border-radius: 0 var(--r) var(--r) 0; }
.subtabs a:hover { color: var(--green); z-index: 1; }
.subtabs a.on { background: var(--green); border-color: var(--green); color: #fff; z-index: 2; }
.subtabs a .badge { margin-left: 6px; }
.subtabs.inline { margin: 0; }

/* ========== 卡片 ========== */
.card { background: var(--surface); border-radius: var(--r); padding: 16px 20px; margin-bottom: var(--gap); }
.card > h2, .card-h { font-size: 15px; line-height: 1.5; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.card > h2 .h-actions, .card-h .h-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 13px; }
.card > h2 .h-actions form, .card-h .h-actions form { margin: 0; }
.card > h2 small, .card-h small { font-size: 12px; font-weight: 400; color: var(--muted); }
.card h3 { font-size: 14px; color: var(--ink); margin: 16px 0 8px; }
.card.tight { padding: 0; overflow: hidden; }
.card.tight > h2 { margin: 0; padding: 12px 20px; }
.card.tight > .pad { padding: 0 20px 12px; margin: 0; }
.card.tight > .pad-b { padding: 0 20px 16px; }
.card.tight > .pad-b.mt { padding-top: 14px; margin: 0; }
.card.tight > .empty { padding: 14px 20px 18px; margin: 0; }
.card.tight > h2 + .table-wrap { border-top: 1px solid var(--line-3); }
.card.tight > .pad + .table-wrap { border-top: 1px solid var(--line-3); }
.grid { display: grid; gap: var(--gap); margin-bottom: var(--gap); }
.grid > .card, .grid > form.card { margin-bottom: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
.g-side { grid-template-columns: minmax(320px, 1fr) minmax(0, 2fr); }
.g-form { grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); align-items: start; }
.aside h2 { font-size: 14px; }
.aside .tips { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; line-height: 1.8; }
.aside .tips li + li { margin-top: 8px; }
.aside .tips b { color: var(--ink); }
/* 卡片里的小方块（宝塔“CC防御”那种带边框的功能块） */
.box { border: 1px solid var(--line-2); border-radius: var(--r); padding: 18px 20px; background: var(--surface); }

/* 工具条：左按钮/分类，右搜索 */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 20px; }
.toolbar form { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.toolbar input[type=search], .toolbar input[type=text] { width: 240px; }
.toolbar select { width: auto; min-width: 120px; }
.toolbar .check { white-space: nowrap; }
.toolbar + .table-wrap { border-top: 1px solid var(--line-3); }
.card.filters { padding: 14px 20px; }
.filters input[type=search] { width: 260px; }
.filters select { width: auto; min-width: 120px; }
/* 搜索框（右侧放大镜按钮） */
.search, .toolbar form.search { display: inline-flex; align-items: stretch; gap: 0; flex-wrap: nowrap; }
.search input[type=search] { border-radius: var(--r) 0 0 var(--r); width: 260px; }
.search button { width: 40px; height: 32px; border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--r) var(--r) 0; background: #fff; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 0; }
.search button:hover { color: var(--green); }
.search button svg { width: 16px; height: 16px; }

/* ========== 总览：数字块、仪表盘、图表 ========== */
.stat { background: var(--surface); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column-reverse; gap: 4px; color: var(--ink-2); min-width: 0; }
.stat .n { font-size: 26px; font-weight: 400; line-height: 1.2; color: var(--green); font-family: Arial, var(--font); }
.stat .l { color: var(--ink-2); font-size: 13px; }
.stat.attn .n { color: var(--warn-ink); }
.stat.alarm .n { color: var(--bad); }
a.stat:hover { box-shadow: 0 2px 12px rgba(0, 0, 0, .06); }
/* 宝塔首页式状态卡：左边标题与大字，右边圆环大百分比 */
.scs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.sc { background: var(--surface); border-radius: var(--r); padding: 16px 20px 16px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 132px; min-width: 0; }
.sc-b { min-width: 0; }
.sc-l { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.sc-v { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: Arial, var(--font); }
.sc-v em { font-style: normal; color: var(--green); }
.sc-v small { font-size: 13px; font-weight: 700; margin-left: 1px; }
.sc-v i { font-style: normal; font-weight: 400; color: var(--faint); margin: 0 6px; }
.sc-d { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-r { position: relative; flex: none; width: 104px; height: 104px; }
.ring { width: 100%; height: 100%; display: block; }
.ring-bg { fill: none; stroke: #F0F1F2; stroke-width: 7; }
.ring-fg { fill: none; stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .6s ease-out; }
.sc-n { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 28px/1 Arial, var(--font); letter-spacing: -1px; }
.sc-n small { font-size: 12px; font-weight: 700; margin: 10px 0 0 2px; letter-spacing: 0; }
.sc-n.t-muted { color: var(--faint); font-weight: 400; }

/* 宝塔“概览”：浅灰底小块，标题、大数字、浅绿按钮 */
.ov { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.ov-i { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 18px 14px; border-radius: var(--r); background: linear-gradient(180deg, #F6F7F7 0%, #FBFBFB 100%); color: var(--ink-2); min-width: 0; }
.ov-i .l { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ov-i .row2 { display: flex; align-items: center; gap: 14px; min-height: 34px; }
.ov-i .n { font: 700 26px/1 Arial, var(--font); color: var(--ink); }
.ov-i.attn .n { color: var(--warn-ink); }
.ov-i.alarm .n { color: var(--bad); }
.ov-i .go { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; border-radius: var(--r); background: var(--green-soft); color: var(--green); font-size: 13px; white-space: nowrap; }
.ov-i .go svg { width: 12px; height: 12px; }
.ov-i .go:hover { background: var(--green); color: #fff; }
.ov-i .go.plain { background: transparent; color: var(--muted); padding: 0 6px; }
.ov-i .go.plain:hover { color: var(--green); background: var(--green-soft); }

/* 趋势图上方的数值块（宝塔“上行/下行/总发送”） */
.pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 16px; }
.pill { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r); background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .07); font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.pill b { font: 700 14px/1 Arial, var(--font); color: var(--ink); }
.pill .pd { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; flex: none; position: relative; }
.pill .pd::after { content: ""; position: absolute; inset: 1px; border-radius: 50%; background: currentColor; }
.pill .pd.c-ok { color: var(--green); } .pill .pd.c-warn { color: var(--warn); } .pill .pd.c-info { color: var(--info); } .pill .pd.c-bad { color: var(--bad-ink); } .pill .pd.c-violet { color: #8E6CEF; }
/* 卡片里的大号标签（宝塔“流量 / 磁盘IO”） */
.ctabs { display: flex; align-items: center; gap: 30px; }
.ctabs label { position: relative; font-size: 16px; color: var(--ink-2); cursor: pointer; padding: 4px 0 10px; line-height: 1.4; }
.ctabs label:hover { color: var(--ink); }

/* SVG 颜色等级 */
.c-ok { stroke: var(--green); fill: var(--green); }
.c-warn { stroke: var(--warn); fill: var(--warn); }
.c-bad { stroke: var(--bad-ink); fill: var(--bad-ink); }
.c-info { stroke: var(--info); fill: var(--info); }
.c-muted { stroke: #C8CCD2; fill: #C8CCD2; }
.c-violet { stroke: #8E6CEF; fill: #8E6CEF; }
.ring-fg.c-ok, .ring-fg.c-warn, .ring-fg.c-bad, .ring-fg.c-info, .ring-fg.c-muted { fill: none; }
.t-ok { color: var(--green); }
.t-warn { color: var(--warn-ink); }
.t-bad { color: var(--bad-ink); }
.t-info { color: var(--info); }
.t-muted { color: var(--muted); }

.donut-box { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.donut-r { position: relative; width: 150px; height: 150px; flex: none; }
.donut { width: 150px; height: 150px; display: block; }
.donut-bg { fill: none; stroke: #F0F2F5; stroke-width: 14; }
.donut-seg { fill: none; stroke-width: 14; }
.donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-c b { font: 400 26px/1.1 Arial, var(--font); color: var(--ink); }
.donut-c small { font-size: 12px; color: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 170px; display: grid; gap: 10px; }
.legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 44px; align-items: center; gap: 10px; font-size: 13px; }
.legend .dot { width: 10px; height: 10px; border-radius: 2px; display: block; }
.dot.c-ok { background: var(--green); } .dot.c-warn { background: var(--warn); } .dot.c-bad { background: var(--bad-ink); }
.dot.c-info { background: var(--info); } .dot.c-muted { background: #C8CCD2; } .dot.c-violet { background: #8E6CEF; }
.legend .lg-n { color: var(--ink-2); }
.legend .lg-n a { color: var(--ink-2); }
.legend .lg-n a:hover { color: var(--green); }
.legend b { font-weight: 400; color: var(--ink); font-family: Arial, var(--font); }
.legend .lg-p { color: var(--muted); text-align: right; font-size: 12px; }

.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 220px auto; column-gap: 12px; }
.chart-y { grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; text-align: right; font: 12px/1 Arial, var(--font); color: var(--muted); min-width: 36px; }
.chart-y span { transform: translateY(-50%); }
.chart-y span:first-child { transform: translateY(-2px); }
.chart-y span:last-child { transform: translateY(-70%); }
.chart-p { grid-row: 1; position: relative; min-width: 0; }
.plot { width: 100%; height: 100%; display: block; overflow: visible; }
.grid-l { stroke: #E3E5E8; stroke-width: 1; stroke-dasharray: 4 4; }
.grid-l.base { stroke: #D5D8DC; stroke-dasharray: none; }
.bar { stroke: none; }
.chart-x { grid-column: 2; display: flex; justify-content: space-between; font: 12px/1 Arial, var(--font); color: var(--muted); padding-top: 10px; }
.chart-x span { white-space: nowrap; }
.chart-x span:first-child { transform: translateX(-30%); }
.chart-x span:last-child { transform: translateX(20%); }
.chart-x.even span { flex: 1; text-align: center; transform: none; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 13px; }
/* 图表切换（不用脚本：单选框 + 标签） */
.chart-card { position: relative; }
.chart-card > input { position: absolute; opacity: 0; pointer-events: none; }
.chart-pane { display: none; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: -4px 0 18px; }
.chart-head .muted { font-size: 12px; }
#ct-exp:checked ~ .chart-head label[for=ct-exp], #ct-new:checked ~ .chart-head label[for=ct-new], #ct-job:checked ~ .chart-head label[for=ct-job] { color: var(--ink); font-weight: 700; }
#ct-exp:checked ~ .chart-head label[for=ct-exp]::after, #ct-new:checked ~ .chart-head label[for=ct-new]::after, #ct-job:checked ~ .chart-head label[for=ct-job]::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 24px; margin-left: -12px; height: 3px; border-radius: 2px; background: var(--green); }
#ct-exp:checked ~ .pane-exp, #ct-new:checked ~ .pane-new, #ct-job:checked ~ .pane-job { display: block; }
.chart-card > input:focus-visible ~ .chart-head .ctabs { outline: 2px solid rgba(32, 165, 58, .4); outline-offset: 4px; border-radius: var(--r); }

/* 细进度条 */
.meter { display: block; width: 100%; height: 6px; }
.meter-bg { fill: #EBEEF5; }
.meter-fg { stroke: none; }
.progress { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.progress .meter { flex: 1; min-width: 60px; max-width: 120px; }
.progress span { font-size: 12px; color: var(--ink-2); white-space: nowrap; font-family: Arial, var(--font); }

/* ========== 键值 ========== */
.kv { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 9px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--ink); }
.kv.two { grid-template-columns: 100px minmax(0, 1fr) 100px minmax(0, 1fr); }
/* 信息块（4 个一行的概要） */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.tile { background: var(--surface); border-radius: var(--r); padding: 18px 20px; display: flex; align-items: center; gap: 16px; min-width: 0; }
.tile-i { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.tile-i svg { width: 22px; height: 22px; }
.tile-i.warn { background: var(--warn-soft); color: var(--warn-ink); }
.tile-i.bad { background: var(--bad-soft); color: var(--bad-ink); }
.tile-i.info { background: var(--info-soft); color: var(--info); }
.tile-i.muted { background: #F2F3F5; color: var(--muted); }
.tile-b { min-width: 0; }
.tile-b .l { font-size: 12px; color: var(--muted); }
.tile-b .v { font-size: 16px; color: var(--ink); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-b .v small { font-size: 12px; color: var(--muted); margin-left: 6px; }
.tile .ring-s { flex: none; width: 46px; height: 46px; position: relative; }
.tile .ring-s .ring { width: 46px; height: 46px; }
.tile .ring-s .ring-bg, .tile .ring-s .ring-fg { stroke-width: 9; }

/* ========== 表格 ========== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 400; font-size: 13px; color: var(--ink-2); background: var(--head); padding: 8px 14px; border-bottom: 1px solid var(--line-3); white-space: nowrap; }
td { padding: 9px 14px; border-bottom: 1px solid var(--line-3); vertical-align: middle; color: var(--ink); font-size: 14px; line-height: 1.5; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, tr:hover td { background: var(--hover); }
td .sub { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 1px; }
td .sub.t-warn { color: var(--warn-ink); } td .sub.t-bad { color: var(--bad-ink); } td .sub.t-ok { color: var(--green); }
td.ops, th.ops { text-align: right; white-space: nowrap; }
td.ops a, td.ops .link { margin-left: 14px; }
td.ops .inline-actions { justify-content: flex-end; }
td select, td input[type=time], td input[type=date] { width: auto; min-width: 130px; }
.card.tight th:first-child, .card.tight td:first-child { padding-left: 20px; }
.card.tight th:last-child, .card.tight td:last-child { padding-right: 20px; }
.day-row td { background: #FAFBFC; color: var(--ink); font-weight: 600; padding: 6px 14px; font-size: 13px; }
.day-row:hover td { background: #FAFBFC; }
.cell-name { color: var(--ink); font-size: 14px; }
a.cell-name:hover { color: var(--green); }
/* 操作链接：宝塔式“设置 | 删除” */
.oplinks { display: inline-flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.oplinks > * { position: relative; padding: 0 9px; margin: 0 !important; }
.oplinks > * + *::before { content: ""; position: absolute; left: 0; top: 50%; height: 12px; margin-top: -6px; width: 1px; background: var(--line); }
.oplinks > :last-child { padding-right: 0; }
.oplinks form { margin: 0; display: inline; }

/* ========== 状态 ========== */
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 3px; font-size: 12px; line-height: 1; white-space: nowrap; border: 1px solid #E4E7ED; background: #F4F4F5; color: #909399; vertical-align: middle; }
.tag.ok { background: var(--green-soft); border-color: #BDE5C5; color: var(--green); }
.tag.warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn-ink); }
.tag.bad { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad-ink); }
.tag.info { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.tag.muted { background: #F4F4F5; color: #909399; }
/* 宝塔列表里的运行状态：彩色文字 + 圆点 */
.state { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.state.ok { color: var(--green); } .state.warn { color: var(--warn-ink); } .state.bad { color: var(--bad); }
.state.info { color: var(--info); } .state.muted { color: var(--muted); }
.state.muted::before { background: var(--faint); }
/* 未读式红色数字 */
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #F23D3D; color: #fff; font-size: 11px; line-height: 1; font-weight: 600; font-family: Arial, var(--font); }

/* ========== 按钮 ========== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 15px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; transition: color .15s, background .15s, border-color .15s; }
.btn:hover { color: var(--green); border-color: var(--green-line); background: var(--green-faint); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-2); border-color: var(--green-2); color: #fff; }
.btn.plain { background: var(--green-soft); border-color: var(--green-line); color: var(--green); }
.btn.plain:hover { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { color: var(--bad-ink); border-color: #F3B9B4; background: #fff; }
.btn.danger:hover { background: var(--bad-ink); border-color: var(--bad-ink); color: #fff; }
.btn.small { height: 28px; padding: 0 12px; font-size: 12px; }
.btn svg { width: 14px; height: 14px; flex: none; }
.btn[disabled], .btn.busy { opacity: .55; cursor: default; pointer-events: none; }
.btn.busy::after { content: ""; width: 11px; height: 11px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--green); cursor: pointer; }
.link:hover { color: var(--green-2); }
.link.danger { color: var(--bad-ink); }
.inline { display: inline; margin: 0; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-actions form { margin: 0; }
.inline-actions .grow { flex: 1 1 220px; width: auto; }
select.w-auto, input.w-auto { width: auto; min-width: 120px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== 表单（宝塔式：标签在左右对齐，输入框定宽） ========== */
.field { display: grid; grid-template-columns: var(--lw) minmax(0, var(--cw)); column-gap: 16px; align-items: start; margin-bottom: 14px; }
.field > label, .field > .label { grid-column: 1; text-align: right; line-height: 1.5; padding-top: 6px; margin: 0; color: var(--ink-2); font-size: 14px; font-weight: 400; }
.field > :not(label):not(.label) { grid-column: 2; }
.field > label.check { grid-column: 2; text-align: left; line-height: 1.7; padding-top: 6px; }
.field.wide { --cw: 860px; }
.field.full { --cw: 100%; grid-template-columns: var(--lw) minmax(0, 1fr); }
.form-actions { padding-left: calc(var(--lw) + 16px); margin-top: 6px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-actions .hint { margin: 0; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=search], input[type=email], select, textarea {
  width: 100%; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--ink); font: inherit; font-size: 13px; transition: border-color .15s, box-shadow .15s; }
select { padding-right: 8px; }
textarea { height: auto; min-height: 84px; padding: 7px 12px; resize: vertical; line-height: 1.6; }
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 2px rgba(32, 165, 58, .1); }
input[disabled], select[disabled], textarea[disabled] { background: #F5F7FA; color: var(--muted); border-color: var(--line-2); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 600px), 1fr)); column-gap: 24px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: 14px; height: 14px; accent-color: var(--green); margin: 0; }
.section-title { font-size: 14px; font-weight: 600; color: var(--ink); margin: 26px 0 16px; padding: 0 0 10px calc(var(--lw) + 16px); border-bottom: 1px dashed var(--line-3); }
.section-title:first-child { margin-top: 0; }
.form-sec { font-size: 14px; font-weight: 600; color: var(--ink); margin: 6px 0 18px; display: flex; align-items: center; gap: 8px; }

/* ========== 提示 ========== */
.note { padding: 11px 16px; border-radius: var(--r); background: #F3FAF4; border: 1px solid #D3ECD8; color: #3E6E49; font-size: 13px; line-height: 1.75; margin-bottom: var(--gap); }
.note.warn { background: var(--warn-soft); border-color: var(--warn-line); color: #8A5A12; }
.note.info { background: var(--info-soft); border-color: #CFE2F8; color: #2D5F99; }
.note b { color: inherit; }
.note ol, .note ul { margin: 4px 0 0; padding-left: 18px; }
.flash { padding: 10px 14px; border-radius: var(--r); background: var(--green-soft); border: 1px solid #BDE5C5; color: #1E7A32; font-size: 13px; margin-bottom: 12px; }
.flash.bad { background: var(--bad-soft); border-color: var(--bad-line); color: #B42318; }
.empty { color: var(--muted); }
.list-plain { margin: 0; padding-left: 18px; }
.list-plain li { margin: 3px 0; }

/* ========== 居中提示（宝塔 layer.msg 式） ========== */
.toast-host { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 60; display: grid; gap: 8px; width: max-content; max-width: min(480px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-radius: var(--r); background: #fff; box-shadow: 0 4px 24px rgba(0, 0, 0, .18); animation: toast-in .2s ease-out; color: var(--ink); font-size: 14px; }
.toast::before { content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-size: 13px; font-weight: 700; }
.toast.bad::before { content: "!"; background: var(--bad-ink); }
.toast span { flex: 1; }
.toast-x { border: 0; background: none; font-size: 18px; line-height: 1; color: var(--faint); cursor: pointer; padding: 0 0 0 4px; }
.toast.hide { opacity: 0; transition: opacity .25s; }
@keyframes toast-in { from { opacity: 0; transform: scale(.96); } }

/* ========== 弹窗（宝塔 layer 式） ========== */
.dlg { border: 0; padding: 0; border-radius: var(--r); width: min(460px, calc(100vw - 24px)); color: var(--ink-2); background: #fff; box-shadow: 0 6px 40px rgba(0, 0, 0, .25); overflow: visible; --lw: 96px; --cw: 320px; }
.dlg.wide { width: min(600px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(0, 0, 0, .35); }
.dlg[open] { animation: dlg-in .16s ease-out; }
@keyframes dlg-in { from { opacity: 0; transform: scale(.97); } }
.dlg-body { margin: 0; }
.dlg-title { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 8px 0 20px; background: #F8F8F8; border-bottom: 1px solid #EEE; border-radius: var(--r) var(--r) 0 0; }
.dlg-title h3 { font-size: 14px; font-weight: 400; color: var(--ink); margin: 0; }
.dlg-x { border: 0; background: none; width: 32px; height: 32px; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; border-radius: var(--r); }
.dlg-x:hover { color: var(--ink); background: #ECECEC; }
.dlg-main { padding: 22px 24px 6px; }
.dlg-text { color: var(--ink-2); font-size: 13px; margin: 0 0 10px; white-space: pre-line; line-height: 1.8; }
.dlg-hint { color: var(--muted); font-size: 12px; margin: 0; }
.dlg-error { color: var(--bad-ink); font-size: 12px; margin: 8px 0 0; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 16px; border-top: 1px solid var(--line-3); margin-top: 12px; }
.dlg-actions .btn { min-width: 72px; }
.dlg .field { margin-bottom: 14px; }
.dlg-confirm .btn.danger-ok { background: var(--bad-ink); border-color: var(--bad-ink); color: #fff; }
.dlg-confirm .dlg-main { display: grid; grid-template-columns: 32px 1fr; gap: 0 14px; align-items: start; }
.dlg-confirm .dlg-main::before { content: "?"; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #F0AD4E; color: #fff; font-weight: 700; font-size: 16px; }
.dlg-confirm.danger .dlg-main::before { content: "!"; background: var(--bad-ink); }
.dlg-confirm [data-confirm-head] { font-size: 14px; color: var(--ink); margin: 4px 0 4px; font-weight: 600; }
.dlg-confirm [data-confirm-text] { margin-top: 2px; }

/* 动态口令：一个真实输入框覆盖 6 个格子；圆环显示当前口令剩余秒数 */
.otp-box { text-align: center; }
.otp-top { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.otp-ring { position: relative; width: 30px; height: 30px; flex: none; }
.otp-ring svg { width: 30px; height: 30px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: #EEE; stroke-width: 3.5; }
.ring-bar { fill: none; stroke: var(--green); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 119.4; transition: stroke-dashoffset .25s linear; }
.otp-ring.low .ring-bar { stroke: var(--warn); }
.ring-sec { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; color: var(--muted); }
.otp-cells { position: relative; display: grid; grid-template-columns: repeat(6, 44px); gap: 8px; justify-content: center; margin: 0 auto; cursor: text; }
.otp-cells input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; z-index: 1; caret-color: transparent; }
.otp-cells .cell { height: 48px; border: 1px solid var(--line); border-radius: var(--r); display: grid; place-items: center; font: 600 22px/1 var(--mono); color: var(--ink); background: #fff; transition: border-color .12s, box-shadow .12s; }
.otp-cells .cell.active { border-color: var(--green); box-shadow: 0 0 0 2px rgba(32, 165, 58, .15); }
.otp-cells.error .cell { border-color: var(--bad-ink); animation: shake .32s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.otp-alt { margin-top: 12px; font-size: 12px; }
.otp-alt input { margin-top: 6px; }
.bind-qr { display: flex; gap: 16px; align-items: center; text-align: left; margin-bottom: 16px; padding: 12px; background: #FAFAFA; border: 1px solid var(--line-3); border-radius: var(--r); }
.bind-qr .img { width: 132px; height: 132px; flex: none; background: #fff; padding: 6px; border: 1px solid var(--line-2); }
.bind-qr .img svg { width: 100%; height: 100%; display: block; }
.bind-qr .mono { word-break: break-all; color: var(--ink); }

/* ========== 任务步骤 ========== */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 0 0 12px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line-3); }
.steps .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--info-soft); color: var(--info); }
.steps li.done .dot { background: var(--green); color: #fff; }
.steps li.failed .dot { background: var(--bad-ink); color: #fff; }
.steps li.running .dot::after { content: ""; width: 9px; height: 9px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.job-live { border-left: 3px solid var(--green); }
.job-live > h2::before { content: ""; width: 12px; height: 12px; border: 2px solid var(--green); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }

/* ========== 杂项 ========== */
.mono { font-family: inherit; }
.code, code { font-family: var(--mono); font-size: 12px; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.mt { margin-top: 12px; }
.nowrap { white-space: nowrap; }
.text-bad { color: var(--bad-ink); }
.text-ok { color: var(--green); }
.pre { background: #FAFAFA; border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; font: 12px/1.65 var(--mono); overflow: auto; white-space: pre; max-height: 440px; margin: 0; color: var(--ink); }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 8px; }
.code-head b { color: var(--ink); }
.secret-box { font: 600 15px/1.5 var(--mono); background: #F3F9F4; border: 1px dashed #A9DBB2; color: #1E7A32; padding: 8px 14px; border-radius: var(--r); display: inline-block; user-select: all; word-break: break-all; letter-spacing: .04em; }
.qr .img { width: 156px; height: 156px; padding: 6px; border: 1px solid var(--line-2); background: #fff; }
.qr .img svg { width: 100%; height: 100%; display: block; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; font: 13px/1.9 var(--mono); padding: 12px 16px; background: #FAFAFA; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--ink); }
details summary { cursor: pointer; color: var(--green); font-size: 13px; margin-top: 10px; }
.audit-detail { color: var(--muted); font-size: 12px; max-width: 760px; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { padding: 8px 0; border-bottom: 1px dashed var(--line-3); display: flex; gap: 8px; align-items: flex-start; }
.check-list li:last-child { border-bottom: 0; }
.check-list .check { align-items: flex-start; }
.check-list .check input { margin-top: 4px; }
.group-title { margin: 16px 0 4px; font-weight: 600; color: var(--ink); }
.group-title:first-child { margin-top: 0; }
.tool-result { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-3); }
.tool-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #FFF9E8; border: 1px solid #F5E1A4; border-radius: var(--r); padding: 12px 18px; margin-bottom: var(--gap); color: #7A5B0E; font-size: 13px; }
.banner.ok { background: var(--green-soft); border-color: #BDE5C5; color: #1E7A32; }
.banner b { color: inherit; }
.banner .grow { flex: 1; min-width: 220px; }
.banner form { margin: 0; }

/* 危险操作 */
.danger-zone > h2 { color: var(--bad-ink); }
.zone-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 16px 0; border-top: 1px solid var(--line-3); }
.danger-zone > h2 + .zone-row { border-top: 0; padding-top: 0; }
.zone-row:last-child { padding-bottom: 0; }
.zone-row b { display: block; font-weight: 600; color: var(--ink); font-size: 14px; margin-bottom: 2px; }
.zone-row p { margin: 0; color: var(--muted); max-width: 820px; }
.zone-row form { margin: 0; flex: none; }
.zone-form { display: flex; gap: 10px; align-items: center; }
.zone-form input[type=text] { width: 180px; }

/* ========== 列表页的功能接入、计划任务编辑 ========== */
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.feature-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line-3); min-width: 0; }
.feature-list li > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.period-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.period-row select { width: 100px; }
.unit-input { display: inline-flex; align-items: stretch; }
.unit-input input { width: 68px; border-radius: var(--r) 0 0 var(--r); }
.unit-input em { font-style: normal; display: inline-grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); border-left: 0; background: #F5F7FA; color: var(--muted); border-radius: 0 var(--r) var(--r) 0; }
.dlg-scroll { max-height: 60vh; overflow: auto; }
.dlg table td, .dlg table th { padding: 8px 10px; }

/* 开关（宝塔式） */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; vertical-align: middle; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 40px; height: 20px; border-radius: 10px; background: #DCDFE6; transition: background .2s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + .switch-track { background: var(--green); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 2px solid rgba(32, 165, 58, .45); outline-offset: 2px; }
.switch input:disabled + .switch-track { opacity: .5; cursor: not-allowed; }
.switch-text { color: var(--ink-2); font-size: 13px; }
.switch input:checked ~ .switch-text { color: var(--green); }

/* AI 余额 */
.ai-balance { padding: 20px 24px 16px; }
.ab-row { display: flex; flex-wrap: wrap; gap: 14px 0; }
.ab-item { display: flex; flex-direction: column; gap: 4px; padding: 0 40px; border-left: 1px solid var(--line-3); }
.ab-item:first-child { padding-left: 0; border-left: 0; }
.ab-item b { font: 400 26px/1.2 Arial, var(--font); color: var(--ink); }
.ab-item span { color: var(--muted); font-size: 12px; }
.ab-hint { margin: 14px 0 0; }
.ab-item b.text-ok { color: var(--green); }
.ab-item b.text-bad { color: var(--bad-ink); }
.weekdays { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.weekdays[hidden] { display: none; }

/* 上传安装包 */
.upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload-progress { margin-top: 14px; display: flex; align-items: center; gap: 12px; }
.upload-progress[hidden] { display: none; }
.upload-progress .bar { flex: 0 0 320px; height: 8px; border-radius: 4px; background: var(--line-3); overflow: hidden; }
.upload-progress .bar span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.dropzone { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border: 1px dashed var(--line); border-radius: var(--r); background: #FAFBFC; }
.dropzone-i { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.dropzone-i svg { width: 24px; height: 24px; }
.dropzone-b { flex: 1; min-width: 0; }
.dropzone-b b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }

/* 不让浏览器记住/填充密码与历史输入 */
.secret-input { -webkit-text-security: disc; text-security: disc; font-family: var(--mono); letter-spacing: .05em; }
.secret-input::placeholder { font-family: var(--font); letter-spacing: 0; }
.secret-input.masked, textarea.masked { -webkit-text-security: none; text-security: none; letter-spacing: 1px; color: var(--ink-2); }

/* 表单校验：出错的项标红，已填内容保留 */
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--bad-ink); background: #FFFBFB; }
.field-error { color: var(--bad-ink); font-size: 12px; margin-top: 4px; }
.code-input { font: 12px/1.65 var(--mono); min-height: 170px; }
.json-template summary { margin-top: 6px; }
.json-template .pre { max-height: 320px; }

/* 分页（宝塔式） */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; padding-bottom: 16px; }
.pager a, .pager span.on, .pager span.off { min-width: 30px; height: 28px; padding: 0 9px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink-2); background: #fff; font-size: 13px; }
.pager a:hover { color: var(--green); border-color: var(--green-line); }
.pager span.on { background: var(--green); border-color: var(--green); color: #fff; }
.pager span.off { color: var(--faint); }
.pager .gap { padding: 0 4px; color: var(--muted); }
.pager > .muted:first-child { margin-right: auto; }

/* ========== 登录 / 安装 / 错误页 ========== */
.bare { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: #EEF1F0; }
.bare .box { width: min(400px, 100%); border: 0; padding: 0; background: none; }
.bare .box.wide { width: min(780px, 100%); }
.logo { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 22px; font-size: 22px; font-weight: 600; color: var(--ink); }
.logo::before { content: attr(data-mark); width: 38px; height: 38px; border-radius: 6px; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 17px; }
.logo span { display: block; line-height: 1.25; }
.logo small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.bare .card { padding: 30px 32px 24px; border-radius: 6px; box-shadow: 0 4px 24px rgba(0, 0, 0, .06); }
.bare .card > h2 { font-size: 18px; text-align: center; border: 0; padding: 0; margin: 0 0 22px; display: block; }
.bare .card.msg { text-align: center; }
.bare .card.msg p { font-size: 14px; color: var(--ink-2); margin-bottom: 18px; }
.bare .field { display: block; }
.bare .field > label { display: block; text-align: left; line-height: 1.6; padding-top: 0; margin-bottom: 6px; }
.bare .box.wide .field { display: grid; }
.bare .box.wide .field > label { text-align: right; margin: 0; }
.bare input[type=text], .bare input[type=password] { height: 40px; font-size: 14px; }
.bare .btn.primary { width: 100%; height: 40px; margin: 6px 0 10px; font-size: 15px; }
.bare .dlg .btn.primary, .bare .form-actions .btn.primary { width: auto; height: 32px; margin: 0; font-size: 13px; }
.bare-foot { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line-3); text-align: center; font-size: 12px; }
.login-locked .field input { background: #F5F7FA; }
.wizard { display: flex; list-style: none; margin: 0 0 var(--gap); padding: 0; counter-reset: step; background: #fff; border-radius: var(--r); overflow: hidden; }
.wizard li { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 12px; counter-increment: step; border-right: 1px solid var(--line-3); }
.wizard li:last-child { border-right: 0; }
.wizard li::before { content: counter(step); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: #E9E9E9; color: var(--muted); }
.wizard li.on { color: var(--green); }
.wizard li.on::before { background: var(--green); color: #fff; }

/* ========== 窄屏 ========== */
@media (max-width: 1500px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sc-r { width: 112px; height: 112px; } .sc-n { font-size: 32px; } }
@media (max-width: 1280px) { .scs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1280px) {
  .g-form { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .g-side { grid-template-columns: minmax(0, 1fr); }
  .kv.two { grid-template-columns: 100px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .side { position: fixed; left: 0; top: 0; z-index: 40; width: 200px; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; }
  body.nav-open .side-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, .35); }
  .topbar { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px; background: var(--side); color: #fff; position: sticky; top: 0; z-index: 30; }
  .menu-btn { border: 1px solid #4A5158; background: transparent; color: #fff; border-radius: var(--r); width: 34px; height: 30px; font-size: 15px; cursor: pointer; }
  .topbar-title { font-weight: 600; font-size: 14px; }
  .page { padding: 10px 10px 40px; --gap: 10px; }
  .pbar { padding: 0 14px; }
  .ptabs { padding-left: 0; width: 100%; order: 3; border-top: 1px solid var(--line-3); }
  .ptabs::before { display: none; }
  .ptabs a { height: 46px; }
  .pact { margin-left: 0; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .scs { grid-template-columns: 1fr; }
  .sc { min-height: 140px; }
  .tiles { grid-template-columns: 1fr; }
  .ov { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ov-i { padding: 14px 14px 16px; }
  .field { grid-template-columns: 1fr; }
  .field > label, .field > .label { text-align: left; padding-top: 0; margin-bottom: 6px; }
  .field > .label:empty { display: none; }
  .filters input[type=search], .search input[type=search] { width: 100%; }
  .search { width: 100%; }
  .field > :not(label):not(.label), .field > label.check { grid-column: 1; }
  .form-actions, .section-title { padding-left: 0; }
  .zone-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .zone-form { flex-wrap: wrap; }
  .zone-form input[type=text] { flex: 1; }
  .toolbar input[type=search], .toolbar input[type=text] { width: 100%; }
  .toolbar form { width: 100%; }
  .feature-list { grid-template-columns: 1fr; }
  .ab-item { padding: 0 20px; }
  .dropzone { flex-direction: column; align-items: flex-start; }
  .upload-progress .bar { flex: 1 1 200px; }
  .card.tight th:first-child, .card.tight td:first-child { padding-left: 14px; }
  .card.tight th:last-child, .card.tight td:last-child { padding-right: 14px; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: 1fr 1fr; } .otp-cells { grid-template-columns: repeat(6, 38px); gap: 6px; } .otp-cells .cell { height: 44px; } .bind-qr { flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }


/* ========== p41：版面与交互重做 ========== */
/* 单元格里跟在主文字后面的灰色补充（同一行，放不下就省略） */
.inl { color: var(--muted); font-size: 12px; margin-left: 8px; }
.cell-1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; }
.cell-1 > :first-child { flex: none; }
.cell-1 .inl { margin-left: 0; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
td.trunc { max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.trunc .inl { white-space: nowrap; }
td .copy { margin-left: 8px; }

/* 总览：运维指标圆环卡 */
.sc-v small { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.sc-d a { color: inherit; }
.sc-d a:hover { color: var(--green); }
.sc-d b { font-weight: 600; color: var(--ink-2); }
/* 横向进度条列表（各客户功能接入） */
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.hbars li { display: grid; grid-template-columns: minmax(80px, 140px) minmax(0, 1fr) 54px; align-items: center; gap: 12px; font-size: 13px; }
.hbars li > span:first-child { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbars .meter { height: 10px; }
.hbars .v { text-align: right; color: var(--ink-2); font-family: Arial, var(--font); white-space: nowrap; }
/* 待处理事项 */
.todo td:first-child { width: 96px; }
.todo .tag { min-width: 72px; justify-content: center; }
/* 需要填到微信、企业微信后台的地址 */
.urls td:first-child { white-space: nowrap; color: var(--ink-2); width: 1%; }
.urls td.u { font-family: var(--mono); font-size: 13px; color: var(--ink); word-break: break-all; }
.urls td.w { color: var(--muted); font-size: 12px; white-space: nowrap; }
.urls tr.grp td { background: #FAFBFC; font-weight: 600; color: var(--ink); padding-top: 7px; padding-bottom: 7px; }
.urls .btn.small { height: 26px; }
.aside .urls td { padding: 7px 0; border-bottom: 1px dashed var(--line-3); }
.aside .urls td:first-child { padding-right: 10px; }
.aside .urls tr:hover td { background: none; }
.aside .urls td.u { font-size: 12px; }
.aside h3 { font-size: 14px; margin: 14px 0 6px; }
.aside h3:first-of-type { margin-top: 0; }
/* 快速续期弹窗 */
.dlg .quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* 侧栏里的地址清单（窄：用途 + 复制一行，地址一行，说明一行） */
.urlist { display: grid; gap: 12px; }
.urlist .ug { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 4px; }
.urlist .ui { padding: 10px 12px; border: 1px solid var(--line-3); border-radius: var(--r); background: #FBFCFC; }
.urlist .ui-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-2); }
.urlist .ui-v { margin-top: 4px; font: 13px/1.5 var(--mono); color: var(--ink); word-break: break-all; }
.urlist .ui-v.plain { font-family: var(--font); color: var(--ink-2); }
.urlist .ui-w { margin-top: 3px; font-size: 12px; color: var(--muted); }
.copy-btn { border: 0; background: none; padding: 0; color: var(--green); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.copy-btn:hover { color: var(--green-2); }
.oplinks > .link { padding: 0 9px; }
.oplinks > .link:last-child { padding-right: 0; }
.inl.t-warn { color: var(--warn-ink); } .inl.t-bad { color: var(--bad-ink); } .inl.t-ok { color: var(--green); }
/* 客户状态卡：环形图在上、图例两列在下，填满卡片 */
.donut-box.v { flex-direction: column; align-items: stretch; gap: 18px; }
.donut-box.v .donut-r { align-self: center; width: 168px; height: 168px; }
.donut-box.v .donut { width: 168px; height: 168px; }
.donut-box.v .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.donut-box.v .legend li { grid-template-columns: 10px minmax(0, 1fr) auto 36px; }


/* ========== p43：页面不显示名称、一屏总览、横排客户标签页、版本与升级合并、宝塔式计划任务 ========== */
/* 页头只有标签页（左侧菜单进来的页面不显示名称和说明） */
.ptabs.first { padding-left: 0; margin-left: -16px; }
.ptabs.first::before { display: none; }

/* 总览：整页一屏，下面两块内容多时在块内滚动；顶部一条显示平台版本、系统和日期 */
.sysline { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--ink-2); font-size: 13px; }
.sysline span { white-space: nowrap; }
.sysline b { font-weight: 400; color: var(--ink); }
.page:has(> .dash) { padding-bottom: var(--gap); }
.dash { display: flex; flex-direction: column; gap: var(--gap); height: calc(100vh - var(--gap) * 2); min-height: 760px; }
.dash > * { flex: none; margin-bottom: 0 !important; }
.dash > .dash-row { flex: 1 1 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(340px, 1fr); gap: var(--gap); min-height: 0; }
.dash > .dash-row.mid { min-height: 300px; }
.dash > .dash-row.bot { flex-grow: 1.1; min-height: 250px; }
.dash-row > .card { margin: 0; min-height: 0; display: flex; flex-direction: column; }
.ov-card > h2 { margin-bottom: 10px; }
.ov-card .ov-i { padding: 10px 18px 12px; }
.ov-i .st { display: inline-flex; align-items: center; gap: 8px; font: 700 20px/1 var(--font); }
.ov-i .st::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.ov-i .st.ok { color: var(--green); }
.ov-i .st.bad { color: var(--bad); }
.ov-i .at { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash .chart-card .chart-head { margin-bottom: 14px; }
.dash .chart-pane { flex: 1; min-height: 0; flex-direction: column; }
.dash #ct-exp:checked ~ .pane-exp, .dash #ct-new:checked ~ .pane-new, .dash #ct-job:checked ~ .pane-job { display: flex; }
.dash .pills { margin-bottom: 12px; }
.dash .chart { flex: 1; min-height: 120px; grid-template-rows: minmax(0, 1fr) auto; }
.dash .chart-p, .dash .chart-y { min-height: 0; }
.dash .donut-card .donut-box { flex: 1; justify-content: center; }
.dash .donut-card .legend { flex: none; align-content: start; }
.dash .donut-card { overflow: auto; }
/* 屏幕不高时环形图放左边、图例放右边一列，整页仍然一屏放下 */
@media (max-height: 1120px) and (min-width: 1101px) {
  .dash .donut-box.v { flex-direction: row; align-items: center; gap: 26px; }
  .dash .donut-box.v .donut-r, .dash .donut-box.v .donut { width: 150px; height: 150px; }
  .dash .donut-box.v .legend { grid-template-columns: minmax(0, 1fr); gap: 8px; flex: 1; }
  .dash .sc { min-height: 0; padding-top: 12px; padding-bottom: 12px; }
  .dash .sc-r { width: 88px; height: 88px; }
  .dash .sc-n { font-size: 24px; }
  .dash .ov-card { padding-top: 12px; padding-bottom: 12px; }
  .dash .ov-card > h2 { margin-bottom: 8px; }
  .dash .ov-card .ov-i { padding: 8px 16px 10px; }
  .dash > .dash-row.mid { min-height: 250px; }
  .dash > .dash-row.bot { min-height: 200px; }
  .dash .chart-card .chart-head { margin-bottom: 8px; }
  .dash .pills { margin-bottom: 8px; }
}
.card.fill > h2 { flex: none; }
.card.fill > .scroll { flex: 1; min-height: 0; overflow: auto; }
.card.fill > .empty { flex: 1; }
.todo thead th { position: sticky; top: 0; z-index: 1; }
.hbars.scroll { align-content: start; padding-right: 6px; }

/* 客户详情页头：名称、状态、编号/域名/到期/程序 + 按钮；下面横排标签页（概况 | 接入配置 | 运维） */
.thead { background: var(--surface); border-radius: var(--r); margin-bottom: var(--gap); }
.thead-t { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 13px 20px 12px; }
.thead-t h1 { font-size: 18px; line-height: 1.4; white-space: nowrap; }
.thead-meta { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-left: 12px; font-size: 13px; color: var(--ink); }
.thead-meta > span { white-space: nowrap; }
.thead-meta i { font-style: normal; color: var(--muted); margin-right: 6px; }
.thead-meta b { font-weight: 400; }
.thead-meta em { font-style: normal; font-size: 12px; margin-left: 6px; color: var(--muted); }
.thead-act { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.thead-act form { margin: 0; }
.ttabs { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: thin; padding: 0 6px; border-top: 1px solid var(--line-3); }
.ttabs a { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 14px; color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.ttabs a:hover { color: var(--green); }
.ttabs a.on { color: var(--green); font-weight: 600; }
.ttabs a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--green); }
.ttabs a.danger { color: var(--bad-ink); }
.ttabs a.danger.on::after { background: var(--bad-ink); }
.tsep { flex: none; width: 1px; height: 18px; align-self: center; background: var(--line); margin: 0 10px; }

/* 版本与升级 */
.card.rel { padding: 0; }
.rel-strip { display: flex; align-items: stretch; flex-wrap: wrap; }
.rel-i { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 18px 30px; border-left: 1px solid var(--line-3); min-width: 0; }
.rel-i:first-child { border-left: 0; }
.rel-i.lead { flex-direction: row; align-items: center; gap: 16px; padding-left: 22px; padding-right: 40px; }
.rel-i.lead > div { display: flex; flex-direction: column; gap: 3px; }
.rel-ico { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.rel-ico svg { width: 24px; height: 24px; }
.rel-i .l { font-size: 12px; color: var(--muted); }
.rel-i .v { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); white-space: nowrap; }
.rel-i.lead .v { font: 700 20px/1.3 Arial, var(--font); }
.rel-i .v .state { font-size: 15px; }
.rel-i .d { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.rel-act { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 14px 22px; flex-wrap: wrap; }
.rel-act form { margin: 0; }
.rel > .banner, .rel > .note { margin: 0 22px 14px; }
.rel-vers { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 22px 13px; border-top: 1px solid var(--line-3); background: #FBFCFC; border-radius: 0 0 var(--r) var(--r); }
.rel-vers > .l { font-size: 13px; color: var(--ink-2); margin-right: 6px; }
.rel-vers > .l small { font-size: 12px; color: var(--muted); margin-left: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; font-size: 12px; color: var(--muted); white-space: nowrap; }
.chip b { font-weight: 600; font-size: 13px; color: var(--ink); }
.chip i { font-style: normal; color: var(--green); }
.chip.on { border-color: var(--green-line); background: var(--green-faint); }
.pick { display: inline-flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.pick .link[disabled] { color: var(--faint); cursor: default; }
.tgroup { display: inline-flex; align-items: center; gap: 8px; padding-left: 16px; margin-left: 6px; border-left: 1px solid var(--line-3); }
.tg-l { font-size: 13px; color: var(--muted); white-space: nowrap; }
.toolbar .tgroup input[type=text] { width: 220px; }
th.cb, td.cb { width: 44px; padding-right: 0 !important; }
.card.tight > p.pad.mt { padding-top: 12px; border-top: 1px solid var(--line-3); margin: 0; }

/* 通用设置 */
.field-text { display: inline-block; padding-top: 6px; color: var(--ink); }
.card h3 small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.steps-plain { margin: 0 0 8px; padding-left: 20px; color: var(--ink-2); font-size: 13px; line-height: 1.8; }
.steps-plain li + li { margin-top: 6px; }
.steps-plain b { color: var(--ink); }

/* 计划任务编辑窗口（与宝塔一致） */
.dlg.bt { width: min(720px, calc(100vw - 24px)); --lw: 96px; --cw: 560px; }
.dlg.bt .dlg-main { padding-top: 24px; }
.period { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.period select { width: 120px; }
.period select[hidden] { display: none; }
.period .unit-input input { width: 84px; }
.period-text { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.tips-list { margin: 0; padding: 6px 0 0 16px; color: var(--ink-2); font-size: 13px; line-height: 1.9; }
.dlg-actions .btn[data-dlg-cancel] { background: #A9ADB3; border-color: #A9ADB3; color: #fff; }
.dlg-actions .btn[data-dlg-cancel]:hover { background: #979BA1; border-color: #979BA1; color: #fff; }

@media (max-width: 1100px) {
  .dash { height: auto; min-height: 0; }
  .dash > .dash-row { grid-template-columns: minmax(0, 1fr); }
  .dash .chart { min-height: 220px; }
  .card.fill > .scroll { max-height: 420px; }
  .rel-act { margin-left: 0; width: 100%; padding-top: 0; }
  .thead-meta { margin-left: 0; width: 100%; }
}
@media (max-width: 900px) {
  .rel-i { padding: 14px 16px; border-left: 0; width: 50%; }
  .rel-i.lead { width: 100%; }
  .tgroup { border-left: 0; padding-left: 0; margin-left: 0; }
}

/* ========== p44：左上角消息、操作进度弹窗、开通客户弹窗、续期/重置弹窗 ========== */
.tray { position: fixed; z-index: 60; left: 12px; top: 58px; width: 320px; max-height: 420px; overflow-y: auto; background: #fff; color: var(--ink-2); border-radius: var(--r); box-shadow: 0 8px 30px rgba(0, 0, 0, .22); font-size: 13px; }
.tray[hidden] { display: none; }
.tray-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line-3); color: var(--ink); }
.tray-i { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line-4); background: #fff; color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; }
.tray-i:hover { background: #F7FBF8; color: var(--ink-2); }
.tray-i .state { padding-top: 6px; }
.tray-i b { display: block; color: var(--ink); font-weight: 400; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-i small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tray-i .grow { min-width: 0; }
.tray-empty { margin: 0; padding: 22px 14px; text-align: center; color: var(--muted); }

.job-dlg { width: min(560px, calc(100vw - 24px)); }
.job-dlg .dlg-main { padding: 22px 24px 8px; max-height: min(64vh, 560px); overflow-y: auto; }
.job-head { display: flex; align-items: center; gap: 14px; padding: 2px 0 16px; }
.job-head b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.job-sum { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.job-sum[hidden] { display: none; }
.job-ico { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--info-soft); color: var(--info); }
.job-ico > * { grid-area: 1 / 1; }
.job-ico svg { width: 22px; height: 22px; display: none; }
.job-ico .spin { width: 22px; height: 22px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.job-head[data-job-state=ok] .job-ico { background: var(--green); color: #fff; }
.job-head[data-job-state=failed] .job-ico { background: var(--bad-ink); color: #fff; }
.job-head[data-job-state=ok] .spin, .job-head[data-job-state=failed] .spin { display: none; }
.job-head[data-job-state=ok] .i-ok, .job-head[data-job-state=failed] .i-bad { display: block; }
.job-steps { border-top: 1px dashed var(--line-3); padding-top: 14px; }
.job-steps[hidden] { display: none; }
.job-secret { margin: 0 0 16px; padding: 14px 16px; border-radius: var(--r); background: #FAFCFA; border: 1px solid #DCEFE0; }
.job-secret-t { margin: 0 0 10px; color: var(--ink); font-weight: 600; font-size: 13px; }
.job-secret .kv { grid-template-columns: 72px minmax(0, 1fr); align-items: center; }
.job-secret .hint { margin-top: 10px; }
.dlg-actions .grow { flex: 1; align-self: center; }
.dlg-actions a.btn[hidden] { display: none; }

/* 开通客户：两列表单，分三段 */
.dlg.xwide { width: min(820px, calc(100vw - 24px)); }
.dlg.xwide .dlg-main { padding: 18px 28px 6px; max-height: min(72vh, 680px); overflow-y: auto; }
.fg-sec { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; font-size: 14px; font-weight: 600; color: var(--ink); }
.fg-sec::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--green); }
.fg-sec::after { content: ""; flex: 1; height: 1px; background: var(--line-3); }
.dlg-main > .fg-sec:first-of-type, .dlg-error + .fg-sec { margin-top: 4px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; }
.fg { min-width: 0; margin-bottom: 10px; }
.fg.span2 { grid-column: 1 / -1; }
.fg > label { display: block; margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }
.fg .hint { margin-top: 4px; }
.addon { display: flex; align-items: stretch; }
.addon input { flex: 1; min-width: 0; border-radius: var(--r) 0 0 var(--r); }
.addon em { flex: none; font-style: normal; display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--r) var(--r) 0; background: #F5F7FA; color: var(--muted); font-size: 13px; white-space: nowrap; }
.exp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.w-date { width: 168px !important; flex: none; }
.seg { display: inline-flex; flex-wrap: wrap; }
.seg .btn { border-radius: 0; margin-left: -1px; padding: 0 12px; }
.seg .btn:first-child { margin-left: 0; border-radius: var(--r) 0 0 var(--r); }
.seg .btn:last-child { border-radius: 0 var(--r) var(--r) 0; }
.seg .btn:hover { position: relative; z-index: 1; }
.dlg .field .seg { margin-top: 10px; display: flex; }
.dlg-value { display: flex; align-items: baseline; gap: 10px; padding-top: 6px; }
.dlg-value b { font-size: 15px; color: var(--ink); font-weight: 600; }
.dlg-sub { font-size: 12px; color: var(--muted); }
.dlg-error[hidden] { display: none; }
.dlg-form .dlg-main > .dlg-error { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--r); background: #FEF0F0; }

/* 扩展功能：左 AI 报告，右边银行申请码与获客统计上下叠放 */
.more { align-items: start; }
.stack { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.stack > .card { margin-bottom: 0; }
.more > .card { margin-bottom: 0; }

@media (max-width: 760px) {
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .tray { width: calc(100vw - 24px); }
}

/* 维护工具：三张小卡片 + 差异明细 + 图片素材缩略图 */
.tool-cards { align-items: stretch; }
.tool-cards > .card { margin-bottom: 0; }
.tool-cards + * { margin-top: var(--gap); }
.tool-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tool-h h2 { margin: 0; flex: 1; min-width: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.tool-h h2 small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 10px; }
.tool-h form { margin: 0; }
.tool-card .hint { margin: 0 0 12px; }
.tool-line { display: flex; align-items: center; gap: 12px; margin: 0; padding-top: 12px; border-top: 1px dashed var(--line-3); }
.tool-line .tool-meta { margin: 0; }
.tool-msg { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.7; overflow-wrap: anywhere; }
.tool-empty { margin: 0; padding-top: 12px; border-top: 1px dashed var(--line-3); color: var(--muted); font-size: 13px; }
.tool-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.tool-nums span { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.tool-nums b { font-size: 20px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.tool-nums .t-warn b { color: var(--warn-ink); } .tool-nums .t-bad b { color: var(--bad); }
.tool-list { margin-top: 8px; }
.fix-cols { columns: 3 300px; column-gap: 28px; }
.fix-g { break-inside: avoid; margin-bottom: 10px; }
.media-grid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.media-i { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line-3); border-radius: var(--r); min-width: 0; }
.media-th { flex: none; width: 64px; height: 64px; border-radius: 3px; background: #F5F7FA; display: grid; place-items: center; overflow: hidden; color: var(--faint); }
.media-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-th svg { width: 28px; height: 28px; }
.media-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.media-b > b { font-weight: 400; color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-b small { color: var(--muted); font-size: 12px; }
.media-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.media-id code { flex: 1; min-width: 0; font: 12px/1.5 var(--mono); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-id .btn { flex: none; }
.pkg-list { margin-top: 12px; padding-left: 0; list-style: none; }
.pkg-list li { display: flex; gap: 12px; align-items: baseline; }
.logs2 { align-items: start; }
.logs2 > .card { margin-bottom: 0; }
.sec-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 28px; align-items: start; }
.sec-side { border-left: 1px solid var(--line-3); padding-left: 24px; min-width: 0; }
@media (max-width: 1100px) { .sec-split { grid-template-columns: minmax(0, 1fr); } .sec-side { border-left: 0; padding-left: 0; } }
.chan-card { padding: 14px 20px; }
.chan-row { display: flex; align-items: center; gap: 16px 28px; flex-wrap: wrap; }
.chan-l { flex: 1 1 280px; min-width: 0; }
.chan-l h2 { font-size: 15px; margin: 0 0 4px; color: var(--ink); }
.chan-l .hint { margin: 0; }
.chan-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.chan-opt { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 190px; padding: 9px 14px 9px 36px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; background: #fff; }
.chan-opt input { position: absolute; left: 13px; top: 12px; margin: 0; accent-color: var(--green); }
.chan-opt b { font-size: 14px; font-weight: 600; color: var(--ink); }
.chan-opt small { font-size: 12px; color: var(--muted); }
.chan-opt:has(input:checked) { border-color: var(--green); background: #F3FBF5; }
.chan-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chan-r .hint { margin: 0; }
/* 扩展功能一排三张：标签收窄，申请页地址放在设置下面 */
.more.g3 { --lw: 104px; }
.more.g3 .field { grid-template-columns: var(--lw) minmax(0, 1fr); }
.sec-below { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-3); }
@media (max-width: 1280px) { .more.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .more.g3 { grid-template-columns: minmax(0, 1fr); } }
/* 通用设置一页三张卡片：标签收窄 */
.settings-row { align-items: stretch; }
.settings-row.g3 { --lw: 104px; }
.settings-row.g3 .field { grid-template-columns: var(--lw) minmax(0, 1fr); }
.acts-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-left: 0; }
.acts-row form { display: inline-flex; margin: 0; }
.dlg-title h3 small { margin-left: 10px; font-size: 12px; font-weight: 400; color: var(--muted); }
/* 扩展功能：三列等高；左列上下放报单与通知渠道和获客统计 */
.more.more3 { align-items: stretch; }
.more3 > .stack { gap: var(--gap); }
.more3 > .stack > .card:last-child { flex: 1 1 auto; }
.more3 .chan-card { padding: 16px 20px; }
.more3 .chan-card > .hint { margin: 0 0 12px; }
.more3 .chan-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.more3 .chan-opt { min-width: 0; }
.chan-fail { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.chan-fail .hint { margin: 0; }
.chan-act { margin-top: 14px; }
/* 企业微信 / 飞书：左配置、右要填到对方后台的内容，等高 */
.cfg-pair { align-items: stretch; }
.check-line { margin-top: 10px; }
.check-line .hint { margin: 0; line-height: 1.7; }
/* 客户概况 · 接入概况：名称 | 状态 | 说明，一行一项对齐 */
.status-list { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); }
.sl-name, .sl-tag { padding-right: 18px !important; }
.sl-row { display: contents; }
.sl-row > span { padding: 9px 0; border-bottom: 1px dashed var(--line-3); min-width: 0; display: flex; align-items: center; }
.sl-row:last-child > span { border-bottom: 0; }
.sl-name { color: var(--ink); white-space: nowrap; }
.sl-note { color: var(--muted); font-size: 12px; overflow: hidden; }
.sl-note { white-space: nowrap; text-overflow: ellipsis; display: block !important; line-height: 22px; }
/* 版本页 · 客户操作栏：三组并排（平台安装包 / 客户程序 / 小程序），每组上面一行小标题 */
.op-bar { display: flex; flex-wrap: wrap; gap: 12px; padding: 4px 20px 14px; }
.op-g { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; border: 1px solid var(--line-3); border-radius: var(--r); background: #FBFCFC; }
.op-g.grow { flex: 1 1 auto; }
.op-l { font-size: 12px; color: var(--muted); }
.op-c { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.op-c select { width: auto; min-width: 150px; }
.op-c input[type=text] { width: 200px; }
.pick-bar { border-top: 1px solid var(--line-3); }
/* 设置：一排三张等高，保存按钮都在卡片底部同一高度 */

.settings-row > .card { display: flex; flex-direction: column; }
.settings-row > .card > .form-actions:last-of-type { margin-top: auto; padding-top: 6px; }
.settings-row .kv { grid-template-columns: var(--lw) minmax(0, 1fr); column-gap: 16px; }
.settings-row .kv dt { text-align: right; }
.act-sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }
/* 扩展功能（p62 重排）：四张卡片同一种写法——标题、标签在上输入框在下、保存按钮贴底对齐 */
.more3 > .card, .more3 > .stack > .card { display: flex; flex-direction: column; margin-bottom: 0; }
.more3 .chan-card { padding: 16px 20px; }
.more3 .field { display: block; margin-bottom: 16px; }
.more3 .field > label, .more3 .field > .label { display: block; text-align: left; padding: 0; margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }
.more3 .field > div { max-width: none; }
.more3 .field .hint { margin-top: 5px; }
.more3 .form-actions { padding-left: 0; margin-top: auto; padding-top: 4px; }
.more3 .chan-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.more3 .chan-opt { min-width: 0; padding: 9px 12px 9px 34px; }
.more3 textarea.code-input { height: 150px; min-height: 0; }
.more3 .sec-below { margin: 0 0 16px; padding-top: 0; border-top: 0; }
.more3 .sec-below .ug { display: none; }
.cfg-pair .urlist .ug { display: none; }
/* p63：左侧菜单字和图标再大一点 */
.side { font-size: 16px; }
.nav-item { height: 52px; line-height: 52px; font-size: 17px; gap: 15px; padding-left: 22px; }
.nav-item .ico { width: 25px; height: 25px; }
.nav-item.on::before { top: 13px; bottom: 13px; }
.brand .brand-text { font-size: 19px; }
/* 重置客户管理员弹窗：内容不多，窄一点 */
.dlg.bt.narrow { width: min(520px, calc(100vw - 24px)); --cw: 360px; }
/* 概况：操作按钮在“接入概况”卡片底部 */
.g-side > .card { display: flex; flex-direction: column; }
.ov-acts { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-3); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ov-acts form { margin: 0; }
.status-list + .ov-acts { margin-top: auto; }
/* p64：重置弹窗只填一个账号名——窄弹窗，标签在上，内容居中 */
.dlg.bt.narrow { width: min(420px, calc(100vw - 24px)); }
.dlg.bt.narrow .dlg-main { padding: 20px 28px 8px; }
.dlg.bt.narrow .field { display: block; margin-bottom: 12px; }
.dlg.bt.narrow .field > label { display: block; text-align: left; padding: 0; margin: 0 0 6px; }
.dlg.bt.narrow .field input { width: 100%; }
.reset-tips { margin: 4px 0 6px; padding: 10px 12px 10px 28px; background: #F7F8FA; border-radius: var(--r); color: var(--ink-2); font-size: 13px; line-height: 1.8; }
