:root {
  --bg: #f6fbff;
  --panel: rgba(255, 255, 255, 0.9);
  --border: rgba(23, 93, 150, 0.16);
  --text: #0b1f33;
  --heading: #06172a;
  --muted: #52677d;
  --accent: #00b894;
  --accent-2: #1677ff;
  --accent-3: #6d5dfc;
  --danger: #d93d5b;
  --success: #087f68;
  --shadow: 0 26px 80px rgba(31, 83, 126, 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 184, 148, 0.16), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(22, 119, 255, 0.16), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 48%, #eef7ff 100%);
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(22, 119, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 119, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}
a { color: var(--accent-2); font-weight: 800; text-decoration: none; }
button, input { font: inherit; }

.portal-shell {
  width: min(1160px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 28px;
  align-items: center;
  padding: 48px 0;
}
.brand-panel,
.auth-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 34px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}
.brand-panel {
  min-height: 660px;
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.brand-panel::before,
.auth-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(135deg, rgba(0, 184, 148, 0.12), transparent 45%);
}
.brand-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { position: relative; display: inline-flex; width: 166px; }
.brand img { width: 100%; height: auto; filter: drop-shadow(0 10px 18px rgba(22, 119, 255, 0.14)); }
.login-language-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(239, 248, 255, 0.88);
}
.login-language-switch button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 950;
}
.login-language-switch button.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 22px rgba(22, 119, 255, 0.2);
}
.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--success);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow::before {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
  content: "";
}
h1, h2 { position: relative; margin: 0; color: var(--heading); line-height: 1.02; letter-spacing: -0.055em; }
h1 { max-width: 720px; font-size: clamp(42px, 6vw, 72px); }
h2 { font-size: clamp(30px, 4vw, 42px); }
.intro,
.form-heading p,
.field span,
.check,
.form-note { position: relative; color: var(--muted); }
.intro { max-width: 620px; margin: 22px 0 0; font-size: 18px; }
.signal-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.signal-grid div,
.network-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 38px rgba(31, 83, 126, 0.08);
}
.signal-grid div { padding: 18px; }
.signal-grid strong { display: block; color: var(--heading); font-size: 28px; line-height: 1; }
.signal-grid span { display: block; margin-top: 8px; color: var(--muted); font-weight: 800; }
.network-card { position: relative; height: 150px; margin-top: 28px; padding: 20px; }
.network-card span { position: absolute; width: 16px; height: 16px; border-radius: 999px; background: var(--accent-2); box-shadow: 0 0 0 8px rgba(22, 119, 255, 0.08); }
.network-card span:nth-child(1) { left: 13%; top: 34%; background: var(--accent); }
.network-card span:nth-child(2) { left: 48%; top: 60%; }
.network-card span:nth-child(3) { right: 14%; top: 28%; background: var(--accent-3); }
.network-line { position: absolute; left: 16%; right: 16%; top: 50%; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3)); transform: rotate(-4deg); }

.auth-card { padding: 26px; }
.auth-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px; border: 1px solid var(--border); border-radius: 999px; background: rgba(239, 248, 255, 0.86); }
.tab-button { border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; padding: 11px 14px; font-weight: 950; }
.tab-button.is-active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 12px 24px rgba(22, 119, 255, 0.22); }
.auth-form { position: relative; display: none; padding: 30px 6px 4px; }
.auth-form.is-active { display: grid; gap: 18px; }
.form-heading { margin-bottom: 6px; }
.form-heading p:last-child { margin: 12px 0 0; }
.field { display: grid; gap: 8px; }
.field span { font-size: 13px; font-weight: 900; }
.field input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--heading);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input:focus { border-color: rgba(22, 119, 255, 0.42); box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.1); background: #fff; }
.password-field { position: relative; }
.password-field input { padding-right: 78px; }
.password-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); border: 0; border-radius: 999px; background: rgba(22, 119, 255, 0.08); color: var(--accent-2); cursor: pointer; padding: 7px 10px; font-size: 12px; font-weight: 950; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; }
.check input { accent-color: var(--accent-2); }
.submit-button { border: 0; border-radius: 999px; min-height: 54px; cursor: pointer; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 950; box-shadow: 0 16px 36px rgba(22, 119, 255, 0.22); transition: transform .18s ease, box-shadow .18s ease; }
.submit-button:hover, .submit-button:focus-visible { transform: translateY(-2px); box-shadow: 0 20px 44px rgba(22, 119, 255, 0.28); outline: none; }
.form-note { min-height: 22px; margin: 0; font-size: 14px; font-weight: 800; }
.form-note.is-error { color: var(--danger); }
.form-note.is-success { color: var(--success); }

.error-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.error-card { width: min(520px, 100%); border: 1px solid var(--border); border-radius: 30px; background: var(--panel); padding: 34px; text-align: center; box-shadow: var(--shadow); }
.error-card h1 { font-size: 82px; }
.error-card p { color: var(--muted); }
.error-card a { display: inline-flex; margin-top: 18px; border-radius: 999px; padding: 13px 18px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }

@media (max-width: 940px) {
  .portal-shell { grid-template-columns: 1fr; padding: 24px 0; }
  .brand-panel { min-height: auto; gap: 34px; }
}
@media (max-width: 560px) {
  .portal-shell { width: min(100% - 22px, 1160px); }
  .brand-panel, .auth-card { border-radius: 24px; padding: 22px; }
  .brand-row { align-items: flex-start; flex-direction: column; }
  .signal-grid { grid-template-columns: 1fr; }
  .form-row { align-items: flex-start; flex-direction: column; }
}

/* V3 exploration alignment: livelier edge-network portal visuals. */
:root {
  --vivid-orange: #ff7a1a;
  --vivid-cyan: #00d4ff;
  --vivid-pink: #ff4ecd;
}

body {
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 122, 26, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 6%, rgba(0, 212, 255, 0.2), transparent 30rem),
    radial-gradient(circle at 90% 68%, rgba(255, 78, 205, 0.11), transparent 24rem),
    linear-gradient(180deg, #ffffff 0%, #f4fbff 46%, #eef8ff 100%);
}

.brand-panel,
.auth-card,
.error-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 252, 255, 0.84));
  box-shadow: 0 32px 90px rgba(31, 83, 126, 0.18), 0 16px 36px rgba(255, 122, 26, 0.08);
}

.brand-panel::after,
.auth-card::after {
  position: absolute;
  inset: auto 24px 24px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  pointer-events: none;
  content: "";
  background: conic-gradient(from 90deg, rgba(255, 122, 26, 0.18), rgba(0, 212, 255, 0.2), rgba(109, 93, 252, 0.16), rgba(255, 122, 26, 0.18));
  filter: blur(34px);
  opacity: 0.78;
}

.tab-button.is-active,
.login-language-switch button.is-active,
.submit-button,
.error-card a {
  background: linear-gradient(135deg, var(--vivid-orange), var(--accent-2) 56%, var(--accent-3));
}

.submit-button {
  box-shadow: 0 18px 42px rgba(22, 119, 255, 0.26), 0 10px 22px rgba(255, 122, 26, 0.12);
}

h1 {
  background: linear-gradient(120deg, #06172a, #135fa8 38%, #00a98b 68%, #ff7a1a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.signal-grid div,
.network-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.signal-grid div:hover,
.network-card:hover {
  transform: translateY(-5px);
  border-color: rgba(22, 119, 255, 0.28);
  box-shadow: 0 24px 58px rgba(31, 83, 126, 0.14), 0 12px 24px rgba(255, 122, 26, 0.08);
}

.network-line {
  background: linear-gradient(90deg, var(--vivid-orange), var(--vivid-cyan), var(--accent-3));
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.32);
}
