:root {
  --bg-dark: #5f4427;
  --bg-mid: #826241;
  --bg-soft: #b9986d;
  --gold-0: #fff7ea;
  --gold-1: #f4dfb6;
  --gold-2: #dec088;
  --gold-3: #b88947;
  --gold-4: #6b4520;
  --panel-line: rgba(255, 238, 205, 0.58);
  --panel-glass: rgba(255, 248, 235, 0.14);
  --panel-glass-strong: rgba(255, 249, 238, 0.24);
  --field-fill: rgba(255, 251, 243, 0.08);
  --field-line: rgba(255, 238, 208, 0.42);
  --text-main: #fff8ea;
  --text-soft: rgba(255, 246, 230, 0.82);
  --text-muted: rgba(255, 241, 219, 0.68);
  --font-ui: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-title: "STSong", "Songti SC", "Noto Serif SC", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
}

html {
  background: #8f704c;
}

body {
  position: relative;
  overflow: hidden;
  font-family: var(--font-ui);
  color: var(--text-main);
  background: #8f704c url("./assets/new/images/login-bg.png?v=20260423-1") center center / cover no-repeat;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background: linear-gradient(90deg, rgba(82, 56, 28, 0.1), rgba(255, 249, 238, 0) 34%, rgba(255, 249, 238, 0) 66%, rgba(82, 56, 28, 0.08));
  z-index: 0;
}

body::after {
  z-index: 0;
  background: linear-gradient(180deg, rgba(32, 20, 8, 0.08), rgba(32, 20, 8, 0) 20%, rgba(32, 20, 8, 0) 82%, rgba(32, 20, 8, 0.08));
}

.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.74fr) minmax(520px, 690px);
  align-items: center;
  gap: clamp(32px, 4.6vw, 96px);
  min-height: 100vh;
  padding: clamp(24px, 2.5vw, 48px) clamp(28px, 4vw, 82px);
  z-index: 1;
}

.login-shell__grain {
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 0;
}

.brand-stage {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - clamp(48px, 5vw, 96px));
  padding: 0;
  overflow: hidden;
}

.brand-stage::before,
.brand-stage::after {
  display: none;
}

.brand-stage__copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.brand-stage__title {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(52px, 4vw, 92px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--gold-0);
  text-shadow:
    0 0 18px rgba(255, 246, 223, 0.28),
    0 12px 30px rgba(76, 52, 26, 0.18);
}

.brand-stage__subtitle {
  margin-top: clamp(16px, 2vw, 28px);
  padding-left: clamp(96px, 10vw, 218px);
  font-family: var(--font-title);
  font-size: clamp(18px, 1.55vw, 34px);
  line-height: 1.2;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: rgba(255, 248, 233, 0.92);
  text-shadow: 0 0 14px rgba(255, 247, 227, 0.22);
}

.brand-stage__halo {
  display: none;
}

.brand-stage__floor {
  display: none;
}

.brand-stage__bonsai {
  display: none;
}

.login-panel {
  position: relative;
  z-index: 1;
  min-height: min(84vh, 940px);
  padding: 152px clamp(34px, 2.8vw, 56px) 54px;
  border-radius: 38px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 249, 237, 0.28), rgba(223, 196, 154, 0.1)),
    linear-gradient(135deg, rgba(255, 248, 236, 0.16), rgba(122, 88, 50, 0.1));
  border: 1px solid var(--panel-line);
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 232, 0.18),
    inset 0 20px 54px rgba(255, 251, 244, 0.12),
    0 32px 88px rgba(74, 48, 22, 0.24),
    0 0 40px rgba(255, 230, 177, 0.1);
  backdrop-filter: blur(24px) saturate(120%);
}

.login-panel::before,
.login-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.login-panel::before {
  inset: 14px;
  border-radius: 28px;
  border: 1px solid rgba(255, 248, 232, 0.14);
}

.login-panel::after {
  left: 10%;
  right: 10%;
  bottom: 4%;
  height: 16%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 247, 229, 0.18), transparent 66%);
  filter: blur(10px);
}

.login-panel__header {
  position: absolute;
  inset: 0 0 auto;
  height: 142px;
  padding: 12px;
}

.login-panel__header::before {
  content: "";
  position: absolute;
  inset: 10px 10px auto;
  height: 112px;
  border-radius: 34px 34px 22px 22px;
  border: 1px solid rgba(255, 239, 208, 0.44);
  background:
    linear-gradient(180deg, rgba(255, 249, 238, 0.12), rgba(185, 146, 83, 0.16)),
    linear-gradient(90deg, rgba(255, 247, 228, 0.1), rgba(145, 105, 52, 0.12));
}

.login-panel__tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(72%, 364px);
  height: 104px;
  border-radius: 28px 28px 42px 28px;
  background:
    linear-gradient(90deg, rgba(202, 164, 95, 0.58), rgba(255, 251, 242, 0.96) 56%, rgba(208, 171, 103, 0.62));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.68),
    0 0 28px rgba(255, 234, 191, 0.24);
  color: #54371b;
  font-size: clamp(24px, 1.8vw, 42px);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.login-panel__ornament {
  position: absolute;
  right: 16%;
  top: 54%;
  width: 126px;
  height: 160px;
  opacity: 0.09;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 247, 228, 0.75), transparent 12%),
    radial-gradient(circle at 40% 44%, rgba(255, 247, 228, 0.52), transparent 22%),
    radial-gradient(circle at 62% 48%, rgba(255, 247, 228, 0.42), transparent 20%),
    linear-gradient(180deg, transparent 0 56%, rgba(255, 247, 228, 0.52) 56% 70%, transparent 70%);
  filter: blur(0.2px);
}

.login-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 34px;
  margin-top: 26px;
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 96px;
  padding: 0 34px 0 94px;
  border-radius: 999px;
  border: 1px solid var(--field-line);
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.12), rgba(255, 248, 238, 0.04)),
    var(--field-fill);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 242, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.field:focus-within {
  border-color: rgba(255, 245, 222, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(255, 251, 243, 0.4),
    0 0 0 4px rgba(255, 240, 204, 0.08),
    0 0 34px rgba(255, 235, 193, 0.16);
}

.field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: clamp(20px, 1.5vw, 24px);
  color: var(--text-main);
}

.field input::placeholder {
  color: rgba(255, 242, 218, 0.74);
}

.field__icon {
  position: absolute;
  left: 34px;
  width: 36px;
  height: 36px;
  opacity: 0.95;
}

.field__icon::before,
.field__icon::after {
  content: "";
  position: absolute;
}

.field__icon--user::before {
  left: 9px;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 250, 238, 1), rgba(228, 199, 145, 0.96));
}

.field__icon--user::after {
  left: 4px;
  bottom: 1px;
  width: 28px;
  height: 16px;
  border-radius: 16px 16px 10px 10px;
  background: linear-gradient(180deg, rgba(255, 250, 238, 1), rgba(228, 199, 145, 0.96));
}

.field__icon--lock::before {
  left: 8px;
  top: 0;
  width: 18px;
  height: 16px;
  border: 3px solid rgba(255, 249, 236, 0.96);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}

.field__icon--lock::after {
  left: 5px;
  bottom: 1px;
  width: 24px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 250, 238, 1), rgba(228, 199, 145, 0.96));
}

.login-form__hint-row {
  display: flex;
  justify-content: flex-end;
  padding: 0 10px;
  margin-top: -10px;
}

.login-form__forgot {
  font-size: clamp(18px, 1.2vw, 24px);
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.login-submit {
  min-height: 102px;
  margin-top: 20px;
  border: 0;
  border-radius: 999px;
  font-size: clamp(30px, 2.1vw, 48px);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-4);
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 252, 0.98), rgba(255, 241, 206, 0.98) 48%, rgba(228, 193, 125, 0.98) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.84),
    0 0 0 2px rgba(255, 235, 193, 0.32),
    0 0 44px rgba(255, 226, 168, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.login-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.84),
    0 0 0 2px rgba(255, 235, 193, 0.34),
    0 0 54px rgba(255, 229, 176, 0.34);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit[disabled] {
  cursor: wait;
  opacity: 0.94;
}

.login-message {
  min-height: 26px;
  margin: 0;
  font-size: 15px;
  text-align: center;
  color: var(--text-soft);
}

.login-message[data-state="error"] {
  color: #fff1d5;
}

.login-message[data-state="success"] {
  color: #fff8e6;
}

@keyframes haloDrift {
  0%,
  100% {
    transform: translate3d(-1.5%, 0, 0) scale(0.98);
    opacity: 0.84;
  }
  50% {
    transform: translate3d(1.5%, 2%, 0) scale(1.03);
    opacity: 1;
  }
}

@media (max-width: 1480px) {
  .login-shell {
    grid-template-columns: minmax(0, 1.3fr) minmax(460px, 580px);
  }

  .brand-stage__subtitle {
    padding-left: clamp(48px, 6vw, 128px);
    white-space: normal;
  }
}

@media (max-width: 1180px) {
  body {
    overflow-y: auto;
  }

  .login-shell {
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: auto;
    padding: 22px;
  }

  .brand-stage {
    min-height: 46vh;
    padding: 58px 12px 110px;
  }

  .brand-stage__title,
  .brand-stage__subtitle {
    text-align: center;
  }

  .brand-stage__subtitle {
    padding-left: 0;
    white-space: normal;
  }

  .brand-stage__halo {
    left: 12%;
    width: 76%;
    height: 180px;
  }

  .brand-stage__bonsai--left {
    left: 2%;
    width: 180px;
    height: 150px;
  }

  .brand-stage__bonsai--center {
    left: auto;
    right: 10%;
    width: 92px;
    height: 82px;
  }

  .login-panel {
    min-height: auto;
    padding-bottom: 40px;
  }
}

@media (max-width: 640px) {
  .login-shell {
    padding: 18px 14px 24px;
  }

  .brand-stage {
    padding: 42px 0 94px;
  }

  .login-panel {
    min-height: auto;
    padding: 132px 18px 32px;
    border-radius: 30px;
  }

  .login-panel__header {
    height: 126px;
    padding: 10px;
  }

  .login-panel__header::before {
    height: 96px;
  }

  .login-panel__tab {
    width: min(82%, 300px);
    height: 88px;
    font-size: 24px;
  }

  .field {
    min-height: 80px;
    padding-left: 76px;
  }

  .field__icon {
    left: 24px;
    width: 30px;
    height: 30px;
  }

  .login-form {
    gap: 24px;
  }

  .login-submit {
    min-height: 86px;
    letter-spacing: 0.08em;
  }

  .login-panel__ornament {
    right: 10%;
    top: 50%;
    width: 96px;
    height: 122px;
  }
}
