* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pri); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: inherit; font-size: 14px; outline: none; }

/* 登录页 */
.login-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  top: -80px; right: -80px;
  border-radius: 50%;
}
.login-wrap::after {
  content: '';
  position: absolute;
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
  bottom: -60px; left: -60px;
  border-radius: 50%;
}
.login-card {
  background: var(--surface);
  border-radius: var(--r-2xl);
  padding: 36px 40px;
  width: 380px;
  max-width: 90%;
  box-shadow: var(--shadow-login);
  position: relative;
  z-index: 1;
}
.login-card h2, .login-card h1 {
  text-align: center;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}
.login-card .sub {
  text-align: center;
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 24px;
}

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

/* 侧边栏 */
.side {
  width: 220px;
  background: var(--side-bg);
  color: var(--side-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.side-h {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.side-h h3, .side-h h2 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.side-h .role {
  font-size: 11px;
  color: var(--side-text-dim);
  background: rgba(255,255,255,0.1);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
}
.role-switcher {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.role-switcher .rs-label {
  font-size: 10px;
  color: var(--side-text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.role-switcher .rs-select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 13px;
}
.role-switcher .rs-select option { color: #333; background: #fff; }
.side-n {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}
.nav-i {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  color: var(--side-text);
  border-radius: var(--r-md);
  font-size: 14px;
  margin-bottom: 2px;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.nav-i:hover { background: var(--side-hover); color: #fff; }
.nav-i.on {
  background: var(--side-active);
  color: #fff;
  font-weight: 600;
  border-left: 3px solid #60a5fa;
  padding-left: 11px;
}
.side-f {
  padding: 16px 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.side-f .un { font-size: 13px; color: var(--side-text-dim); }
.side-f .lo {
  background: rgba(255,255,255,0.1);
  color: var(--side-text);
  border: none;
  padding: 5px 12px;
  border-radius: var(--r-md);
  font-size: 12px;
  cursor: pointer;
}

/* 主内容区 */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
}
.topbar {
  background: var(--surface);
  padding: 16px 24px;
  border-bottom: 1px solid var(--bd);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
}
.content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* 提示条 */
.note {
  padding: 12px 16px;
  border-radius: var(--r-md);
  margin-bottom: 16px;
  font-size: 14px;
}
.note.info { background: var(--info-l); color: #075985; border-left: 4px solid var(--info); }
.note.success { background: var(--suc-l); color: #065f46; border-left: 4px solid var(--suc); }
.note.warning { background: var(--war-l); color: #92400e; border-left: 4px solid var(--war); }

/* 手机端适配 */
@media (max-width: 768px) {
  .app { flex-direction: column; }
  .side { width: 100%; }
  .side-h { padding: 12px 16px; }
  .role-switcher { display: none; }
  .side-n { display: flex; padding: 8px 12px; overflow-x: auto; gap: 4px; }
  .nav-i { padding: 8px 12px; font-size: 13px; white-space: nowrap; }
  .nav-i.on { border-left: none; border-bottom: 2px solid #34d399; padding-left: 12px; }
  .side-f { display: none; }
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; }
}
