/* ============================================================
   HTMLHost 控制台 — 宝塔风格设计系统
   ============================================================ */

:root {
  --bg: #f2f3f5;
  --panel: #ffffff;
  --ink: #1f2329;
  --ink-2: #424850;
  --muted: #8a919f;
  --muted-2: #a8aeb8;
  --line: #e9ebef;
  --line-2: #f0f2f5;
  --brand: #1677ff;
  --brand-hover: #4096ff;
  --brand-soft: #e8f0fe;
  --brand-line: #bae0ff;
  --ok: #00b42a;
  --ok-soft: #e8ffea;
  --warn: #d25f00;
  --warn-soft: #fff7e8;
  --warn-line: #ffe4ba;
  --danger: #f53f3f;
  --danger-soft: #ffece8;
  --sidebar-w: 176px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(31, 35, 41, .04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

svg { width: 16px; height: 16px; fill: currentColor; flex: none; }

code {
  font-family: var(--mono);
  background: #f2f3f5;
  border-radius: 3px;
  padding: 1px 5px;
  font-size: .9em;
  color: #c7254e;
}

/* 终端风格代码块（接口调用示例） */
.code-box {
  background: #1b2130;
  color: #cfd8e6;
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.72;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}
.code-box::-webkit-scrollbar { height: 8px; }
.code-box::-webkit-scrollbar-thumb { background: #3a4356; border-radius: 4px; }

/* ================= 框架 ================= */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.brand {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-2);
  flex: none;
}

.brand-mark {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
  flex: none;
}

.brand-text strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text small { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; }

.nav { padding: 8px 8px; flex: 1; overflow-y: auto; }

.nav-group {
  font-size: 11.5px;
  color: var(--muted-2);
  padding: 10px 8px 5px;
  font-weight: 500;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 13.5px;
  margin-bottom: 1px;
  position: relative;
  transition: background .15s, color .15s;
}

.nav-item svg { width: 15px; height: 15px; color: var(--muted); transition: color .15s; }
.nav-item:hover { background: #f5f6f8; color: var(--ink); }
.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}
.nav-item.active svg { color: var(--brand); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 3px; height: 18px;
  border-radius: 0 2px 2px 0;
  background: var(--brand);
}

.nav-count {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  background: #f2f3f5;
  border-radius: 9px;
  padding: 0 6px;
  line-height: 16px;
  min-width: 16px;
  text-align: center;
}
.nav-item.active .nav-count { background: #fff; color: var(--brand); }

.sidebar-foot {
  padding: 10px 14px;
  border-top: 1px solid var(--line-2);
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.6;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 48px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 30;
  flex: none;
}

.topbar-title { font-size: 14px; font-weight: 500; margin: 0; color: var(--ink); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.topbar-back {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 4px;
  color: var(--muted);
}
.topbar-back:hover { background: #f2f3f5; color: var(--ink); }
.topbar-back svg { width: 15px; height: 15px; }

.user-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-2);
}
.user-chip .avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: #d6e4ff; color: var(--brand);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
}

.content { padding: 16px 20px 48px; max-width: 1440px; width: 100%; }

/* ================= 卡片 ================= */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }

.card-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
}

.card-head h2, .card-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}
.card-head h2 svg, .card-head h3 svg { width: 15px; height: 15px; color: var(--brand); }
.card-head .sub { color: var(--muted); font-size: 12px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.card-body { padding: 16px; }
.card-body.tight { padding: 0; }
.card-body.pad-lg { padding: 20px; }

/* ================= 仪表盘头部 ================= */

.hero {
  background: linear-gradient(96deg, #f0f6ff 0%, #f7fbff 55%, #fdfdff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -40px; top: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22,119,255,.10), transparent 66%);
}
.hero h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.2px; }
.hero p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.hero .right { margin-left: auto; display: flex; align-items: center; gap: 10px; z-index: 1; }

.ver-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 12px;
  font-weight: 500;
}

/* ================= 统计卡 ================= */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.stat .ico {
  position: absolute;
  right: 12px; top: 12px;
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: #f5f8ff;
  color: var(--brand);
}
.stat .ico svg { width: 18px; height: 18px; }
.stat .ico.green { background: #f0fff4; color: var(--ok); }
.stat .ico.orange { background: #fff8ee; color: #fa8c16; }
.stat .ico.red { background: #fff1f0; color: var(--danger); }

.stat .label { color: var(--muted); font-size: 12.5px; }
.stat .value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.5px;
  line-height: 1.25;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.stat .value small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.stat .foot { color: var(--muted); font-size: 12px; margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.stat .foot svg { width: 12px; height: 12px; }

/* ================= 资源环 ================= */

.ring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.ring-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 8px;
}

.ring-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.ring-head svg { width: 14px; height: 14px; color: var(--brand); }
.ring-head .val { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.ring-wrap { display: flex; justify-content: center; padding: 6px 0 2px; }
.ring { position: relative; width: 128px; height: 128px; }
.ring svg { width: 128px; height: 128px; transform: rotate(-90deg); }
.ring .track { stroke: #f0f2f5; }
.ring .bar { stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring .txt {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 21px; font-weight: 600;
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
}
.ring-foot { text-align: center; color: var(--muted); font-size: 12px; padding-bottom: 10px; }

/* ================= 系统信息 ================= */

.info-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.info-table td { padding: 7px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.info-table tr:last-child td { border-bottom: 0; }
.info-table td.k { color: var(--muted); width: 108px; padding-right: 10px; }
.info-table td.v { color: var(--ink-2); word-break: break-all; }

.info-head {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
}
.info-head .badge-ico {
  width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center;
  background: #f0f6ff; color: var(--brand);
}
.info-head .badge-ico svg { width: 15px; height: 15px; }
.info-head .t { font-size: 13.5px; font-weight: 500; }
.info-head .s { font-size: 11.5px; color: var(--muted); }
.info-head .right { margin-left: auto; }

/* ================= 按钮 ================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-family: inherit;
  font-weight: 400;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { border-color: var(--brand-line); color: var(--brand); }
.btn svg { width: 14px; height: 14px; }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #ff7875; border-color: #ff7875; color: #fff; }

.btn-danger-ghost { color: var(--danger); border-color: #ffccc7; background: #fff; }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f5f6f8; color: var(--ink); border-color: transparent; }

.btn-sm { height: 26px; padding: 0 9px; font-size: 12.5px; border-radius: 4px; }
.btn-sm svg { width: 12px; height: 12px; }
.btn-lg { height: 38px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.icon-btn {
  width: 30px; height: 30px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s;
}
.icon-btn:hover { border-color: var(--brand-line); color: var(--brand); }
.icon-btn svg { width: 14px; height: 14px; }

/* ================= 表单 ================= */

.form-grid { display: grid; gap: 14px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.field label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.field label .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

input[type=text], input[type=password], input[type=number], input[type=search],
input[type=url], select, textarea {
  width: 100%;
  height: 32px;
  border: 1px solid #d9dce1;
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}

textarea {
  height: auto;
  min-height: 120px;
  padding: 8px 10px;
  line-height: 1.7;
  resize: vertical;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, .1);
}

input::placeholder, textarea::placeholder { color: #bfc4cc; }
input[readonly] { background: #f7f8fa; color: var(--muted); }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%238a919f' d='M6 8.5 2 4.5h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 11px;
  padding-right: 26px;
}

.input-wrap { display: flex; gap: 6px; }
.input-wrap input, .input-wrap select { flex: 1; min-width: 0; }
.input-wrap .btn { flex: none; }

.field-hint-box {
  background: #f7f8fa;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 6px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.check input { width: 14px; height: 14px; accent-color: var(--brand); margin: 0; }

/* 开关 */
.switch { display: inline-flex; align-items: center; cursor: pointer; gap: 8px; }
.switch input { display: none; }
.switch .track {
  width: 38px; height: 20px;
  border-radius: 20px;
  background: #d9dce1;
  position: relative;
  transition: background .2s;
  flex: none;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }

/* ================= 表格 ================= */

.table-wrap { overflow-x: auto; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }

.tbl th {
  text-align: left;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  padding: 9px 14px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
  color: var(--ink-2);
}

.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #fafcff; }

.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .actions { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }

.tbl .name {
  color: var(--brand);
  font-weight: 500;
  font-family: var(--mono);
  font-size: 13px;
}

/* ================= 徽章 ================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  font-weight: 400;
}
.badge::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-off { background: #f2f3f5; color: var(--muted); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-plain { background: #f2f3f5; color: var(--ink-2); }
.badge-plain::before { display: none; }

/* ================= 提示 ================= */

.alert {
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 12px;
  border: 1px solid transparent;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.65;
}
.alert svg { width: 15px; height: 15px; margin-top: 2px; flex: none; }
.alert-success { background: var(--ok-soft); border-color: #aff0b5; color: #1a7f2e; }
.alert-error { background: var(--danger-soft); border-color: #ffccc7; color: #cf1322; }
.alert-warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.alert-info { background: #f0f6ff; border-color: var(--brand-line); color: #0958d9; }

/* ================= 进度条 ================= */

.meter { height: 8px; background: #e9edf3; border-radius: 4px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(15,23,42,.06); }
.meter > i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transition: width .4s; }
.meter.warn > i { background: #fa8c16; }
.meter.danger > i { background: var(--danger); }

.metric { margin-bottom: 14px; }
.metric:last-child { margin-bottom: 0; }
.metric-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; color: var(--ink-2); }
.metric-top b { font-weight: 500; font-variant-numeric: tabular-nums; }
.metric-top span { color: var(--muted); }

/* ================= 通用 ================= */

.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.page-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 10px; } .mt-3 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 14px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.wrap { flex-wrap: wrap; }

.divider { height: 1px; background: var(--line-2); margin: 16px 0; }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .ico { font-size: 28px; opacity: .45; margin-bottom: 8px; }
.empty .ico svg { width: 30px; height: 30px; stroke-width: 1.5; }
.empty h3 { margin: 0 0 5px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.empty p { margin: 0 0 14px; font-size: 12.5px; }

.link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-2);
  height: 32px;
  overflow: hidden;
}
.link-box span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { margin-left: auto; flex: none; }

/* ================= 上传控件 ================= */

.dropzone {
  border: 1px dashed #d3d8de;
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  background: #fbfcfd;
  transition: all .18s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--brand);
  background: #f5f9ff;
}
.dropzone .dz-icon { font-size: 26px; margin-bottom: 8px; opacity: .55; line-height: 1; color: var(--brand); }
.dropzone .dz-icon svg { width: 30px; height: 30px; stroke-width: 1.5; }
.dropzone .dz-title { font-size: 13.5px; color: var(--ink-2); }
.dropzone .dz-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.dropzone input[type=file] { display: none; }
.dz-file {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--ink-2);
}

/* ================= 结果卡 ================= */

.result-box {
  border: 1px solid #aff0b5;
  background: linear-gradient(180deg, #f6fff7, #fff);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.result-box h3 {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ok);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cred-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.cred {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.cred .k { font-size: 11.5px; color: var(--muted); }
.cred .v {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: .3px;
  word-break: break-all;
}

/* ================= 登录页 ================= */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  background: #fff;
}

/* 左侧品牌区 */
.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 54px;
  color: #fff;
  background: linear-gradient(152deg, #0a46c4 0%, #1677ff 48%, #3d9bff 100%);
}
.auth-visual::before {
  content: "";
  position: absolute;
  width: 620px; height: 620px;
  right: -220px; top: -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 66%);
}
.auth-visual::after {
  content: "";
  position: absolute;
  left: -120px; bottom: -180px;
  width: 520px; height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
}
.auth-visual > * { position: relative; z-index: 1; }

.auth-visual .auth-brand {
  display: flex; align-items: center; gap: 11px;
  font-size: 15px; font-weight: 600; letter-spacing: .2px;
}
.auth-visual .auth-brand .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255,255,255,.18);
  display: grid; place-items: center;
  font-weight: 700; font-size: 16px;
}
.auth-visual h2 {
  font-size: 29px; font-weight: 600; line-height: 1.36;
  letter-spacing: -.5px; margin: 0 0 14px; max-width: 420px;
}
.auth-visual .lead {
  color: rgba(255,255,255,.82); font-size: 13.5px; line-height: 1.9;
  max-width: 390px; margin: 0;
}
.auth-points { display: grid; gap: 13px; margin-top: 32px; }
.auth-points div { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.92); }
.auth-points .dot {
  width: 21px; height: 21px; flex: 0 0 21px;
  border-radius: 7px; background: rgba(255,255,255,.16);
  display: grid; place-items: center;
}
.auth-points svg { width: 13px; height: 13px; }
.auth-visual .foot { font-size: 11.5px; color: rgba(255,255,255,.5); letter-spacing: .3px; }

/* 右侧表单区 */
.auth-side { display: grid; place-items: center; padding: 40px 24px; }
.auth-side .auth-logo { display: none; }

.auth-card { width: 100%; max-width: 366px; }

.auth-logo {
  width: 40px; height: 40px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 19px;
  margin-bottom: 15px;
}
.auth-logo svg { width: 21px; height: 21px; stroke-width: 2; }

.auth-card h1 { font-size: 20px; margin: 0 0 5px; font-weight: 600; letter-spacing: -.2px; }
.auth-card .sub { color: var(--muted); font-size: 12.5px; margin: 0 0 22px; }
.auth-card .btn { margin-top: 18px; }
.auth-card .form-grid { gap: 14px; }
.auth-foot { text-align: center; margin-top: 14px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; background: #f2f3f5; }
  .auth-visual { display: none; }
  .auth-side { padding: 30px 18px; }
  .auth-card {
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 6px 30px -8px rgba(31,35,41,.14);
    padding: 26px 24px 22px;
  }
  .auth-side .auth-logo { display: grid; }
}

.reserved-note {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
  background: #f7f8fa;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  line-height: 1.65;
}

/* ================= 站点提示页 ================= */

.notice-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f2f3f5;
  padding: 24px;
  font-family: var(--font);
}
.notice-card {
  text-align: center;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  padding: 40px 32px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px -14px rgba(31, 35, 41, .16);
}
.notice-code { font-size: 46px; font-weight: 700; letter-spacing: -2px; color: var(--brand); line-height: 1; opacity: .22; }
.notice-card h1 { font-size: 18px; margin: 12px 0 6px; font-weight: 600; }
.notice-card p { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.7; }

/* ================= 落地页 ================= */

.landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
  background: radial-gradient(700px 400px at 50% -10%, rgba(22,119,255,.10), transparent 62%), #f2f3f5;
}
.landing h1 { font-size: 26px; letter-spacing: -.5px; margin: 14px 0 8px; font-weight: 600; }
.landing p { color: var(--muted); max-width: 440px; margin: 0 auto; font-size: 13px; }
.landing .actions { margin-top: 22px; display: flex; gap: 10px; justify-content: center; }

/* ================= 代码编辑器（粘贴代码） ================= */

.code-wrap {
  border: 1px solid #d9dce1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.code-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(22,119,255,.1); }
.code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--muted);
}
.code-bar .lang {
  font-family: var(--mono);
  font-size: 11px;
  background: #eef2f7;
  border-radius: 3px;
  padding: 1px 6px;
  color: var(--ink-2);
}
.code-bar .right { margin-left: auto; display: flex; gap: 6px; }
.code-wrap textarea {
  border: 0;
  border-radius: 0;
  min-height: 260px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  box-shadow: none !important;
  tab-size: 2;
}

/* 分段选择 */
.seg {
  display: flex;
  gap: 0;
  background: #f2f3f5;
  border-radius: 6px;
  padding: 3px;
  width: fit-content;
}
.seg label { cursor: pointer; }
.seg input { display: none; }
.seg .seg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 14px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--muted);
  transition: all .15s;
  white-space: nowrap;
}
.seg .seg-item svg { width: 13px; height: 13px; }
.seg input:checked + .seg-item {
  background: #fff;
  color: var(--brand);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(31,35,41,.08);
}

/* 文件列表 */
.file-list { font-size: 13px; }
.file-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 5px;
  color: var(--ink-2);
}
.file-row:hover { background: #fafbfc; }
.file-row .fi { color: var(--muted); }
.file-row .fi svg { width: 15px; height: 15px; }
.file-row .nm { font-family: var(--mono); font-size: 12.5px; }
.file-row .sz { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.file-row .tag { font-size: 11px; color: var(--ok); background: var(--ok-soft); padding: 1px 6px; border-radius: 3px; }

/* ================= 备份：主机多选 ================= */

.tbl-pick td, .tbl-pick th { padding-top: 9px; padding-bottom: 9px; }
.tbl-pick tbody tr.picked { background: #f5f9ff; }
.tbl-pick tbody tr.picked:hover { background: #eef5ff; }

/* 列多的表格：窄屏不做挤压换行，交给 .table-wrap 横向滚动 */
.tbl-wide { min-width: 720px; }

.tick { display: inline-flex; align-items: center; cursor: pointer; }
.tick input {
  width: 15px; height: 15px; margin: 0;
  accent-color: var(--brand); cursor: pointer;
}

.pick-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
  border-radius: 0 0 var(--radius) var(--radius);
}
.pick-bar .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.pick-info { font-size: 13px; color: var(--ink-2); }
.pick-info b { color: var(--brand); font-variant-numeric: tabular-nums; }

.tag-mini {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-2);
  background: #f2f3f5;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 5px;
  margin: 0 4px 2px 0;
}

.note-list {
  margin: 0; padding-left: 18px;
  color: var(--ink-2); font-size: 12.5px; line-height: 1.95;
}
.note-list li { margin-bottom: 4px; }
.note-list b { color: var(--ink); font-weight: 500; }

/* ================= 移动端 ================= */

.only-mobile { display: none; }
.scrim { display: none; }

@media (max-width: 920px) {
  .sidebar {
    position: fixed; left: 0; top: 0;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 4px 0 24px rgba(31,35,41,.12);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .scrim {
    display: block;
    position: fixed; inset: 0;
    background: rgba(31, 35, 41, .4);
    z-index: 35;
  }
  .only-mobile { display: inline-grid; }
  .content { padding: 12px 12px 40px; }
  .topbar { padding: 0 12px; }
  .form-grid.cols-2, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat .value { font-size: 22px; }
  .auth-card { padding: 24px 20px 20px; }
  .hero { flex-wrap: wrap; }
  .hero .right { margin-left: 0; width: 100%; }
  .page-head .right { margin-left: 0; width: 100%; }
}
