* { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 13px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f5f7; color: #1f2329; }
header { display: flex; align-items: center; gap: 18px; height: 44px;
  padding: 0 16px; background: #1f2329; color: #fff; }
.brand { font-weight: 700; font-size: 14px; letter-spacing: .5px; }
nav { display: flex; gap: 2px; flex: 1; }
nav a { color: #c8cdd4; text-decoration: none; padding: 4px 10px; border-radius: 4px; }
nav a:hover { background: #333a44; color: #fff; }
.who { color: #9aa3ad; font-size: 12px; }
main { padding: 16px; max-width: 1600px; margin: 0 auto; }
h2 { font-size: 15px; margin: 14px 0 8px; }
h2:first-child { margin-top: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.card { background: #fff; border: 1px solid #e3e6ea; border-radius: 6px; padding: 10px 12px; }
.card .k { color: #6b7280; font-size: 12px; }
.card .v { font-size: 18px; font-weight: 600; margin-top: 2px; }
table { width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid #e3e6ea; border-radius: 6px; overflow: hidden; }
th, td { text-align: left; padding: 4px 10px; border-bottom: 1px solid #eef0f3; }
th { background: #f7f8fa; color: #4b5563; font-size: 12px; font-weight: 600;
  white-space: nowrap; }
tr:last-child td { border-bottom: none; }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end;
  background: #fff; border: 1px solid #e3e6ea; border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 3px; }
.field label { font-size: 12px; color: #6b7280; }
input, select { padding: 5px 8px; border: 1px solid #d5d9df; border-radius: 4px;
  font-size: 13px; background: #fff; min-width: 120px; }
input:focus, select:focus { outline: none; border-color: #3568d4; }
button { padding: 6px 14px; border: 1px solid #d5d9df; border-radius: 4px;
  background: #fff; cursor: pointer; font-size: 13px; }
button:hover { background: #f2f4f7; }
button.primary { background: #3568d4; border-color: #3568d4; color: #fff; }
button.primary:hover { background: #2c58b5; }
button.danger { color: #c0392b; border-color: #e5b8b1; }
button.danger:hover { background: #fdf0ee; }
button.ghost { background: transparent; border: none; color: #c8cdd4; }
button.ghost:hover { color: #fff; background: #333a44; }
button:disabled { opacity: .5; cursor: default; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; }
.tag.ok { background: #e6f4ea; color: #1e7e3e; }
.tag.warn { background: #fdf3e0; color: #b07d18; }
/* 全局 .err (错误提示段落) 与 tag err 类名撞车, 会抢走字号和外边距, 这里显式压回 */
.tag.err { background: #fde8e6; color: #c0392b; font-size: 11px; margin: 0; }
.tag.off { background: #eef0f3; color: #6b7280; }
.err { color: #c0392b; font-size: 12px; margin: 6px 0; }
.hint { color: #6b7280; font-size: 12px; margin: 4px 0 10px; }
.muted { color: #8a919a; font-size: 12px; }
.actions { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
.actions input { min-width: 64px; width: 72px; padding: 3px 6px; }
td .actions button { padding: 2px 8px; font-size: 12px; line-height: 1.5; white-space: nowrap; }
td .actions input { width: 56px; min-width: 56px; padding: 2px 6px; font-size: 12px; }
td .hint { margin: 1px 0 0; font-size: 11px; line-height: 1.3; }
td code { word-break: break-all; }
.login-body { display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: #1f2329; }
.login-card { background: #fff; border-radius: 8px; padding: 28px 32px; width: 320px; }
.login-card h1 { font-size: 18px; margin-bottom: 2px; }
.login-card .sub { color: #6b7280; font-size: 12px; margin-bottom: 16px; }
.login-card .field { margin-bottom: 12px; }
.login-card input { width: 100%; }
.login-card button { width: 100%; padding: 8px; }
.key-box { background: #f7f8fa; border: 1px dashed #d5d9df; border-radius: 4px;
  padding: 8px 10px; font-family: ui-monospace, Menlo, monospace; font-size: 12px;
  word-break: break-all; margin: 8px 0; }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 4px; }
.chk-grid label { font-size: 12px; display: flex; gap: 5px; align-items: center; }
.chk-grid input { min-width: 0; width: 14px; }
.detail { background: #f7f8fa; border-radius: 4px; padding: 8px 10px; margin: 6px 0; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 12px;
  background: #f2f4f7; padding: 1px 4px; border-radius: 3px; }
/* 主机选择器 (表单内联面板 + 改主机弹窗共用) */
.pickwrap { position: relative; display: inline-block; }
.pickbtn, #add-pick-btn { white-space: nowrap; }
.pickpanel { position: absolute; top: 100%; left: 0; z-index: 30; margin-top: 4px;
  background: #fff; border: 1px solid #d5d9df; border-radius: 6px;
  box-shadow: 0 4px 14px rgba(31,35,41,.14); min-width: 200px; max-width: 340px;
  padding: 8px; }
.picklist { max-height: 240px; overflow-y: auto; border-top: 1px solid #eef0f3;
  padding-top: 6px; margin-top: 6px; }
.pickitem { display: flex; align-items: center; gap: 6px; font-size: 13px;
  padding: 3px 4px; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.pickitem:hover { background: #f2f4f7; }
.pickitem input { min-width: 0; width: 14px; }
.pick-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
/* 改主机弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(31,35,41,.45); z-index: 50;
  display: flex; align-items: center; justify-content: center; }
.modal-box { background: #fff; border-radius: 8px; width: 360px; max-width: 92vw;
  padding: 16px 18px; box-shadow: 0 8px 30px rgba(31,35,41,.25); }
.modal-box h3 { font-size: 14px; margin-bottom: 4px; word-break: break-all; }
.modal-box .picklist { max-height: 280px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
/* 表格: 主机范围小标签 + URL 截断 */
.chip { display: inline-block; background: #e8eefb; color: #2c58b5; border-radius: 3px;
  padding: 0 6px; font-size: 11px; line-height: 18px; margin-right: 4px; white-space: nowrap; }
.chip.all { background: #eef0f3; color: #6b7280; }
td code.urlcell { display: inline-block; max-width: 340px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
  word-break: normal; }
/* 分页 */
.pager { justify-content: space-between; }
