:root {
  --bg: #0a1228;
  --card: rgba(14, 24, 55, 0.78);
  --line: rgba(160, 188, 255, 0.25);
  --text: #e9f0ff;
  --brand: #5e8bff;
  --success: #31d0a1;
  --danger: #ff6b6b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at 20% 0, #233d82, #0a1228 45%, #060b19 100%);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", sans-serif;
}

.login-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 520px;
  max-width: 100%;
}

.login-brand {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-sub {
  margin: 0 0 18px;
  color: #b9cbff;
}

.login-btn {
  width: 100%;
  margin-top: 8px;
}

.login-tip {
  margin-top: 10px;
  color: #9eb4ff;
  font-size: 13px;
}
#app { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  border-right: 1px solid var(--line);
  background: rgba(10, 18, 40, 0.72);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.brand { font-weight: 700; font-size: 34px; line-height: 1.1; margin-bottom: 8px; white-space: nowrap; }
.nav-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
}
.nav-btn.active { background: rgba(94, 139, 255, 0.25); }
.main { flex: 1; padding: 24px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
}
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.right { justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.input {
  width: 100%; padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--text);
}
.btn {
  background: linear-gradient(135deg, #5e8bff, #39d0ff);
  color: #fff; border: none; border-radius: 10px;
  padding: 10px 14px; cursor: pointer;
}
.btn.ghost { background: rgba(255,255,255,0.08); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid rgba(255,255,255,0.08); padding: 10px 8px; text-align: left; }
.hidden { display: none; }

.pager {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}
.pager .meta { color: #afc2ff; font-size: 13px; margin-right: 8px; }

dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0e1837;
  color: var(--text);
}
.dialog-form { min-width: 420px; display: flex; flex-direction: column; gap: 10px; }

.toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  background: rgba(10, 20, 45, 0.95);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 180px;
}
.toast.success { border-color: rgba(49,208,161,0.6); }
.toast.error { border-color: rgba(255,107,107,0.7); }
