/* ===== 白色简易统一模板 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e8e9ec;
  --text: #1c1d1f;
  --muted: #8a8d93;
  --accent: #111417;
  --accent-hover: #33383d;
  --radius: 12px;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
input, textarea, select, button { font-family: inherit; font-size: 14px; }

/* ---------- 登录 / 注册页 ---------- */
.auth-wrap { display:flex; align-items:center; justify-content:center; min-height:100vh; padding:20px; }
.auth-card { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:38px 32px; width:100%; max-width:400px; box-shadow:0 8px 30px rgba(0,0,0,.05); }
.auth-card .logo { text-align:center; font-size:22px; font-weight:700; letter-spacing:.5px; margin-bottom:6px; }
.auth-card .sub { text-align:center; color:var(--muted); font-size:13px; margin-bottom:26px; }
.field { margin-bottom:16px; }
.field label { display:block; font-size:13px; color:#555; margin-bottom:6px; }
.field input { width:100%; padding:11px 13px; border:1px solid var(--line); border-radius:9px; background:#fbfbfc; outline:none; transition:border .15s; }
.field input:focus { border-color:#111; background:#fff; }
.btn { display:inline-block; width:100%; padding:11px; border:0; border-radius:9px; background:var(--accent); color:#fff; font-size:15px; cursor:pointer; text-align:center; transition:background .15s; }
.btn:hover { background:var(--accent-hover); }
.btn.ghost { background:#fff; color:#111; border:1px solid var(--line); }
.btn.ghost:hover { background:#f5f6f8; }
.tip { text-align:center; font-size:13px; color:var(--muted); margin-top:18px; }
.tip a { color:#111; font-weight:600; }
.alert { padding:10px 12px; border-radius:8px; font-size:13px; margin-bottom:16px; }
.alert.err { background:#fdeeee; color:#b42318; }
.alert.ok { background:#eafaf0; color:#1a7f43; }

/* ---------- 后台布局（侧边栏） ---------- */
.layout { display:flex; min-height:100vh; }
.sidebar { width:230px; background:var(--card); border-right:1px solid var(--line); display:flex; flex-direction:column; position:fixed; top:0; bottom:0; left:0; }
.sidebar .brand { padding:22px 20px; font-size:18px; font-weight:700; border-bottom:1px solid var(--line); }
.sidebar .brand span { color:var(--muted); font-weight:400; font-size:12px; display:block; margin-top:2px; }
.nav { flex:1; padding:12px 10px; overflow:auto; }
.nav a { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:8px; color:#444; font-size:14px; margin-bottom:2px; }
.nav a:hover { background:#f5f6f8; }
.nav a.active { background:#111; color:#fff; }
.nav a .ico { width:18px; text-align:center; }
.side-foot { padding:14px 16px; border-top:1px solid var(--line); font-size:12px; color:var(--muted); }
.side-foot a { color:#b42318; }

.main { margin-left:230px; flex:1; padding:26px 32px; }
.topbar { display:flex; align-items:center; justify-content:space-between; margin-bottom:22px; }
.topbar h2 { font-size:19px; font-weight:600; }
.topbar .who { color:var(--muted); font-size:13px; }
.topbar .who a { color:#111; font-weight:600; margin-left:8px; }

/* ---------- 卡片 / 表格 / 表单 ---------- */
.panel { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:22px; margin-bottom:20px; }
.panel h3 { font-size:15px; font-weight:600; margin-bottom:16px; }
table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:11px 10px; border-bottom:1px solid var(--line); font-size:13px; vertical-align:middle; }
th { color:var(--muted); font-weight:500; }
tr:last-child td { border-bottom:0; }
.badge { display:inline-block; padding:2px 8px; border-radius:20px; font-size:12px; background:#f0f1f3; color:#555; }
.badge.on { background:#eafaf0; color:#1a7f43; }
.badge.off { background:#fdeeee; color:#b42318; }
.btn-sm { padding:5px 11px; border:1px solid var(--line); border-radius:7px; background:#fff; cursor:pointer; font-size:12px; }
.btn-sm:hover { background:#f5f6f8; }
.btn-sm.danger { color:#b42318; border-color:#f3c9c5; }
.btn-primary { padding:9px 16px; border:0; border-radius:8px; background:var(--accent); color:#fff; cursor:pointer; }
.btn-primary:hover { background:var(--accent-hover); }
.form-row { margin-bottom:15px; }
.form-row label { display:block; font-size:13px; color:#555; margin-bottom:6px; }
.form-row input, .form-row select { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:#fbfbfc; outline:none; }
.form-row input:focus, .form-row select:focus { border-color:#111; background:#fff; }
.form-inline { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.form-inline .form-row { margin-bottom:0; }
.hint { font-size:12px; color:var(--muted); margin-top:6px; }
.url-box { display:flex; align-items:center; gap:8px; }
.url-box code { background:#f5f6f8; padding:4px 8px; border-radius:6px; font-size:12px; }
.empty { text-align:center; color:var(--muted); padding:40px 0; font-size:13px; }
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-bottom:20px; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px; }
.stat .num { font-size:26px; font-weight:700; }
.stat .lbl { color:var(--muted); font-size:12px; margin-top:4px; }

@media (max-width:768px){
  .sidebar { position:static; width:100%; height:auto; }
  .layout { flex-direction:column; }
  .main { margin-left:0; padding:18px; }
  .nav { display:flex; flex-wrap:wrap; }
}
