/* ============================================================
 * 公共样式：门户页 + 登录页（两版共用）
 * ============================================================ */
:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --line: #e5e9f2;
  --text: #1e2739;
  --text-2: #5b667f;
  --text-3: #8a94ab;
  --brand: #3b6ef6;
  --brand-2: #6a4df6;
  --brand-soft: #eef2ff;
  --green: #16a34a;
  --green-soft: #e8f7ee;
  --amber: #b45309;
  --amber-soft: #fdf3e3;
  --red: #dc2626;
  --red-soft: #fdecec;
  --gray: #64748b;
  --gray-soft: #eef1f6;
  --blue: #2563eb;
  --blue-soft: #e8f0fe;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px rgba(16, 24, 40, .07);
}

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

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }

/* ---------- 门户页 ---------- */
.portal-body { overflow: hidden; }

.portal-bg { position: fixed; inset: 0; z-index: 0; background: linear-gradient(160deg, #eef2ff 0%, #f6f4ff 45%, #eef6ff 100%); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.blob-a { width: 460px; height: 460px; background: #b9c8ff; top: -140px; left: -120px; }
.blob-b { width: 420px; height: 420px; background: #d3c2ff; bottom: -150px; right: -110px; }
.blob-c { width: 300px; height: 300px; background: #a8d8ff; top: 38%; left: 62%; }

.portal {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 20px; gap: 34px;
}

.portal-head { text-align: center; }
.portal-logo {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(59, 110, 246, .35);
}
.portal-logo svg { width: 34px; height: 34px; }
.portal-head h1 { font-size: 30px; letter-spacing: 1px; }
.portal-sub { margin-top: 10px; color: var(--text-2); font-size: 14px; letter-spacing: .5px; }

.portal-cards { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 760px; }

.portal-card {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 26px 24px;
  display: flex; align-items: center; gap: 18px;
  width: 340px; max-width: 100%;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.portal-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(59, 110, 246, .18); }

.pc-card-icon {
  width: 56px; height: 56px; flex: none;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.pc-card-icon svg { width: 28px; height: 28px; }
.portal-card:last-child .pc-card-icon { background: #f1eaff; color: var(--brand-2); }

.pc-card-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pc-card-body strong { font-size: 18px; }
.pc-card-body small { color: var(--text-3); font-size: 12.5px; }

.pc-card-go { color: var(--text-3); display: flex; }
.pc-card-go svg { width: 20px; height: 20px; }
.portal-card:hover .pc-card-go { color: var(--brand); }

.portal-foot { color: var(--text-3); font-size: 13px; display: flex; align-items: center; gap: 12px; }
.portal-foot .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }

@media (max-width: 640px) {
  .portal-head h1 { font-size: 24px; }
  .portal-card { width: 100%; padding: 20px; }
}

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #eef2ff 0%, #f6f4ff 50%, #eef6ff 100%);
  position: relative; overflow: hidden;
}
.login-wrap::before, .login-wrap::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5;
}
.login-wrap::before { width: 420px; height: 420px; background: #b9c8ff; top: -130px; left: -110px; }
.login-wrap::after { width: 380px; height: 380px; background: #d3c2ff; bottom: -140px; right: -100px; }

.login-card {
  position: relative; z-index: 1;
  width: 400px; max-width: 100%;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 34px 32px 26px;
}

.login-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 700;
}
.login-brand .logo-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.login-brand .logo-mark svg { width: 21px; height: 21px; }
.login-brand .edition {
  margin-left: auto; font-size: 12px; font-weight: 500;
  color: var(--brand); background: var(--brand-soft);
  padding: 3px 10px; border-radius: 999px;
}

.login-sub { margin: 14px 0 22px; color: var(--text-2); font-size: 13.5px; }

.login-err {
  display: none;
  background: var(--red-soft); color: var(--red);
  border-radius: 8px; padding: 8px 12px; font-size: 12.5px;
  margin-bottom: 14px;
}
.login-err.show { display: block; }

.lbl { display: block; font-size: 13px; color: var(--text-2); margin: 0 0 6px; }

.inp {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  background: #fbfcfe;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: 16px;
  font-family: inherit;
}
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 110, 246, .14); background: #fff; }

.demo-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.demo-tip { font-size: 12.5px; color: var(--text-3); }
.chip {
  border: 1px solid var(--line); background: #fff;
  border-radius: 999px; padding: 4px 12px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.btn {
  border: 1px solid var(--line); background: #fff; color: var(--text);
  border-radius: 9px; padding: 9px 16px;
  font-size: 13.5px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s;
  font-family: inherit;
}
.btn:hover { border-color: #c7d2e8; background: #f8faff; }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: none; color: #fff;
  box-shadow: 0 8px 18px rgba(59, 110, 246, .28);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled { opacity: .65; cursor: not-allowed; }
.btn.danger { color: var(--red); border-color: #f6c9c9; background: #fff; }
.btn.danger:hover { background: var(--red-soft); }
.btn-block { width: 100%; justify-content: center; padding: 11px 16px; font-size: 14.5px; letter-spacing: 2px; }

.login-foot { margin-top: 18px; text-align: center; font-size: 12.5px; }
.login-foot a { color: var(--text-3); }
.login-foot a:hover { color: var(--brand); }

@media (max-width: 480px) {
  .login-card { padding: 26px 20px 20px; box-shadow: none; background: rgba(255,255,255,.96); }
}
