body { margin: 0; font-family: Arial, "Microsoft YaHei", sans-serif; background: #f4f6f8; color: #1f2933; }
header { background: #223142; color: #fff; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
header a { color: #fff; margin-left: 14px; text-decoration: none; }
main { width: calc(100% - 40px); max-width: 95%; margin: 24px auto; padding: 0; }
.panel { background: #fff; border: 1px solid #d8dee6; border-radius: 6px; padding: 18px; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.metric { background: #fff; border: 1px solid #d8dee6; border-radius: 6px; padding: 18px; }
.metric strong { display: block; font-size: 30px; margin-top: 8px; }
label { display: block; margin: 10px 0 5px; font-weight: 600; }
input, select, textarea, button { box-sizing: border-box; font: inherit; }
input, select, textarea { width: 100%; padding: 9px; border: 1px solid #b8c2cc; border-radius: 4px; background: #fff; }
button, .button { display: inline-block; padding: 9px 14px; border: 0; border-radius: 4px; background: #2563eb; color: #fff; text-decoration: none; cursor: pointer; white-space: nowrap; }
button.secondary, .button.secondary { background: #52606d; }
button.danger, .button.danger { background: #b42318; }
.table-wrapper { width: 100%; overflow-x: auto; overflow-y: hidden; margin-bottom: 18px; border: 1px solid #d8dee6; background: #fff; }
.table-wrapper table { margin-bottom: 0; }
table { width: 100%; min-width: 1200px; border-collapse: collapse; background: #fff; }
th, td { border: 1px solid #d8dee6; padding: 8px 10px; text-align: left; font-size: 14px; white-space: nowrap; vertical-align: middle; }
th { background: #edf1f5; }
th:nth-child(1), td:nth-child(1) { min-width: 120px; }
th:nth-child(2), td:nth-child(2) { min-width: 90px; }
th:nth-child(3), td:nth-child(3) { min-width: 110px; }
th:nth-child(4), td:nth-child(4) { min-width: 90px; }
th:nth-child(5), td:nth-child(5) { min-width: 160px; }
th:nth-child(6), td:nth-child(6) { min-width: 180px; }
th:nth-child(7), td:nth-child(7) { min-width: 180px; }
th:nth-child(8), td:nth-child(8) { min-width: 180px; }
th:nth-child(9), td:nth-child(9) { min-width: 80px; }
th:nth-child(10), td:nth-child(10) { min-width: 160px; }
th:last-child, td:last-child { min-width: 100px; }
.ok { background: #e3f8ec; border: 1px solid #82c99a; padding: 10px; border-radius: 4px; }
.bad { background: #ffe8e8; border: 1px solid #e58a8a; padding: 10px; border-radius: 4px; }
.warn { background: #fff4db; border: 1px solid #f0b94d; padding: 10px; border-radius: 4px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.scan-input { font-size: 26px; padding: 14px; }
.login { max-width: 420px; margin-top: 80px; }
.login-page {
  min-height: calc(100vh - 96px);
  display: grid;
  place-items: center;
  padding: 28px 0 48px;
}
.login-card {
  width: min(460px, calc(100vw - 40px));
  background: #fff;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(32, 49, 66, 0.12);
  padding: 34px 36px 28px;
}
.login-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9dcff;
  border-radius: 12px;
  background: #e8f1ff;
  color: #1d4ed8;
  font-size: 18px;
  font-weight: 700;
}
.login-card h1 {
  margin: 0;
  text-align: center;
  font-size: 26px;
  line-height: 1.25;
}
.login-subtitle {
  margin: 8px 0 24px;
  color: #66788a;
  text-align: center;
}
.login-form label {
  margin-top: 14px;
  color: #334155;
}
.login-form input {
  height: 44px;
  padding: 10px 12px;
  border-radius: 6px;
}
.login-form input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.login-button {
  width: 100%;
  height: 44px;
  margin-top: 22px;
  border-radius: 6px;
  font-weight: 700;
}
.login-button:hover {
  background: #1d4ed8;
}
.login-error {
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid #fecdd3;
  border-radius: 6px;
  background: #fff1f2;
  color: #b42318;
}
.login-help {
  margin: 18px 0 0;
  color: #7b8794;
  font-size: 13px;
  text-align: center;
}
ul.errors { max-height: 260px; overflow: auto; }
.actions { white-space: nowrap; min-width: 220px; }
.actions button, .actions .button { margin: 2px; padding: 7px 10px; white-space: nowrap; }
td input { min-width: 110px; padding: 7px; }
.inline-password-form { display: flex; gap: 6px; align-items: center; min-width: 420px; }
.inline-password-form input { width: 130px; min-width: 130px; }
.inline-password-form button { min-width: 90px; }
.status { font-weight: 700; }
#plan-message { margin-bottom: 12px; }
.bad-row td { background: #fff1f1; }
.bad-text { color: #b42318; font-weight: 700; }
.warn-text { color: #a15c00; font-weight: 700; }
.ok-text { color: #15803d; font-weight: 700; }
.summary-card { margin-top: 12px; line-height: 1.8; }
.compact-toggle { background: #52606d; padding: 6px 10px; font-size: 13px; }
body.compact table { min-width: 1120px; }
body.compact th, body.compact td { padding: 5px 8px; font-size: 13px; line-height: 1.25; }
body.compact .panel { padding: 14px; margin-bottom: 14px; }
@media (max-width: 900px) {
  header { align-items: flex-start; flex-direction: column; }
  header a { margin-left: 0; margin-right: 12px; }
  main { width: calc(100% - 20px); max-width: calc(100% - 20px); }
}
@media (max-width: 520px) {
  .login-page { min-height: calc(100vh - 120px); padding: 18px 0 28px; }
  .login-card { padding: 26px 22px 22px; }
}
