:root {
  color-scheme: light;
  --ink: #101216;
  --muted: #686963;
  --page: #f2f0ea;
  --line: rgba(16, 18, 22, 0.12);
  --blue: #2d66f5;
  --lime: #dcf35f;
  --sky: #b8d7ff;
  --coral: #ffb49a;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  flex-direction: column;
  padding: clamp(36px, 5vw, 72px);
  background:
    radial-gradient(circle at 74% 26%, rgba(45, 102, 245, 0.27), transparent 28%),
    radial-gradient(circle at 12% 82%, rgba(220, 243, 95, 0.11), transparent 24%),
    linear-gradient(145deg, #0d1016 0%, #141922 56%, #0c0f14 100%);
  color: #fff;
}

.brand-panel::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 12px;
  color: inherit;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand img { display: block; object-fit: contain; }

.brand-copy {
  position: relative;
  z-index: 2;
  width: min(650px, 90%);
  margin: auto 0;
}

.eyebrow, .edition {
  margin: 0;
  color: rgba(255,255,255,.55);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: .16em;
}

.brand-copy h1 {
  margin: 24px 0 28px;
  font-size: clamp(46px, 5vw, 76px);
  font-weight: 760;
  letter-spacing: -.075em;
  line-height: 1.04;
}

.brand-copy > p:last-child {
  max-width: 520px;
  margin: 0;
  color: rgba(255,255,255,.62);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.8;
}

.brand-footnote {
  position: relative;
  z-index: 2;
  margin: 0;
  color: rgba(255,255,255,.35);
  font-size: 12px;
}

.signal-orbit {
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 480px;
  height: 480px;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
}

.orbit-one { inset: 25px; }
.orbit-two { inset: 110px; }

.signal-dot {
  position: absolute;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  color: #101216;
  font-size: 13px;
  font-weight: 800;
}

.signal-new { top: 28px; left: 168px; background: var(--lime); }
.signal-collab { top: 182px; left: 22px; background: var(--sky); }
.signal-activity { top: 278px; left: 278px; background: var(--coral); }

.login-panel {
  display: grid;
  min-height: 100vh;
  align-content: center;
  justify-items: center;
  padding: clamp(32px, 6vw, 88px);
  background:
    radial-gradient(circle at 100% 0, rgba(184, 215, 255, .28), transparent 26rem),
    var(--page);
}

.login-card { width: min(100%, 470px); }

.login-heading .edition { color: #74746e; }

.login-heading h2 {
  margin: 12px 0 8px;
  font-size: clamp(36px, 4vw, 48px);
  letter-spacing: -.055em;
  line-height: 1.05;
}

.login-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 38px 0 30px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.52);
}

.login-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #70716b;
  cursor: pointer;
  font-size: 14px;
  font-weight: 720;
}

.login-tabs button[aria-selected="true"] {
  background: #fff;
  box-shadow: 0 5px 18px rgba(20, 23, 30, .08), 0 1px 2px rgba(20, 23, 30, .04);
  color: var(--ink);
}

.login-tabs button:focus-visible,
.password-field input:focus-visible,
.password-field button:focus-visible,
.primary-button:focus-visible,
.feishu-button:focus-visible {
  outline: 3px solid rgba(45, 102, 245, .23);
  outline-offset: 2px;
}

.login-message {
  margin: -12px 0 20px;
  padding: 12px 14px;
  border: 1px solid rgba(185, 69, 40, .18);
  border-radius: 12px;
  background: rgba(255, 180, 154, .22);
  color: #75311f;
  font-size: 13px;
  line-height: 1.55;
}

.login-message.is-info {
  border-color: rgba(45, 102, 245, .14);
  background: rgba(184, 215, 255, .26);
  color: #244375;
}

.mode-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.mode-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: #e4edff;
  color: var(--blue);
  font-size: 24px;
  font-weight: 780;
}

.feishu-icon { background: #fff; box-shadow: 0 5px 20px rgba(20,23,30,.07); }

.mode-intro h3 { margin: 0 0 4px; font-size: 16px; }
.mode-intro p { margin: 0; color: var(--muted); font-size: 13px; }

.field-label {
  display: block;
  margin: 0 0 9px;
  color: #3c3e3a;
  font-size: 13px;
  font-weight: 690;
}

.password-field { position: relative; }

.password-field input {
  width: 100%;
  height: 52px;
  padding: 0 72px 0 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.74);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.password-field input:focus {
  border-color: rgba(45, 102, 245, .54);
  box-shadow: 0 0 0 4px rgba(45, 102, 245, .08);
  outline: none;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 10px;
  min-width: 52px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #777872;
  cursor: pointer;
  font-size: 12px;
  font-weight: 680;
  transform: translateY(-50%);
}

.primary-button, .feishu-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 760;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary-button {
  background: #11141a;
  box-shadow: 0 12px 28px rgba(17,20,26,.16);
  color: #fff;
}

.feishu-button {
  margin-top: 0;
  border: 1px solid rgba(51, 112, 255, .18);
  background: #3370ff;
  box-shadow: 0 12px 28px rgba(51,112,255,.18);
  color: #fff;
}

.primary-button:hover, .feishu-button:hover { transform: translateY(-1px); }
.primary-button:disabled, .feishu-button:disabled { cursor: not-allowed; opacity: .48; transform: none; }

.button-feishu-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.16);
}

.privacy-note {
  margin: 14px 0 0;
  color: #777872;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #85857f;
  font-size: 11.5px;
  line-height: 1.65;
}

.security-note p { margin: 0; }
.support { margin: 32px 0 0; color: #8a8a84; font-size: 11.5px; text-align: center; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: 300px; padding: 30px clamp(24px, 7vw, 64px) 36px; }
  .brand-copy { width: min(680px, 100%); margin: 54px 0 28px; }
  .brand-copy h1 { margin-block: 16px 18px; font-size: clamp(38px, 8vw, 58px); }
  .brand-copy > p:last-child { display: none; }
  .brand-footnote { display: none; }
  .signal-orbit { right: -110px; bottom: -210px; opacity: .68; }
  .login-panel { min-height: auto; padding: 56px 24px 46px; }
}

@media (max-width: 520px) {
  .brand-panel { min-height: 244px; }
  .brand-copy { margin: 42px 0 10px; }
  .brand-copy h1 { font-size: 36px; }
  .login-panel { padding-top: 42px; }
  .login-tabs { margin-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
