/* ============================================================
 * 门户首页 + 登录页 公共样式
 * ============================================================ */
:root {
  --primary: #0e7490;
  --primary-dark: #155e75;
  --primary-deep: #0c4a6e;
  --accent: #14b8a6;
  --ink: #1f2937;
  --ink-2: #4b5563;
  --ink-3: #9ca3af;
  --line: #e5e7eb;
  --bg: #f3f6f8;
  --white: #ffffff;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --run: #2563eb;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(12, 74, 110, .12);
}

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

html, body { height: 100%; }

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

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ---------------- 门户首页 ---------------- */
.portal-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0c4a6e 0%, #155e75 45%, #0f766e 100%);
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.portal-bg { position: fixed; inset: 0; pointer-events: none; }

.portal-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .35;
}

.portal-bg .b1 { width: 480px; height: 480px; background: #14b8a6; top: -140px; right: -120px; }
.portal-bg .b2 { width: 380px; height: 380px; background: #38bdf8; bottom: -120px; left: -100px; opacity: .25; }
.portal-bg .b3 { width: 260px; height: 260px; background: #a7f3d0; top: 40%; left: 55%; opacity: .12; }

.portal-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portal-head { text-align: center; color: #fff; margin-bottom: 40px; }

.portal-head .logo {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.logo-mark {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.portal-head h1 {
  font-size: 34px;
  letter-spacing: 2px;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

.portal-head p {
  margin-top: 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, .82);
  letter-spacing: 1px;
}

.version-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.vcard {
  background: rgba(255, 255, 255, .97);
  border-radius: 20px;
  padding: 34px 32px 30px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .5);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.vcard::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity .25s ease;
}

.vcard:hover { transform: translateY(-8px); box-shadow: 0 18px 44px rgba(4, 47, 66, .35); }
.vcard:hover::before { opacity: 1; }

.vcard-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #e0f2fe, #ccfbf1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 20px;
}

.vcard h2 { font-size: 24px; color: var(--ink); margin-bottom: 8px; }
.vcard > p { font-size: 14px; color: var(--ink-2); line-height: 1.7; margin-bottom: 16px; }

.vcard ul {
  list-style: none;
  margin-bottom: 24px;
  flex: 1;
}

.vcard li {
  font-size: 13px;
  color: var(--ink-2);
  padding: 7px 0 7px 24px;
  position: relative;
  border-bottom: 1px dashed var(--line);
}

.vcard li:last-child { border-bottom: none; }

.vcard li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  color: var(--primary);
  font-weight: 700;
}

.vcard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--primary), #0891b0);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: filter .2s ease;
}

.vcard:hover .vcard-btn { filter: brightness(1.1); }

.flow-strip {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, .85);
  font-size: 12.5px;
}

.flow-strip span {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.flow-strip i { font-style: normal; color: rgba(255, 255, 255, .55); }

.portal-foot {
  text-align: center;
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
  margin-top: 28px;
  letter-spacing: 1px;
}

@media (max-width: 760px) {
  .version-cards { grid-template-columns: 1fr; }
  .portal-head h1 { font-size: 26px; }
  .portal-wrap { padding: 32px 16px 24px; }
}

/* ---------------- 登录页公共 ---------------- */
.login-page { min-height: 100vh; }

.back-home {
  position: fixed;
  top: 20px;
  left: 24px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: background .2s ease;
}

.back-home:hover { background: rgba(255, 255, 255, .28); }

.login-brand {
  background: linear-gradient(150deg, #0c4a6e 0%, #155e75 55%, #0f766e 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.login-brand .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}

.login-brand .b1 { width: 300px; height: 300px; background: #14b8a6; opacity: .3; top: -80px; right: -80px; }
.login-brand .b2 { width: 240px; height: 240px; background: #38bdf8; opacity: .22; bottom: -70px; left: -60px; }

.login-brand-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 48px; }

.login-brand .logo-mark {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 22px;
}

.login-brand h1 { font-size: 26px; letter-spacing: 1.5px; margin-bottom: 10px; }
.login-brand .slogan { font-size: 13.5px; color: rgba(255, 255, 255, .8); line-height: 1.8; margin-bottom: 28px; }

.login-brand .feat { list-style: none; }

.login-brand .feat li {
  font-size: 13px;
  color: rgba(255, 255, 255, .88);
  padding: 7px 0 7px 26px;
  position: relative;
}

.login-brand .feat li::before {
  content: "●";
  position: absolute;
  left: 4px;
  color: #5eead4;
  font-size: 9px;
  top: 11px;
}

.login-form-wrap {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}

.login-box { width: 100%; max-width: 380px; }

.login-box h2 { font-size: 24px; color: var(--ink); margin-bottom: 6px; }
.login-box .sub { font-size: 13px; color: var(--ink-3); margin-bottom: 28px; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 7px;
  font-weight: 500;
}

.field .input-shell {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #f9fafb;
  transition: border-color .2s ease, background .2s ease;
}

.field .input-shell:focus-within { border-color: var(--primary); background: #fff; }

.field .input-shell .ico {
  width: 42px;
  text-align: center;
  font-size: 15px;
  color: var(--ink-3);
  flex-shrink: 0;
}

.field .input-shell input {
  flex: 1;
  height: 46px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  color: var(--ink);
  min-width: 0;
}

.field .input-shell .toggle-eye {
  width: 42px;
  text-align: center;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 15px;
  flex-shrink: 0;
  user-select: none;
}

.field .input-shell .toggle-eye:hover { color: var(--primary); }

.login-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--bad);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.login-error.show { display: block; }

.btn-login {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary), #0891b0);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 4px;
  cursor: pointer;
  transition: filter .2s ease, transform .1s ease;
  margin-top: 4px;
}

.btn-login:hover { filter: brightness(1.08); }
.btn-login:active { transform: scale(.985); }
.btn-login:disabled { filter: grayscale(.5); cursor: not-allowed; }

.login-tip {
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.8;
}

.login-tip b { color: var(--primary); font-weight: 600; }

.quick-users {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-users .chip {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f9fafb;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .18s ease;
}

.quick-users .chip:hover { border-color: var(--primary); color: var(--primary); background: #ecfeff; }

.login-foot {
  margin-top: 30px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
}
