:root {
  --bg: #0f1419;
  --panel: #161d27;
  --card: #1c2533;
  --line: #2a3545;
  --text: #e8eef6;
  --muted: #8b9bb0;
  --acc: #3d8bfd;
  --ok: #3ecf8e;
  --bad: #f07178;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.5 "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; }
.hidden { display: none !important; }
.login-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; }
.login-card { width: 360px; padding: 28px; }
.login-card h1 { margin: 0 0 8px; font-size: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.muted { color: var(--muted); }
.err { color: var(--bad); min-height: 20px; margin-top: 8px; }
.app { display: flex; height: 100%; }
aside { width: 168px; background: var(--panel); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; }
.brand { font-weight: 700; margin: 4px 8px 16px; }
nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
nav button, .ghost, button {
  appearance: none; border: 0; background: transparent; color: var(--text); text-align: left;
  padding: 8px 12px; border-radius: 8px; cursor: pointer;
}
nav button.on, nav button:hover { background: #243044; }
.ghost { margin-top: auto; color: var(--muted); }
main { flex: 1; overflow: auto; padding: 18px 22px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
input, textarea, select {
  background: #0f1620; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font: inherit; min-width: 0;
}
textarea { width: 100%; min-height: 90px; resize: vertical; }
.primary { background: var(--acc) !important; color: #fff !important; padding: 8px 14px !important; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
.logbox {
  background: #0b1016; border: 1px solid var(--line); border-radius: 8px; padding: 10px;
  height: 180px; overflow: auto; font-family: Consolas, "Courier New", monospace; font-size: 12px; color: #b7c4d4;
}
h2 { margin: 0 0 12px; font-size: 18px; }
label.chk { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } aside { width: 120px; } }
