:root {
  --brand-a: #6A3DF5;
  --brand-b: #9B5CFF;
  --brand-c: #FF7AB6;
  --warm-a: #FFB75E;
  --warm-b: #ED8F03;
  --bg: #f4f5fb;
  --ink: #1f2030;
  --muted: #9aa0b4;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); }

.layout { display: flex; min-height: 100vh; }

/* 渐变侧边栏 */
.sidebar {
  width: 240px; flex-shrink: 0; padding: 26px 18px;
  background: linear-gradient(170deg, var(--brand-a) 0%, var(--brand-b) 55%, var(--brand-c) 100%);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.logo {
  width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800;
  border: 2px solid rgba(255,255,255,0.5);
}
.brand-text { font-size: 20px; font-weight: 800; line-height: 1.2; }
.brand-text small { display: block; font-size: 12px; font-weight: 400; opacity: 0.85; }

.nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  display: block; padding: 14px 16px; border-radius: 12px; color: rgba(255,255,255,0.9);
  text-decoration: none; font-size: 15px; transition: 0.2s;
}
.nav-item:hover { background: rgba(255,255,255,0.14); }
.nav-item.active { background: rgba(255,255,255,0.22); font-weight: 700; box-shadow: 0 8px 18px rgba(0,0,0,0.12); }

/* 主区 */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 64px; background: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; box-shadow: 0 2px 12px rgba(40,30,90,0.06);
}
.crumb { font-size: 18px; font-weight: 700; }
.admin-badge {
  background: linear-gradient(135deg, var(--brand-a), var(--brand-c)); color: #fff;
  padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
}
.content { padding: 26px; }

/* 沉叠卡片 */
.card {
  background: #fff; border-radius: 18px; padding: 22px;
  box-shadow: 0 10px 26px rgba(40,30,90,0.08); margin-bottom: 20px;
}
.card + .card { margin-top: -10px; }

/* 概览统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.stat {
  border-radius: 18px; padding: 22px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-c));
  box-shadow: 0 12px 28px rgba(106,61,245,0.30);
}
.stat:nth-child(2) { background: linear-gradient(135deg, #FF9A8B, #FF6A88); box-shadow: 0 12px 28px rgba(255,106,136,0.3); }
.stat:nth-child(3) { background: linear-gradient(135deg, #43CEA2, #185A9D); box-shadow: 0 12px 28px rgba(24,90,157,0.3); }
.stat:nth-child(4) { background: linear-gradient(135deg, #FFB75E, #ED8F03); box-shadow: 0 12px 28px rgba(237,143,3,0.3); }
.stat:nth-child(5) { background: linear-gradient(135deg, #7C4DFF, #448AFF); box-shadow: 0 12px 28px rgba(68,138,255,0.3); }
.stat .num { font-size: 32px; font-weight: 800; }
.stat .label { font-size: 13px; opacity: 0.9; margin-top: 6px; }

/* 表格 */
.panel-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 13px 12px; border-bottom: 1px solid #eef0f6; }
th { color: var(--muted); font-weight: 600; background: #fafbff; }
tr:hover td { background: #faf9ff; }
.tag { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.s0 { background: #FFE9EC; color: #FF5B7F; }
.tag.s1 { background: #E4F7EE; color: #1FA968; }
.tag.s2 { background: #FFF3E0; color: #ED8F03; }
.tag.s3 { background: #EDE7FF; color: #6A3DF5; }

.btn {
  border: none; cursor: pointer; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: #fff; background: linear-gradient(135deg, var(--brand-a), var(--brand-c));
}
.btn.ok { background: linear-gradient(135deg, #43CEA2, #185A9D); }
.btn.no { background: linear-gradient(135deg, #FF9A8B, #FF6A88); }
.btn.ghost { background: #fff; color: var(--brand-a); border: 1px solid var(--brand-a); }
.empty { color: var(--muted); text-align: center; padding: 30px 0; }

/* 登录遮罩 */
.login-mask {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #6A3DF5 0%, #9B5CFF 50%, #FF7AB6 100%);
}
.login-card {
  width: 360px; max-width: 88vw; background: #fff; border-radius: 20px; padding: 40px 32px;
  box-shadow: 0 30px 60px rgba(30,20,70,0.28); text-align: center;
}
.login-logo {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 16px;
  background: linear-gradient(135deg, #6A3DF5, #FF7AB6); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800;
}
.login-title { font-size: 22px; font-weight: 800; }
.login-sub { color: var(--muted); font-size: 13px; margin: 6px 0 24px; }
.login-input {
  width: 100%; padding: 14px 16px; margin-bottom: 14px; border: 1px solid #e6e8f2; border-radius: 12px;
  font-size: 15px; outline: none; transition: 0.2s;
}
.login-input:focus { border-color: var(--brand-a); box-shadow: 0 0 0 3px rgba(106,61,245,0.12); }
.login-err { color: #FF5C6C; font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.login-btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px; color: #fff; font-size: 16px; font-weight: 700;
  background: linear-gradient(135deg, #6A3DF5, #9B5CFF); cursor: pointer; transition: 0.2s;
}
.login-btn:hover { opacity: 0.92; }
.login-tip { color: var(--muted); font-size: 12px; margin-top: 16px; }
.logout-btn {
  margin-left: 12px; padding: 6px 14px; border: 1px solid rgba(255,255,255,0.5); border-radius: 999px;
  background: transparent; color: #fff; font-size: 13px; cursor: pointer;
}
