:root {
  color-scheme: dark;
  --page-bg: #030814;
  --surface: #071323;
  --surface-subtle: #0b192c;
  --surface-muted: #102039;
  --border: #223550;
  --border-strong: #36577d;
  --text: #f4f8ff;
  --text-secondary: #bac7da;
  --text-muted: #7889a4;
  --primary: #22d3ee;
  --primary-hover: #67e8f9;
  --primary-soft: rgba(34, 211, 238, 0.12);
  --primary-gradient: linear-gradient(
    100deg,
    #b22cff 0%,
    #4f6fff 48%,
    #20d8f5 100%
  );
  --danger: #ff879c;
  --danger-soft: rgba(126, 28, 57, 0.24);
  --success: #57e3b0;
  --success-soft: rgba(23, 126, 91, 0.2);
  --radius-card: 12px;
  --radius-control: 8px;
  --control-height: 40px;
  --focus-ring: 0 0 0 3px rgba(34, 211, 238, 0.16);
  --shadow-card:
    0 22px 60px rgba(0, 0, 0, 0.34), 0 0 36px rgba(34, 211, 238, 0.06);
  --shadow-dialog: 0 28px 72px rgba(0, 0, 0, 0.52);
  font-family:
    Inter,
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  min-width: 320px;
  background: var(--page-bg);
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#login-app {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.page-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(
      ellipse at 12% 22%,
      rgba(177, 44, 255, 0.28),
      transparent 38%
    ),
    radial-gradient(
      ellipse at 88% 78%,
      rgba(32, 216, 245, 0.14),
      transparent 38%
    ),
    linear-gradient(115deg, #110622 0%, #080b1e 38%, #03101d 68%, #03141d 100%);
}

.login-page {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 1fr);
  width: 100%;
  height: 100dvh;
}

.brand-panel {
  position: relative;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
  min-width: 0;
  overflow: hidden;
  background: transparent;
}

.corner-brand {
  position: absolute;
  top: clamp(32px, 5vh, 56px);
  left: clamp(32px, 4vw, 64px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.corner-brand-logo-wrap {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(178, 44, 255, 0.46);
  border-radius: 10px;
  background: rgba(5, 12, 27, 0.82);
  box-shadow: 0 8px 26px rgba(178, 44, 255, 0.12);
}

.corner-brand-logo {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.visual-stage {
  position: absolute;
  right: -10%;
  bottom: -5%;
  left: -10%;
  height: min(86vh, 960px);
  pointer-events: none;
}

.visual-person {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(112%, 900px);
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 1;
}

.auth-panel {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  height: 100dvh;
  place-items: center end;
  padding: 48px clamp(128px, 10vw, 160px) 72px 48px;
  background: transparent;
}

.auth-card {
  width: min(100%, 440px);
  min-height: 540px;
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  padding: 28px 38px 32px;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  background:
    linear-gradient(rgba(6, 17, 31, 0.96), rgba(6, 17, 31, 0.96)) padding-box,
    linear-gradient(145deg, rgba(178, 44, 255, 0.72), rgba(34, 211, 238, 0.7))
      border-box;
  box-shadow: var(--shadow-card);
  scrollbar-width: thin;
  scrollbar-color: #294665 transparent;
  transform: translateY(6px);
}

.auth-card::-webkit-scrollbar {
  width: 6px;
}

.auth-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #294665;
}

.login-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  border-bottom: 1px solid var(--border);
}

.login-tab {
  position: relative;
  min-height: 54px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 160ms ease;
}

.login-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.login-tab:hover {
  color: var(--text-secondary);
}

.login-tab:focus-visible {
  outline: none;
  box-shadow: inset 0 -3px rgba(34, 211, 238, 0.72);
}

.login-tab.is-active {
  color: var(--primary);
  font-weight: 600;
}

.login-tab.is-active::after {
  background: linear-gradient(90deg, #b22cff 0%, var(--primary) 100%);
}

.login-tab:not(.is-active)::after {
  background: transparent;
}

.auth-brand {
  display: block;
  width: 100%;
  margin: 10px 0 24px;
  color: var(--text);
  text-align: left;
  text-decoration: none;
}

.auth-brand h2,
.modal-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.auth-brand h2 {
  font-size: 32px;
}

.tab-panel,
#login-form,
#wechat-qr-view {
  min-height: 0;
}

.field {
  display: grid;
  gap: 8px;
  margin: 10px 0 20px 0px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.field input,
.field select,
.area-select-trigger {
  width: 100%;
  min-height: var(--control-height);
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: #101e34;
  color: var(--text);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.field input:hover,
.field select:hover,
.area-select-trigger:hover:not(:disabled) {
  border-color: var(--border-strong);
}

.field input:focus,
.field select:focus,
.area-select-trigger:focus-visible {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid .area-select-trigger {
  border-color: rgba(255, 135, 156, 0.78);
  box-shadow: 0 0 0 3px rgba(255, 135, 156, 0.1);
}

.field-error {
  color: var(--danger);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.field input::placeholder,
.field select:invalid {
  color: #667895;
}

.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px #101e34 inset;
  caret-color: var(--text);
}

.field select {
  color-scheme: dark;
}

.password-field,
.code-field {
  position: relative;
  display: flex;
  align-items: stretch;
}

.password-field input,
.code-field input {
  flex: 1;
  min-width: 0;
}

.password-field input {
  padding-right: 64px;
}

.code-field input {
  padding-right: 116px;
}

.password-toggle,
.code-button {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}

.password-toggle {
  width: 60px;
}

.code-button {
  width: 108px;
  border-left: 1px solid var(--border);
}

.password-toggle:hover:not(:disabled),
.code-button:hover:not(:disabled) {
  color: var(--primary-hover);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: 0 18px;
  border-radius: var(--radius-control);
  font-size: 14px;
  font-weight: 600;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 120ms ease;
}

.primary-button {
  width: 100%;
  border: 1px solid rgba(83, 224, 248, 0.68);
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow:
    0 10px 24px rgba(34, 211, 238, 0.12),
    0 8px 22px rgba(178, 44, 255, 0.1);
}

.primary-button:hover:not(:disabled) {
  border-color: #8cf1ff;
  background: linear-gradient(100deg, #c13aff 0%, #5d7cff 48%, #45e4fb 100%);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled) {
  transform: translateY(1px);
}

.secondary-button {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-secondary);
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
  color: var(--text);
}

.login-submit-label:empty::before {
  content: "立即登录";
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.text-button {
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
}

.text-button.is-emphasis,
.text-button:hover {
  color: var(--primary);
}

.form-message {
  margin: -6px 0 16px;
  padding: 10px 12px;
  border: 1px solid #ffd6d2;
  border-radius: var(--radius-control);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.form-message.is-success {
  border-color: rgba(87, 227, 176, 0.38);
  background: var(--success-soft);
  color: var(--success);
}

#wechat-qr-view {
  display: grid;
  justify-items: center;
}

.qr-stage {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 330px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-subtle);
}

.qr-container {
  display: grid;
  width: 282px;
  height: 282px;
  place-items: center;
  overflow: hidden;
  background: #fff;
}

.qr-container iframe {
  width: 300px !important;
  max-width: 100%;
  height: 400px !important;
  border: 0;
  background: #fff;
  transform: translateY(-48px);
}

.loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  gap: 12px;
  background: rgba(6, 17, 31, 0.92);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.spinner {
  width: 26px;
  height: 26px;
  margin: 0 auto;
  border: 2px solid #294665;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.qr-tip {
  margin: 16px 0 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

#refresh-wechat {
  color: var(--text-muted);
}

.wechat-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-subtle);
}

.wechat-profile img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.wechat-profile strong {
  color: var(--text);
  font-size: 15px;
}

.wechat-profile p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.page-footer {
  position: fixed;
  right: clamp(24px, 4vw, 64px);
  bottom: 22px;
  z-index: 4;
  display: flex;
  gap: 14px;
  color: #60718d;
  font-size: 12px;
}

.page-footer a {
  color: inherit;
  text-decoration: none;
}

.page-footer a:hover {
  color: var(--primary);
}

.modal-dialog {
  width: min(820px, calc(100vw - 40px));
  max-width: 100vw;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--text);
}

.modal-dialog-small,
#slider-dialog {
  width: min(520px, calc(100vw - 40px));
}

.modal-dialog::backdrop {
  background: rgba(1, 4, 12, 0.72);
  backdrop-filter: blur(3px);
}

.modal-dialog[open] {
  animation: dialog-in 180ms ease-out;
}

.modal-card {
  max-height: calc(100dvh - 40px);
  padding: 28px 30px 30px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-dialog);
}

#slider-dialog .modal-card {
  padding: 24px 28px 22px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 24px;
}

.auth-kicker {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.icon-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
  color: var(--text);
}

.icon-button:focus-visible {
  border-color: rgba(34, 211, 238, 0.58);
  outline: 0;
  box-shadow: var(--focus-ring);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.field-wide {
  grid-column: 1 / -1;
}

.area-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.area-select {
  position: relative;
  min-width: 0;
}

.area-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.area-select-native[hidden] {
  display: block !important;
}

.area-select-trigger {
  position: relative;
  padding-right: 38px;
  color: var(--text-secondary);
  text-align: left;
}

.area-select-trigger::after {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 7px;
  height: 7px;
  transform: translateY(-70%) rotate(45deg);
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  content: "";
  transition: transform 160ms ease;
}

.area-select-trigger[aria-expanded="true"] {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.area-select-trigger[aria-expanded="true"]::after {
  transform: translateY(-20%) rotate(225deg);
}

.area-select-trigger:disabled {
  background: var(--surface-muted);
  color: #566984;
}

.area-select-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 12;
  max-height: 220px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
  color-scheme: dark;
}

.area-select.is-opening-down .area-select-menu {
  top: calc(100% + 8px);
  bottom: auto;
}

.area-select-option {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: left;
}

.area-select-option:hover,
.area-select-option:focus-visible {
  outline: none;
  background: var(--surface-subtle);
  color: var(--text);
}

.area-select-option.is-selected {
  background: var(--primary-soft);
  color: var(--primary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.modal-actions .primary-button,
.modal-actions .secondary-button {
  width: auto;
  min-width: 112px;
}

.slider-description {
  margin: -10px 0 18px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.slider-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-muted) center / cover no-repeat;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.slider-hole {
  position: absolute;
  background: rgba(29, 33, 41, 0.48);
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9));
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
}

.slider-piece {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.42));
}

.slider-control {
  position: relative;
  width: 100%;
  height: 44px;
  margin: 18px auto 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--surface-muted);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.slider-control:focus-within {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.slider-control.is-verifying {
  background: var(--primary-soft);
}

.slider-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-left: 44px;
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

.slider-control.is-verifying .slider-hint {
  color: var(--primary);
}

.slider-range {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 42px;
  margin: 0;
  appearance: none;
  border: 0;
  outline: none;
  background: transparent;
}

.slider-range::-webkit-slider-runnable-track {
  height: 42px;
  border-radius: 7px;
  background: transparent;
}

.slider-range::-webkit-slider-thumb {
  width: 42px;
  height: 42px;
  margin-top: 0;
  appearance: none;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface-subtle);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slider-range::-moz-range-track {
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
}

.slider-range::-moz-range-thumb {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--surface-subtle);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slider-range:disabled {
  opacity: 0.58;
}

.slider-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.slider-actions .text-button {
  color: var(--primary);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 20;
  max-width: min(440px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 11px 16px;
  border: 1px solid rgba(87, 227, 176, 0.38);
  border-radius: var(--radius-control);
  background: var(--success-soft);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
  color: var(--success);
  font-size: 13px;
}

.toast.is-error {
  border-color: #ffd6d2;
  background: var(--danger-soft);
  color: var(--danger);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes dialog-in {
  from {
    transform: translateY(8px) scale(0.99);
    opacity: 0;
  }
}

@media (max-width: 1399px) {
  .login-page {
    grid-template-columns: minmax(0, 48%) minmax(520px, 52%);
  }

  .visual-stage {
    right: -7%;
    left: -8%;
  }

  .auth-panel {
    padding-right: 72px;
    padding-left: 36px;
  }
}

@media (max-width: 1199px) {
  .login-page {
    display: block;
  }

  .brand-panel {
    display: none;
  }

  .auth-panel {
    width: 100%;
    height: 100dvh;
    place-items: center;
    padding: 36px 28px 58px;
    overflow-y: auto;
  }

  .auth-card {
    max-height: none;
    transform: none;
  }

  .page-footer {
    right: 0;
    left: 0;
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .auth-panel {
    place-items: start center;
    padding: 24px 16px 64px;
  }

  .auth-card {
    width: min(100%, 480px);
    min-height: 0;
    padding: 24px 28px 30px;
  }

  .auth-brand {
    margin-block: 34px 28px;
    margin-inline: auto;
  }

  .modal-dialog {
    width: min(820px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
  }

  .modal-dialog-small,
  #slider-dialog {
    width: min(520px, calc(100vw - 24px));
  }

  .modal-card {
    max-height: calc(100dvh - 24px);
    padding: 24px 22px;
  }

  #slider-dialog .modal-card {
    padding: 24px 22px 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .area-fields {
    grid-template-columns: 1fr;
  }

  .area-select-menu {
    top: calc(100% + 8px);
    bottom: auto;
  }
}

@media (max-width: 479px) {
  .auth-panel {
    padding-inline: 12px;
  }

  .auth-card {
    padding: 20px 18px 26px;
  }

  .login-tab {
    min-height: 50px;
  }

  .auth-brand {
    margin-top: 28px;
  }

  .auth-brand h2 {
    font-size: 23px;
  }

  .field {
    margin-bottom: 18px;
  }

  .modal-header h2 {
    font-size: 22px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .modal-actions .primary-button,
  .modal-actions .secondary-button {
    width: 100%;
    min-width: 0;
  }

  .page-footer {
    bottom: 12px;
    flex-wrap: wrap;
    row-gap: 2px;
    padding: 0 16px;
  }
}

@media (max-width: 366px) {
  #slider-dialog .modal-card {
    padding-inline: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  #slider-dialog .modal-header,
  #slider-dialog .slider-description,
  #slider-dialog .form-message,
  #slider-dialog .slider-actions {
    margin-right: 16px;
    margin-left: 16px;
  }
}

@media (max-height: 760px) and (min-width: 1200px) {
  .auth-panel {
    padding-block: 22px 42px;
  }

  .auth-card {
    min-height: 0;
    max-height: calc(100dvh - 64px);
    padding-block: 22px 26px;
  }

  .login-tab {
    min-height: 46px;
  }

  .auth-brand {
    margin-block: 28px 22px;
    margin-inline: auto;
  }

  .auth-brand h2 {
    font-size: 23px;
  }

  .field {
    gap: 6px;
    margin-bottom: 14px;
  }

  .form-actions {
    margin-top: 14px;
  }
}

@media (max-width: 820px) and (max-height: 560px) {
  .auth-panel {
    display: block;
    height: 100dvh;
    padding: 12px 12px 28px;
    overflow-y: auto;
  }

  .auth-card {
    margin: 0 auto;
  }

  .page-footer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Preserve the dev atmosphere layer alongside the refreshed login layout. */

.brand-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  contain: strict;
}

.brand-atmosphere::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: radial-gradient(circle, rgba(181, 217, 220, 0.34) 0.55px, transparent 0.8px);
  background-position: 8px 10px;
  background-size: 19px 19px;
  content: "";
  opacity: 0.045;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 96% 86% at 43% 48%, #000 4%, transparent 82%);
}

.brand-atmosphere::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(2, 5, 9, 0.12), transparent 19%, transparent 82%, rgba(2, 5, 9, 0.08)),
    linear-gradient(180deg, rgba(2, 5, 9, 0.06), transparent 19%, transparent 82%, rgba(2, 5, 9, 0.16));
  content: "";
  pointer-events: none;
}

.atmosphere-fog {
  --fog-clear-x: 50%;
  --fog-clear-y: 50%;
  --fog-clear-radius: 0px;
  --fog-clear-alpha: 1;
  position: absolute;
  inset: -12%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: radial-gradient(
    circle var(--fog-clear-radius) at var(--fog-clear-x) var(--fog-clear-y),
    rgba(0, 0, 0, var(--fog-clear-alpha)) 0 28%,
    #000 100%
  );
  will-change: mask-image;
}

.atmosphere-fog::before {
  position: absolute;
  inset: 7% -12% 4%;
  border-radius: 46%;
  background:
    radial-gradient(ellipse 42% 17% at 22% 35%, rgba(127, 153, 177, 0.2), transparent 75%),
    radial-gradient(ellipse 48% 20% at 70% 58%, rgba(84, 145, 148, 0.17), transparent 76%),
    radial-gradient(ellipse 34% 13% at 46% 78%, rgba(151, 132, 151, 0.1), transparent 78%);
  content: "";
  filter: blur(34px);
  animation: atmosphere-current 31s ease-in-out -9s infinite alternate;
}

.atmosphere-fog::after {
  position: absolute;
  inset: 4% -8% 8%;
  border-radius: 48%;
  background:
    radial-gradient(ellipse 46% 9% at 28% 48%, rgba(190, 205, 213, 0.09), transparent 76%),
    radial-gradient(ellipse 38% 8% at 66% 31%, rgba(143, 177, 184, 0.075), transparent 78%),
    radial-gradient(ellipse 51% 10% at 58% 72%, rgba(119, 161, 169, 0.07), transparent 78%);
  content: "";
  filter: blur(24px);
  animation: atmosphere-current-soft 37s ease-in-out -17s infinite alternate-reverse;
}

.atmosphere-haze {
  position: absolute;
  z-index: 0;
  display: block;
  border-radius: 50%;
  opacity: 0.76;
  pointer-events: none;
  will-change: transform, opacity;
}

.atmosphere-haze-blue {
  top: 3%;
  left: -8%;
  width: 59%;
  height: 58%;
  background: radial-gradient(ellipse, rgba(75, 109, 160, 0.3), rgba(61, 89, 130, 0.12) 44%, transparent 73%);
  filter: blur(56px);
  animation: atmosphere-breathe-blue 19s ease-in-out infinite;
}

.atmosphere-haze-cyan {
  right: -5%;
  bottom: -14%;
  width: 67%;
  height: 68%;
  background: radial-gradient(ellipse, rgba(68, 151, 153, 0.24), rgba(52, 109, 118, 0.09) 48%, transparent 74%);
  filter: blur(68px);
  animation: atmosphere-breathe-cyan 23s ease-in-out -7s infinite;
}

.atmosphere-haze-warm {
  bottom: 1%;
  left: 14%;
  width: 43%;
  height: 35%;
  background: radial-gradient(ellipse, rgba(187, 143, 116, 0.12), rgba(127, 93, 100, 0.052) 52%, transparent 76%);
  filter: blur(58px);
  animation: atmosphere-breathe-warm 21s ease-in-out -12s infinite;
}

.atmosphere-clearing {
  --clear-x: 50%;
  --clear-y: 50%;
  --clear-radius: 0px;
  --clear-opacity: 0;
  position: absolute;
  top: var(--clear-y);
  left: var(--clear-x);
  z-index: 1;
  width: calc(var(--clear-radius) * 2);
  height: calc(var(--clear-radius) * 2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(204, 232, 225, 0.26), rgba(112, 171, 178, 0.11) 38%, transparent 73%);
  opacity: var(--clear-opacity);
  pointer-events: none;
  transform: translate(-50%, -50%);
  filter: blur(7px);
  mix-blend-mode: screen;
}

.brand-particle-field {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  pointer-events: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.visual-person {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

@media (max-width: 820px) {
  .brand-atmosphere {
    display: none;
  }
}

@media (max-height: 760px) and (min-width: 821px) {
  .brand-atmosphere {
    opacity: 0.84;
  }

  .atmosphere-haze-blue,
  .atmosphere-haze-cyan,
  .atmosphere-haze-warm {
    filter: blur(42px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere-haze,
  .atmosphere-fog::before,
  .atmosphere-fog::after {
    animation: none;
  }
}

@keyframes atmosphere-breathe-blue {
  0%,
  100% {
    opacity: 0.55;
    transform: translate3d(-2.5%, -1%, 0) scale(0.96) rotate(-1deg);
  }

  50% {
    opacity: 0.82;
    transform: translate3d(7%, 4%, 0) scale(1.08) rotate(2deg);
  }
}

@keyframes atmosphere-breathe-cyan {
  0%,
  100% {
    opacity: 0.52;
    transform: translate3d(4%, 2%, 0) scale(0.96) rotate(1deg);
  }

  50% {
    opacity: 0.8;
    transform: translate3d(-8%, -5%, 0) scale(1.09) rotate(-2deg);
  }
}

@keyframes atmosphere-breathe-warm {
  0%,
  100% {
    opacity: 0.38;
    transform: translate3d(-4%, 3%, 0) scale(0.94);
  }

  50% {
    opacity: 0.66;
    transform: translate3d(9%, -4%, 0) scale(1.07);
  }
}

@keyframes atmosphere-current {
  0% {
    opacity: 0.46;
    transform: translate3d(-7%, 1%, 0) scale(0.96) rotate(-2deg);
  }

  55% {
    opacity: 0.82;
    transform: translate3d(4%, -3%, 0) scale(1.04) rotate(1deg);
  }

  100% {
    opacity: 0.58;
    transform: translate3d(9%, 4%, 0) scale(1.08) rotate(2deg);
  }
}

@keyframes atmosphere-current-soft {
  0% {
    opacity: 0.42;
    transform: translate3d(7%, -2%, 0) scale(0.97) rotate(1deg);
  }

  50% {
    opacity: 0.78;
    transform: translate3d(-4%, 3%, 0) scale(1.06) rotate(-1deg);
  }

  100% {
    opacity: 0.54;
    transform: translate3d(-9%, -4%, 0) scale(1.02) rotate(-2deg);
  }
}

.jump-page {
  display: grid;
  width: 100%;
  min-height: 100dvh;
  place-items: center;
  padding: 32px 20px;
  overflow-y: auto;
}

.jump-panel {
  position: relative;
  display: grid;
  width: min(100%, 520px);
  min-height: 580px;
  align-content: center;
  justify-items: center;
  padding: 48px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  background:
    linear-gradient(rgba(6, 17, 31, 0.96), rgba(6, 17, 31, 0.96)) padding-box,
    linear-gradient(145deg, rgba(178, 44, 255, 0.72), rgba(34, 211, 238, 0.7))
      border-box;
  box-shadow: var(--shadow-card);
}

.jump-panel::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 32%, rgba(34, 211, 238, 0.09), transparent 34%);
  content: "";
  pointer-events: none;
}

.jump-brand {
  position: absolute;
  top: 26px;
  left: 30px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 650;
}

.jump-brand-logo-wrap {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 8px;
  background: rgba(7, 19, 35, 0.82);
}

.jump-brand-logo {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.jump-orbit {
  position: relative;
  width: 136px;
  height: 136px;
  margin-bottom: 30px;
}

.jump-orbit-ring,
.jump-orbit-core,
.jump-orbit-marker {
  position: absolute;
  border-radius: 50%;
}

.jump-orbit-ring-outer {
  inset: 0;
  border: 1px solid rgba(103, 232, 249, 0.24);
  box-shadow: inset 0 0 28px rgba(34, 211, 238, 0.05);
}

.jump-orbit-ring-inner {
  inset: 22px;
  border: 1px dashed rgba(178, 44, 255, 0.54);
  animation: jump-orbit-spin 8s linear infinite;
}

.jump-orbit-core {
  inset: 45px;
  background: var(--primary-gradient);
  box-shadow:
    0 0 24px rgba(79, 111, 255, 0.42),
    0 0 52px rgba(32, 216, 245, 0.18);
  animation: jump-core-pulse 1.8s ease-in-out infinite;
}

.jump-orbit-marker {
  top: 2px;
  left: 63px;
  width: 10px;
  height: 10px;
  background: var(--primary-hover);
  box-shadow: 0 0 14px rgba(103, 232, 249, 0.92);
  transform-origin: 5px 66px;
  animation: jump-marker-spin 1.7s linear infinite;
}

.jump-copy {
  position: relative;
  text-align: center;
}

.jump-eyebrow {
  margin: 0 0 10px;
  color: var(--primary-hover);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.jump-copy h1 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}

.jump-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.jump-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
}

.jump-steps::before {
  position: absolute;
  top: 15px;
  right: 16.66%;
  left: 16.66%;
  height: 1px;
  background: var(--border);
  content: "";
}

.jump-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  transition: color 180ms ease;
}

.jump-step-index {
  position: relative;
  z-index: 1;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.jump-step.is-active,
.jump-step.is-complete {
  color: var(--text-secondary);
}

.jump-step.is-active .jump-step-index {
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 0 5px var(--primary-soft);
}

.jump-step.is-complete .jump-step-index {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}

.jump-step-label {
  display: grid;
  min-height: var(--control-height);
  place-items: center;
}

.jump-step-workspace-label {
  width: calc(100% - 10px);
  padding: 0 10px;
  border: 1px solid rgba(83, 224, 248, 0.68);
  border-radius: var(--radius-control);
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow:
    0 10px 24px rgba(34, 211, 238, 0.12),
    0 8px 22px rgba(178, 44, 255, 0.1);
  font-size: 14px;
  font-weight: 600;
}

.jump-error {
  position: relative;
  width: 100%;
  margin-top: 24px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 135, 156, 0.28);
  border-radius: var(--radius-control);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.jump-page.is-error .jump-orbit-core {
  background: var(--danger);
  box-shadow: 0 0 34px rgba(255, 135, 156, 0.32);
  animation: none;
}

.jump-page.is-error .jump-orbit-marker,
.jump-page.is-error .jump-orbit-ring-inner {
  animation-play-state: paused;
}

@keyframes jump-orbit-spin {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes jump-marker-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes jump-core-pulse {
  0%,
  100% {
    opacity: 0.78;
    transform: scale(0.92);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 560px) {
  .jump-page {
    align-items: stretch;
    padding: 0;
  }

  .jump-panel {
    width: 100%;
    min-height: 100dvh;
    padding: 40px 24px;
    border: 0;
    border-radius: 0;
    background: rgba(6, 17, 31, 0.82);
    box-shadow: none;
  }

  .jump-brand {
    top: 24px;
    left: 24px;
  }

  .jump-orbit {
    width: 118px;
    height: 118px;
  }

  .jump-orbit-ring-inner {
    inset: 19px;
  }

  .jump-orbit-core {
    inset: 39px;
  }

  .jump-orbit-marker {
    left: 54px;
    transform-origin: 5px 57px;
  }

  .jump-copy h1 {
    font-size: 24px;
  }

  .jump-steps {
    margin-top: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jump-orbit-ring-inner,
  .jump-orbit-core,
  .jump-orbit-marker {
    animation: none;
  }

  .jump-step,
  .jump-step-index {
    transition: none;
  }
}
