/*
 * 云厂商控制台取向（阿里云/腾讯云浅色）：高密度表格、窄侧栏、少装饰
 * 禁止：深色霓虹侧栏、大阴影卡片墙、紫渐变、奶油底、插画登录
 */
:root {
  --brand: #0052d9;
  --brand-hover: #003cab;
  --brand-soft: #f2f3ff;
  --ok: #2ba471;
  --warn: #e37318;
  --err: #d54941;
  --text: #1d2129;
  --text-2: #4e5969;
  --text-3: #86909c;
  --line: #e5e6eb;
  --line-2: #f2f3f5;
  --bg: #f0f2f5;
  --bg-side: #f7f8fa;
  --bg-top: #ffffff;
  --bg-panel: #ffffff;
  --side-w: 200px;
  --top-h: 48px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", sans-serif;
  --mono: Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 12px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); text-decoration: underline; }
code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  background: #f7f8fa;
  border: 1px solid var(--line);
  padding: 1px 5px;
}

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

/* —— 侧栏：浅灰底，选中左侧竖条 —— */
.sidebar {
  width: var(--side-w);
  background: var(--bg-side);
  border-right: 1px solid var(--line);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  height: var(--top-h);
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.brand::before,
.brand-mark,
.brand-sub { display: none !important; content: none !important; }
.brand-title { color: var(--text); }

.nav { flex: 1; overflow: auto; padding: 6px 0 12px; }
.nav-label {
  margin: 12px 0 4px;
  padding: 0 16px;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
}
.tab {
  display: block;
  height: 36px;
  line-height: 36px;
  padding: 0 16px 0 18px;
  margin: 0;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 0;
  font-size: 13px;
  border: none;
  position: relative;
  background: transparent;
}
.tab:hover {
  background: #eef0f3;
  color: var(--text);
  text-decoration: none;
}
.tab.on {
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line);
}
.tab.on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--brand);
}
.tab::after { display: none !important; content: none !important; }

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

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

.topbar {
  height: var(--top-h);
  background: var(--bg-top);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.page-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.crumb {
  margin: 0 0 1px;
  font-size: 12px;
  color: var(--text-3);
  background: none;
  border: none;
  padding: 0;
}
.userchip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
}
.badge {
  display: inline-block;
  height: 20px;
  line-height: 18px;
  padding: 0 6px;
  font-size: 11px;
  border: 1px solid var(--line);
  background: #f7f8fa;
  color: var(--text-2);
  border-radius: 0;
}
.badge.warn {
  color: #9a5b00;
  background: #fff7e8;
  border-color: #ffd9a8;
}
.userchip a.logout {
  height: 26px;
  line-height: 24px;
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--text-2);
  background: #fff;
  text-decoration: none;
  border-radius: 0;
  font-size: 12px;
}
.userchip a.logout:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.content { padding: 12px 16px 20px; }

.box {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 0;
  margin: 0 0 10px;
  overflow: hidden;
  box-shadow: none;
}
.box .hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  background: #fafbfc;
  color: var(--text);
}
.box .bd { padding: 0; }
.box .bd > .toolbar,
.box .bd > .tip,
.box .bd > .form-bar,
.box .bd > form:not([style*="inline"]) {
  padding: 10px 12px;
  margin: 0;
  border-bottom: 1px solid var(--line-2);
}
.box .bd > .tip {
  border-bottom: none;
  padding-top: 0;
  color: var(--text-3);
}
.box .bd > table.data { border-top: none; }

.tip { margin: 0; color: var(--text-3); font-size: 12px; }
.err, .ok {
  margin: 0 0 10px;
  padding: 7px 10px;
  font-size: 12px;
  border: 1px solid;
  border-radius: 0;
}
.err { background: #fff0ed; border-color: #ffd8d2; color: var(--err); }
.ok { background: #e3f9e9; border-color: #b7ebc8; color: #2a7a4b; }

/* 指标条：紧凑横排，避免「大数字仪表盘」感 */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 10px;
}
.metric-strip .m {
  padding: 8px 12px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.metric-strip .m:last-child { border-right: none; }
.metric-strip .k {
  display: block;
  font-size: 11px;
  color: var(--text-3);
}
.metric-strip .v {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  font-weight: 600;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: var(--text);
}
.metric-strip .v.ok { color: var(--ok); }
.metric-strip .v.bad { color: var(--err); }
.kpi-grid { display: none !important; }

table.data {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 12px;
}
table.data th,
table.data td {
  padding: 8px 12px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line-2);
}
table.data th {
  background: #fafbfc;
  color: var(--text-2);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.data tbody tr:hover td { background: #f7f8fa; }
table.data tr:last-child td { border-bottom: none; }
table.data .path {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  word-break: break-all;
  background: none;
  border: none;
  padding: 0;
}
table.data .c {
  text-align: center;
  color: var(--text-3);
  padding: 24px 12px !important;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  border: none;
  background: none;
  padding: 0;
}
.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-online { color: var(--ok); }
.status-offline { color: var(--err); }
.status-unknown { color: var(--text-3); }

.form-h { width: 100%; border-collapse: collapse; }
.form-h th {
  width: 96px;
  text-align: right;
  padding: 7px 10px 7px 0;
  font-weight: 400;
  color: var(--text-2);
  vertical-align: middle;
  white-space: nowrap;
}
.form-h td { padding: 7px 0; vertical-align: middle; }

.form-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  background: #fafbfc;
}
.form-bar .field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.form-bar .field > span {
  color: var(--text-2);
  white-space: nowrap;
}
.form-bar input[type="text"],
.form-bar input[type="password"] { width: 140px; }

label.row { display: inline; margin: 0 10px 0 0; }
input[type="text"],
input[type="password"],
input[type="url"],
input[type="file"],
input[type="number"],
select,
textarea {
  font: 12px var(--font);
  color: var(--text);
  background: #fff;
  border: 1px solid #d0d3d9;
  border-radius: 0;
  padding: 3px 8px;
  min-height: 28px;
  max-width: 100%;
}
input[type="text"],
input[type="password"],
input[type="url"] { width: 240px; }
textarea {
  width: 100%;
  min-height: 96px;
  padding: 7px 8px;
  font-family: var(--mono);
  font-size: 12px;
  resize: vertical;
}
input:hover, select:hover, textarea:hover { border-color: #9aa1ab; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: none;
}

.btn, .btn2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  font: 400 12px var(--font);
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}
.btn:hover {
  color: #fff;
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  text-decoration: none;
}
.btn2 {
  color: var(--text);
  background: #fff;
  border-color: #d0d3d9;
}
.btn2:hover {
  color: var(--brand);
  border-color: var(--brand);
  text-decoration: none;
}
.linkbtn {
  font: 12px var(--font);
  border: none;
  background: none;
  color: var(--brand);
  cursor: pointer;
  padding: 0 2px;
}
.linkbtn:hover { text-decoration: underline; }
.linkbtn.danger { color: var(--err); }

.toolbar, .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.toolbar { border: none; }
.toolbar label {
  font-size: 12px;
  color: var(--text-2);
  margin-right: 4px;
}

.login-table { width: 100%; border-collapse: collapse; }
.login-table th {
  width: 56px;
  text-align: right;
  font-weight: 400;
  color: var(--text-2);
  font-size: 12px;
  padding: 7px 10px 7px 0;
  vertical-align: middle;
}
.login-table td { padding: 7px 0; vertical-align: middle; }
.login-table input[type="text"],
.login-table input[type="password"] {
  width: 100%;
  height: 32px;
}

.bottom {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 11px;
}

.op-cell { white-space: nowrap; }
.op-cell form { display: inline; margin: 0; }
.tag {
  display: inline-block;
  height: 20px;
  line-height: 18px;
  padding: 0 6px;
  border: 1px solid var(--line);
  background: #f7f8fa;
  color: var(--text-2);
  font-size: 11px;
  border-radius: 0;
}
.tag.ok { color: #2a7a4b; background: #e3f9e9; border-color: #b7ebc8; }
.tag.warn { color: #9a5b00; background: #fff7e8; border-color: #ffd9a8; }
.tag.err { color: var(--err); background: #fff0ed; border-color: #ffd8d2; }

/* 登录：素色居中，无背景图 */
body.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #eef0f3;
  padding: 24px;
}
body.login-page::before { display: none !important; content: none !important; }
.login-wrap {
  width: 360px;
  max-width: 100%;
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.login-wrap .top {
  padding: 18px 20px 12px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.login-wrap .top small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
}
.login-wrap .bd { padding: 18px 20px 20px; }
.login-wrap .btn { width: 100%; height: 32px; }

.frame { width: 100%; border: none; }
pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  background: #f7f8fa;
  border: 1px solid var(--line);
  padding: 10px;
  overflow: auto;
}

@media (max-width: 960px) {
  .metric-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .nav { display: flex; flex-wrap: wrap; padding: 6px; }
  .nav-label { width: 100%; }
  .tab { padding: 0 12px; }
  .tab.on { box-shadow: none; }
  .tab.on::before { display: none; }
  input[type="text"],
  input[type="password"],
  input[type="url"] { width: 100%; }
}
