/* ============================================================
   九派 AI · Login (Linear-Inspired)
   设计参考：Linear / Vercel / Stripe Dashboard 登录页
   2026-05-02 / v6 (Linear-style)
   ============================================================ */

:root {
  --jp-bg:           #fbfbfb;
  --jp-surface:      #ffffff;
  --jp-surface-soft: #fafafa;
  --jp-surface-alt:  #f5f5f5;
  --jp-bg-hover:     #f4f4f5;

  --jp-line:         #e8e8ea;
  --jp-line-strong:  #d8d8db;
  --jp-line-soft:    #efeff1;

  --jp-text:         #0a0a0a;
  --jp-text-soft:    #1f1f23;
  --jp-text-muted:   #6e6e76;
  --jp-text-faint:   #a1a1a8;

  --jp-accent:       #5e6ad2;          /* Linear indigo */
  --jp-accent-hover: #4f5ac8;
  --jp-accent-deep:  #424dab;
  --jp-accent-soft:  #eeeffd;
  --jp-accent-line:  #d3d6f4;

  --jp-success:      #1f9d54;
  --jp-danger:       #dc2626;

  --jp-radius:       6px;
  --jp-radius-lg:    8px;

  --jp-primary:      var(--jp-accent);
  --jp-primary-hover:var(--jp-accent-hover);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body.login-body {
  font-family:
    "Inter", "InterVariable",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", sans-serif;
  color: var(--jp-text);
  background: var(--jp-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 13px;
  letter-spacing: -0.005em;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  overflow: hidden;
}

/* 整体两栏 */
.login-shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
  width: 100%;
}

/* ===========================================================
   左侧：品牌墙（深紫 + 几何渐变）
   =========================================================== */
.brand-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 60px 64px;
  color: #ffffff;
  background:
    radial-gradient(900px 700px at 90% 10%, rgba(140, 130, 240, 0.30), transparent 60%),
    radial-gradient(700px 600px at 10% 90%, rgba(94, 106, 210, 0.40), transparent 60%),
    linear-gradient(160deg, #0a0a14 0%, #1a1a2e 50%, #0a0a14 100%);
  overflow: hidden;
}

/* 极细网格 */
.brand-pane::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 80%);
  pointer-events: none;
}

/* 圆形光晕 */
.brand-pane::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -15%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 130, 240, 0.18) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.brand-head,
.brand-body,
.brand-foot {
  position: relative;
  z-index: 1;
}

.brand-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 横版 logo (900x300, 比例 3:1): 用 height 控制,宽度自适应 */
.brand-logo {
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.brand-mark {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.brand-body {
  max-width: 480px;
}

.brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  padding: 5px 12px 5px 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.brand-eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8c82f0;
  box-shadow: 0 0 10px rgba(140, 130, 240, 0.7);
}

.brand-title {
  margin: 0 0 24px;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.10;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.brand-title strong {
  font-weight: 600;
  background: linear-gradient(120deg, #c4b9ff 0%, #8c82f0 60%, #5e6ad2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.brand-desc {
  margin: 0 0 36px;
  font-size: 14.5px;
  line-height: 1.65;
  letter-spacing: -0.005em;
  color: rgba(255, 255, 255, 0.68);
  max-width: 440px;
}

.brand-divider {
  width: 32px;
  height: 1px;
  margin: 24px 0;
  border: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), transparent);
}

/* 三大要素 */
.brand-pillars {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}

.brand-pillar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-pillar-num {
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.011em;
  font-feature-settings: "tnum" 1;
}

.brand-pillar-num em {
  font-style: normal;
  background: linear-gradient(120deg, #c4b9ff, #8c82f0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.brand-pillar-label {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.02em;
}

.brand-foot span + span {
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.10);
  margin-left: 14px;
}

/* ===========================================================
   右侧：表单
   =========================================================== */
.form-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--jp-bg);
  position: relative;
}

.form-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  display: grid;
  gap: 18px;
}

.form-head {
  margin-bottom: 4px;
}

.form-eyebrow {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--jp-text-muted);
  text-transform: uppercase;
}

.form-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--jp-text);
  line-height: 1.18;
}

.form-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--jp-text-muted);
  line-height: 1.5;
}

/* 字段 */
.field {
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--jp-text);
  letter-spacing: -0.005em;
}

.field-control {
  position: relative;
}

.field-control input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--jp-text);
  background: var(--jp-surface);
  border: 1px solid var(--jp-line-strong);
  border-radius: var(--jp-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.field-control input::placeholder {
  color: var(--jp-text-faint);
}

.field-control input:hover {
  border-color: var(--jp-text-muted);
}

.field-control input:focus {
  outline: none;
  border-color: var(--jp-accent);
  box-shadow: 0 0 0 3px var(--jp-accent-soft);
}

.field-control input:-webkit-autofill {
  -webkit-text-fill-color: var(--jp-text);
  -webkit-box-shadow: 0 0 0 1000px var(--jp-surface) inset;
  caret-color: var(--jp-text);
  transition: background-color 5000s ease-in-out 0s;
}

/* 提交按钮 - 黑色实心 (Linear/Vercel 标志) */
.submit-btn {
  position: relative;
  height: 36px;
  margin-top: 4px;
  border: 1px solid var(--jp-text);
  border-radius: var(--jp-radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: #ffffff;
  cursor: pointer;
  background: var(--jp-text);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  transition: background 0.15s ease, transform 0.1s ease;
}

.submit-btn:hover {
  background: #1c1c1f;
  border-color: #1c1c1f;
}

.submit-btn:active {
  transform: translateY(0.5px);
}

.submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 注册行 */
.form-aux {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--jp-text-muted);
}

.form-aux a {
  color: var(--jp-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.form-aux a:hover {
  color: var(--jp-accent-hover);
}

.inline-message {
  min-height: 18px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--jp-text-muted);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.inline-message.is-visible { opacity: 1; }
.inline-message.success { color: var(--jp-success); }
.inline-message.error { color: var(--jp-danger); }

/* 页脚 */
.form-pane-foot {
  position: absolute;
  bottom: 24px;
  right: 32px;
  font-size: 11px;
  color: var(--jp-text-faint);
  letter-spacing: 0.02em;
}

/* ===========================================================
   响应式
   =========================================================== */
@media (max-width: 960px) {
  body.login-body { overflow: auto; }
  .login-shell { grid-template-columns: 1fr; }

  .brand-pane {
    padding: 40px 32px 32px;
    min-height: 280px;
  }
  .brand-body { margin-top: 8px; }
  .brand-title { font-size: 32px; }
  .brand-pillars { gap: 28px; }
  .brand-foot { display: none; }

  .form-pane { padding: 32px 24px 64px; }
  .form-card { max-width: 100%; }

  .form-pane-foot {
    bottom: 12px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 480px) {
  .brand-pane { padding: 28px 20px; }
  .brand-title { font-size: 26px; }
  .form-title { font-size: 22px; }
}
