/* ===================================================================
   服务器聚合管理面板 —— 浅色专业风设计系统
   =================================================================== */
:root {
  --bg: #f6f8fb;
  --bg-grad: radial-gradient(1200px 520px at 15% -8%, #eaf1ff 0%, #f6f8fb 55%);
  --surface: #ffffff;
  --surface-2: #f4f7fc;
  --surface-3: #eef2f9;
  --line: #e5eaf3;
  --line-strong: #d5dce8;
  --text: #101828;
  --text-2: #475467;
  --muted: #8494ab;
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --primary-weak: #eef4ff;
  --ok: #12925c;
  --ok-weak: #e9f9f1;
  --warn: #b45309;
  --warn-weak: #fff8e8;
  --danger: #d92d20;
  --danger-weak: #fef3f2;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, .06);
  --shadow: 0 8px 24px rgba(16, 24, 40, .08);
  --shadow-lg: 0 24px 64px rgba(16, 24, 40, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Source Han Sans SC", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg-grad) fixed, var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
a { color: var(--primary); text-decoration: none; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* ---------------- 按钮 ---------------- */
.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: 500 14px/1.2 var(--font);
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .06s;
}
.btn:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--text); }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.primary {
  background: linear-gradient(180deg, #3b74f0, var(--primary));
  border-color: var(--primary); color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, .28);
}
.btn.primary:hover { background: linear-gradient(180deg, #2f68e8, var(--primary-2)); border-color: var(--primary-2); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--danger); border-color: #f3c9c6; background: #fff7f6; }
.btn.danger:hover { background: var(--danger-weak); border-color: #eaa9a4; }
.btn.ok { color: var(--ok); border-color: #bfe8d3; background: #f6fdf9; }
.btn.ok:hover { background: var(--ok-weak); }
.btn.warn { color: var(--warn); border-color: #f0dcb4; background: #fffcf4; }
.btn.warn:hover { background: var(--warn-weak); }
.btn.sm { padding: 4px 8px; font-size: 12px; border-radius: 7px; gap: 3px; }
.btn.mini { padding: 3px 10px; font-size: 15px; border-radius: 8px; line-height: 1.35; }
.btn.block { width: 100%; padding: 12px; font-size: 15px; }
.btn.link { background: none; border: none; box-shadow: none; color: var(--primary); padding: 2px 4px; }

/* ---------------- 登录（左右分栏，IDC 服务商风格） ---------------- */
.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 46%) 1fr;
  background: var(--surface);
}

/* ===== 左侧品牌区 ===== */
.auth-aside {
  position: relative;
  overflow: hidden;
  padding: 40px 46px 28px;
  display: flex;
  flex-direction: column;
  color: #eaf1ff;
  background:
    radial-gradient(1100px 620px at 8% -10%, #2f5fd0 0%, transparent 62%),
    linear-gradient(158deg, #0b1a3a 0%, #12295c 46%, #0a1730 100%);
}
.aa-glow { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.aa-glow-a { width: 420px; height: 420px; right: -140px; top: -120px; background: rgba(59, 130, 246, .45); }
.aa-glow-b { width: 340px; height: 340px; left: -120px; bottom: -140px; background: rgba(124, 92, 245, .38); }
.aa-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 30% 25%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 30% 25%, #000 0%, transparent 78%);
}

.aa-brand { position: relative; display: flex; align-items: center; gap: 13px; }
.aa-logo {
  width: 46px; height: 46px; flex: none;
  border-radius: 13px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 10px 26px rgba(4, 12, 32, .45);
  overflow: hidden;
  backdrop-filter: blur(6px);
}
.aa-logo img { width: 100%; height: 100%; object-fit: contain; }
.aa-logo-fallback { font-size: 21px; line-height: 1; }
.aa-logo.sm { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(145deg, #3b74f0, #7c5cf5); border: 0; box-shadow: 0 4px 12px rgba(59,116,240,.3); }
.aa-logo.sm .aa-logo-fallback { font-size: 15px; color: #fff; }
.aa-logo.sm img { border-radius: 9px; filter: none; }

/* 设置页 LOGO 上传 */
.logo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo-prev {
  width: 64px; height: 64px; flex: none; border-radius: 16px;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(145deg, #3b74f0, #7c5cf5);
  color: #fff; font-size: 26px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.logo-prev img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.logo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.logo-hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.65; }
.aa-brand strong { display: block; font-size: 17px; font-weight: 650; letter-spacing: .2px; color: #fff; }
.aa-brand-sub { display: block; margin-top: 2px; font-size: 12px; color: rgba(226, 236, 255, .62); letter-spacing: .4px; }

.aa-main { position: relative; margin: auto 0; padding: 34px 0; max-width: 460px; }
.aa-main h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 2.2vw, 31px);
  line-height: 1.34;
  font-weight: 650;
  letter-spacing: .3px;
  color: #fff;
}
.aa-desc { margin: 0 0 26px; font-size: 13.5px; line-height: 1.85; color: rgba(219, 231, 255, .72); }

.aa-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.aa-feats li {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .085);
}
.aa-ico {
  width: 32px; height: 32px; flex: none; border-radius: 9px;
  display: grid; place-items: center; font-size: 15px;
  background: rgba(96, 165, 250, .18);
  border: 1px solid rgba(147, 197, 253, .22);
}
.aa-feats b { display: block; font-size: 13.5px; font-weight: 600; color: #f2f7ff; }
.aa-feats i { display: block; font-style: normal; font-size: 12px; color: rgba(205, 220, 248, .6); margin-top: 2px; }

.aa-foot {
  position: relative;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12px; color: rgba(200, 216, 245, .5);
}
.aa-foot-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* ===== 右侧表单区 ===== */
.auth-formside {
  display: grid;
  place-items: center;
  padding: 40px 28px;
  background: var(--surface);
}
.auth-box { width: min(392px, 100%); }
.ab-head { margin-bottom: 22px; }
.ab-head h1 { margin: 0; font-size: 23px; font-weight: 650; letter-spacing: .2px; }
.ab-tip { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: var(--muted); }

.ab-tabs {
  display: flex; gap: 22px; margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.ab-tab {
  position: relative;
  border: 0; background: none; padding: 0 2px 11px; cursor: pointer;
  font: 500 14px var(--font); color: var(--muted);
}
.ab-tab.active { color: var(--primary); font-weight: 600; }
.ab-tab.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--primary); border-radius: 2px;
}

.ab-form { display: grid; gap: 17px; }
.ab-field { display: grid; gap: 8px; }
.ab-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.ab-input { position: relative; display: flex; align-items: center; }
.ab-input > svg {
  position: absolute; left: 13px; color: #98a6bb; pointer-events: none;
  transition: color .15s;
}
.ab-input input {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 38px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fbfcfe;
  font: 400 14.5px var(--font);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ab-input input::placeholder { color: #a9b5c6; }
.ab-input input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
  outline: none;
}
.ab-input:focus-within > svg { color: var(--primary); }
.ab-eye {
  position: absolute; right: 8px;
  border: 0; background: none; cursor: pointer;
  width: 30px; height: 30px; border-radius: 7px;
  display: grid; place-items: center;
  font-size: 13px; color: #98a6bb; opacity: .85;
}
.ab-eye:hover { background: var(--surface-2); color: var(--text-2); }

.ab-submit {
  margin-top: 6px;
  height: 46px;
  border: 0; border-radius: 10px; cursor: pointer;
  font: 600 15px var(--font); letter-spacing: 2px; color: #fff;
  background: linear-gradient(180deg, #3b74f0, #2563eb);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .26);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.ab-submit:hover { filter: brightness(1.04); box-shadow: 0 10px 24px rgba(37, 99, 235, .32); }
.ab-submit:active { transform: translateY(1px); }
.ab-submit:disabled { opacity: .65; cursor: not-allowed; box-shadow: none; }

.ab-note {
  margin: 22px 0 0;
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 12.5px; line-height: 1.7; color: var(--muted);
}
.ab-note svg { flex: none; margin-top: 3px; color: #9fb0c8; }

/* 小屏：左侧折叠为顶部品牌条 */
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-aside { padding: 20px 22px 18px; min-height: 0; }
  .aa-main, .aa-foot { display: none; }
  .aa-grid { opacity: .22; }
  .aa-logo { width: 40px; height: 40px; border-radius: 11px; }
  .aa-brand strong { font-size: 15.5px; }
  .aa-brand-sub { font-size: 11.5px; }
  .auth-formside { place-items: start center; padding: 26px 20px 48px; }
  .auth-box { width: 100%; max-width: 420px; }
  .ab-head h1 { font-size: 20px; }
}

.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 7px; font-size: 13.5px; color: var(--text-2); font-weight: 500; }
input, select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font: 400 14.5px var(--font);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #a8b3c4; }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
input[type=checkbox] { width: auto; accent-color: var(--primary); }
.hint { font-size: 12.5px; margin: 16px 0 0; line-height: 1.7; color: var(--muted); }

/* ---------------- 顶栏 ---------------- */
.topbar {
  height: 62px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-left strong { font-size: 15.5px; font-weight: 650; }
.user-chip {
  font-size: 13px; color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px;
}
.burger {
  display: none; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  align-items: center; justify-content: center; font-size: 17px; color: var(--text-2);
}

/* ---------------- 布局 ---------------- */
.layout { display: flex; min-height: calc(100vh - 62px); }
.sidebar {
  width: 248px; flex: 0 0 248px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
  padding: 16px 14px 28px;
}
.side-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 6px 8px 10px; font-weight: 600;
}
.provider-list { display: grid; gap: 4px; margin-bottom: 20px; }
.provider-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid transparent; color: var(--text-2); background: transparent;
  text-align: left; width: 100%; font: 500 14px var(--font);
  transition: background .15s, color .15s, border-color .15s;
}
.provider-item:hover { background: var(--surface-2); color: var(--text); }
.provider-item.active { background: var(--primary-weak); border-color: #cfe0ff; color: var(--primary-2); font-weight: 600; }
.provider-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; flex: 0 0 8px; }
.provider-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(18, 146, 92, .14); }
.provider-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav { display: grid; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  text-align: left; background: transparent; border: 1px solid transparent;
  color: var(--text-2); padding: 10px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font: 500 14px var(--font); width: 100%;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-weak); color: var(--primary-2); border-color: #cfe0ff; }

.content { flex: 1; padding: 24px 26px 56px; min-width: 0; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.card-title { font-size: 17px; font-weight: 650; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1074px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th {
  background: var(--surface-2); color: var(--text-2);
  font-weight: 600; font-size: 12.5px; letter-spacing: .02em;
  position: sticky; top: 0; z-index: 1;
}
tbody tr { transition: background .12s; }
tbody tr:hover { background: #fafcff; }
tbody tr:last-child td { border-bottom: 0; }
td.name { white-space: normal; min-width: 168px; max-width: 200px; }
td.name strong { display: block; font-weight: 600; font-size: 14.5px; }
td.name small { color: var(--muted); font-size: 12.5px; }
.spec { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--text-2); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  border: 1px solid transparent; white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.on { color: var(--ok); background: var(--ok-weak); border-color: #c7ecd8; }
.chip.off { color: var(--danger); background: var(--danger-weak); border-color: #f7cdc9; }
.chip.busy { color: var(--warn); background: var(--warn-weak); border-color: #f2dfb7; }
.chip.unknown { color: #64748b; background: #f1f5f9; border-color: #e2e8f0; }
.chip.plain { color: var(--text-2); background: var(--surface-2); border-color: var(--line); }

.actions { display: flex; gap: 5px; flex-wrap: wrap; max-width: 152px; }

td.ops { white-space: normal; }
td.ipcopy { cursor: pointer; }
td.ipcopy:hover { color: var(--primary); }
td.sys { max-width: 168px; overflow: hidden; text-overflow: ellipsis; }

.empty {
  padding: 48px 20px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #fbfdff);
}
.empty strong { display: block; color: var(--text); margin-bottom: 8px; font-size: 17px; }

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, #eef2f7 25%, #f7f9fc 37%, #eef2f7 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  border-radius: 8px; height: 14px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------------- Toast ---------------- */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; max-width: 400px; }
.toast {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  padding: 12px 16px; border-radius: 12px; font-size: 14px; color: var(--text);
  box-shadow: var(--shadow); animation: slide .18s ease-out;
}
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
@keyframes slide { from { transform: translateY(10px); opacity: 0; } }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .45);
  display: grid; place-items: center; padding: 20px; z-index: 100;
  backdrop-filter: blur(3px);
}
.modal {
  width: min(580px, 100%); max-height: 88vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 24px; box-shadow: var(--shadow-lg);
  animation: pop .16s ease-out;
}
@keyframes pop { from { transform: scale(.985); opacity: .6; } }
.modal.wide { width: min(820px, 100%); }
.modal h3 { font-size: 18px; margin-bottom: 6px; }
.modal .modal-sub { font-size: 13.5px; color: var(--text-2); margin-bottom: 18px; line-height: 1.65; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.warn-box {
  background: var(--danger-weak); border: 1px solid #f7cdc9;
  color: #912018; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.65;
}
.info-box {
  background: var(--primary-weak); border: 1px solid #cfe0ff;
  color: #1e40af; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.65;
}
pre.raw {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; font-size: 12.5px; line-height: 1.55; color: var(--text-2);
  max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.spinner {
  width: 15px; height: 15px; border: 2px solid rgba(37, 99, 235, .22);
  border-top-color: var(--primary); border-radius: 50%; display: inline-block;
  animation: spin .7s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 日志 ---------------- */
.log-list { display: grid; gap: 8px; }
.log-item {
  display: grid; grid-template-columns: 158px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; font-size: 13.5px;
}
.log-item .ok { color: var(--ok); font-weight: 600; }
.log-item .fail { color: var(--danger); font-weight: 600; }

/* ---------------- 共享标签 & 授权 ---------------- */
.provider-item small.tag-op, .provider-item small.tag-ro {
  margin-left: auto; font-size: 11px; padding: 2px 6px; border-radius: 5px; flex: 0 0 auto;
}
.tag-op { color: var(--warn); background: var(--warn-weak); }
.tag-ro { color: #64748b; background: #f1f5f9; }

.grant-list { display: grid; gap: 8px; }
.grant-row {
  display: grid; grid-template-columns: 1fr 1.4fr auto auto; gap: 12px; align-items: center;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-size: 13.5px;
}
.grant-user { font-weight: 600; }
.grant-scope { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-pick {
  max-height: 240px; overflow: auto; border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 8px 10px; background: var(--surface); display: grid; gap: 2px;
}
.host-check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; padding: 6px 2px; color: var(--text); font-weight: 400; }
.host-check input { width: auto; margin: 0; }

/* ---------------- 使用说明（图文） ---------------- */
.guide-hero {
  background: linear-gradient(135deg, #eef4ff 0%, #f7f4ff 55%, #ffffff 100%);
  border: 1px solid #dfe7f7; border-radius: 18px; padding: 28px; margin-bottom: 20px;
}
.guide-hero h2 { font-size: 24px; letter-spacing: -.02em; }
.guide-hero p { margin: 10px 0 0; color: var(--text-2); font-size: 15px; max-width: 720px; line-height: 1.75; }
.guide-hero .hero-badges { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.steps { display: grid; gap: 18px; }
.step {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 22px; align-items: start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-xs);
}
.step.rev { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.step.solo { grid-template-columns: 1fr; }
.step.rev .step-text { order: 2; }
.step-num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .3);
}
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.step-head h3 { font-size: 18px; }
.step-text p { margin: 0 0 10px; color: var(--text-2); font-size: 15px; line-height: 1.8; }
.step-text ul { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 14.5px; line-height: 1.9; }
.step-text li b { color: var(--text); font-weight: 600; }
.shot {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption {
  font-size: 12.5px; color: var(--muted); padding: 9px 12px; border-top: 1px solid var(--line);
  background: var(--surface);
}
.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px 16px;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--text); }
.faq p { margin: 10px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.8; }

.mini-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 0; }
.mini-table th, .mini-table td { border: 1px solid var(--line); padding: 10px 12px; white-space: normal; }
.mini-table th { background: var(--surface-2); font-size: 13px; }

/* ---------------- 付费提示 ---------------- */
.paywall { text-align: center; padding: 6px 2px 0; }
.paywall .pw-icon {
  width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 16px;
  display: grid; place-items: center; font-size: 28px;
  background: linear-gradient(145deg, #fff1e0, #ffe4e6);
  box-shadow: 0 10px 24px rgba(217, 119, 6, .18);
}
.paywall h3 { font-size: 19px; }
.paywall p { color: var(--text-2); font-size: 14.5px; line-height: 1.8; margin: 12px auto 0; max-width: 440px; }

/* ---------------- 响应式 ---------------- */
.drawer-mask {
  display: none; position: fixed; inset: 62px 0 0; background: rgba(16, 24, 40, .4);
  z-index: 25; backdrop-filter: blur(2px);
}
@media (max-width: 960px) {
  .burger { display: inline-flex; }
  .sidebar {
    position: fixed; left: 0; top: 62px; bottom: 0; z-index: 26;
    background: var(--surface); transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 12px 0 40px rgba(16, 24, 40, .12); overflow-y: auto;
  }
  .sidebar.open { transform: none; }
  .drawer-mask.show { display: block; }
  .content { padding: 16px 14px 48px; }
  .layout { min-height: calc(100vh - 62px); }
  .step, .step.rev { grid-template-columns: 1fr; }
  .step.rev .step-text { order: 0; }
  .row2 { grid-template-columns: 1fr; }
  .card { padding: 15px; border-radius: 12px; }
  .log-item { grid-template-columns: 1fr; gap: 6px; }
  .modal { padding: 18px; }
  body { font-size: 14.5px; }
}
/* ---------------- 移动端服务器卡片 ---------------- */
.server-card {
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow-xs);
}
.sc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sc-title { font-weight: 650; font-size: 15px; line-height: 1.45; }
.sc-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.sc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 10px;
  margin: 12px 0; padding: 10px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
}
.sc-item { display: grid; gap: 2px; }
.sc-item span { font-size: 11.5px; color: var(--muted); }
.sc-item b { font-size: 13px; font-weight: 600; }
.sc-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------- 监控详情 ---------------- */
.link-btn {
  background: none; border: 0; padding: 0; color: var(--text); font: inherit;
  font-weight: 650; cursor: pointer; text-align: left;
}
.link-btn:hover { color: var(--primary); }

.gauges {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: 18px; padding: 16px 0 6px; border-top: 1px solid var(--line);
}
.gauge { text-align: center; }
.donut-wrap { position: relative; width: 118px; height: 118px; margin: 0 auto; }
.donut { width: 118px; height: 118px; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; gap: 3px; }
.donut-center b { font-size: 21px; font-weight: 650; letter-spacing: -.02em; }
.donut-center span { font-size: 11.5px; color: var(--muted); }
.gauge-label { margin-top: 10px; font-size: 13px; color: var(--text-2); }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; box-shadow: var(--shadow-xs);
}
.chart-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.chart { width: 100%; height: 210px; display: block; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

.range-btns { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; }
.range-btn {
  border: 0; background: transparent; padding: 6px 11px; border-radius: 7px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer;
}
.range-btn.active { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-xs); }

@media (max-width: 960px) {
  .gauges { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
}

/* ---------------- 监控仪表 / 图表 ---------------- */
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: var(--text); text-align: left; font-weight: 650;
}
.link-btn:hover { color: var(--primary); }

.gauges {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: 18px; padding: 8px 0 4px;
}
.gauge { text-align: center; }
.donut-wrap { position: relative; width: 116px; height: 116px; margin: 0 auto; }
.donut { width: 116px; height: 116px; display: block; }
.donut-center {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 2px;
}
.donut-center b { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.donut-center span { font-size: 11.5px; color: var(--muted); }
.gauge-label { margin-top: 8px; font-size: 13.5px; color: var(--text-2); }

.range-btns { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.range-btn {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 8px;
  font: 500 13px var(--font); color: var(--text-2); cursor: pointer;
}
.range-btn.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-xs); font-weight: 600; }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 10px; box-shadow: var(--shadow-xs);
}
.chart-head { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.chart-box svg.chart { width: 100%; height: 210px; display: block; }

@media (max-width: 960px) {
  .gauges { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .chart-grid { grid-template-columns: 1fr; }
  .donut-wrap, .donut { width: 96px; height: 96px; }
}

/* ---------------- 首屏骨架（静态，避免白屏闪烁） ---------------- */
.boot-skel {
  position: fixed; inset: 0; z-index: 5;
  display: grid; grid-template-columns: minmax(360px, 46%) 1fr;
  background: var(--surface);
}
.bs-aside {
  position: relative; overflow: hidden;
  padding: 40px 46px 28px;
  display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(158deg, #0b1a3a 0%, #12295c 46%, #0a1730 100%);
}
.bs-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.bs-logo {
  width: 46px; height: 46px; border-radius: 13px;
  background: rgba(255, 255, 255, .12);
}
.bs-head { display: grid; gap: 10px; margin-bottom: 16px; }
.bs-card {
  height: 56px; border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .07);
}
.bs-form {
  padding: 42px; display: flex; flex-direction: column; gap: 12px;
  align-items: center;
}
.bs-form > * { width: min(392px, 100%); }
.bs-form .bs-btn { height: 46px; border-radius: 10px; margin-top: 14px; background: #e8eefb; }
.bs-input { height: 46px; border-radius: 10px; background: var(--surface-2); }
.bs-line { display: block; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .14); }
.bs-form .bs-line { background: #eef2f9; }
.w120 { width: 120px; } .w180 { width: 180px; } .w240 { width: 240px; } .w260 { width: 260px; } .w280 { width: 280px; } .w300 { width: 300px; }
.h16 { height: 16px; } .h26 { height: 26px; } .h28 { height: 28px; }
.boot-skel .bs-aside > * { animation: bsPulse 1.4s ease-in-out infinite; }
@keyframes bsPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* 桌面顶栏 LOGO 区（真正显示在上方） */
.bs-form { position: relative; }
@media (max-width: 900px) {
  .boot-skel { grid-template-columns: 1fr; }
  .bs-aside { padding: 20px 22px 18px; }
  .bs-head, .bs-card, .bs-aside > .bs-line { display: none; }
  .bs-form { padding: 26px 20px; }
}

/* ---------------- 无权限 / 升级提示 ---------------- */
.upgrade-empty { padding: 46px 24px; text-align: center; }
.upgrade-empty .ue-icon {
  width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 15px;
  display: grid; place-items: center; font-size: 24px;
  background: var(--primary-weak); border: 1px solid #dbe7ff;
}
.upgrade-empty strong { display: block; font-size: 17px; margin-bottom: 10px; }
.ue-text { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.85; }
.ue-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.ue-tag {
  font-size: 12px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 4px 11px; border-radius: 999px;
}
.pw-list { margin: 12px 0 20px; padding-left: 20px; color: var(--text-2); font-size: 13.5px; line-height: 2; }
.pw-list li::marker { color: var(--primary); }

/* ---------------- 监控 agent 引导 ---------------- */
.agent-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 16px; padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f6faff, #eef5ff);
  border: 1px solid #d6e6ff;
}
.ab-text { flex: 1; min-width: 240px; }
.ab-text strong { display: block; font-size: 14px; color: #12315e; margin-bottom: 4px; }
.ab-text span { font-size: 12.8px; line-height: 1.7; color: #4a6584; }

.chart-card-nodata { background: #fbfcfe; }
.chart-hint {
  height: 210px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  color: var(--muted); font-size: 13px; text-align: center;
}
.chart-hint .ch-x { font-size: 26px; color: #cfd8e6; line-height: 1; }
.chart-hint small { font-size: 12px; color: #9aa8bd; }

.code-box {
  margin: 12px 0 14px; padding: 14px;
  background: #0f172a; color: #d7e3f4;
  border-radius: 10px; overflow-x: auto;
  font: 400 12.5px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap; word-break: break-all;
}
.agent-notes { margin: 0 0 18px; padding-left: 18px; font-size: 13px; line-height: 2; color: var(--text-2); }
.agent-notes code {
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 1px 5px; border-radius: 5px; font-size: 12px;
}
