:root {
  color-scheme: dark;
  --bg: #10213a;
  --bg-purple: #1b3158;
  --blue-glow: rgba(88, 166, 255, 0.24);
  --cyan-glow: rgba(94, 234, 212, 0.18);
  --grid: rgba(167, 221, 255, 0.14);
  --wave: rgba(94, 234, 212, 0.28);
  --card: rgba(24, 43, 74, 0.68);
  --card-border: rgba(139, 211, 255, 0.34);
  --text: #f0f8ff;
  --muted: #a9bad5;
  --gold: #ffc95a;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

button,
input {
  font: inherit;
}

.login-page {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(420px, 620px) minmax(340px, 430px);
  gap: clamp(56px, 7vw, 108px);
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(64px, 8vh, 96px) clamp(24px, 5vw, 72px);
  background:
    radial-gradient(circle at 26% 40%, rgba(94, 234, 212, 0.18), transparent 30%),
    radial-gradient(circle at 76% 16%, rgba(122, 167, 255, 0.22), transparent 34%),
    radial-gradient(circle at 58% 68%, var(--cyan-glow), transparent 34%),
    linear-gradient(116deg, #10213a 0%, #172b4a 46%, #1b3158 100%);
}

.login-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(14, 34, 59, 0.18), transparent 42%, rgba(23, 48, 82, 0.28)),
    radial-gradient(ellipse at center, transparent 0%, rgba(9, 24, 43, 0.24) 78%);
}

.mesh-grid {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
}

.wave-field {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.78;
  pointer-events: none;
}

.wave-field path {
  fill: none;
  stroke: var(--wave);
  stroke-width: 1.3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 18px rgba(94, 234, 212, 0.16));
}

.wave-field path:nth-child(2) {
  stroke: rgba(125, 180, 255, 0.2);
}

.wave-field path:nth-child(3) {
  stroke: rgba(255, 201, 90, 0.13);
}

.corner-logo {
  position: fixed;
  top: 34px;
  right: 44px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}

.cat-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(139, 211, 255, 0.34);
  border-radius: 18px;
  background: rgba(21, 47, 80, 0.48);
  box-shadow: 0 16px 42px rgba(5, 22, 39, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.cat-mark img {
  width: 46px;
  height: 46px;
}

.logo-copy {
  display: grid;
  gap: 4px;
}

.logo-copy strong {
  font-size: 24px;
  letter-spacing: 0;
}

.logo-copy small {
  color: rgba(240, 248, 255, 0.72);
  font-size: 12px;
}

.intro-panel {
  width: 100%;
  padding-top: 18px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: #8fb8ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, #5eead4, #7aa7ff);
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro-lead {
  width: min(100%, 560px);
  margin: 22px 0 0;
  color: #c3d5ec;
  font-size: 18px;
  line-height: 1.8;
}

.feature-list {
  display: grid;
  gap: 14px;
  width: min(100%, 500px);
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #e4f1ff;
  font-size: 15px;
}

.feature-list span {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(94, 234, 212, 0.95);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(94, 234, 212, 0.34);
}

.signal-card {
  width: min(100%, 470px);
  margin-top: 54px;
  overflow: hidden;
  border: 1px solid rgba(139, 211, 255, 0.28);
  border-radius: 8px;
  background: rgba(21, 43, 73, 0.56);
  box-shadow: 0 26px 72px rgba(5, 22, 39, 0.26);
  backdrop-filter: blur(16px);
}

.signal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(139, 211, 255, 0.18);
}

.signal-head i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.signal-head i:nth-child(1) {
  background: #ff6e82;
}

.signal-head i:nth-child(2) {
  background: var(--gold);
}

.signal-head i:nth-child(3) {
  background: #3dd7c7;
}

.signal-head span {
  margin-left: auto;
  color: rgba(240, 248, 255, 0.42);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.28em;
}

.signal-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.signal-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(139, 211, 255, 0.18);
  border-radius: 8px;
  color: #c5d6ef;
  background: rgba(255, 255, 255, 0.04);
}

.signal-row.active {
  border-color: rgba(94, 234, 212, 0.34);
  background: rgba(94, 234, 212, 0.12);
  color: var(--text);
}

.signal-row b {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5eead4;
  box-shadow: 0 0 16px rgba(94, 234, 212, 0.46);
}

.signal-row em {
  color: rgba(240, 248, 255, 0.54);
  font-size: 11px;
  font-style: normal;
}

.auth-card {
  position: relative;
  width: min(100%, 430px);
  justify-self: end;
  padding: 26px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 28px 82px rgba(5, 22, 39, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(94, 234, 212, 0.18), transparent 38%),
    linear-gradient(315deg, rgba(122, 167, 255, 0.14), transparent 34%);
}

.auth-tabs,
.auth-form {
  position: relative;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(139, 211, 255, 0.22);
  border-radius: 8px;
  background: rgba(13, 34, 59, 0.54);
}

.auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.auth-tabs button.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.26), rgba(88, 166, 255, 0.22));
  box-shadow: inset 0 0 0 1px rgba(139, 211, 255, 0.28);
}

.auth-form {
  display: none;
  gap: 16px;
  margin-top: 26px;
}

.auth-form.active {
  display: grid;
}

.card-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 6px;
  text-align: center;
}

.card-heading h2 {
  margin: 0;
  font-size: 26px;
}

.card-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

label {
  display: grid;
  gap: 8px;
  color: #d3e4f8;
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(139, 211, 255, 0.26);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  outline: none;
  background: rgba(12, 31, 55, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus {
  border-color: rgba(94, 234, 212, 0.7);
  background: rgba(13, 34, 59, 0.94);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.14);
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: #ffb8c2;
  font-size: 13px;
  line-height: 1.55;
}

.form-message.success {
  color: #86efcb;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #f8fbff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
}

.primary-button {
  background: linear-gradient(135deg, #5eead4, #4c8bff);
  box-shadow: 0 16px 34px rgba(30, 151, 170, 0.28);
}

.secondary-button {
  border: 1px solid rgba(94, 234, 212, 0.32);
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.16), rgba(122, 167, 255, 0.16));
}

.login-icp {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 34px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: min(calc(100% - 48px), 860px);
  column-gap: 14px;
  row-gap: 6px;
  color: rgba(214, 231, 247, 0.6);
  font-size: 12px;
  line-height: 16px;
  transform: translateX(-50%);
}

.login-icp > span,
.login-icp a {
  display: inline-flex;
  align-items: center;
  height: 16px;
}

.login-icp a {
  gap: 4px;
  color: rgba(214, 231, 247, 0.66);
  text-decoration: none;
  white-space: nowrap;
}

.login-icp a:hover {
  color: #f0f8ff;
}

.login-icp img {
  display: block;
  flex: 0 0 auto;
  width: 14px;
  height: 16px;
  min-width: 14px;
  max-width: 14px;
  min-height: 16px;
  max-height: 16px;
  object-fit: contain;
}

.police-record span {
  white-space: nowrap;
}

.primary-button:hover,
.secondary-button:hover {
  filter: brightness(1.07);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .login-page {
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: start;
    min-height: 100svh;
    padding: 104px 24px 42px;
  }

  .corner-logo {
    top: 24px;
    right: 24px;
  }

  .logo-copy strong {
    font-size: 18px;
  }

  .logo-copy small {
    display: none;
  }

  .intro-panel,
  .auth-card {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }

  .signal-card {
    margin-top: 34px;
  }
}

@media (max-width: 560px) {
  .login-page {
    padding: 94px 16px 28px;
  }

  .corner-logo {
    left: 16px;
    right: auto;
  }

  .cat-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .cat-mark img {
    width: 37px;
    height: 37px;
  }

  .login-icp {
    position: static;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 22px;
    transform: none;
  }

  h1 {
    font-size: 38px;
  }

  .intro-lead {
    font-size: 15px;
  }

  .auth-card {
    padding: 20px;
  }
}
