/* 钢好购开发工作台 · 工业软件启动登录 */

:root {
  --lg-void: #08090b;
  --lg-steel: #101318;
  --lg-panel: #161a20;
  --lg-well: #0a0c0f;
  --lg-line: rgba(196, 168, 92, 0.28);
  --lg-line-dim: rgba(160, 170, 184, 0.12);
  --lg-brass: #c4a85c;
  --lg-brass-hot: #e2c36a;
  --lg-ink: #e6e2d6;
  --lg-mute: #8b8474;
  --lg-ghost: #5c5a52;
  --lg-warn: #e07050;
  --lg-ok: #7dba6a;
  --lg-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --lg-hud: "Oxanium", "IBM Plex Mono", sans-serif;
  --lg-mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;
}

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

[hidden] { display: none !important; }

html { -webkit-font-smoothing: antialiased; }

body.login-page {
  min-height: 100vh;
  font-family: var(--lg-sans);
  background: var(--lg-void);
  color: var(--lg-ink);
  overflow-x: hidden;
}

button, input { font: inherit; }

:focus { outline: none; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--lg-brass), 0 0 0 4px rgba(196, 168, 92, 0.22);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
}

/* —— 左侧机位 / 线稿场景 —— */

.login-stage {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 18% 88%, rgba(196, 168, 92, 0.08), transparent 58%),
    radial-gradient(640px 420px at 86% 8%, rgba(90, 110, 130, 0.12), transparent 50%),
    linear-gradient(180deg, #0d1014 0%, #08090b 100%);
  overflow: hidden;
}

.login-stage-grid,
.login-stage-hatch,
.login-stage-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-stage-grid {
  background-image:
    linear-gradient(rgba(196, 168, 92, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 168, 92, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 40% 45%, #000 20%, transparent 78%);
}

.login-stage-hatch {
  opacity: 0.18;
  background:
    repeating-linear-gradient(
      -32deg,
      transparent 0 11px,
      rgba(196, 168, 92, 0.07) 11px 12px
    );
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}

.login-stage-noise {
  opacity: 0.2;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.login-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.login-art .pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: node-pulse 3.6s ease-in-out infinite;
}

.login-art .pulse-b { animation-delay: 1.1s; }
.login-art .pulse-c { animation-delay: 2.2s; }

@keyframes node-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.login-stage-caption {
  position: absolute;
  left: 48px;
  bottom: 44px;
  z-index: 2;
  max-width: 22rem;
  padding: 18px 20px 8px 0;
  background: linear-gradient(180deg, transparent, rgba(8, 9, 11, 0.72) 28%);
}

.login-stage-id {
  font-family: var(--lg-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--lg-brass);
  margin-bottom: 12px;
}

.login-stage-caption h1 {
  font-family: var(--lg-hud);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.15;
  font-variation-settings: "wght" 600;
}

.login-stage-caption h1 span {
  display: block;
  margin-top: 4px;
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: #c9c3b2;
}

.login-stage-meta {
  position: absolute;
  top: 28px;
  left: 48px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--lg-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--lg-ghost);
}

.login-stage-meta i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lg-ok);
  box-shadow: 0 0 8px var(--lg-ok);
}

/* —— 右侧终端舱 —— */

.login-bay {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background:
    linear-gradient(180deg, #0e1116 0%, #0a0c10 100%);
  border-left: 1px solid rgba(196, 168, 92, 0.14);
}

.login-bay::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid var(--lg-line-dim);
  pointer-events: none;
}

.login-terminal {
  position: relative;
  width: min(392px, 100%);
  background:
    linear-gradient(180deg, #1a1f27 0%, #12151b 48%, #101318 100%);
  border: 1px solid rgba(196, 168, 92, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 190, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.45);
  clip-path: polygon(
    14px 0, calc(100% - 14px) 0, 100% 14px,
    100% calc(100% - 14px), calc(100% - 14px) 100%,
    14px 100%, 0 calc(100% - 14px), 0 14px
  );
}

.login-screw {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(196, 168, 92, 0.45);
  border-radius: 50%;
  background:
    conic-gradient(from 40deg, #2a2e34, #8a8068, #2a2e34 70%);
  box-shadow: inset 0 0 0 2px #0c0e11;
  z-index: 2;
}

.login-screw-tl { top: 16px; left: 16px; }
.login-screw-tr { top: 16px; right: 16px; }
.login-screw-bl { bottom: 16px; left: 16px; }
.login-screw-br { bottom: 16px; right: 16px; }

.login-terminal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 28px 14px;
  border-bottom: 1px solid rgba(196, 168, 92, 0.16);
  font-family: var(--lg-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--lg-mute);
}

.login-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lg-ok);
  box-shadow: 0 0 10px var(--lg-ok);
  animation: led-breathe 2.8s ease-in-out infinite;
}

@keyframes led-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.login-terminal-name { flex: 1; color: var(--lg-brass); }
.login-terminal-state { color: var(--lg-ok); }

.login-terminal-body {
  padding: 26px 28px 22px;
}

.login-terminal-title {
  font-family: var(--lg-hud);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 22px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.login-field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #c8c0aa;
}

.login-field label span {
  font-family: var(--lg-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--lg-ghost);
}

.login-field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(196, 168, 92, 0.22);
  background: var(--lg-well);
  color: var(--lg-ink);
  border-radius: 0;
  font-family: var(--lg-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  caret-color: var(--lg-brass);
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.45);
}

.login-field input::placeholder { color: #4a4840; }

.login-field input:focus {
  border-color: var(--lg-brass);
  box-shadow:
    inset 0 1px 0 rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(196, 168, 92, 0.28);
}

.login-pass { position: relative; display: block; }

.login-pass input { padding-right: 64px; }

.login-pass-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--lg-mute);
  font-family: var(--lg-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 8px 10px;
  cursor: pointer;
}

.login-pass-toggle:hover { color: var(--lg-brass-hot); }

.login-err {
  min-height: 1.25em;
  margin: 2px 0 12px;
  font-family: var(--lg-mono);
  font-size: 12px;
  color: var(--lg-warn);
}

.login-submit {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--lg-brass);
  background: #17150f;
  color: var(--lg-brass-hot);
  font-family: var(--lg-hud);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.28em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 190, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.4);
}

.login-submit:hover:not(:disabled) {
  background: #221e14;
  color: #f3e3a6;
}

.login-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-terminal-foot {
  padding: 0 28px 22px;
  font-family: var(--lg-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--lg-ghost);
}

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-stage { min-height: 240px; }
  .login-stage-caption {
    left: 24px;
    bottom: 20px;
  }
  .login-stage-caption h1 { font-size: 28px; }
  .login-stage-meta { left: 24px; top: 18px; }
  .login-bay {
    padding: 28px 18px 40px;
    border-left: 0;
    border-top: 1px solid rgba(196, 168, 92, 0.14);
  }
  .login-bay::before { inset: 10px; }
}
