@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Inter-Bold.woff2') format('woff2');
}

:root {
  --font-family: 'Inter', 'Microsoft YaHei', sans-serif;
  --lgnewui-login-primary: #111827;
  --lgnewui-login-primary-hover: #000000;
  --lgnewui-login-bg: #f8fafc;
  --lgnewui-login-surface: #ffffff;
  --lgnewui-login-text: #1e293b;
  --lgnewui-login-text-muted: #64748b;
  --lgnewui-login-input-bg: #f4f4f5;
  --lgnewui-login-input-focus: #ffffff;
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body.auth-page {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--lgnewui-login-text);
  background: var(--lgnewui-login-bg);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

.request-progress {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  background: #111827;
}

.is-fetching .request-progress {
  opacity: 1;
  animation: request-progress 1.4s ease-in-out infinite;
}

@keyframes request-progress {
  0% { transform: scaleX(.04); }
  55% { transform: scaleX(.72); }
  100% { transform: scaleX(.96); }
}

.lgnewui-login-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  opacity: 1;
  transform: scale(1);
  transition: opacity .3s ease, transform .3s cubic-bezier(.4, 0, .2, 1);
}

.page-exit .lgnewui-login-container {
  opacity: 0;
  transform: scale(.995);
}

.lgnewui-login-visual {
  position: relative;
  display: none;
  flex: 1;
  overflow: hidden;
  background-color: #f1f5f9;
}

@media (min-width: 1024px) {
  .lgnewui-login-visual {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px;
  }
}

@keyframes bg-breathing {
  0%, 100% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.05) translate(-1%, -1%); }
}

.lgnewui-login-visual-bg {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: bg-breathing 20s ease-in-out infinite;
  will-change: transform;
}

.lgnewui-login-visual-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .1) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, .05) 0%, transparent 50%),
    linear-gradient(135deg, rgba(15, 23, 42, .5) 0%, rgba(15, 23, 42, .9) 100%);
}

.lgnewui-login-particles {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  background: rgba(255, 255, 255, .4);
  filter: blur(1px);
  animation: float-up var(--duration) linear infinite;
}

@keyframes float-up {
  0% {
    opacity: 0;
    transform: translateY(102vh) scale(0);
  }
  50% { opacity: .6; }
  100% {
    opacity: 0;
    transform: translateY(-2vh) scale(1);
  }
}

.lgnewui-login-brand,
.lgnewui-login-quote {
  position: relative;
  z-index: 3;
  color: #fff;
}

.lgnewui-login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lgnewui-login-brand-icon {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  font-size: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lgnewui-login-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lgnewui-login-brand-title {
  color: rgba(255, 255, 255, .95);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 2px;
}

.lgnewui-login-brand-subtitle {
  margin-top: 2px;
  color: rgba(255, 255, 255, .6);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 4px;
}

.lgnewui-login-quote {
  margin-bottom: 20px;
}

.lgnewui-login-quote h2 {
  margin-bottom: 16px;
  color: rgba(255, 255, 255, .95);
  font-size: 38px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 1px;
}

.lgnewui-login-quote p {
  max-width: 420px;
  color: rgba(255, 255, 255, .85);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: .5px;
  opacity: .85;
}

.lgnewui-login-form-wrapper {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 100%;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--lgnewui-login-surface);
}

@media (min-width: 1024px) {
  .lgnewui-login-form-wrapper {
    max-width: 580px;
    padding: 80px;
  }
}

.lgnewui-login-form-content {
  width: 100%;
  max-width: 400px;
}

.login-maintenance-notice {
  display: flex;
  align-items: flex-start;
  margin: -28px 0 26px;
  border: 1px solid #efd9cd;
  border-radius: 8px;
  padding: 12px 13px;
  gap: 10px;
  color: #9a5134;
  background: #fff6f1;
}
.login-maintenance-notice > svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; }
.login-maintenance-notice > span { display: grid; min-width: 0; gap: 3px; }
.login-maintenance-notice strong { font-size: 11px; letter-spacing: 0; }
.login-maintenance-notice small { overflow: hidden; color: #a77c69; font-size: 9px; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.auth-tab:disabled { color: #a7afb8; cursor: not-allowed; text-decoration: none; }

.lgnewui-login-header {
  margin-bottom: 48px;
}

.lgnewui-login-title {
  margin-bottom: 12px;
  color: var(--lgnewui-login-primary);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0;
}

.lgnewui-login-subtitle {
  color: var(--lgnewui-login-text-muted);
  font-size: 15px;
  line-height: 1.5;
}

.lgnewui-login-group {
  position: relative;
  margin-bottom: 24px;
}

.lgnewui-login-label {
  display: block;
  margin-bottom: 8px;
  color: var(--lgnewui-login-primary);
  font-size: 14px;
  font-weight: 600;
}

.lgnewui-login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lgnewui-login-input {
  width: 100%;
  height: 52px;
  border: 1px solid transparent;
  border-radius: 12px;
  outline: none;
  padding: 0 46px;
  color: var(--lgnewui-login-text);
  background: var(--lgnewui-login-input-bg);
  font-family: inherit;
  font-size: 15px;
  transition: background .2s cubic-bezier(.4, 0, .2, 1), border-color .2s cubic-bezier(.4, 0, .2, 1);
}

.lgnewui-login-input:focus {
  border-color: var(--lgnewui-login-primary);
  background: var(--lgnewui-login-input-focus);
  box-shadow: none;
}

.lgnewui-login-input:-webkit-autofill,
.lgnewui-login-input:-webkit-autofill:hover,
.lgnewui-login-input:-webkit-autofill:focus,
.lgnewui-login-input:-webkit-autofill:active {
  transition: color 99999s ease-out, background-color 99999s ease-out;
  transition-delay: 99999s;
}

.lgnewui-login-input:-webkit-autofill {
  box-shadow: 0 0 0 1000px var(--lgnewui-login-input-bg) inset !important;
  -webkit-text-fill-color: var(--lgnewui-login-text) !important;
}

.lgnewui-login-input:focus:-webkit-autofill {
  box-shadow: 0 0 0 1000px var(--lgnewui-login-input-focus) inset !important;
}

.lgnewui-login-icon {
  position: absolute;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  pointer-events: none;
  transition: color .2s ease;
}

.lgnewui-login-input:focus ~ .lgnewui-login-icon,
.lgnewui-login-input:not(:placeholder-shown) ~ .lgnewui-login-icon {
  color: var(--lgnewui-login-primary);
}

.lgnewui-login-icon svg {
  width: 18px;
  height: 18px;
}

.lgnewui-login-pwd-toggle {
  position: absolute;
  right: 12px;
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}

.lgnewui-login-pwd-toggle:hover {
  color: var(--lgnewui-login-text);
  background: rgba(0, 0, 0, .05);
}

.lgnewui-login-pwd-toggle svg {
  width: 18px;
  height: 18px;
}

.lgnewui-login-pwd-toggle .pwd-icon-eye-off,
.lgnewui-login-pwd-toggle.is-visible .pwd-icon-eye {
  display: none;
}

.lgnewui-login-pwd-toggle.is-visible .pwd-icon-eye-off {
  display: block;
}

.lgnewui-login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.lgnewui-login-checkbox-wrap {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.lgnewui-login-checkbox-wrap input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.lgnewui-login-checkbox {
  display: flex;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  color: transparent;
  background: #fff;
  transition: color .2s cubic-bezier(.4, 0, .2, 1), background .2s cubic-bezier(.4, 0, .2, 1), border-color .2s cubic-bezier(.4, 0, .2, 1);
}

.lgnewui-login-checkbox svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.lgnewui-login-checkbox-wrap input:checked + .lgnewui-login-checkbox {
  border-color: var(--lgnewui-login-primary);
  color: #fff;
  background: var(--lgnewui-login-primary);
}

.lgnewui-login-checkbox-text {
  color: var(--lgnewui-login-text-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
  transition: color .2s ease;
}

.lgnewui-login-checkbox-wrap input:checked ~ .lgnewui-login-checkbox-text {
  color: var(--lgnewui-login-text);
}

.auth-tab {
  border: 0;
  padding: 0;
  color: var(--lgnewui-login-primary);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease;
}

.auth-tab:hover {
  color: #4b5563;
  text-decoration: underline;
}

.lgnewui-login-btn {
  display: flex;
  width: 100%;
  height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  outline: none;
  color: #fff;
  background: var(--lgnewui-login-primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s cubic-bezier(.4, 0, .2, 1), transform .2s cubic-bezier(.4, 0, .2, 1), box-shadow .2s cubic-bezier(.4, 0, .2, 1), opacity .2s ease;
}

.lgnewui-login-btn:hover,
.lgnewui-login-btn:focus-visible {
  background: var(--lgnewui-login-primary-hover);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
  transform: translateY(-1px);
}

.lgnewui-login-btn:active {
  transform: translateY(0);
}

.lgnewui-login-btn:disabled {
  cursor: wait;
  opacity: .78;
}

.auth-page .lgnewui-login-btn.is-loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.lgnewui-login-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.auth-message {
  position: fixed;
  z-index: 20;
  top: 24px;
  right: 24px;
  max-width: min(360px, calc(100vw - 48px));
  border-radius: 10px;
  padding: 11px 15px;
  color: #fff;
  background: rgba(220, 38, 38, .92);
  box-shadow: 0 12px 36px rgba(15, 23, 42, .14);
  font-size: 12px;
  line-height: 1.5;
  backdrop-filter: blur(12px);
}

.auth-message:empty {
  display: none;
}

.auth-message.success {
  background: rgba(5, 150, 105, .92);
}

.lgnewui-login-footer {
  margin-top: 60px;
  padding-top: 24px;
  text-align: center;
}

.lgnewui-login-copyright {
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  color: #94a3b8;
  font-size: 12px;
  text-decoration: none;
  transition: color .3s ease;
}

.lgnewui-login-copyright:hover {
  color: var(--lgnewui-login-text);
}

.lgnewui-login-copyright::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}

.lgnewui-login-copyright:hover::after {
  transform: scaleX(1);
}

.register-form .lgnewui-login-header {
  margin-bottom: 34px;
}

.register-form .lgnewui-login-group {
  margin-bottom: 18px;
}

.register-form .lgnewui-login-btn {
  margin-top: 6px;
}

.register-form-note {
  margin-top: 14px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.register-back {
  margin-top: 20px;
  text-align: center;
}

@keyframes lgnewuiLoginFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lgnewuiLoginFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.stagger-item {
  opacity: 0;
  animation: lgnewuiLoginFadeIn .6s cubic-bezier(.2, .8, .2, 1) forwards;
}

.stagger-1 { animation-delay: .1s; }
.stagger-2 { animation-delay: .2s; }
.stagger-3 { animation-delay: .3s; }
.stagger-4 { animation-delay: .4s; }
.stagger-5 { animation-delay: .5s; }
.stagger-6 { animation-delay: .6s; }
.stagger-7 { animation-delay: .7s; }
.stagger-8 { animation-delay: .8s; }

.auth-form.is-leaving {
  animation: lgnewuiLoginFadeOut .22s cubic-bezier(.4, 0, 1, 1) forwards;
  pointer-events: none;
}

.auth-form.is-entering {
  animation: lgnewuiLoginFadeIn .35s cubic-bezier(.2, .8, .2, 1) forwards;
}

@media (max-width: 480px) {
  .lgnewui-login-form-wrapper {
    padding-right: 24px;
    padding-left: 24px;
  }

  .lgnewui-login-title {
    font-size: 30px;
  }

  .lgnewui-login-options {
    gap: 12px;
  }

  .lgnewui-login-checkbox-text,
  .auth-tab {
    font-size: 13px;
  }
}

@media (max-height: 700px) {
  .lgnewui-login-form-wrapper {
    align-items: flex-start;
    overflow-y: auto;
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .lgnewui-login-header {
    margin-bottom: 32px;
  }

  .lgnewui-login-footer {
    margin-top: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
