/* 托管平台总后台样式：无外部依赖，适配手机。 */
:root {
  --bg: #f4f5f7; --panel: #fff; --ink: #1d2330; --sub: #5d6676; --line: #e3e6eb; --soft: #f8f9fb;
  --brand: #1f6feb; --brand-ink: #fff; --brand-soft: #e8f0fe;
  --ok: #1a7f37; --ok-bg: #e6f4ea; --warn: #9a6700; --warn-bg: #fff4d6; --bad: #c62828; --bad-bg: #fdecec;
  --info: #0b5cad; --info-bg: #e7f1fb; --muted: #6b7280; --muted-bg: #eef0f3;
  --radius: 10px; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 8px; color: var(--sub); }
p { margin: 0 0 10px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* 布局 */
.shell { display: flex; min-height: 100vh; }
.side { width: 210px; background: #141a26; color: #c9d1dd; flex-shrink: 0; display: flex; flex-direction: column; }
.side .brand { padding: 18px 18px 14px; font-weight: 600; color: #fff; font-size: 15px; border-bottom: 1px solid #222b3b; }
.side .brand small { display: block; color: #8b95a7; font-weight: 400; font-size: 12px; margin-top: 2px; }
.side nav a { display: block; padding: 9px 18px; color: #c9d1dd; border-left: 3px solid transparent; }
.side nav a:hover { background: #1b2232; text-decoration: none; }
.side nav a.on { background: #1b2232; color: #fff; border-left-color: var(--brand); }
.side .foot { margin-top: auto; padding: 14px 18px; border-top: 1px solid #222b3b; font-size: 12px; }
.side .foot button { background: none; border: 0; color: #8b95a7; padding: 0; cursor: pointer; font: inherit; }
.main { flex: 1; min-width: 0; padding: 22px 28px 60px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.head .crumb { color: var(--sub); font-size: 12px; margin-bottom: 2px; }
.head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 卡片与网格 */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card.tight { padding: 0; overflow: hidden; }
.card.tight > h2 { padding: 14px 18px 0; }
.card.tight > .pad { padding: 0 18px; }
.card.tight > .pad-b { padding: 0 18px 16px; }
.grid { display: grid; gap: 16px; }
.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)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 26px; font-weight: 600; line-height: 1.2; }
.stat .l { color: var(--sub); font-size: 12px; }
dl.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--sub); }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft); color: var(--sub); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.nowrap, th.nowrap { white-space: nowrap; }

/* 标签 */
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; line-height: 20px; white-space: nowrap; }
.tag.ok { color: var(--ok); background: var(--ok-bg); }
.tag.warn { color: var(--warn); background: var(--warn-bg); }
.tag.bad { color: var(--bad); background: var(--bad-bg); }
.tag.info { color: var(--info); background: var(--info-bg); }
.tag.muted { color: var(--muted); background: var(--muted-bg); }
.text-ok { color: var(--ok); } .text-warn { color: var(--warn); } .text-bad { color: var(--bad); }

/* 提示 */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; background: var(--info-bg); color: var(--info); border: 1px solid #c8def5; }
.flash.bad { background: var(--bad-bg); color: var(--bad); border-color: #f5c6c6; }
.note { padding: 10px 14px; border-radius: 8px; background: var(--soft); border: 1px dashed var(--line); color: var(--sub); margin: 10px 0; }
.note.warn { background: var(--warn-bg); border: 1px solid #f0d58c; color: #6b4c00; }
.secret-box { font-family: var(--mono); font-size: 18px; letter-spacing: 1px; background: #101622; color: #e9f0ff; padding: 12px 16px; border-radius: 8px; display: inline-block; user-select: all; word-break: break-all; }

/* 表单 */
form.inline { display: inline; }
label { display: block; font-weight: 500; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 3px; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #cfd5de; border-radius: 7px; background: #fff; font: inherit; color: inherit;
}
textarea { min-height: 90px; font-family: var(--mono); font-size: 12.5px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
input.otp { font-family: var(--mono); font-size: 18px; letter-spacing: 4px; max-width: 180px; }
.check { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.check input { margin: 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 180px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 7px; border: 1px solid #cfd5de; background: #fff; color: var(--ink);
  font: inherit; cursor: pointer; white-space: nowrap; line-height: 1.4; }
.btn:hover { background: var(--soft); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #1a5fd0; }
.btn.danger { color: var(--bad); border-color: #efb6b6; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.small { padding: 3px 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.otp-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); }
.otp-line label { margin: 0; }

/* 页签 */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 8px 14px; color: var(--sub); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--brand); font-weight: 500; }
.tabs a:hover { text-decoration: none; color: var(--ink); }

/* 步骤 */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps .dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 12px; color: #fff; background: #c4cad4; margin-top: 1px; }
.steps .done .dot { background: var(--ok); }
.steps .running .dot { background: var(--info); animation: pulse 1s infinite; }
.steps .failed .dot { background: var(--bad); }
@keyframes pulse { 50% { opacity: .4; } }

/* 简洁页（登录、安装） */
.bare { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, #eef3fb 0%, #f4f5f7 60%); }
.bare .box { width: 100%; max-width: 440px; }
.bare .box.wide { max-width: 760px; }
.bare .logo { text-align: center; margin-bottom: 18px; font-weight: 600; font-size: 17px; }
.bare .logo small { display: block; color: var(--sub); font-weight: 400; font-size: 12.5px; }
.qr { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr .img { width: 188px; height: 188px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.qr .img svg { width: 100%; height: 100%; display: block; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; font-family: var(--mono); font-size: 15px; background: var(--soft); padding: 14px 18px; border-radius: 8px; }
.wizard { display: flex; gap: 6px; margin-bottom: 14px; }
.wizard span { flex: 1; text-align: center; font-size: 12px; padding: 6px; border-radius: 6px; background: var(--muted-bg); color: var(--sub); }
.wizard span.on { background: var(--brand); color: #fff; }

details { margin: 8px 0; }
details summary { cursor: pointer; color: var(--sub); }

@media (max-width: 900px) {
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .shell { flex-direction: column; }
  .side { width: 100%; }
  .side nav { display: flex; overflow-x: auto; }
  .side nav a { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; padding: 10px 12px; }
  .side nav a.on { border-bottom-color: var(--brand); }
  .side .foot { display: none; }
  .main { padding: 16px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  dl.kv { grid-template-columns: 90px 1fr; }
}
.mt { margin-top: 16px; }
.empty { padding: 0 18px 14px; }
.right { text-align: right; }
.stack > * + * { margin-top: 8px; }
.danger-zone { border-color: #f2c4c4; }
.danger-zone h2 { color: var(--bad); }
.list-plain { margin: 0; padding-left: 18px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pre { white-space: pre-wrap; word-break: break-all; font-family: var(--mono); font-size: 12px; background: var(--soft); padding: 8px 10px; border-radius: 6px; margin: 0; }
