* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f6fb; color: #22272e; font-size: 14px; }
a { color: #2563eb; text-decoration: none; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: #0f172a; color: #cbd5e1; display: flex;
  flex-direction: column; padding: 20px 0; position: fixed; height: 100vh; }
.brand { font-size: 18px; font-weight: 700; color: #fff; text-align: center;
  line-height: 1.4; margin-bottom: 24px; }
.sidebar nav { flex: 1; display: flex; flex-direction: column; }
.sidebar nav a { color: #cbd5e1; padding: 11px 24px; font-size: 14px; }
.sidebar nav a:hover { background: #1e293b; color: #fff; }
.sidebar nav a.active { background: #2563eb; color: #fff; font-weight: 600; }
.logout { color: #f87171 !important; padding: 12px 24px; margin-top: auto; }
.content { margin-left: 210px; flex: 1; padding: 28px 36px; }

h1 { font-size: 22px; margin-bottom: 20px; }
h2 { font-size: 16px; margin: 18px 0 12px; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stat { background: #fff; border-radius: 10px; padding: 20px; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat .num { font-size: 30px; font-weight: 700; color: #2563eb; }
.stat .label { color: #64748b; margin-top: 6px; }

/* 表格 */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px;
  overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eef1f6;
  font-size: 13px; }
th { background: #f8fafc; color: #475569; font-weight: 600; }
tr:hover td { background: #f9fbff; }

/* 表单 */
label { display: block; margin: 12px 0 5px; color: #475569; font-weight: 500; }
input[type=text], input[type=password], input[type=number], input[type=email],
input[type=time], select, textarea { width: 100%; padding: 9px 11px;
  border: 1px solid #d5dbe6; border-radius: 7px; font-size: 14px; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
.inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline > div { flex: 1; min-width: 160px; }

/* 按钮 */
.btn { display: inline-block; padding: 9px 18px; border-radius: 7px; border: none;
  background: #2563eb; color: #fff; font-size: 14px; cursor: pointer; }
.btn:hover { background: #1d4ed8; }
.btn.gray { background: #64748b; } .btn.gray:hover { background: #475569; }
.btn.red { background: #dc2626; } .btn.red:hover { background: #b91c1c; }
.btn.green { background: #16a34a; } .btn.green:hover { background: #15803d; }
.btn.sm { padding: 5px 11px; font-size: 12px; }

/* 徽标 */
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px;
  background: #e2e8f0; color: #475569; }
.tag.on { background: #dcfce7; color: #16a34a; }
.tag.off { background: #fee2e2; color: #dc2626; }
.tag.blue { background: #dbeafe; color: #2563eb; }

/* 提示 */
.flash { padding: 11px 16px; border-radius: 8px; margin-bottom: 16px; }
.flash.success { background: #dcfce7; color: #166534; }
.flash.error { background: #fee2e2; color: #991b1b; }

/* 登录页 */
.login-wrap { min-height: 100vh; display: flex; align-items: center;
  justify-content: center; background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.login-box { background: #fff; padding: 38px 34px; border-radius: 14px; width: 360px;
  box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.login-box h1 { text-align: center; color: #1e293b; }
.login-box .btn { width: 100%; margin-top: 18px; padding: 11px; }

.muted { color: #94a3b8; font-size: 12px; }
.strategy-card { border: 2px solid #e2e8f0; border-radius: 10px; padding: 16px;
  margin-bottom: 12px; cursor: pointer; }
.strategy-card.selected { border-color: #2563eb; background: #f0f6ff; }
.pager { margin-top: 16px; display: flex; gap: 8px; align-items: center; }
