/* HG 项目看板 · 设置页、登录页、还有「会跳到哪里」的小说明页。
   颜色、字、圆角全用 app.css 里的那一套（设计 A）：界面只用中性色，红只给「出错了」，绿只给「成功」。
   设置页的 class 都以 set- 开头，登录页和说明页以 xp- 开头，不碰别人的样式。 */

/* ================= 设置 ================= */
.set { max-width: 1180px; margin: 0 auto; }
.set-hd { display: flex; align-items: baseline; gap: 12px; margin: 4px 2px 14px; }
.set-hd h1 { margin: 0; font-size: 22px; line-height: 30px; font-weight: 700; letter-spacing: -.01em; }
.set-hd span { font-size: 12.5px; color: var(--ink-3); }
.set-cols { display: grid; grid-template-columns: 372px minmax(0, 1fr); gap: 20px; align-items: start; }
.set-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.set-card, .set-conns { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.set-card { padding: 16px 20px 14px; }
.set-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.set-h h2 { margin: 0; font-size: 15px; font-weight: 700; }
.set-h span { font-size: 12px; color: var(--ink-3); }

/* 一行：左边是名字，右边是能改的东西 */
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; align-items: center; min-height: 48px; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: 0; }
.set-row > label, .set-row > .set-k { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.set-inl { display: flex; align-items: center; gap: 8px; }
.set-pre { font: 600 12px var(--mono); color: var(--ink-3); }

.set-seg { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.set-seg button { height: 26px; padding: 0 11px; border: 0; border-radius: 6px; background: none; color: var(--ink-3); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.set-seg button:hover { color: var(--ink); }
.set-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }

.set-inp { width: 100%; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.set-inp::placeholder { color: var(--ink-4); }
.set-inp:hover { border-color: var(--ink-4); }
.set-inp:focus { outline: 0; border-color: var(--ink-2); box-shadow: 0 0 0 3px var(--track); }
.set-inp.num { width: 92px; font-variant-numeric: tabular-nums; }
.set-inp.mono { font-family: var(--mono); font-size: 12px; }
.set input[type="checkbox"] { accent-color: var(--ink); }
.set .btn[disabled] { opacity: .45; cursor: default; pointer-events: none; }

/* 用户 */
.set-users { width: 100%; border-collapse: collapse; font-size: 13px; }
.set-users th { padding: 2px 0 6px; text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.set-users td { height: 38px; padding: 0; border-top: 1px solid var(--line); }
.set-users td:first-child { font-weight: 600; }
.set-users th + th, .set-users td + td { width: 76px; text-align: center; }
.set-users .ic { width: 14px; height: 14px; vertical-align: -2px; color: var(--ok); }
.set-users .no { color: var(--ink-4); }
.set-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.set-add-r { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.set-add-r .btn { margin-left: auto; }
.set-ck { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }

/* 连接：一张表里一块一块，中间只隔一条细线 */
.set-conns-h { padding: 16px 22px 12px; }
.set-conns-h.set-h { margin: 0; }
.set-conn { padding: 14px 22px 16px; border-top: 1px solid var(--line); }
.set-conn-h { display: flex; align-items: center; gap: 12px; min-height: 24px; margin-bottom: 10px; }
.set-conn-h b { flex: none; font-size: 14px; font-weight: 600; }
.set-res { margin-left: auto; min-width: 0; display: inline-flex; align-items: center; gap: 7px; overflow: hidden; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.set-res span { overflow: hidden; text-overflow: ellipsis; }
.set-res i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.set-res.good i { background: var(--ok); }
.set-res.bad { color: var(--red-ink); font-weight: 600; }
.set-res.bad i { background: var(--red); }
.set-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.set-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.set-f.wide { grid-column: 1 / -1; }
.set-f > label, .set-f > .set-k { font-size: 12px; line-height: 16px; color: var(--ink-3); }
.set-f.check { flex-direction: row; align-items: center; gap: 8px; align-self: end; min-height: 32px; }
.set-f.check > label { font-size: 13px; color: var(--ink-2); }
.set-acts { display: flex; align-items: center; gap: 8px; margin-top: 12px; }

/* 演练开关：开着什么都不会真的发 */
.set-dry { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.set-dry-t { display: flex; flex-direction: column; min-width: 0; }
.set-dry-t label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.set-dry-t span { font-size: 12px; line-height: 17px; color: var(--ink-3); }
.set-dry.live { background: var(--amber-t); }
.set-dry.live .set-dry-t span { color: var(--amber-ink); font-weight: 600; }
.set-sw { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 36px; height: 20px; margin: 0; border-radius: 10px; background: var(--line-2); cursor: pointer; transition: background .12s; }
.set-sw::before { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .12s; }
.set-sw:checked { background: var(--ink); }
.set-sw:checked::before { transform: translateX(16px); }
.set-sw:disabled { opacity: .5; cursor: default; }

.set-msg { padding: 44px 16px; text-align: center; font-size: 13.5px; color: var(--ink-3); }
.set-msg b { display: block; margin-bottom: 4px; font-size: 15px; color: var(--ink); }
.set-msg .btn { margin-top: 14px; }

@media (max-width: 1359px) {
  .set-cols { grid-template-columns: 340px minmax(0, 1fr); gap: 16px; }
  .set-conn, .set-conns-h { padding-left: 20px; padding-right: 20px; }
}

/* ================= 登录页、说明页 ================= */
body.xp { min-width: 0; }
.xp-main { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px 64px; }
.xp-card { width: 372px; max-width: 100%; padding: 26px 28px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.xp-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.xp-mark { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: var(--surface); }
.xp-mark svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.xp-card h1 { margin: 20px 0 0; font-size: 22px; line-height: 30px; font-weight: 700; letter-spacing: -.01em; }
.xp-sub { margin: 2px 0 0; min-height: 18px; font-size: 12.5px; line-height: 18px; color: var(--ink-3); }
.xp-form { display: grid; gap: 12px; margin-top: 18px; }
.xp-f { display: grid; gap: 5px; font-size: 12px; color: var(--ink-3); }
.xp-inp { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.xp-inp:hover { border-color: var(--ink-4); }
.xp-inp:focus { outline: 0; border-color: var(--ink-2); box-shadow: 0 0 0 3px var(--track); }
.xp-err { margin: 0; padding: 8px 12px; border-radius: 9px; background: var(--red-t); color: var(--red-ink); font-size: 13px; font-weight: 500; }
.xp-btn { height: 40px; margin-top: 4px; border: 1px solid var(--ink); border-radius: 9px; background: var(--ink); color: var(--surface); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.xp-btn:hover { opacity: .9; }
.xp-btn[disabled] { opacity: .5; cursor: default; }
.xp [hidden] { display: none; }

.xp-go { width: 560px; }
.xp-go h1 { margin-top: 6px; font-size: 19px; line-height: 27px; }
.xp-go p { margin: 10px 0 0; font-size: 13.5px; line-height: 21px; color: var(--ink-2); }
.xp-kicker { display: inline-block; margin: 0; padding: 0 8px; border-radius: 6px; background: var(--surface-2); font-size: 11.5px; line-height: 20px; font-weight: 600; color: var(--ink-3); }
.xp-go .xp-kicker { margin: 0; font-size: 11.5px; line-height: 20px; color: var(--ink-3); }
.xp-go .xp-target { padding: 10px 12px; border-radius: 9px; background: var(--surface-2); font: 500 12.5px/19px var(--mono); color: var(--ink); word-break: break-all; }
.xp-back { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.xp-back:hover { color: var(--ink); text-decoration: underline; }

/* ---------- 设置 · Xero 连接 ---------- */
.set-xero { display: flex; align-items: center; gap: 10px; margin: -2px 0 12px; }
.set-xero .set-res { margin-left: 0; margin-right: auto; }
a.btn.off { opacity: .5; pointer-events: none; }

/* ===== 看板界面优化 · 设置：Xero 第一次连接三步、用户「改」（2026-11-19 晚）===== */
.set-steps { margin: 4px 0 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.set-steps li { display: flex; align-items: center; gap: 10px; min-height: 30px; font-size: 13px; color: var(--ink-2); }
.set-steps li > b { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 12px; color: var(--ink-2); }
.set-steps li.ok > b { background: var(--ok-t); box-shadow: none; color: var(--ok); }
.set-steps li.ok > b .ic { width: 12px; height: 12px; }
.set-steps li > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.set-steps code { padding: 1px 6px; border-radius: 5px; background: var(--surface-2); font: 12px var(--mono); color: var(--ink); word-break: break-all; }
.set-users td:last-child { width: 44px; text-align: right; }
/* ===== 设置 · 结束 ===== */
