body.root-auth-home-active {
  margin: 0 !important;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(113, 173, 255, 0.22), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(255, 196, 122, 0.18), transparent 24%),
    linear-gradient(135deg, #f6fbff 0%, #eef5ff 48%, #fff4e7 100%) !important;
}

body.root-auth-home-active > :not(#root-auth-app) {
  display: none !important;
}

#root-auth-app,
#root-auth-app * {
  box-sizing: border-box;
}

#root-auth-app {
  min-height: 100vh;
  position: relative;
  z-index: 1;
  color: #173056;
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

#root-auth-app a {
  color: inherit;
  text-decoration: none;
}

#root-auth-app button,
#root-auth-app input {
  font: inherit;
}

.root-auth-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.root-auth-loading-card {
  width: min(460px, calc(100vw - 40px));
  padding: 28px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(190, 210, 242, 0.78);
  box-shadow: 0 26px 58px rgba(64, 112, 189, 0.14);
  text-align: center;
}

.root-auth-loading-card strong {
  display: block;
  font-size: 24px;
  margin-bottom: 12px;
  color: #113471;
}

.root-auth-loading-card p {
  margin: 0;
  color: #61789c;
}

.root-auth-shell {
  min-height: 100vh;
  padding: 92px 28px 110px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.root-auth-layout {
  width: min(1280px, 100%);
  position: relative;
  min-height: 640px;
}

.root-auth-panel,
.root-auth-notice,
.root-auth-fab,
.root-auth-support {
  backdrop-filter: blur(18px);
}

.root-auth-panel {
  position: relative;
  width: min(432px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 32px 38px 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(197, 215, 245, 0.92);
  box-shadow: 0 26px 60px rgba(53, 95, 173, 0.14);
}

.root-auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
}

.root-auth-brand img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.root-auth-brand-copy strong {
  display: block;
  font-size: 32px;
  line-height: 1.1;
  color: #112e63;
  letter-spacing: 0.02em;
}

.root-auth-brand-copy span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #6f86a7;
}

.root-auth-domain {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  background: #f7f9fc;
  color: #8696ad;
  font-size: 14px;
  margin-bottom: 20px;
}

.root-auth-domain a {
  color: #2c66c8;
  font-weight: 700;
}

.root-auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.root-auth-head h1 {
  margin: 0;
  font-size: 28px;
  color: #102f63;
}

.root-auth-switch {
  border: 1px solid #bfcef0;
  background: #ffffff;
  color: #2c66c8;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
}

.root-auth-subtitle {
  margin: 0 0 18px;
  color: #7184a0;
  font-size: 14px;
}

.root-auth-session {
  display: none;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef5ff;
  border: 1px solid #cfe0ff;
  color: #22497e;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.root-auth-session.is-visible {
  display: flex;
}

.root-auth-session strong {
  display: block;
  font-size: 15px;
}

.root-auth-session span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #6480ab;
}

.root-auth-logout {
  border: 0;
  background: transparent;
  color: #2c66c8;
  font-weight: 700;
  cursor: pointer;
}

.root-auth-form {
  display: grid;
  gap: 16px;
}

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

.root-auth-field span {
  color: #70829c;
  font-size: 14px;
}

.root-auth-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #ccd9ef;
  background: #ffffff;
  color: #173056;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.root-auth-field input:focus {
  border-color: #6f9df2;
  box-shadow: 0 0 0 4px rgba(42, 109, 242, 0.12);
}

.root-auth-inline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.root-auth-inline-grid .root-auth-send-code {
  height: 48px;
}

.root-auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #7a8ca8;
  font-size: 14px;
}

.root-auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.root-auth-check input {
  width: 16px;
  height: 16px;
}

.root-auth-meta a {
  color: #5b78a8;
}

.root-auth-actions {
  display: grid;
  gap: 12px;
}

.root-auth-btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.root-auth-btn:hover {
  transform: translateY(-1px);
}

.root-auth-btn:disabled {
  opacity: 0.68;
  cursor: not-allowed;
  transform: none;
}

.root-auth-btn-primary {
  background: linear-gradient(180deg, #3579d3 0%, #2869be 100%);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(40, 105, 190, 0.18);
}

.root-auth-btn-secondary {
  background: linear-gradient(180deg, #2f75cd 0%, #255da7 100%);
  color: #ffffff;
}

.root-auth-btn-light {
  background: #ffffff;
  border: 1px solid #c7d5ee;
  color: #2c66c8;
}

.root-auth-helper {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f7f9fc;
  color: #7a8ea9;
  font-size: 13px;
  line-height: 1.65;
}

.root-auth-message {
  min-height: 46px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: #f6f8fb;
  color: #61799e;
  font-size: 14px;
  line-height: 1.6;
}

.root-auth-message.is-success {
  background: #edf9f1;
  border-color: #cfead7;
  color: #23673a;
}

.root-auth-message.is-error {
  background: #fff0ef;
  border-color: #f6d2ce;
  color: #a54237;
}

.root-auth-message.is-info {
  background: #f4f8ff;
  border-color: #d7e6ff;
  color: #40679e;
}

.root-auth-notice {
  position: absolute;
  right: 10px;
  top: 255px;
  width: 320px;
  padding: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 121, 118, 0.14);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 22px 42px rgba(61, 92, 153, 0.14);
}

.root-auth-notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(180deg, #ff6f6d 0%, #ff5e66 100%);
  color: #ffffff;
  font-weight: 700;
}

.root-auth-notice-head button {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  cursor: pointer;
}

.root-auth-notice-body {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.root-auth-notice-item {
  display: grid;
  gap: 6px;
}

.root-auth-notice-item strong {
  color: #e65455;
  font-size: 16px;
}

.root-auth-notice-item p {
  margin: 0;
  color: #6a7e99;
  line-height: 1.6;
  font-size: 14px;
}

.root-auth-notice-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #dd2e34 0%, #c62028 100%);
  color: #ffffff;
  font-weight: 700;
}

.root-auth-notice-mini {
  color: #8a99ad;
  font-size: 13px;
}

.root-auth-fab,
.root-auth-support {
  position: fixed;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  box-shadow: 0 16px 30px rgba(58, 101, 177, 0.16);
  z-index: 5;
}

.root-auth-fab {
  left: 18px;
  width: 52px;
  height: 52px;
  background: linear-gradient(180deg, #72a8ff 0%, #5d8cf0 100%);
  color: #ffffff;
  font-size: 24px;
}

.root-auth-support {
  right: 18px;
  gap: 8px;
  padding: 12px 16px;
  background: #ffffff;
  color: #1b4f92;
  border: 1px solid #cfddf5;
  font-weight: 700;
}

.root-auth-support-badge {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #24ba86 0%, #14a36f 100%);
  color: #ffffff;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .root-auth-layout {
    max-width: 520px;
    min-height: auto;
  }

  .root-auth-panel {
    width: 100%;
  }

  .root-auth-notice {
    position: static;
    width: auto;
    margin: 18px auto 0;
  }
}

@media (max-width: 640px) {
  .root-auth-shell {
    padding: 20px 14px 94px;
  }

  .root-auth-panel {
    padding: 24px 18px 22px;
    border-radius: 24px;
  }

  .root-auth-brand {
    flex-direction: column;
    text-align: center;
  }

  .root-auth-brand img {
    width: 74px;
    height: 74px;
  }

  .root-auth-brand-copy strong {
    font-size: 28px;
  }

  .root-auth-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .root-auth-inline-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .root-auth-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .root-auth-support {
    right: 14px;
    bottom: 14px;
    padding: 11px 14px;
  }

  .root-auth-fab {
    left: 14px;
    bottom: 14px;
  }
}