/* jc 监测面板 —— EdgeOne Pages 静态前端 */
* { box-sizing: border-box; }
/* 关键：hidden 属性必须始终隐藏元素（避免 .modal/.prog 上的 display 覆盖 hidden） */
[hidden] { display: none !important; }
body {
  margin: 0; padding: 24px;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: #f5f6f8; color: #222; line-height: 1.6;
}
.wrap { max-width: 1080px; margin: 0 auto; }
h1 { font-size: 20px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 28px 0 10px; border-left: 3px solid #2f6fdf; padding-left: 8px; }
.card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.hint { font-size: 13px; color: #6b7280; }
.hint code { background: #eef1f5; padding: 1px 4px; border-radius: 3px; }
.foot { margin: 28px 0 40px; }

.btn {
  font: inherit; padding: 8px 14px; border: 0; border-radius: 6px;
  background: #2f6fdf; color: #fff; cursor: pointer;
}
.btn:hover { opacity: .9; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: #6b7280; }
.btn.danger { background: #c0392b; }
.btn.sm { padding: 5px 10px; font-size: 13px; }

input, select {
  font: inherit; padding: 8px 10px; border: 1px solid #ccd; border-radius: 6px;
  width: 100%; background: #fff; color: #222;
}
label { display: block; margin: 12px 0 4px; font-size: 13px; color: #555; }
.form-actions { margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.msg { background: #e8f6ec; border: 1px solid #9ad3a9; color: #1e6b34; padding: 10px 12px; border-radius: 6px; margin-bottom: 14px; }
.msg.err { background: #fdecea; border-color: #e6a8a0; color: #9b2c20; }

/* 登录 */
.login-wrap { max-width: 360px; margin: 8vh auto; }
.login-card h1 { text-align: left; }

/* 顶栏 */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bar h1 { margin: 0; }
.bar-actions { display: flex; align-items: center; gap: 8px; }
.usermenu { position: relative; }
.um-btn { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #dde2e9;
  border-radius: 6px; padding: 5px 10px; cursor: pointer; font: inherit; color: #222; }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: #2f6fdf; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.uname { font-size: 13px; }
.caret { font-size: 11px; color: #6b7280; }
.um-drop { position: absolute; right: 0; top: 100%; margin-top: 4px; min-width: 140px;
  background: #fff; border: 1px solid #dde2e9; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.1); z-index: 10; }
.um-item { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none;
  font: inherit; cursor: pointer; color: #222; }
.um-item:hover { background: #f2f5fa; }
.um-out { color: #c0392b; }
.um-sep { height: 1px; background: #eef1f5; }

/* 站点状态条 */
.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 10px 12px; background: #fff;
  border-radius: 8px; border-left: 4px solid #1a9e5c; box-shadow: 0 1px 3px rgba(0,0,0,.06); align-items: center; }
.row.bad { border-left-color: #d33; background: #fff5f5; }
.row.unknown { border-left-color: #b9c0ca; }
.row.checking { outline: 2px solid #2f6fdf; }
.row .nm { font-weight: 600; }
.row .u { flex: 1 1 100%; font-size: 12px; color: #8494a6; word-break: break-all; }
.row .f { font-size: 13px; }
.row .f .lbl { color: #8494a6; margin-right: 4px; }
.row .f.badf { color: #c0392b; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px;
  background: #1a9e5c; color: #fff; }
.tag.bad { background: #d33; }
.tag.unknown { background: #9aa4b1; }

.prog { display: flex; align-items: center; gap: 8px; background: #eaf1ff; border: 1px solid #bcd2ff;
  color: #24509c; padding: 8px 12px; border-radius: 6px; margin-bottom: 10px; font-size: 13px; }
.spin { width: 14px; height: 14px; border: 2px solid #bcd2ff; border-top-color: #2f6fdf;
  border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 表格 */
.table-scroll { overflow-x: auto; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 700px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eef2f6; vertical-align: middle; }
th { color: #8494a6; font-weight: normal; font-size: 12px; }
td .ok { color: #1a9e5c; }
td .bad { color: #d33; font-weight: 600; }
td .url { word-break: break-all; }
td .ops { display: flex; gap: 6px; flex-wrap: wrap; }
.add-card { margin-top: 12px; }

/* 弹层 */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal-card { position: relative; background: #fff; border-radius: 10px; padding: 20px;
  width: min(420px, 92vw); box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; border: 0; padding: 0; }
.modal-close { border: 0; background: none; font-size: 22px; cursor: pointer; line-height: 1; }

@media (max-width: 640px) {
  body { padding: 14px; }
  html, body { overflow-x: hidden; }
  .form-grid { grid-template-columns: 1fr; }
  .row .nm, .row .u { flex: 1 1 100%; }
}
