:root {
  --ink: #050c0b;
  --ink-2: #081512;
  --card: rgba(9, 24, 21, .78);
  --line: rgba(154, 234, 208, .15);
  --text: #eaf6f1;
  --muted: #8ea8a0;
  --accent: #2fd3a4;
  --accent-2: #7fe9c9;
  --gold: #d8b46a;
  --danger: #ef7b74;
  --shadow: 0 34px 90px rgba(0, 0, 0, .55);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--ink); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input { font: inherit; }
.login-stage {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(420px, .76fr);
  background: var(--ink);
}

/* ---------- 左侧：鹰隼动态影像 ---------- */
.visual { position: relative; overflow: hidden; min-height: 100svh; background: #0a1412; }
.visual-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  transform: scale(1.01);
  filter: saturate(.9) contrast(1.04) brightness(.9);
  animation: visual-drift 22s ease-in-out infinite alternate;
}
.visual-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 9, 8, .18) 0%, rgba(3, 9, 8, .04) 50%, rgba(5, 12, 11, .58) 100%),
    linear-gradient(0deg, rgba(3, 8, 8, .96) 0%, rgba(3, 8, 8, .42) 15%, transparent 38%),
    radial-gradient(80% 60% at 24% 38%, rgba(47, 211, 164, .08), transparent 62%);
}
.visual-glow {
  position: absolute; width: 520px; height: 520px; right: -140px; top: 10%;
  background: radial-gradient(circle, rgba(47, 211, 164, .18), transparent 68%);
  filter: blur(20px); animation: glow-breathe 9s ease-in-out infinite;
}
.visual-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 54px) 16px;
  color: rgba(205, 228, 219, .55); font-size: 10px; letter-spacing: .16em;
  background: linear-gradient(0deg, rgba(3, 8, 8, .82), transparent);
}
#login-clock { font-variant-numeric: tabular-nums; letter-spacing: .08em; }

/* ---------- 右侧：标题 + 登录卡 ---------- */
.panel {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(28px, 4.6vw, 64px) clamp(26px, 4.4vw, 66px) 46px;
  background:
    radial-gradient(70% 54% at 82% 8%, rgba(47, 211, 164, .08), transparent 60%),
    linear-gradient(165deg, #07110f 0%, #06100e 52%, #050c0b 100%);
  overflow-x: hidden; overflow-y: auto;
}
.panel-intro {
  position: relative; z-index: 2; width: min(100%, 410px); margin: 0 auto 24px;
  animation: rise-in .8s cubic-bezier(.16, 1, .3, 1) .08s both;
}
.panel-intro .eyebrow { padding: 5px 10px; }
.panel-intro h1 {
  margin: 14px 0 9px;
  font-size: clamp(27px, 3vw, 42px);
  line-height: 1.08; font-weight: 640; letter-spacing: -.045em;
}
.panel-intro h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #c9f5e5 5%, var(--accent) 55%, #7fd8ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.panel-intro p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; border: 1px solid rgba(162, 238, 213, .26);
  background: rgba(6, 20, 17, .42); backdrop-filter: blur(10px);
  color: #b9ddd0; font-size: 9.5px; letter-spacing: .2em; font-weight: 700;
}
.pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(47, 211, 164, .6);
  animation: pulse 2.1s ease-out infinite;
}
.panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(168, 235, 214, .08) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .32;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}
.panel-noise {
  position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
.login-card {
  position: relative; z-index: 2; width: min(100%, 410px); margin: 0 auto;
  padding: 34px 34px 26px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(15, 36, 31, .87), rgba(7, 19, 16, .92));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(210, 255, 240, .08);
  backdrop-filter: blur(24px) saturate(1.15);
  animation: card-in .85s cubic-bezier(.16, 1, .3, 1) both;
}
.login-card::after {
  content: ""; position: absolute; inset: -1px; border-radius: 25px; pointer-events: none;
  background: linear-gradient(135deg, rgba(47, 211, 164, .38), transparent 28%, transparent 70%, rgba(127, 216, 255, .20));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center; color: #041713;
  background: linear-gradient(140deg, #b7f6e1, var(--accent) 55%, #55b8ff);
  box-shadow: 0 14px 34px rgba(47, 211, 164, .28), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.brand-mark svg { width: 25px; height: 25px; }
.brand-line { margin-top: 16px; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.brand-sub { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.welcome { margin: 30px 0 22px; animation: rise-in .7s cubic-bezier(.16, 1, .3, 1) .18s both; }
.welcome h2 { margin: 0; font-size: 27px; font-weight: 640; letter-spacing: -.035em; }
.welcome p { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.field { display: block; margin-bottom: 14px; animation: rise-in .7s cubic-bezier(.16, 1, .3, 1) both; }
.field:nth-of-type(1) { animation-delay: .24s; }
.field:nth-of-type(2) { animation-delay: .30s; }
.field-label { display: block; margin: 0 0 7px 2px; color: #a9c3ba; font-size: 11px; font-weight: 600; letter-spacing: .05em; }
.field-box {
  position: relative; display: flex; align-items: center;
  height: 50px; border-radius: 12px;
  border: 1px solid rgba(151, 215, 195, .16);
  background: rgba(3, 12, 10, .55);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field-box:focus-within {
  border-color: rgba(47, 211, 164, .62);
  background: rgba(5, 18, 15, .78);
  box-shadow: 0 0 0 3px rgba(47, 211, 164, .10), 0 10px 26px rgba(0, 0, 0, .22);
}
.field-icon { width: 18px; height: 18px; margin: 0 11px 0 14px; color: #71968a; flex: none; }
.field-box input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: 14px; letter-spacing: .01em;
}
.field-box input::placeholder { color: #5d7a70; }
.eye {
  width: 44px; height: 44px; margin-right: 3px; display: grid; place-items: center;
  border: 0; border-radius: 9px; background: transparent; color: #6d9084; cursor: pointer;
  transition: color .15s, background .15s;
}
.eye:hover, .eye.on { color: var(--accent); background: rgba(47, 211, 164, .08); }
.eye svg { width: 18px; height: 18px; }
.form-row {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 18px; margin: 2px 2px 6px; font-size: 10.5px; color: #66867a;
}
.caps { color: var(--gold); }
.login-error {
  min-height: 20px; margin: 2px 2px 8px; color: var(--danger);
  font-size: 12px; line-height: 1.6;
}
.login-error.shake { animation: shake .36s ease; }
.submit {
  position: relative; width: 100%; height: 50px; border: 0; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #03130e; font-size: 14px; font-weight: 750; letter-spacing: .03em;
  cursor: pointer; overflow: hidden;
  background: linear-gradient(100deg, #8df0d2 0%, var(--accent) 48%, #64d8ff 100%);
  box-shadow: 0 16px 36px rgba(47, 211, 164, .24), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  animation: rise-in .7s cubic-bezier(.16, 1, .3, 1) .36s both;
}
.submit::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .42) 46%, transparent 68%);
  transform: translateX(-120%); transition: transform .55s ease;
}
.submit:hover { transform: translateY(-1px); box-shadow: 0 20px 42px rgba(47, 211, 164, .32); filter: saturate(1.06); }
.submit:hover::before { transform: translateX(120%); }
.submit:active { transform: translateY(0) scale(.995); }
.submit[disabled] { cursor: wait; filter: saturate(.7) brightness(.9); }
.submit-arrow { position: absolute; right: 17px; width: 18px; height: 18px; }
.submit-loader { display: inline-flex; align-items: center; gap: 8px; }
.submit-loader i {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(3, 19, 14, .25); border-top-color: #03130e;
  animation: spin .7s linear infinite;
}
.role-note {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(156, 222, 201, .10);
  color: #6f8c82; font-size: 10.5px; line-height: 1.7;
  animation: rise-in .7s cubic-bezier(.16, 1, .3, 1) .42s both;
}
.role-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.role-dot.viewer { background: var(--gold); margin-left: 2px; }
.role-sep { width: 1px; height: 10px; background: rgba(150, 210, 190, .18); margin: 0 3px; }
.panel-foot {
  position: relative; z-index: 2; width: min(100%, 410px); margin: 18px auto 0;
  display: flex; justify-content: space-between; color: #4f6a61; font-size: 9.5px; letter-spacing: .08em;
}

@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes visual-drift { from { transform: scale(1.035) translate3d(0, 0, 0); } to { transform: scale(1.085) translate3d(-1.2%, -1%, 0); } }
@keyframes glow-breathe { 0%,100% { opacity: .45; transform: scale(1); } 50% { opacity: .9; transform: scale(1.12); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,211,164,.5); } 70% { box-shadow: 0 0 0 9px rgba(47,211,164,0); } 100% { box-shadow: 0 0 0 0 rgba(47,211,164,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

@media (max-width: 980px) {
  .login-stage { grid-template-columns: 1fr; }
  .visual { position: absolute; inset: 0; min-height: 100svh; }
  .visual-video { width: 100%; height: 100%; object-position: 40% top; clip-path: none; filter: saturate(.78) contrast(1.05) brightness(.46); }
  .visual-tint { background: linear-gradient(0deg, rgba(4, 12, 10, .97) 4%, rgba(4, 12, 10, .76) 46%, rgba(4, 12, 10, .52) 100%); }
  .visual-foot { display: none; }
  .panel {
    min-height: 100svh; padding: 26px 18px 28px;
    background: transparent; justify-content: center;
  }
  .panel::before { opacity: .18; }
  .panel-intro { margin-bottom: 18px; }
  .panel-intro h1 { font-size: clamp(26px, 7.4vw, 32px); margin: 11px 0 7px; }
  .panel-intro p { font-size: 11.5px; }
  .login-card { padding: 26px 21px 20px; border-radius: 20px; background: rgba(7, 20, 17, .88); }
  .field-box input { font-size: 16px; } /* iOS 聚焦不放大 */
  .panel { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .welcome { margin: 22px 0 18px; }
  .welcome h2 { font-size: 23px; }
  .panel-foot { padding: 0 6px max(14px, env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) {
  .login-card { padding: 24px 17px 20px; }
  .brand-name { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .visual-video, .visual-glow, .pulse, .login-card, .welcome, .field, .submit, .role-note { animation: none !important; }
  .submit::before { display: none; }
}
