:root {
  --lh-auth-blue: #3b82f6;
  --lh-auth-purple: #8b5cf6;
  --lh-auth-pink: #ec4899;
  --lh-auth-ink: #111827;
  --lh-auth-muted: #5d6b82;
  --lh-auth-line: #e5e7eb;
  --lh-auth-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
  --lh-auth-gradient-hover: linear-gradient(135deg, #2563eb, #7c3aed, #db2777);
}

html {
  min-width: 0 !important;
  overflow-x: hidden;
}

body.auth-page {
  min-width: 0 !important;
  width: 100% !important;
  overflow-x: hidden;
  margin: 0;
  background: #f8fbff;
  color: var(--lh-auth-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.auth-page a {
  text-decoration: none;
}

body.auth-page #authBox {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, .12), rgba(236, 72, 153, .08) 48%, rgba(255, 255, 255, 0) 72%),
    #f8fbff;
}

body.auth-page .lh-auth-header {
  border-bottom: 1px solid rgba(229, 231, 235, .88);
  background: rgba(255, 255, 255, .88);
}

body.auth-page .header-nav.container {
  width: min(1200px, calc(100% - 48px));
  min-width: 0 !important;
  max-width: none;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0;
}

body.auth-page .nav-links {
  flex: 1 1 auto;
  justify-content: center;
  align-items: center;
  gap: .5rem;
}

body.auth-page .nav-link {
  width: auto !important;
  height: auto !important;
  color: #4b5563 !important;
  border-radius: 8px;
  padding: .5rem .875rem !important;
  font-size: .875rem !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
  white-space: nowrap;
}

body.auth-page .nav-link:hover {
  color: #3b82f6 !important;
  background: #f8fafc;
}

body.auth-page .header-cta {
  width: auto !important;
  flex: 0 0 auto;
  display: flex !important;
  align-items: center;
  gap: 12px;
  height: 72px;
}

body.auth-page .header-cta .btn {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  height: auto !important;
  min-width: 116px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: .78rem 1.45rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--lh-auth-gradient) !important;
  background-image: var(--lh-auth-gradient) !important;
  color: #fff !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  text-align: center;
  box-shadow: 0 18px 34px rgba(139, 92, 246, .26), 0 8px 18px rgba(59, 130, 246, .18) !important;
}

body.auth-page .header-cta .btn:hover,
body.auth-page .lh-auth-mobile-menu .mobile-cta .btn:hover {
  background: var(--lh-auth-gradient-hover) !important;
  background-image: var(--lh-auth-gradient-hover) !important;
  transform: translateY(-1px);
}

body.auth-page .lh-auth-mobile-menu .mobile-cta .btn {
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--lh-auth-gradient) !important;
  background-image: var(--lh-auth-gradient) !important;
  color: #fff !important;
  font-weight: 900 !important;
  box-shadow: 0 18px 34px rgba(139, 92, 246, .26), 0 8px 18px rgba(59, 130, 246, .18) !important;
}

body.auth-page .mobile-menu-btn {
  position: static !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px;
  margin: 0 0 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px;
  background: transparent !important;
  color: #111827 !important;
}

body.auth-page .lh-auth-mobile-menu[hidden] {
  display: none !important;
}

.lh-auth-main {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding: 118px 24px 48px;
}

.lh-auth-panel {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  overflow: hidden;
  margin: 0 auto;
  border: 1px solid rgba(229, 231, 235, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 28px 80px rgba(37, 99, 235, .16);
}

.lh-auth-side {
  position: relative;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(59, 130, 246, .94), rgba(139, 92, 246, .88) 54%, rgba(236, 72, 153, .82)),
    #3b82f6;
}

.lh-auth-side:after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .18) 0 1px, transparent 1px 28px),
    linear-gradient(30deg, rgba(255, 255, 255, .12), transparent 38%);
  opacity: .42;
}

.lh-auth-side > * {
  position: relative;
  z-index: 1;
}

.lh-auth-brand img {
  display: block;
  width: 190px;
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(15, 23, 42, .18));
}

.lh-auth-side h2 {
  max-width: 360px;
  margin: 38px 0 16px;
  color: #fff;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.lh-auth-side p {
  max-width: 380px;
  margin: 0;
  color: rgba(255, 255, 255, .86);
  font-size: 16px;
  line-height: 1.8;
}

.lh-auth-contact {
  display: grid;
  gap: 12px;
}

.lh-auth-contact a,
.lh-auth-contact span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .92);
  font-size: 14px;
  font-weight: 800;
}

.lh-auth-contact img {
  width: 22px;
  height: 22px;
}

.lh-auth-form-wrap {
  min-width: 0;
  position: relative;
  padding: 58px clamp(28px, 5vw, 72px);
}

.lh-auth-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(59, 130, 246, .16);
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 13px;
  font-weight: 900;
}

.lh-auth-title-row {
  margin-top: 18px;
}

.lh-auth-title-row h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

.lh-auth-title-row p {
  margin: 12px 0 0;
  color: var(--lh-auth-muted);
  font-size: 15px;
  line-height: 1.7;
}

body.auth-page .auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 34px 0 30px;
  padding: 6px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

body.auth-page .auth-switch button {
  min-width: 0;
  height: 48px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #526179;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}

body.auth-page .auth-switch button.active {
  color: #fff;
  background: var(--lh-auth-gradient);
  box-shadow: 0 14px 30px rgba(59, 130, 246, .22);
}

.lh-auth-form {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  gap: 20px;
}

body.auth-page .login-bd,
.lh-auth-form-wrap {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.lh-field {
  display: grid;
  gap: 8px;
}

.lh-field label {
  color: #334155;
  font-size: 14px;
  font-weight: 900;
}

body.auth-page .lh-field .txt {
  width: 100%;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 52px;
  box-sizing: border-box;
  padding: 0 15px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

body.auth-page .lh-field .txt:focus {
  border-color: rgba(59, 130, 246, .72);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .12);
}

.lh-auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body.auth-page .login-btn {
  margin-top: 8px;
}

body.auth-page .login-btn .btn {
  width: 100%;
  height: 56px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: var(--lh-auth-gradient);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 18px 40px rgba(139, 92, 246, .26), 0 8px 18px rgba(59, 130, 246, .18);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

body.auth-page .login-btn .btn:hover {
  transform: translateY(-1px);
  background: var(--lh-auth-gradient-hover);
  box-shadow: 0 22px 48px rgba(139, 92, 246, .32), 0 10px 20px rgba(59, 130, 246, .2);
}

body.auth-page #registerPanel {
  display: none;
}

.lh-auth-foot {
  margin-top: 24px;
  color: #66758f;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.lh-auth-foot a {
  color: #2563eb;
  font-weight: 900;
}

.lh-auth-support {
  z-index: 95;
}

body.auth-page .lanhai-support-float {
  display: inline-flex !important;
  z-index: 95;
}

@media (max-width: 1023px) {
  body.auth-page .mobile-menu-btn {
    display: flex !important;
  }

  body.auth-page .nav-links,
  body.auth-page .header-cta {
    display: none !important;
  }

  body.auth-page .header-nav.container {
    position: relative;
    width: min(calc(100vw - 32px), 1200px) !important;
  }

  body.auth-page .header-nav > .mobile-menu-btn {
    position: fixed !important;
    top: 16px !important;
    right: 16px !important;
    margin: 0 !important;
    z-index: 2;
  }

  .lh-auth-main {
    padding-top: 104px;
  }

  .lh-auth-panel {
    grid-template-columns: 1fr;
  }

  .lh-auth-side {
    min-height: auto;
    padding: 30px;
  }

  .lh-auth-side h2 {
    margin-top: 26px;
  }

  .lh-auth-contact {
    margin-top: 28px;
  }
}

@media (min-width: 1024px) {
  body.auth-page .header-nav > .mobile-menu-btn {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .lh-auth-main {
    width: 100vw !important;
    box-sizing: border-box;
    overflow: hidden;
    padding: 92px 12px 28px;
  }

  .lh-auth-panel {
    width: calc(100vw - 24px) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 24px) !important;
  }

  .lh-auth-side {
    display: none;
  }

  .lh-auth-form-wrap {
    max-width: 100%;
    overflow: hidden;
    padding: 28px 18px 24px;
  }

  .lh-auth-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .lh-auth-title-row h1 {
    font-size: 30px;
  }

  body.auth-page .auth-switch {
    width: 100% !important;
    max-width: 100% !important;
    margin: 26px 0 24px;
  }

  body.auth-page .auth-switch button,
  body.auth-page .lh-field,
  body.auth-page .lh-field .txt,
  body.auth-page .login-btn,
  body.auth-page .login-btn .btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
}
