/* Auth shell — login / logout / register.
   Tokens only (§2.3): the colour values live in app.css, which these pages load.
   Centred single card, official vertical lockup in light theme and the icon in
   dark (§1.1), no sidebar/topbar because there is no session behind them. */

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-root);
  padding: var(--gutter);
}

.auth-shell {
  width: 100%;
  max-width: 400px;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px 28px;
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.auth-logo {
  height: auto;
}

.auth-logo--light {
  width: 132px;
  display: block;
}

.auth-logo--dark {
  width: 56px;
  display: none;
}

html[data-theme="dark"] .auth-logo--light {
  display: none;
}

html[data-theme="dark"] .auth-logo--dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .auth-logo--light {
    display: none;
  }
  html:not([data-theme="light"]) .auth-logo--dark {
    display: block;
  }
}

.auth-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
}

.auth-subtitle {
  margin: 0 0 24px;
  font-size:14px;
  text-align: center;
  color: var(--text-muted);
}

.auth-form .field {
  margin-bottom: 16px;
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  font-size:14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.auth-form input {
  width: 100%;
  min-height: var(--tap);
  padding: 8px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-bg);
}

.auth-form button[type="submit"] {
  width: 100%;
  min-height: var(--tap);
  margin-top: 8px;
  background: var(--color-primary);
  color: var(--on-brand);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-form button[type="submit"]:hover {
  background: var(--color-primary-hover);
}

.auth-form button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-hint {
  margin-top: 4px;
  font-size:13px;
  color: var(--text-muted);
}

/* ── 飞书 SSO 入口（§4：次操作 = surface 底 + line 边框；主操作保持品牌实色）── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-default);
}

.auth-feishu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: var(--tap);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.auth-feishu:hover {
  background: var(--color-primary-bg);
  border-color: var(--color-primary);
  color: var(--brand-link);
}

.auth-feishu .icon {
  flex: none;
}

.auth-msg {
  display: none;
  padding: 8px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  font-size:14px;
  text-align: center;
}

.auth-msg.show {
  display: block;
}

.auth-msg.ok {
  background: var(--color-success-bg);
  border: 1px solid var(--line-success);
  color: var(--color-success-ink);
}

.auth-msg.err {
  background: var(--color-danger-bg);
  border: 1px solid var(--line-danger);
  color: var(--color-danger-ink);
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size:14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--brand-link);
  font-weight: 600;
}

.auth-toolbar {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  gap: 8px;
}

.auth-toolbar button {
  min-height: var(--tap-dense);
  padding: 8px 16px;
  font-size:14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  cursor: pointer;
}

.auth-toolbar button:hover {
  background: var(--color-primary-bg);
  border-color: var(--color-primary);
  color: var(--brand-link);
}
