/* 登录页：朴素风格 + 小卡片 + 底部登录 */
:root {
  --lp-bg: #f3f5f8;
  --lp-panel: #ffffff;
  --lp-text: #1e293b;
  --lp-muted: #64748b;
  --lp-line: #e2e8f0;
  --lp-primary: #4a7ab0;
  --lp-primary-dark: #3a6494;
  --lp-shadow: 0 2px 10px rgba(30, 41, 59, .06);
}
.login-portal-body {
  margin: 0;
  min-height: 100vh;
  background: #f3f5f8;
  color: var(--lp-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}
.lp-header {
  background: #fff;
  border-bottom: 1px solid var(--lp-line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.lp-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 14px;
}
.lp-home-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.lp-brand-mark {
  display: block;
  width: 2.9rem;
  height: 2.9rem;
  flex: 0 0 2.9rem;
  position: relative;
  z-index: 1;
}
.lp-home-title h1,
.lp-title-sparkle {
  margin: 0;
  font-size: clamp(1.55rem, 4.2vw, 2.15rem);
  letter-spacing: .06em;
  font-weight: 900;
  text-align: center;
  width: auto;
  line-height: 1.35;
  /* 闪耀渐变字 */
  background: linear-gradient(
    110deg,
    #1e3a5f 0%,
    #2b6cb0 18%,
    #63b3ed 36%,
    #f6e05e 50%,
    #63b3ed 64%,
    #2b6cb0 82%,
    #1e3a5f 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: lp-title-shine 3.2s linear infinite;
  filter: drop-shadow(0 0 10px rgba(99, 179, 237, .45))
          drop-shadow(0 1px 0 rgba(255, 255, 255, .35));
  position: relative;
}
/* 顶部微光扫过（兼容不支持 clip 的场景时仍有光感） */
.lp-home-title {
  position: relative;
  overflow: visible;
}
.lp-home-title::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: -6px -12px;
  border-radius: 12px;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, .55) 48%,
    rgba(246, 224, 94, .35) 52%,
    transparent 65%
  );
  background-size: 220% 100%;
  animation: lp-title-sweep 3.2s ease-in-out infinite;
  mix-blend-mode: soft-light;
  opacity: .85;
}
@keyframes lp-title-shine {
  0% { background-position: 0% center; }
  100% { background-position: 220% center; }
}
@keyframes lp-title-sweep {
  0% { background-position: 120% 0; opacity: .35; }
  40% { opacity: .9; }
  100% { background-position: -120% 0; opacity: .35; }
}
.lp-badge { display: none; }
.lp-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 14px 28px;
}
.lp-section {
  background: var(--lp-panel);
  border: 1px solid var(--lp-line);
  border-radius: 12px;
  box-shadow: var(--lp-shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.lp-section h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  color: var(--lp-text);
  font-weight: 700;
  text-align: center;
}
/* 无标题时工具卡片区顶部留白略减 */
.lp-section > .lp-cards {
  margin-top: 0;
}
.lp-section .lp-hint { display: none; }

.lp-cards {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 8px;
}
.lp-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  height: 70px;
  max-width: 100%;
  overflow: hidden;
  padding: 6px 4px;
  border: 1px solid var(--lp-line);
  border-radius: 8px;
  background: #fff;
  color: var(--lp-text);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
  transition: .12s;
  text-align: center;
}
.lp-card:hover {
  border-color: #94b4d4;
  color: var(--lp-primary);
  box-shadow: 0 2px 8px rgba(30, 41, 59, .08);
}
.lp-card strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 副标题小字不显示 */
.lp-card span:not(.lp-card-icon) {
  display: none;
}
.lp-card-icon {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 0;
}

/* 底部登录区（朴素） */
.lp-login-section {
  border-color: var(--lp-line);
  background: #fff;
}
.lp-login-section h2 {
  text-align: center;
  color: var(--lp-text);
}
.lp-login-form {
  max-width: 420px;
  margin: 0 auto;
}
.lp-login-form .form-group {
  margin-bottom: .75rem;
  text-align: left;
}
.lp-login-form label {
  display: block;
  font-size: 13px;
  color: var(--lp-muted);
  margin-bottom: 5px;
  text-align: left;
}
.lp-login-form .lp-req {
  color: #c0392b;
  font-weight: 600;
}
.lp-crc-legend {
  padding: 0;
  margin: 0 0 5px;
  font-size: 13px;
  color: var(--lp-muted);
}
.lp-crc-choice {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  min-height: 2.15rem;
}
.lp-crc-choice label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  color: var(--lp-text);
  font-size: .92rem;
  cursor: pointer;
}
.lp-crc-choice input {
  width: auto;
  margin: 0;
}
.lp-login-form input[type="text"],
.lp-login-form input[type="password"],
.lp-login-form input[type="email"],
.lp-login-form input[type="tel"],
.lp-login-form input[type="file"],
.lp-login-form select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 10px; /* 文本框更矮 */
  min-height: 0;
  line-height: 1.35;
  background: #fff;
  color: var(--lp-text);
  font: inherit;
  font-size: .92rem;
  box-sizing: border-box;
}
.lp-login-form select {
  min-height: 2.15rem;
}
.lp-login-form input[type="file"] {
  padding: 6px 8px;
  background: #f8fafc;
}
.lp-photo-thumb {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  margin: 0 0 8px;
  background: #f1f5f9;
}
.lp-crop-box {
  max-width: 100%;
  max-height: 320px;
  margin: 8px 0;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
}
.lp-crop-box img {
  max-width: 100%;
  display: block;
}
.lp-photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 8px;
}
.lp-crop-apply {
  flex: 0 0 auto;
  border: 1px solid var(--lp-primary);
  background: #fff;
  color: var(--lp-primary-dark);
  border-radius: 8px;
  padding: 6px 12px;
  font: inherit;
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
}
.lp-crop-apply:hover {
  background: #f0f6fb;
}
.lp-photo-actions .lp-login-tip {
  margin: 0;
  flex: 1 1 12rem;
}
.lp-login-form input:focus,
.lp-login-form select:focus {
  outline: none;
  border-color: var(--lp-primary);
  box-shadow: 0 0 0 3px rgba(74, 122, 176, .15);
}
.lp-remember {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  font-size: 13px;
  color: var(--lp-text);
  justify-content: flex-start;
}
.lp-remember input { width: auto; }
.lp-login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}
.lp-login-actions-auto {
  grid-template-columns: 1fr;
  margin-bottom: 8px;
}
.lp-login-actions button,
.lp-login-actions .lp-btn-register {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  min-height: 46px;
  min-width: 0;
  box-sizing: border-box;
}
.lp-btn-auto {
  background: linear-gradient(135deg, #3a6494, #4a7ab0);
  color: #fff;
  box-shadow: 0 2px 8px rgba(58, 100, 148, .25);
}
.lp-btn-auto:hover { filter: brightness(1.05); }
.lp-btn-full {
  background: var(--lp-primary);
  color: #fff;
}
.lp-btn-full:hover { background: var(--lp-primary-dark); }
.lp-btn-mobile {
  background: #fff;
  color: var(--lp-primary);
  border: 1.5px solid #94b4d4 !important;
}
.lp-btn-mobile:hover {
  background: #f0f6fb;
}
.lp-login-tip {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--lp-muted);
}
.lp-guide-link {
  color: var(--lp-primary);
  font-weight: 700;
  text-decoration: underline;
}
.lp-login-ip {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--lp-muted);
  line-height: 1.5;
}
.lp-login-ip code {
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0,0,0,.04);
}
.lp-login-geo {
  margin-left: .15rem;
  color: var(--lp-muted);
}
.lp-alert {
  max-width: 420px;
  margin: 0 auto 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
}
.lp-alert-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.lp-alert-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.lp-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.lp-alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* 门户打开时 IP 拦截（工具卡片 + 登录一并隐藏） */
.lp-blocked-section {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}
.lp-blocked-panel {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(185, 28, 28, 0.08);
}
.lp-blocked-icon {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: 0.75rem;
}
.lp-blocked-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: #b91c1c;
  font-weight: 700;
}
.lp-blocked-msg {
  margin: 0 0 1rem;
  font-size: 14px;
  line-height: 1.6;
  color: #7f1d1d;
}
.lp-blocked-panel .lp-login-ip {
  margin: 0 0 1rem;
  padding: 0.5rem 0.75rem;
  background: #fef2f2;
  border-radius: 8px;
}
.lp-blocked-hint {
  margin: 0;
  font-size: 12px;
  color: var(--lp-muted, #64748b);
  line-height: 1.5;
}
.lp-blocked-login {
  margin-top: 1.15rem;
  padding-top: 1.1rem;
  border-top: 1px solid #fecaca;
  text-align: left;
}
.lp-blocked-login .lp-btn-auto {
  width: 100%;
  margin-top: .15rem;
}
.lp-blocked-panel .lp-alert {
  text-align: left;
  margin: 0 0 .75rem;
}

/* 注册入口 / 注册页 */
.lp-register-row {
  max-width: 420px;
  margin: 16px auto 0;
  text-align: center;
}
.lp-btn-register,
.lp-btn-back-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  box-sizing: border-box;
  transition: .12s;
}
.lp-btn-register {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #fff;
  border: 0;
  box-shadow: 0 2px 8px rgba(13, 148, 136, .25);
}
.lp-btn-register:hover {
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #fff;
}
.lp-btn-back-login {
  background: #fff;
  color: var(--lp-primary);
  border: 1.5px solid #94b4d4;
}
.lp-btn-back-login:hover {
  background: #f0f6fb;
}
.lp-register-tip,
.lp-register-desc {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--lp-muted);
  text-align: center;
  line-height: 1.5;
}
.lp-register-desc {
  max-width: 420px;
  margin: 0 auto 14px;
  font-size: 13px;
}
.lp-btn-register-submit {
  width: 100%;
  margin-top: 4px;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 760px) {
  .lp-wrap { padding: 12px 10px; }
  .lp-home-title { gap: 8px; }
  .lp-brand-mark { width: 2.4rem; height: 2.4rem; flex-basis: 2.4rem; }
  .lp-home-title h1,
  .lp-title-sparkle {
    font-size: clamp(1.28rem, 5.5vw, 1.7rem);
    letter-spacing: .04em;
  }
  .lp-main { padding: 10px 10px 22px; }
  .lp-section { border-radius: 10px; padding: 12px; }
  .lp-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .lp-card { height: 72px; padding: 6px 5px; }
  .lp-card strong { font-size: 12.5px; white-space: normal; }
  .lp-card-icon { font-size: 1.28rem; }
}
@media (max-width: 400px) {
  .lp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
