/* 登录页样式 —— 独立于工作台样式，登录页不加载任何业务界面样式 */

:root {
  --brand: #147d64;
  --brand-dark: #0e624e;
  --brand-bright: #2fb3a0;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --danger: #dc2626;
  --ok: #059669;
  --bg: #f1f5f9;
}

* { box-sizing: border-box; }

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

body.login-body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* ── 左侧品牌区 ───────────────────────────────────────── */
.login-brand {
  background: linear-gradient(150deg, #0b5745 0%, #147d64 52%, #2fb3a0 100%);
  color: #fff;
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-logo-lg {
  width: 112px;
  height: 112px;
  object-fit: contain;
  object-position: left center;
  margin: 0 0 24px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .22));
}

.login-brand h1 {
  font-size: 34px;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 17px;
  margin: 0 0 40px;
  opacity: 0.9;
}

.brand-points {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 420px;
}

.brand-points li {
  position: relative;
  padding: 0 0 18px 30px;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.95;
}

.brand-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  font-size: 12px;
}

/* ── 右侧登录区 ───────────────────────────────────────── */
.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: #fff;
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-head h2 {
  margin: 0 0 6px;
  font-size: 26px;
}

.login-head p {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 14px;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: #334155;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 125, 100, 0.14);
}

.login-submit {
  width: 100%;
  padding: 13px;
  margin-top: 6px;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.login-submit:hover:not(:disabled) { background: var(--brand-dark); }

.login-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-error {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-radius: 9px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  font-size: 13.5px;
  line-height: 1.55;
}

/* 提交成功（申请账号已受理）——替代原来的内联样式，CSP 禁止内联 */
.login-error.is-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.login-links {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  min-height: 20px;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.login-foot {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
}

.login-foot select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.login-copyright {
  margin-top: 28px;
  color: #94a3b8;
  font-size: 12.5px;
}

/* ── 申请弹窗 ─────────────────────────────────────────── */
.signup-dialog {
  border: none;
  border-radius: 16px;
  padding: 28px;
  width: min(420px, 92vw);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.signup-dialog::backdrop { background: rgba(15, 23, 42, 0.5); }

.signup-dialog h3 { margin: 0 0 8px; font-size: 20px; }

.dialog-note {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.dialog-actions button {
  padding: 10px 20px;
  border-radius: 9px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.dialog-actions button.secondary {
  background: #fff;
  color: #475569;
  border-color: var(--line);
}

/* ── 窄屏：单列，隐藏品牌区 ───────────────────────────── */
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { background: var(--bg); }
  .login-card {
    background: #fff;
    padding: 30px 24px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.1);
  }
}
