:root {
  color-scheme: dark;
  --bg: #061617;
  --panel: rgba(13, 35, 36, .82);
  --panel-solid: #0d2526;
  --line: rgba(178, 255, 226, .13);
  --muted: #8fa8a4;
  --text: #ecfff9;
  --mint: #73f6c2;
  --mint-deep: #25c991;
  --danger: #ff8e8e;
  --shadow: 0 28px 90px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 20%, rgba(31, 128, 105, .15), transparent 34rem),
    radial-gradient(circle at 92% 82%, rgba(115, 246, 194, .08), transparent 36rem),
    linear-gradient(135deg, #061516 0%, #071d1f 48%, #061415 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.ambient { position: fixed; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.ambient-one { width: 25rem; height: 25rem; background: rgba(45, 213, 158, .1); left: -12rem; top: 18%; }
.ambient-two { width: 22rem; height: 22rem; background: rgba(51, 173, 161, .08); right: -10rem; bottom: 5%; }

.topbar {
  position: relative;
  z-index: 5;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: auto;
  padding: 0 32px;
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: #06231d;
  background: linear-gradient(135deg, var(--mint), #a3ffd9);
  font: 900 21px/1 Georgia, serif;
  box-shadow: 0 8px 28px rgba(59, 232, 169, .25);
}
.brand strong { display: block; font-size: 15px; letter-spacing: .04em; }
.brand small { display: block; margin-top: 3px; color: #6d8e88; font-size: 8px; letter-spacing: .19em; }
.secure-pill { padding: 8px 13px; border: 1px solid var(--line); border-radius: 99px; color: #9db5b0; font-size: 12px; background: rgba(7, 24, 25, .65); }
.secure-pill span { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }

main { position: relative; z-index: 1; min-height: calc(100vh - 138px); display: grid; place-items: center; padding: 34px 32px 60px; }
.hidden { display: none !important; }
.center-card { padding: 42px; text-align: center; color: var(--muted); }
.compact { width: 300px; }
.loader { width: 32px; height: 32px; margin: 0 auto 18px; border: 2px solid rgba(115,246,194,.16); border-top-color: var(--mint); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-layout, .install-layout { width: min(1160px, 100%); display: grid; align-items: center; gap: 96px; }
.login-layout { grid-template-columns: minmax(360px, 1fr) 440px; }
.install-layout { grid-template-columns: 330px minmax(540px, 720px); gap: 70px; }
.hero-copy { padding-left: 3vw; }
.eyebrow { color: var(--mint); font-size: 10px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; }
.hero-copy h1, .install-intro h1 { margin: 18px 0 22px; font-family: Georgia, "Songti SC", serif; font-weight: 500; letter-spacing: -.05em; line-height: 1.06; }
.hero-copy h1 { font-size: clamp(48px, 5.4vw, 76px); }
.hero-copy h1 em { color: var(--mint); font-style: normal; }
.hero-copy > p, .install-intro > p { max-width: 480px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.trust-row { display: flex; align-items: center; gap: 24px; margin-top: 54px; }
.trust-row div { display: grid; gap: 6px; }
.trust-row b { font-family: Georgia, serif; color: #dffff3; font-size: 19px; }
.trust-row span { color: #708e88; font-size: 11px; }
.trust-row i { width: 1px; height: 34px; background: var(--line); }

.login-card, .install-panel {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(18, 48, 48, .88), rgba(8, 27, 28, .9));
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}
.login-card { min-height: 570px; padding: 46px 42px 38px; border-radius: 28px; }
.login-card::before, .install-panel::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(120deg, rgba(255,255,255,.045), transparent 24%); }
.card-heading h2, .panel-heading h2, .process-heading h2 { margin: 11px 0 8px; font-family: Georgia, "Songti SC", serif; font-size: 32px; font-weight: 500; }
.card-heading p, .panel-heading p, .process-heading p { margin: 0 0 30px; color: var(--muted); font-size: 13px; }

form { position: relative; }
label { display: block; color: #b8cbc7; font-size: 12px; font-weight: 650; letter-spacing: .025em; }
input {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(181, 244, 221, .14);
  border-radius: 12px;
  outline: none;
  padding: 0 14px;
  color: var(--text);
  background: rgba(1, 15, 16, .55);
  font: inherit;
  transition: border .2s, box-shadow .2s, background .2s;
}
input:focus { border-color: rgba(115, 246, 194, .7); background: rgba(4, 24, 24, .8); box-shadow: 0 0 0 3px rgba(115, 246, 194, .08); }
input::placeholder { color: #506c67; }
.input-shell { display: flex; align-items: center; height: 51px; margin-top: 9px; border: 1px solid rgba(181,244,221,.14); border-radius: 13px; background: rgba(1,15,16,.55); }
.input-shell:focus-within { border-color: rgba(115,246,194,.7); box-shadow: 0 0 0 3px rgba(115,246,194,.08); }
.input-shell > span { display: grid; place-items: center; width: 48px; height: 24px; color: var(--mint); border-right: 1px solid var(--line); font-weight: 800; }
.input-shell input { height: 49px; border: 0; background: transparent; box-shadow: none; }
.primary-button, .secondary-button {
  width: 100%;
  min-height: 51px;
  border-radius: 13px;
  cursor: pointer;
  font: 700 13px/1 inherit;
  transition: transform .18s, filter .18s, opacity .18s;
}
.primary-button { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; border: 0; padding: 0 18px 0 21px; color: #06251d; background: linear-gradient(135deg, #72f6c2, #a1ffda); box-shadow: 0 12px 30px rgba(47, 207, 151, .2); }
.primary-button b { font-size: 19px; }
.primary-button:hover, .secondary-button:hover { transform: translateY(-1px); filter: brightness(1.04); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.secondary-button { margin-top: 18px; border: 1px solid var(--line); color: #cce1dc; background: rgba(255,255,255,.025); }
.privacy-note { margin-top: 18px; text-align: center; color: #68827c; font-size: 10px; }
.privacy-note span { color: var(--mint); margin-right: 6px; }
.alert { margin-top: 16px; padding: 11px 13px; border-radius: 10px; font-size: 12px; line-height: 1.5; }
.alert.error { color: #ffd0d0; border: 1px solid rgba(255,119,119,.22); background: rgba(134,32,32,.14); }

.install-intro h1 { font-size: 48px; }
.steps { list-style: none; margin: 45px 0 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 14px; min-height: 66px; color: #607e78; position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 50px; width: 1px; height: 31px; background: var(--line); }
.steps li > span { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; font: 700 9px/1 inherit; }
.steps li div { display: grid; gap: 5px; }
.steps b { font-size: 12px; }
.steps small { font-size: 10px; }
.steps .active > span { color: #09291f; background: var(--mint); border-color: var(--mint); }
.steps .active b { color: var(--text); }
.install-panel { border-radius: 26px; padding: 38px 42px; }
.panel-heading p code { color: #b1dbcc; background: rgba(255,255,255,.04); padding: 2px 5px; border-radius: 4px; }
fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 25px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; }
legend { padding: 0 10px; color: #d6e8e4; font-size: 12px; font-weight: 700; }
legend span { color: var(--mint); margin-right: 8px; }
fieldset label { display: grid; gap: 8px; }
.field-help { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.7; letter-spacing: 0; }
fieldset .wide { grid-column: 1 / -1; }
.form-note { color: #627e78; text-align: center; font-size: 10px; line-height: 1.7; }

.back-button { border: 0; padding: 0; color: #78958f; background: transparent; cursor: pointer; font-size: 12px; }
.process-heading { margin-top: 28px; text-align: center; }
.process-heading p { min-height: 18px; }
.stage { margin-top: 18px; }
.device-notice { display: flex; gap: 12px; padding: 13px; border: 1px solid rgba(255,215,122,.18); border-radius: 12px; background: rgba(140,104,20,.08); }
.device-notice > span { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border-radius: 50%; color: #ffe39a; background: rgba(255,220,132,.12); font-weight: 900; }
.device-notice div { display: grid; gap: 4px; }
.device-notice b { color: #f2dec0; font-size: 11px; }
.device-notice small { color: #8f8674; font-size: 10px; line-height: 1.5; }
.qr-wrap { position: relative; overflow: hidden; width: 244px; height: 244px; margin: 24px auto 15px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.28); }
.qr-wrap img { width: 100%; height: 100%; object-fit: contain; }
.scan-line { position: absolute; left: 12px; right: 12px; height: 2px; top: 12px; background: linear-gradient(90deg, transparent, var(--mint-deep), transparent); box-shadow: 0 0 12px var(--mint-deep); animation: scan 2.4s ease-in-out infinite; }
@keyframes scan { 50% { transform: translateY(216px); } }
.poll-status { display: flex; align-items: center; justify-content: center; gap: 8px; color: #9db4ae; font-size: 11px; }
.poll-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; box-shadow: 0 0 0 6px rgba(115,246,194,.09); } }
#successStage { text-align: center; }
.success-mark span { display: grid; place-items: center; margin: auto; border-radius: 50%; color: #06251d; background: var(--mint); }
#successStage h3 { margin: 20px 0 8px; font: 500 25px/1.2 Georgia, serif; }
#successStage p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.login-notice { margin-top: 24px; }
.success-mark { width: 92px; height: 92px; margin: 35px auto 0; padding: 11px; border: 1px solid rgba(115,246,194,.18); border-radius: 50%; box-shadow: 0 0 60px rgba(70,219,165,.12); }
.success-mark span { width: 100%; height: 100%; font-size: 32px; }
.expiry { display: inline-block; margin-top: 12px; padding: 7px 11px; border-radius: 99px; color: #99b4ae; background: rgba(255,255,255,.035); font-size: 10px; }

footer { position: relative; z-index: 1; height: 54px; display: flex; justify-content: center; align-items: center; gap: 9px; color: #49645f; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 920px) {
  .login-layout, .install-layout { grid-template-columns: 1fr; gap: 40px; max-width: 620px; }
  .hero-copy { padding: 20px 0 0; text-align: center; }
  .hero-copy > p { margin-inline: auto; }
  .trust-row { justify-content: center; margin-top: 30px; }
  .install-intro { text-align: center; }
  .install-intro > p { margin-inline: auto; }
  .steps { display: none; }
}

@media (max-width: 580px) {
  .topbar { height: 72px; padding: 0 18px; }
  .secure-pill { display: none; }
  main { padding: 18px 14px 40px; align-items: start; }
  .hero-copy h1 { font-size: 42px; }
  .hero-copy { padding-top: 8px; }
  .trust-row { gap: 16px; }
  .login-card, .install-panel { padding: 32px 22px; border-radius: 21px; }
  .login-card { min-height: 540px; }
  .install-intro h1 { font-size: 39px; }
  fieldset { grid-template-columns: 1fr; padding: 18px; }
  fieldset .wide { grid-column: auto; }
  .qr-wrap { width: 220px; height: 220px; }
  @keyframes scan { 50% { transform: translateY(192px); } }
}
