/* =============================================================
 * portal.css — 入口页与登录页
 * ============================================================= */

/* ---------------- 入口页 ---------------- */
.portal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #eef3ff 0%, #f7f9ff 42%, #eafaf8 100%);
  position: relative;
  overflow-x: hidden;
}

.portal-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.orb-1 { width: 420px; height: 420px; background: #b9d0ff; top: -120px; left: -80px; }
.orb-2 { width: 380px; height: 380px; background: #a8ece4; bottom: -110px; right: -60px; }
.orb-3 { width: 300px; height: 300px; background: #ffe2b8; top: 42%; left: 55%; opacity: .34; }

.portal-head, .portal-main, .portal-foot { position: relative; z-index: 1; }

.portal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px clamp(20px, 6vw, 80px) 10px;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-logo {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), #5b8cff);
  color: #fff;
  box-shadow: 0 6px 18px rgba(47, 107, 255, .3);
}
.brand-logo svg { width: 25px; height: 25px; }
.brand-text h1 { margin: 0; font-size: 19px; letter-spacing: .5px; }
.brand-text p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }

.head-meta { display: flex; align-items: center; gap: 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2);
}
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-ok { background: var(--teal); box-shadow: 0 0 0 3px rgba(0, 184, 169, .18); }
.head-date { font-size: 12.5px; color: var(--muted); }

.portal-main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) 24px 30px;
  display: flex;
  flex-direction: column;
}

.welcome { text-align: center; margin-bottom: clamp(22px, 4vw, 40px); }
.welcome h2 { margin: 0 0 10px; font-size: clamp(21px, 3vw, 29px); letter-spacing: .5px; }
.welcome p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.7; }

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

.entry-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  color: inherit;
  box-shadow: var(--shadow-1);
  transition: transform .24s cubic-bezier(.2, .9, .3, 1.1), box-shadow .24s, border-color .24s;
}
.entry-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(20, 40, 80, .14);
  border-color: var(--brand);
}
.entry-mb:hover { border-color: var(--teal); }

.entry-visual {
  position: relative;
  height: 186px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.entry-pc .entry-visual { background: linear-gradient(140deg, #eaf0ff, #f5f8ff); }
.entry-mb .entry-visual { background: linear-gradient(140deg, #e3f8f5, #f2fbfa); }

.entry-badge {
  position: absolute;
  top: 14px; right: 14px;
  padding: 4px 11px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
}
.entry-badge.badge-mb { background: var(--teal); }

/* 电脑版缩略图 */
.pc-mock { width: 216px; }
.pc-screen {
  background: #fff;
  border-radius: 9px;
  border: 1px solid #d8e2f2;
  box-shadow: 0 10px 26px rgba(30, 60, 120, .13);
  overflow: hidden;
}
.pc-topbar { height: 15px; background: var(--brand); opacity: .85; }
.pc-body { display: flex; height: 104px; }
.pc-side { width: 46px; background: #f6f8fd; padding: 8px 6px; display: flex; flex-direction: column; gap: 6px; }
.pc-side span { height: 7px; border-radius: 3px; background: #dde5f3; }
.pc-side span:first-child { background: var(--brand); opacity: .5; }
.pc-main { flex: 1; padding: 9px 10px; }
.pc-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.pc-cards i { height: 30px; border-radius: 5px; background: #eef3fc; border: 1px solid #e2eaf7; }
.pc-chart {
  margin-top: 8px;
  height: 38px;
  border-radius: 5px;
  background:
    linear-gradient(180deg, transparent 60%, rgba(47,107,255,.06)),
    repeating-linear-gradient(90deg, rgba(47,107,255,.5) 0 2px, transparent 2px 26px);
  border: 1px solid #e2eaf7;
}

/* 手机版缩略图 */
.mb-mock { width: 116px; }
.mb-screen {
  position: relative;
  background: #fff;
  border-radius: 18px;
  border: 2px solid #cfe4e2;
  box-shadow: 0 10px 26px rgba(0, 120, 110, .14);
  padding: 12px 9px 8px;
  height: 168px;
  display: flex;
  flex-direction: column;
}
.mb-notch {
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  width: 34px; height: 5px;
  border-radius: 3px;
  background: #d7e6e4;
}
.mb-head { height: 26px; border-radius: 7px; background: linear-gradient(120deg, var(--teal), #4fd6c6); margin: 6px 0 9px; }
.mb-rows { display: flex; flex-direction: column; gap: 7px; }
.mb-rows i { height: 26px; border-radius: 6px; background: #f2f7f9; border: 1px solid #e4eeef; }
.mb-tabbar {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid #eef3f4;
}
.mb-tabbar s { display: block; height: 12px; border-radius: 4px; background: #ddeceb; text-decoration: none; }
.mb-tabbar s:first-child { background: var(--teal); opacity: .8; }

.entry-body { padding: 20px 22px 22px; }
.entry-title { display: flex; gap: 13px; align-items: flex-start; }
.entry-ico {
  width: 42px; height: 42px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
}
.entry-ico svg { width: 22px; height: 22px; }
.ico-pc { background: var(--brand-weak); color: var(--brand); }
.ico-mb { background: var(--teal-weak); color: #08917f; }
.entry-title h3 { margin: 0 0 4px; font-size: 17.5px; }
.entry-title p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.entry-feats { list-style: none; margin: 16px 0 18px; padding: 0; display: grid; gap: 8px; }
.entry-feats li {
  position: relative;
  padding-left: 19px;
  font-size: 13px;
  color: var(--text-2);
}
.entry-feats li::before {
  content: '';
  position: absolute;
  left: 3px; top: 7px;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--brand);
  opacity: .6;
}
.entry-mb .entry-feats li::before { background: var(--teal); }

.entry-go {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600;
  color: var(--brand);
}
.entry-mb .entry-go { color: #08917f; }
.entry-go em { font-style: normal; transition: transform .2s; }
.entry-card:hover .entry-go em { transform: translateX(4px); }

.portal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px clamp(20px, 6vw, 80px) 26px;
  font-size: 12.5px;
  color: var(--muted);
}
.foot-note { display: flex; align-items: center; gap: 7px; }
.foot-note svg { width: 15px; height: 15px; }
.foot-links { display: flex; align-items: center; gap: 9px; }
.foot-links a { color: var(--text-2); }
.foot-links a:hover { color: var(--brand); }
.foot-links i { color: var(--line-strong); font-style: normal; }

/* ---------------- 使用说明 ---------------- */
.guide-mask {
  position: fixed; inset: 0;
  background: rgba(18, 30, 50, .42);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  z-index: 900; padding: 20px;
}
.guide-mask[hidden] { display: none; }
.guide {
  width: 620px; max-width: 100%;
  max-height: 84vh;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column;
  animation: popIn .2s cubic-bezier(.2,.9,.3,1.1);
}
.guide-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.guide-head h3 { margin: 0; font-size: 16px; }
.guide-body { padding: 18px 22px; overflow: auto; font-size: 13.5px; color: var(--text-2); line-height: 1.85; }
.guide-body h4 { margin: 18px 0 8px; font-size: 14px; color: var(--text); }
.guide-body h4:first-child { margin-top: 0; }
.guide-body ul { margin: 0; padding-left: 20px; }
.guide-body li { margin-bottom: 4px; }
.acct-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 10px 0 4px; }
.acct-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12.5px;
}
.acct-item code {
  font-family: "Consolas", monospace;
  background: var(--brand-weak); color: var(--brand);
  padding: 2px 8px; border-radius: 5px; font-size: 12px;
}
.guide-foot { padding: 14px 20px; border-top: 1px solid var(--line); text-align: right; background: var(--surface-2); border-radius: 0 0 18px 18px; }

/* ---------------- 登录页 ---------------- */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--bg);
  position: relative;
}

.auth-side {
  position: relative;
  overflow: hidden;
  padding: 44px clamp(32px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  color: #fff;
  background: linear-gradient(150deg, #1d4ed8 0%, #2f6bff 46%, #00a99b 100%);
}
.auth-side .orb { opacity: .3; }
.auth-side .orb-1 { width: 380px; height: 380px; background: #fff; top: -100px; left: -120px; filter: blur(90px); }
.auth-side .orb-2 { width: 320px; height: 320px; background: #7ef0e2; bottom: -90px; right: -70px; filter: blur(80px); }
.auth-side .orb-3 { width: 240px; height: 240px; background: #ffd79a; top: 55%; left: 20%; filter: blur(70px); opacity: .2; }

.side-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.side-brand .logo {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
}
.side-brand .logo svg { width: 23px; height: 23px; }
.side-brand h1 { margin: 0; font-size: 18px; letter-spacing: .5px; }
.side-brand p { margin: 2px 0 0; font-size: 12px; opacity: .8; }

.side-hero { margin: auto 0; position: relative; z-index: 1; max-width: 440px; }
.side-hero h2 { margin: 0 0 14px; font-size: clamp(24px, 3vw, 34px); line-height: 1.4; letter-spacing: .5px; }
.side-hero > p { margin: 0 0 30px; font-size: 14px; line-height: 1.9; opacity: .86; }

.side-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.side-stat {
  padding: 15px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(6px);
}
.side-stat b { display: block; font-size: 22px; letter-spacing: .5px; }
.side-stat span { font-size: 12px; opacity: .82; }

.side-foot { position: relative; z-index: 1; font-size: 12px; opacity: .72; line-height: 1.8; }

.auth-main {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  overflow: auto;
}
.auth-box { width: 100%; max-width: 400px; }
.auth-head { margin-bottom: 26px; }
.auth-head h3 { margin: 0 0 8px; font-size: 24px; }
.auth-head p { margin: 0; font-size: 13.5px; color: var(--muted); }

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 22px;
}
.role-btn {
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .16s;
}
.role-btn svg { width: 16px; height: 16px; }
.role-btn.on { background: var(--brand-weak); color: var(--brand); font-weight: 600; }
.role-btn.on[data-role="mb"] { background: var(--teal-weak); color: #08917f; }

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 7px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.input-wrap { position: relative; }
.input-wrap .form-ctl { height: 44px; padding-left: 40px; font-size: 14px; }
.input-ico {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.eye-btn {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border: 0; background: none;
  color: var(--muted);
  cursor: pointer;
  display: grid; place-items: center;
  border-radius: 6px;
}
.eye-btn:hover { background: var(--surface-2); color: var(--text-2); }
.eye-btn svg { width: 17px; height: 17px; }

.auth-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; font-size: 12.5px; }
.check { display: flex; align-items: center; gap: 7px; color: var(--text-2); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.auth-row a { color: var(--brand); }

.auth-tip {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 11px 13px;
  background: var(--brand-weak);
  border: 1px solid #d6e2ff;
  border-radius: 10px;
  font-size: 12.5px;
  color: #2c56c9;
  line-height: 1.7;
  margin-bottom: 18px;
}
.auth-tip svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.auth-tip code {
  font-family: "Consolas", monospace;
  background: rgba(255, 255, 255, .7);
  padding: 1px 6px; border-radius: 4px;
}

.auth-alt {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
.auth-alt a { color: var(--brand); font-weight: 500; }

/* 移动端登录页 */
.auth-page.mb-auth { grid-template-columns: 1fr; }
.mb-auth .auth-side {
  padding: 30px 22px 34px;
  border-radius: 0 0 26px 26px;
  gap: 0;
}
.mb-auth .side-hero { margin: 26px 0 0; max-width: none; }
.mb-auth .side-hero h2 { font-size: 21px; margin-bottom: 8px; }
.mb-auth .side-hero > p { margin-bottom: 20px; font-size: 13px; }
.mb-auth .side-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mb-auth .side-stat { padding: 11px 12px; }
.mb-auth .side-stat b { font-size: 17px; }
.mb-auth .side-stat span { font-size: 11px; }
.mb-auth .side-foot { display: none; }
.mb-auth .auth-main { padding: 26px 20px 40px; place-items: start center; }
.mb-auth .auth-head h3 { font-size: 20px; }
.mb-auth .btn-lg { height: 46px; }

@media (max-width: 900px) {
  .entry-grid { grid-template-columns: 1fr; }
  .auth-page:not(.mb-auth) { grid-template-columns: 1fr; }
  .auth-page:not(.mb-auth) .auth-side { padding: 28px 24px 32px; border-radius: 0 0 22px 22px; }
  .auth-page:not(.mb-auth) .side-hero { margin: 22px 0 0; max-width: none; }
  .auth-page:not(.mb-auth) .side-foot { display: none; }
  .portal-head { flex-wrap: wrap; gap: 12px; }
  .head-meta { width: 100%; justify-content: space-between; }
}
