:root {
  --auth-bg: #070909;
  --auth-surface: rgba(14, 20, 18, 0.86);
  --auth-surface-strong: rgba(19, 29, 25, 0.96);
  --auth-line: rgba(129, 152, 136, 0.22);
  --auth-line-strong: rgba(76, 204, 174, 0.42);
  --auth-text: #edf7f1;
  --auth-muted: #8ea79b;
  --auth-faint: #5f746b;
  --auth-up: #35d39f;
  --auth-down: #ff735f;
  --auth-warn: #d8aa55;
  --auth-focus: #59d9bd;
  --auth-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html,
body,
#LAY_app {
  min-height: 100%;
}

body.auth-shell {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--auth-text);
  background: var(--auth-bg);
  font-family:
    Inter,
    "Segoe UI",
    "Microsoft YaHei",
    Arial,
    sans-serif;
}

.layui-layout-body {
  overflow: auto;
}

#LAY-user-login,
#LAY-user-register,
.layadmin-user-display-show {
  display: block !important;
}

.market-login {
  position: relative;
  min-height: 100vh;
  padding: 48px 24px;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(40, 78, 65, 0.24), transparent 28%),
    linear-gradient(215deg, rgba(145, 105, 43, 0.14), transparent 34%),
    repeating-linear-gradient(90deg, rgba(132, 160, 143, 0.08) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(132, 160, 143, 0.06) 0 1px, transparent 1px 72px),
    linear-gradient(180deg, #111812 0%, #070909 72%);
}

.market-login::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, transparent 0%, rgba(84, 219, 186, 0.08) 48%, transparent 100%),
    repeating-linear-gradient(180deg, transparent 0 33px, rgba(216, 170, 85, 0.05) 34px, transparent 36px);
  opacity: 0.72;
}

.market-login::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  z-index: -2;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 8, 0.88));
}

.market-login__stage {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 88px;
  align-items: center;
}

.market-login__ambient {
  position: absolute;
  inset: -48px;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.market-login__trend-line {
  position: absolute;
  left: 4%;
  bottom: 19%;
  width: 58%;
  height: 220px;
  opacity: 0.7;
  background:
    linear-gradient(152deg, transparent 0 47%, rgba(53, 211, 159, 0.18) 47.4% 48.8%, transparent 49.2%),
    linear-gradient(28deg, transparent 0 44%, rgba(216, 170, 85, 0.2) 44.4% 45.7%, transparent 46.1%);
}

.market-login__trend-line::after {
  content: "";
  position: absolute;
  left: 9%;
  right: 12%;
  top: 42%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(53, 211, 159, 0.82), transparent);
  transform: rotate(-10deg);
  transform-origin: center;
}

.market-login__candle {
  position: absolute;
  width: 10px;
  border: 1px solid rgba(53, 211, 159, 0.76);
  background: rgba(53, 211, 159, 0.16);
  box-shadow: 0 0 22px rgba(53, 211, 159, 0.1);
}

.market-login__candle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -20px;
  bottom: -20px;
  width: 1px;
  background: currentColor;
  transform: translateX(-50%);
  opacity: 0.72;
}

.market-login__candle--one {
  left: 15%;
  top: 20%;
  height: 54px;
  color: var(--auth-up);
}

.market-login__candle--two {
  left: 24%;
  top: 31%;
  height: 88px;
  color: var(--auth-down);
  border-color: rgba(255, 115, 95, 0.78);
  background: rgba(255, 115, 95, 0.14);
}

.market-login__candle--three {
  left: 42%;
  top: 18%;
  height: 72px;
  color: var(--auth-up);
}

.market-login__candle--four {
  right: 38%;
  bottom: 23%;
  height: 96px;
  color: var(--auth-warn);
  border-color: rgba(216, 170, 85, 0.78);
  background: rgba(216, 170, 85, 0.14);
}

.market-login__brief {
  display: grid;
  gap: 34px;
  align-content: center;
  max-width: 560px;
}

.market-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.market-brand__mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(89, 217, 189, 0.5);
  border-radius: 8px;
  color: #bff7e7;
  background:
    linear-gradient(135deg, rgba(89, 217, 189, 0.22), rgba(216, 170, 85, 0.08)),
    rgba(8, 13, 12, 0.72);
  font-size: 18px;
  font-weight: 800;
}

.market-brand__eyebrow,
.auth-card__kicker {
  margin: 0 0 8px;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0;
}

.market-brand h1 {
  margin: 0;
  color: var(--auth-text);
  font-size: 44px;
  line-height: 1.04;
  font-weight: 760;
}

.market-snapshot {
  width: min(420px, 100%);
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(8, 12, 11, 0.48);
  backdrop-filter: blur(12px);
}

.market-snapshot__row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 1fr auto 72px;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(129, 152, 136, 0.14);
  color: var(--auth-muted);
  font-size: 14px;
}

.market-snapshot__row:last-child {
  border-bottom: 0;
}

.market-snapshot__row strong {
  color: var(--auth-text);
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 16px;
  font-weight: 700;
}

.market-snapshot__row em {
  justify-self: end;
  font-style: normal;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
}

.is-up {
  color: var(--auth-up);
}

.is-down {
  color: var(--auth-down);
}

.is-neutral {
  color: var(--auth-warn);
}

.market-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.market-status span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(129, 152, 136, 0.22);
  border-radius: 6px;
  padding: 0 12px;
  color: #bed3c9;
  background: rgba(10, 16, 14, 0.52);
  font-size: 13px;
}

.auth-card {
  width: 420px;
  margin: 0;
  border: 1px solid rgba(129, 152, 136, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(24, 34, 30, 0.94), rgba(11, 17, 15, 0.94)),
    var(--auth-surface);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(16px);
}

.auth-card--register {
  width: 440px;
}

.layadmin-user-login-box {
  padding: 0;
}

.auth-card__header {
  padding: 30px 32px 18px;
  text-align: left;
}

.auth-card__header h2 {
  margin: 0;
  color: var(--auth-text);
  font-size: 28px;
  line-height: 1.22;
  font-weight: 740;
}

.auth-card__header p {
  margin: 10px 0 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.6;
}

.auth-card__header .auth-card__kicker {
  margin: 0 0 10px;
  color: #92e7d2;
}

.auth-card__form {
  margin: 0;
}

.layadmin-user-login-body {
  padding: 0 32px 30px;
}

.layadmin-user-login-body .layui-form-item {
  position: relative;
  margin: 0 0 18px;
}

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

.auth-label {
  color: #bed1c8;
  font-size: 13px;
  line-height: 1.35;
}

.auth-input-wrap {
  position: relative;
}

.layadmin-user-login-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 1;
  width: 20px;
  height: 20px;
  line-height: 20px;
  transform: translateY(-50%);
  color: var(--auth-faint);
  text-align: center;
  pointer-events: none;
}

.layadmin-user-login-body .layui-form-item .layui-input,
.auth-input-wrap .layui-input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 44px;
  border: 1px solid rgba(129, 152, 136, 0.24);
  border-radius: 6px;
  color: var(--auth-text);
  background: rgba(5, 9, 8, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  font-size: 15px;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.auth-input-wrap .layui-input::placeholder {
  color: rgba(142, 167, 155, 0.66);
}

.auth-input-wrap .layui-input:hover {
  border-color: rgba(129, 152, 136, 0.42);
  background: rgba(7, 12, 11, 0.78);
}

.auth-input-wrap .layui-input:focus {
  border-color: var(--auth-focus);
  background: rgba(6, 12, 11, 0.92);
  box-shadow:
    0 0 0 3px rgba(89, 217, 189, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-input-wrap:focus-within .layadmin-user-login-icon {
  color: var(--auth-focus);
}

.auth-captcha {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 10px;
  align-items: stretch;
}

.auth-captcha__button {
  width: 180px;
  height: 58px;
  padding: 0;
  border: 1px solid rgba(129, 152, 136, 0.28);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(237, 247, 241, 0.92);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.auth-captcha__button:hover {
  border-color: var(--auth-line-strong);
  box-shadow: 0 0 0 3px rgba(89, 217, 189, 0.1);
}

.auth-captcha__button:active {
  transform: translateY(1px);
}

.auth-captcha__button:focus-visible {
  outline: 2px solid var(--auth-focus);
  outline-offset: 3px;
}

.auth-captcha__button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}

.auth-actions {
  padding-top: 6px;
}

.auth-submit,
.layui-btn.auth-submit {
  height: 50px;
  border: 0;
  border-radius: 6px;
  color: #03110d;
  background: linear-gradient(180deg, #68e5c8, #31c69b);
  box-shadow:
    0 14px 28px rgba(49, 198, 155, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-size: 15px;
  font-weight: 750;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.auth-submit:hover,
.layui-btn.auth-submit:hover {
  color: #03110d;
  filter: brightness(1.04);
  box-shadow:
    0 18px 34px rgba(49, 198, 155, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.auth-submit:active,
.layui-btn.auth-submit:active {
  transform: translateY(1px);
}

.auth-submit:focus-visible,
.layui-btn.auth-submit:focus-visible {
  outline: 2px solid #bff7e7;
  outline-offset: 3px;
}

.auth-submit:disabled,
.layui-btn.auth-submit:disabled,
.auth-submit.is-loading,
.layui-btn.auth-submit.is-loading {
  cursor: wait;
  opacity: 0.72;
  filter: saturate(0.8);
}

.layadmin-user-login-other,
.auth-meta {
  min-height: 24px;
  padding: 2px 0 0;
  margin-bottom: 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.4;
}

.layadmin-user-login-other > *,
.auth-meta > * {
  display: block;
  margin: 0;
  font-size: 14px;
}

#login-error,
#register-error {
  min-width: 0;
  flex: 1;
  color: #ff9a88;
  line-height: 1.45;
}

.auth-meta a {
  flex: 0 0 auto;
  color: #92e7d2;
  text-decoration: none;
}

.auth-meta a:hover {
  color: #c6fff0;
  text-decoration: underline;
}

.auth-meta a:focus-visible {
  outline: 2px solid var(--auth-focus);
  outline-offset: 4px;
  border-radius: 4px;
}

.layadmin-user-login-codeimg {
  max-height: 48px;
  width: 100%;
  cursor: pointer;
  box-sizing: border-box;
}

.layadmin-user-login-footer,
.ladmin-user-login-theme {
  display: none;
}

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

@media screen and (max-width: 960px) {
  .market-login {
    padding: 34px 18px;
  }

  .market-login__stage {
    width: min(540px, 100%);
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .market-login__brief {
    max-width: none;
    gap: 22px;
  }

  .market-brand h1 {
    font-size: 34px;
  }

  .market-snapshot {
    width: 100%;
  }

  .market-login__ambient {
    inset: -120px -48px;
    opacity: 0.45;
  }

  .auth-card,
  .auth-card--register {
    width: 100%;
  }
}

@media screen and (max-width: 560px) {
  .market-login {
    min-height: 100svh;
    padding: 22px 14px;
    place-items: start center;
  }

  .market-login__stage {
    gap: 18px;
  }

  .market-login__brief {
    gap: 16px;
  }

  .market-brand {
    gap: 12px;
  }

  .market-brand__mark {
    width: 46px;
    height: 46px;
    font-size: 15px;
  }

  .market-brand h1 {
    font-size: 28px;
    line-height: 1.12;
  }

  .market-snapshot__row {
    grid-template-columns: minmax(0, 1fr) auto 64px;
    min-height: 46px;
    gap: 10px;
    padding: 0 12px;
    font-size: 12px;
  }

  .market-snapshot__row strong {
    font-size: 13px;
  }

  .market-snapshot__row em {
    font-size: 12px;
  }

  .market-status {
    gap: 8px;
  }

  .market-status span {
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
  }

  .auth-card__header {
    padding: 24px 20px 16px;
  }

  .auth-card__header h2 {
    font-size: 24px;
  }

  .auth-card__header p {
    font-size: 13px;
  }

  .layadmin-user-login-body {
    padding: 0 20px 24px;
  }

  .layadmin-user-login-body .layui-form-item {
    margin-bottom: 16px;
  }

  .layadmin-user-login-body .layui-form-item .layui-input,
  .auth-input-wrap .layui-input {
    height: 46px;
    font-size: 14px;
  }

  .auth-captcha {
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 8px;
  }

  .auth-captcha__button {
    width: 150px;
    height: 52px;
  }

  .auth-submit,
  .layui-btn.auth-submit {
    height: 48px;
  }

  .auth-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
