:root {
  --bg: #070B1C;
  --bg2: #0B1130;
  --panel: rgba(255, 255, 255, 0.045);
  --panel2: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.09);
  --line2: rgba(255, 255, 255, 0.16);
  --text: #EEF1FF;
  --sub: #8B95BD;
  --dim: #5D6791;
  --b1: #4F6BFF;
  --b2: #9B5CFF;
  --cyan: #35E6F0;
  --green: #2ED47A;
  --orange: #FFB44F;
  --pink: #FF6FA5;
  --rad: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background:
    radial-gradient(50% 40% at 8% -6%, rgba(79, 107, 255, 0.35), transparent 70%),
    radial-gradient(45% 35% at 98% 0%, rgba(155, 92, 255, 0.28), transparent 72%),
    linear-gradient(170deg, #070B1C 0%, #0A1030 45%, #120D2E 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 布局 ---------------- */
.layout { display: flex; min-height: 100vh; }

.side {
  width: 232px; flex-shrink: 0;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(8, 12, 32, 0.55);
  backdrop-filter: blur(20px);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.logo-orb {
  width: 34px; height: 34px; border-radius: 11px;
  background: radial-gradient(circle at 32% 28%, #B9E4FF, #6C8BFF 40%, #7A3CE0 100%);
  box-shadow: 0 6px 18px rgba(90, 110, 255, 0.5);
}
.logo-t { font-size: 15px; font-weight: 700; letter-spacing: 0.3px; }
.logo-s { font-size: 10px; color: var(--dim); letter-spacing: 1.6px; }

.nav-g { font-size: 10px; color: var(--dim); letter-spacing: 1.4px; padding: 16px 10px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 11px; cursor: pointer;
  color: #A5ADD0; font-size: 13.5px; margin-bottom: 2px;
  transition: all 0.18s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #E6EAFF; }
.nav-item.on {
  background: linear-gradient(100deg, rgba(79, 107, 255, 0.9), rgba(140, 92, 255, 0.75));
  color: #fff; font-weight: 600;
  box-shadow: 0 8px 22px rgba(79, 107, 255, 0.32);
}
.nav-item .ni {
  width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; background: rgba(255, 255, 255, 0.1);
}
.nav-item.on .ni { background: rgba(255, 255, 255, 0.22); }
.nav-item.disabled { opacity: 0.32; cursor: not-allowed; }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.user-box { display: flex; align-items: center; gap: 10px; }
.uavatar {
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(140deg, var(--b1), var(--b2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
}
.uavatar.cyan { background: linear-gradient(140deg, #22B8D8, #35E6F0); }
.uname { font-size: 13px; font-weight: 600; }
.urole { font-size: 11px; color: var(--dim); }
.logout { font-size: 11px; color: var(--dim); cursor: pointer; margin-left: auto; }
.logout:hover { color: var(--pink); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 62px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 12, 32, 0.35);
  backdrop-filter: blur(16px);
  position: sticky; top: 0; z-index: 20;
}
.crumb { font-size: 13px; color: var(--sub); }
.crumb b { color: var(--text); font-weight: 600; }
.topbar-r { display: flex; align-items: center; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 9px;
  font-size: 12px; color: #C3CAE8;
  background: var(--panel); border: 1px solid var(--line);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

.view { padding: 26px 30px 60px; flex: 1; }

/* ---------------- 通用 ---------------- */
.page-h { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.page-t { font-size: 24px; font-weight: 700; letter-spacing: 0.3px; }
.page-s { font-size: 13px; color: var(--sub); margin-top: 5px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; } .mt28 { margin-top: 28px; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 20px;
  backdrop-filter: blur(14px);
}
.card-t { font-size: 14px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-t::before {
  content: ""; width: 3px; height: 14px; border-radius: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--b2));
}

.btn {
  height: 38px; padding: 0 16px; border-radius: 10px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  background: linear-gradient(100deg, #4F6BFF, #7A5CFF 60%, #9B5CFF);
  color: #fff; box-shadow: 0 8px 20px rgba(79, 107, 255, 0.3);
  transition: all 0.18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(79, 107, 255, 0.42); }
.btn.ghost { background: var(--panel); border: 1px solid var(--line); color: #C3CAE8; box-shadow: none; }
.btn.ghost:hover { background: var(--panel2); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn.danger { background: rgba(255, 111, 140, 0.14); border: 1px solid rgba(255, 111, 140, 0.3); color: #FF9FB0; box-shadow: none; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 500; white-space: nowrap;
  background: rgba(79, 107, 255, 0.15); color: #A9B6FF; border: 1px solid rgba(79, 107, 255, 0.28);
}
.tag.green { background: rgba(46, 212, 122, 0.13); color: #74E8A8; border-color: rgba(46, 212, 122, 0.26); }
.tag.cyan { background: rgba(53, 230, 240, 0.12); color: #7FE7FF; border-color: rgba(53, 230, 240, 0.26); }
.tag.orange { background: rgba(255, 180, 79, 0.13); color: #FFCC8A; border-color: rgba(255, 180, 79, 0.26); }
.tag.pink { background: rgba(255, 111, 165, 0.13); color: #FFA6C6; border-color: rgba(255, 111, 165, 0.26); }
.tag.gray { background: rgba(255, 255, 255, 0.07); color: #9AA3C7; border-color: rgba(255, 255, 255, 0.12); }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat {
  position: relative; overflow: hidden;
  padding: 18px; border-radius: var(--rad);
  background: var(--panel); border: 1px solid var(--line);
}
.stat.hl {
  background: linear-gradient(145deg, rgba(79, 107, 255, 0.26), rgba(155, 92, 255, 0.14));
  border-color: rgba(140, 150, 255, 0.3);
}
.stat::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle, rgba(53, 230, 240, 0.18), transparent 70%);
}
.stat-l { font-size: 12px; color: var(--sub); }
.stat-n { font-size: 30px; font-weight: 700; margin-top: 6px; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.stat-f { font-size: 11px; color: var(--dim); margin-top: 4px; }
.grad {
  background: linear-gradient(96deg, #7FE7FF, #8FA9FF 45%, #C08BFF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-weight: 500; font-size: 11.5px; color: var(--dim);
  letter-spacing: 0.6px; padding: 10px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 13px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle; }
.tbl tbody tr { transition: background 0.15s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { font-variant-numeric: tabular-nums; }

.avatar-cell { display: flex; align-items: center; gap: 10px; }
.mini-av {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, var(--b1), var(--b2));
}
.mini-av.cyan { background: linear-gradient(140deg, #22B8D8, #35E6F0); }
.mini-av.orange { background: linear-gradient(140deg, #FF9A5B, #FFB44F); }
.mini-av.green { background: linear-gradient(140deg, #22B88A, #2ED47A); }

/* 表单 */
.form { display: grid; gap: 14px; }
.f-row { display: grid; gap: 6px; }
.f-row label { font-size: 12px; color: var(--sub); }
.input, select.input, textarea.input {
  height: 40px; padding: 0 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  color: var(--text); font-size: 13px; width: 100%;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 90px; line-height: 1.6; }
.input:focus { border-color: rgba(120, 140, 255, 0.6); background: rgba(79, 107, 255, 0.08); }
.input::placeholder { color: #4E5780; }
select.input option { background: #12183A; }
.f-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 弹窗 */
.mask {
  position: fixed; inset: 0; background: rgba(3, 5, 15, 0.72);
  display: flex; align-items: center; justify-content: center; z-index: 200;
  padding: 24px; animation: fade 0.18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 520px; max-width: 100%; max-height: 88vh; overflow: auto;
  background: #0D1330; border: 1px solid var(--line2); border-radius: 18px;
  padding: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.modal.wide { width: 720px; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-t { font-size: 16px; font-weight: 700; }
.modal-x { cursor: pointer; color: var(--dim); font-size: 20px; line-height: 1; padding: 4px; }
.modal-x:hover { color: var(--text); }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* 其它 */
.empty { padding: 46px 0; text-align: center; color: var(--dim); font-size: 13px; }
.empty-orb {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 14px;
  background: radial-gradient(circle at 35% 30%, rgba(79, 107, 255, 0.5), rgba(155, 92, 255, 0.12));
  border: 1px solid rgba(140, 150, 255, 0.22);
}
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.hint { font-size: 12px; color: var(--dim); line-height: 1.7; }
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  padding: 10px 18px; border-radius: 10px; z-index: 500;
  background: rgba(20, 26, 56, 0.95); border: 1px solid var(--line2);
  font-size: 13px; color: var(--text); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  animation: pop 0.2s ease;
}
.bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-fill {
  width: 100%; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #7FE7FF, #4F6BFF 60%, rgba(155, 92, 255, 0.5));
  min-height: 4px; transition: height 0.5s ease;
}
.bar-lb { font-size: 10.5px; color: var(--dim); }
