/* 管理后台样式 · 深色侧栏 */
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: #2f3542; color: #dfe4ea; flex-shrink: 0;
  padding: 16px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { padding: 8px 20px 20px; font-size: 16px; font-weight: 600; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 8px; }
.sidebar a {
  display: block; padding: 12px 20px; color: #b2bec3; text-decoration: none;
  border-left: 3px solid transparent;
}
.sidebar a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar a.active { background: rgba(255,255,255,.1); color: #fff; border-left-color: #1890ff; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; padding: 12px 24px; border-bottom: 1px solid #e8e8e8; display: flex; justify-content: space-between; align-items: center; }
.content { padding: 24px; flex: 1; }
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.card h2 { margin: 0 0 16px; font-size: 16px; font-weight: 600; }
.stats { display: flex; flex-wrap: wrap; gap: 16px; }
.stat-item { background: #fff; border-radius: 8px; padding: 20px 24px; min-width: 160px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.stat-item .num { font-size: 28px; font-weight: 600; color: #1890ff; }
.stat-item .label { color: #888; font-size: 13px; margin-top: 4px; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; }
table.data th { background: #fafafa; font-weight: 500; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.badge-on { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.badge-off { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; margin-bottom: 6px; color: #666; }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=number], .form-row textarea, .form-row select {
  width: 100%; max-width: 480px; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px;
}
.form-row textarea { min-height: 100px; max-width: 100%; }
.btn { display: inline-block; padding: 8px 18px; border-radius: 6px; border: none; cursor: pointer; font-size: 14px; text-decoration: none; }
.btn-primary { background: #1890ff; color: #fff; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-default { background: #fff; border: 1px solid #d9d9d9; color: #333; }
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
.alert-success { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
.alert-error { background: #fff1f0; border: 1px solid #ffa39e; color: #cf1322; }
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2f3542 0%, #57606f 100%); }
.login-box { width: 100%; max-width: 400px; background: #fff; padding: 32px; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.2); }
.login-box h1 { margin: 0 0 24px; font-size: 20px; text-align: center; }
