/* 跳转系统后台样式 */
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 14px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  color: #1f2430;
  background: #f4f6fa;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 登录 ---------- */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 20% 0%, #1e3a8a 0%, #0f172a 60%, #0b1120 100%);
}
.login {
  width: 360px; padding: 32px 28px 24px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, .45);
}
.login h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: .5px; }
.login .sub { margin: 0 0 22px; color: #6b7280; font-size: 12px; }
.login label { display: block; margin-bottom: 14px; font-size: 13px; color: #374151; }
.login input[type=text], .login input[type=password] {
  width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid #d5dae4; border-radius: 8px; font-size: 14px; outline: none;
}
.login input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.login button {
  width: 100%; margin-top: 6px; padding: 11px;
  border: 0; border-radius: 8px; cursor: pointer;
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color: #fff; font-size: 15px; letter-spacing: 2px;
}
.login button:hover { filter: brightness(1.06); }
.login .tip { margin: 16px 0 0; font-size: 11px; color: #9aa3b2; text-align: center; }

/* ---------- 布局 ---------- */
.side {
  position: fixed; inset: 0 auto 0 0; width: 208px;
  background: #111827; color: #cbd5e1;
  display: flex; flex-direction: column;
  padding: 18px 12px;
}
.side .brand { padding: 4px 10px 18px; font-size: 16px; font-weight: 600; color: #fff; }
.side .brand span { display: block; font-size: 11px; font-weight: 400; color: #64748b; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side nav a {
  padding: 9px 12px; border-radius: 8px; color: #cbd5e1; font-size: 13px;
}
.side nav a:hover { background: #1f2937; text-decoration: none; }
.side nav a.on { background: #2563eb; color: #fff; }
.side .who {
  border-top: 1px solid #1f2937; padding-top: 12px; font-size: 12px; color: #94a3b8;
  display: flex; justify-content: space-between; align-items: center;
}
.side .who a { color: #f87171; }

main { margin-left: 208px; padding: 24px 28px 60px; }
main h1 { margin: 0 0 18px; font-size: 20px; }

/* ---------- 卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.card { background: #fff; border: 1px solid #e6eaf2; border-radius: 12px; padding: 16px 18px; }
.card .n { font-size: 24px; font-weight: 600; }
.card .l { font-size: 12px; color: #6b7280; margin-top: 2px; }

.panel { background: #fff; border: 1px solid #e6eaf2; border-radius: 12px; padding: 18px 20px; margin-bottom: 20px; }
.panel h3 { margin: 0 0 14px; font-size: 15px; }

/* ---------- 表单 ---------- */
label.f { display: block; margin-bottom: 12px; font-size: 13px; color: #374151; }
input[type=text], input[type=number], input[type=password], select, textarea {
  width: 100%; padding: 9px 11px; margin-top: 5px;
  border: 1px solid #d5dae4; border-radius: 8px; font-size: 13px;
  font-family: inherit; outline: none; background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
textarea { min-height: 220px; font-family: Consolas, Menlo, monospace; font-size: 12px; line-height: 1.55; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 160px; }
.row > .shrink { flex: 0 0 auto; }

button, .btn {
  display: inline-block; padding: 9px 16px; border: 0; border-radius: 8px;
  background: #2563eb; color: #fff; font-size: 13px; cursor: pointer; text-decoration: none;
}
button:hover, .btn:hover { filter: brightness(1.07); text-decoration: none; color: #fff; }
.btn.sm, button.sm { padding: 5px 10px; font-size: 12px; }
.btn.gray { background: #64748b; }
.btn.red { background: #dc2626; }
.btn.green { background: #059669; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #eef1f6; vertical-align: middle; }
th { color: #6b7280; font-weight: 500; font-size: 12px; background: #fafbfe; }
tr:hover td { background: #fafbff; }
code, .mono { font-family: Consolas, Menlo, monospace; font-size: 12px; }
.url { color: #0f766e; word-break: break-all; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 11px; }
.tag.on { background: #dcfce7; color: #15803d; }
.tag.off { background: #fee2e2; color: #b91c1c; }
.tag.role { background: #e0e7ff; color: #3730a3; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.flash.ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.muted { color: #8b93a3; font-size: 12px; }
.empty { padding: 28px; text-align: center; color: #9aa3b2; font-size: 13px; }
.flow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; color: #475569; }
.flow b { background: #eef2ff; color: #3730a3; padding: 3px 10px; border-radius: 6px; font-weight: 500; }

/* ---------- v2：交互反馈 ---------- */
button.loading, .btn.loading { opacity: .55; pointer-events: none; }
tr.rowflash td { background: #eef7ff; transition: background .3s; }
td select { margin-top: 0; }
td button.sm { margin-right: 4px; }
