* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #0f1115; color: #e6e8eb; font-size: 14px; line-height: 1.6;
}
.hidden { display: none !important; }

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 320px; text-align: center; }
.login-card h1 { margin-bottom: 20px; font-size: 20px; }
.login-card input { width: 100%; margin-bottom: 12px; }
.login-card button { width: 100%; }
.err { color: #ff6b6b; margin-top: 10px; min-height: 18px; }

/* 布局 */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid #262a33; margin-bottom: 20px;
}
header h1 { font-size: 18px; }
.header-right { display: flex; gap: 8px; }
.card {
  background: #171a21; border: 1px solid #262a33; border-radius: 10px;
  padding: 18px; margin: 0 24px 20px; overflow-x: auto;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row input { flex: 1; min-width: 160px; }

/* 控件 */
input {
  background: #0f1115; border: 1px solid #2d323d; color: #e6e8eb;
  padding: 9px 12px; border-radius: 8px; outline: none;
}
input:focus { border-color: #4c8bf5; }
button {
  background: #4c8bf5; color: #fff; border: none; padding: 9px 18px;
  border-radius: 8px; cursor: pointer; font-size: 14px;
}
button:hover { background: #3b78e0; }
button.ghost { background: transparent; border: 1px solid #2d323d; color: #b8bec9; }
button.ghost:hover { background: #1e222b; }
button.mini { padding: 5px 10px; font-size: 12px; margin-right: 6px; background: #2a2f3a; }
button.mini:hover { background: #353b48; }
button.mini.danger { background: #5a2733; }
button.mini.danger:hover { background: #7a3243; }

/* 表格 */
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #232833; }
th { color: #8b93a1; font-weight: 500; font-size: 12px; }
td .sub { color: #6b7280; font-size: 12px; }
.on { color: #4ade80; } .off { color: #9ca3af; }
.temp-ok { color: #fbbf24; }
select {
  background: #0f1115; border: 1px solid #2d323d; color: #e6e8eb;
  padding: 9px 12px; border-radius: 8px; outline: none; cursor: pointer;
}
select:focus { border-color: #4c8bf5; }
.url { font-family: monospace; font-size: 12px; color: #7aa2f7; max-width: 260px;
  display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.ops { white-space: nowrap; }
.empty { text-align: center; color: #6b7280; padding: 30px; }

/* toast */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: #2a2f3a; color: #fff; padding: 10px 20px; border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.toast-err { background: #7a3243; }

/* 提示文字 */
.hint { color: #6b7280; font-size: 12px; margin-right: 4px; }

/* 弹窗 */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-box {
  background: #171a21; border: 1px solid #262a33; border-radius: 12px;
  padding: 24px; width: 340px;
}
.modal-box h2 { font-size: 16px; margin-bottom: 16px; }
.modal-box input { width: 100%; margin-bottom: 12px; }
.modal-ops { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
