.card.admin { max-width: 980px; }
.btn {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.btn.primary { color: #ffffff; background: #185fa5; }
.btn.primary:hover:not(:disabled) { background: #0c447c; }
.btn.secondary { color: #0c447c; background: #e6f1fb; border: 1px solid #b5d5f0; }
.btn.secondary:hover:not(:disabled) { background: #d4e6f8; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; }
.form-msg { font-size: 12px; color: #6b7280; }
.form-msg.error { color: #a32d2d; }
.form-msg.ok { color: #3b6d11; }

.gw { margin-top: 20px; padding: 14px; background: #f4f8fc; border: 1px solid #d9e6f3; border-radius: 10px; }
.gw h2 { font-size: 14px; font-weight: 600; margin: 0; }
.gw .gw-tip { margin: 6px 0 10px; font-size: 12px; color: #6b7280; line-height: 1.6; }
.gwrow { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.gwrow input {
  flex: 1;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  outline: none;
}
.gwrow input:focus { border-color: #185fa5; }
.gwrow .form-msg { flex-basis: 100%; }
.gwrow { flex-wrap: wrap; }
.queue-row { flex-wrap: wrap; margin-top: 10px; padding: 8px 10px; border: 1px dashed #e0b25a; background: #fdf8ee; border-radius: 6px; font-size: 12px; }
.queue-tip { color: #8a6d1f; }
.queue-info.warn { color: #a3600a; font-weight: 600; }
.gwrow select.gwproto {
  flex: none;
  height: 36px;
  padding: 0 6px;
  font-size: 13px;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  background: #ffffff;
  color: #374151;
  outline: none;
  cursor: pointer;
}
.gwrow select.gwproto:focus { border-color: #185fa5; }

.zones h2, .zform h2 { font-size: 14px; font-weight: 600; }
.zones .count { margin-left: 8px; font-size: 12px; font-weight: 400; color: #6b7280; }
.zones { margin-top: 22px; }
.ztable { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 13px; }
.ztable th, .ztable td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: top;
}
.ztable th { font-size: 12px; color: #6b7280; font-weight: 500; }
.ztable td.path { word-break: break-all; color: #4b5563; font-size: 12px; }
.ztable td.sub { color: #6b7280; font-size: 12px; }
.empty { margin-top: 10px; color: #9ca3af; font-size: 13px; }

.zform { margin-top: 22px; border-top: 1px solid #edf0f5; padding-top: 16px; }
.frow { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.frow label { width: 90px; flex: none; font-size: 13px; color: #4b5563; }
.frow input {
  flex: 1;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  outline: none;
}
.frow input:focus { border-color: #185fa5; }
.frow.btns { margin-top: 14px; }

/* ---- 区服表格: 勾选列 / 行内网关输入框 ---- */
.ztable th.colchk, .ztable td.colchk {
  width: 36px;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}
.ztable td.colchk input { width: 15px; height: 15px; cursor: pointer; }
.ztable input.zin-gw {
  width: 100%;
  box-sizing: border-box;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  border: 1px solid #d7dde8;
  border-radius: 6px;
  outline: none;
  color: #374151;
}
.ztable input.zin-gw:focus { border-color: #185fa5; }
.ztable input.zin-gw::placeholder { color: #b6bdc9; }

/* ---- 批量操作工具栏 ---- */
.zbatch {
  margin: 12px 0 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.zbatch .chkall {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
}
.zbatch .chkall input { width: 15px; height: 15px; cursor: pointer; }

/* ---- 弹窗(批量导入 / 批量设置网关) ---- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-box {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.modal-box h3 { margin: 0 0 10px; font-size: 16px; font-weight: 600; color: #111827; }
.modal-tip { margin: 0 0 12px; font-size: 12px; color: #6b7280; line-height: 1.7; }
.modal-tip code {
  background: #f1f5f9;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: Consolas, Menlo, monospace;
  font-size: 11px;
  color: #0c447c;
}
.modal-box textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 150px;
  padding: 10px;
  font-size: 13px;
  font-family: Consolas, Menlo, monospace;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  resize: vertical;
  outline: none;
  line-height: 1.5;
}
.modal-box textarea:focus { border-color: #185fa5; }
.modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.import-preview {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  font-size: 12px;
  font-family: Consolas, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 180px;
  overflow: auto;
  color: #374151;
}
.import-preview.ok { border-color: #bfe3c2; background: #f3faf3; color: #2f5d18; }
.import-preview.err { border-color: #f0c4c4; background: #fdf3f3; color: #a32d2d; }

/* ---- 批量增加 / 批量修改: 可编辑多行表格 ---- */
.modal-box.wide { max-width: 720px; }
.btable-wrap {
  margin-top: 8px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid #edf0f5;
  border-radius: 8px;
}
.btable { width: 100%; border-collapse: collapse; font-size: 13px; }
.btable th, .btable td {
  padding: 6px 6px;
  border-bottom: 1px solid #edf0f5;
  text-align: left;
  vertical-align: middle;
}
.btable th { font-size: 12px; color: #6b7280; font-weight: 500; background: #f8fafc; position: sticky; top: 0; }
.btable input.bin {
  width: 100%;
  box-sizing: border-box;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  border: 1px solid #d7dde8;
  border-radius: 6px;
  outline: none;
  color: #374151;
  background: #ffffff;
}
.btable input.bin:focus { border-color: #185fa5; }
.btable input.bin:disabled { background: #f1f5f9; color: #6b7280; }
.btable-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.paste-box { margin-top: 10px; }
.paste-box textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 120px;
  padding: 10px;
  font-size: 13px;
  font-family: Consolas, Menlo, monospace;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  resize: vertical;
  outline: none;
  line-height: 1.5;
}
.paste-box textarea:focus { border-color: #185fa5; }
.btn.small.bdel { padding: 0 9px; min-width: 26px; font-size: 14px; line-height: 1; }
