:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --panel: #fff;
  --line: #dfe4e8;
  --ink: #17202a;
  --muted: #66737e;
  --accent: #1778f2;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
.hidden { display: none !important; }
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 360px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  display: grid;
  gap: 8px;
}
h1 { margin: 0 0 14px; font-size: 22px; }
label { font-size: 13px; color: var(--muted); }
input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  font-size: 14px;
  width: 100%;
}
button, .actions a {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.error { color: #c0392b; min-height: 18px; }
.app { max-width: 1180px; margin: 0 auto; padding: 22px 24px 40px; }
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}
#user-line, p { color: var(--muted); margin: 4px 0 0; }
.actions { display: flex; gap: 10px; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.stat, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.stat span { display: block; font-size: 24px; font-weight: 600; }
.stat label { color: var(--muted); font-size: 13px; }
.panel { margin-bottom: 16px; }
.panel h2 { margin: 0 0 12px; font-size: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.filters { display: flex; align-items: center; gap: 6px; }
.filters input { width: auto; }
.account-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.account-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.account-card.active,
.account-card:hover {
  border-color: var(--accent);
}
.account-card strong { display: block; margin-bottom: 6px; word-break: break-all; }
.account-card span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
th.num, td.num { text-align: right; }
th.sortable { cursor: pointer; user-select: none; }
.user-create { display: grid; gap: 8px; }
.user-access-card { border: 1px solid var(--line); border-radius: 6px; padding: 10px; margin-bottom: 8px; }
.user-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.user-card-head strong { margin: 0; }
.user-card-head select { width: 120px; height: 32px; }
.account-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0; }
.user-access-card label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.user-access-card input[type="checkbox"] { width: auto; height: auto; }
.user-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.user-row input { max-width: 220px; }
.muted { color: var(--muted); font-size: 13px; }
