/* ============================================================================
 * LIUXIAN LAB — Member Access (login) · v4.0
 * Enterprise / Private Workspace. Visual + copy only; auth logic untouched.
 * Colours come from the single project token source: /design-tokens.css.
 * ========================================================================== */

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans SC", ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(400px, 0.95fr) minmax(520px, 1.05fr); }

/* ---------------------------------------------------------------- brand panel */
.brand-panel {
  position: relative; overflow: hidden; min-height: 100vh;
  padding: 44px clamp(32px, 5vw, 76px) 36px;
  color: #EAF0FA;
  background:
    radial-gradient(circle at 82% 14%, rgba(11, 91, 211, 0.20), transparent 30%),
    linear-gradient(158deg, var(--navy-2), var(--navy) 68%);
  display: flex; flex-direction: column;
}
/* very restrained geometry */
.brand-panel::before, .brand-panel::after {
  content: ""; position: absolute; border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 50%; pointer-events: none;
}
.brand-panel::before { width: 560px; height: 560px; right: -300px; top: 60px; }
.brand-panel::after { width: 380px; height: 380px; left: -220px; bottom: -140px; }

.brand { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 12px; width: fit-content; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--primary), var(--primary-dark));
  color: #fff; box-shadow: 0 10px 24px rgba(11, 91, 211, 0.35);
}
.brand-mark svg { width: 26px; height: 26px; stroke: #fff; fill: none; }
.brand-name { display: grid; line-height: 1; }
.brand-name strong { font-size: 17px; font-weight: 800; letter-spacing: 0.12em; color: #F5F8FF; }
.brand-name small { margin-top: 3px; font-size: 10px; letter-spacing: 0.4em; color: #9FB0C9; }

.brand-copy { position: relative; z-index: 1; margin: auto 0; padding: 40px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: #9FB0C9; }
.eyebrow span { width: 24px; height: 1px; background: currentColor; display: inline-block; }
.brand-copy h1 {
  margin: 22px 0 20px;
  font-size: clamp(30px, 3.7vw, 48px);
  line-height: 1.16; font-weight: 800; letter-spacing: -0.035em;
  color: #F7FAFF;
}
.brand-copy > p { margin: 0; max-width: 480px; color: #B4C1D6; font-size: 14px; line-height: 1.95; }

.security-card {
  position: relative; z-index: 1; display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; border-radius: var(--radius-lg); max-width: 480px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.10);
}
.security-icon { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center; background: rgba(59, 130, 246, 0.18); }
.security-icon svg { width: 20px; height: 20px; stroke: #8CC2FF; fill: none; stroke-width: 1.6; }
.security-card strong { display: block; font-size: 13.5px; color: #EEF3FB; }
.security-card p { margin: 5px 0 0; font-size: 12.5px; line-height: 1.7; color: #A9B8CE; }
.brand-foot { position: relative; z-index: 1; margin: 28px 0 0; font-size: 11px; color: #8291AB; }

/* ---------------------------------------------------------------- form panel */
.form-panel { position: relative; display: flex; flex-direction: column; padding: 26px clamp(24px, 5vw, 76px) 22px; background: var(--bg); }
.form-topbar { display: flex; align-items: center; justify-content: space-between; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.back-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.back-link:hover { color: var(--primary); }
.theme-button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; display: grid; place-items: center; color: var(--text-2); transition: border-color 180ms var(--ease), color 180ms var(--ease); }
.theme-button:hover { border-color: var(--border-strong); color: var(--text); }
.theme-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.theme-button .moon-icon { display: none; }
body.dark .theme-button .sun-icon { display: none; }
body.dark .theme-button .moon-icon { display: block; }

.form-wrap { width: min(410px, 100%); margin: auto; }

.form-heading { margin-bottom: 26px; }
.mini-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(150deg, var(--primary), var(--primary-dark)); color: #fff; font-weight: 800; font-size: 16px; }
.kicker { margin: 18px 0 0; font-size: 11px; font-weight: 800; letter-spacing: 0.2em; color: var(--primary); }
.form-heading h2 { margin: 8px 0 8px; font-size: 26px; font-weight: 800; letter-spacing: -0.025em; color: var(--text); }
.form-heading > p:last-child { margin: 0; color: var(--text-2); font-size: 13.5px; }

.login-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--text); }
.input-wrap {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 13px;
  border: 1px solid var(--input-border); border-radius: var(--radius); background: var(--surface);
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.input-wrap svg { width: 18px; height: 18px; stroke: var(--text-3); fill: none; stroke-width: 1.6; flex: 0 0 auto; }
.input-wrap input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 14.5px; color: var(--text); }
.input-wrap input::placeholder { color: var(--placeholder); }
.input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.field.invalid .input-wrap { border-color: var(--error); }
.field.invalid .input-wrap:focus-within { box-shadow: 0 0 0 3px rgba(220, 38, 38, .14); }
.field-error { color: var(--error); font-size: 12px; min-height: 14px; }
.password-toggle { width: 30px; height: 30px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--text-3); }
.password-toggle:hover { color: var(--text-2); }
.password-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.password-toggle .eye-closed { display: none; }
.password-toggle.is-visible .eye-open { display: none; }
.password-toggle.is-visible .eye-closed { display: block; }

.form-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.check-row { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.check-row input { position: absolute; opacity: 0; }
.check-box { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--input-border); display: grid; place-items: center; transition: all 150ms var(--ease); }
.check-box svg { width: 12px; height: 12px; stroke: #fff; fill: none; stroke-width: 2.4; opacity: 0; }
.check-row input:checked + .check-box { background: var(--primary); border-color: var(--primary); }
.check-row input:checked + .check-box svg { opacity: 1; }
.admin-note { font-size: 12px; color: var(--text-3); }

.submit-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; border: 0; border-radius: var(--radius); cursor: pointer;
  background: var(--primary); color: #fff; font-size: 14.5px; font-weight: 800;
  box-shadow: 0 8px 20px rgba(11, 91, 211, 0.22);
  transition: background 180ms var(--ease), transform 120ms var(--ease), opacity 180ms var(--ease);
}
.submit-button svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; }
.submit-button:hover { background: var(--primary-dark); }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled { opacity: 0.6; cursor: progress; }
.submit-button.is-loading { opacity: 0.78; }

.status-message { padding: 11px 13px; border-radius: 12px; font-size: 12.5px; line-height: 1.5; }
.status-message.info { background: var(--primary-light); color: var(--primary-dark); }
.status-message.error { background: rgba(220, 38, 38, .1); color: var(--error); }
.status-message.success { background: rgba(5, 150, 105, .12); color: var(--success); }
body.dark .status-message.info { color: #9CC3FF; }
body.dark .status-message.error { color: #FCA5A5; }
body.dark .status-message.success { color: #6EE7B7; }

.access-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; padding: 12px 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.access-note > span { width: 20px; height: 20px; flex: 0 0 auto; border-radius: 50%; background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.access-note p { margin: 0; font-size: 12px; line-height: 1.65; color: var(--text-2); }
.access-note strong { color: var(--text); }
.mobile-foot { display: none; margin: 20px 0 0; text-align: center; color: var(--text-3); font-size: 11px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .login-shell { grid-template-columns: minmax(340px, 0.85fr) minmax(460px, 1.15fr); }
  .brand-panel { padding: 36px clamp(28px, 4vw, 52px) 30px; }
}
@media (max-width: 900px) {
  .login-shell { grid-template-columns: minmax(0, 1fr); }
  .brand-panel {
    min-height: auto; padding: 30px clamp(22px, 6vw, 44px) 26px;
    gap: 0;
  }
  .brand-copy { margin: 22px 0 0; padding: 0; }
  .brand-copy h1 { font-size: clamp(26px, 6vw, 34px); margin: 16px 0 12px; }
  .brand-copy > p { font-size: 13px; }
  .security-card { margin-top: 20px; }
  .brand-foot { display: none; }
  .form-panel { min-height: auto; padding: 20px 22px 30px; }
  .form-wrap { margin: 6px auto 0; width: 100%; }
  .mobile-foot { display: block; }
}
@media (max-width: 520px) {
  .brand-panel { padding: 22px 20px; }
  .brand-name strong { font-size: 15px; }
  .brand-copy h1 { font-size: 24px; line-height: 1.2; }
  .security-card { padding: 12px 14px; }
  .security-card p { font-size: 12px; }
  .form-panel { padding: 16px 20px 26px; }
  .form-heading { margin-bottom: 20px; }
  .form-heading h2 { font-size: 21px; }
  .input-wrap, .submit-button { height: 50px; }
  .form-options { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) { * { transition-duration: 0.001ms !important; } }
