/**
 * 登录页布局（配色由内联链入的 workbench-prototype.css + wb-theme-dark.css 统一提供）。
 */
body.wb-page {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}

.wb-login {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 24px;
}

/* 登录页右上角：无边框图标按钮 + 固定定位 */
.wb-theme-toggle.wb-theme-toggle--login {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;
}

.wb-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: 4px;
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.wb-login-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 1.25rem;
  height: 48px;
}

.wb-login-brand__logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  margin: 0;
  padding: 0;
  display: block;
  object-fit: contain;
  object-position: center center;
  background: transparent;
  border: none;
}

.wb-login-brand__title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 48px;
  margin: 0;
  padding: 0;
}

.wb-login-brand__title h1 {
  margin: 0;
  padding: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

.wb-card > h1 {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.wb-card label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.wb-card input:not(.wb-captcha-input) {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0.65rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.wb-card input:not(.wb-captcha-input):focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

html[data-theme='dark'] .wb-card input:not(.wb-captcha-input) {
  background: #0d1117;
}

html[data-theme='dark'] .wb-card input:not(.wb-captcha-input):focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

.wb-card .wb-login-submit {
  width: 100%;
  margin-top: 1rem;
  padding: 0.6rem;
  border: none;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  text-decoration: none;
}

.wb-card .wb-login-submit:hover {
  background: var(--accent-hover);
}

.wb-captcha-field {
  margin-bottom: 0.75rem;
}

.wb-captcha-title {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.wb-captcha-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.wb-captcha-img {
  display: block;
  flex: 0 0 auto;
  width: 150px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  vertical-align: middle;
  background: var(--surface);
}

html[data-theme='dark'] .wb-captcha-img {
  background: #0d1117;
}

.wb-captcha-input {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  margin-top: 0;
  padding: 0.5rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

html[data-theme='dark'] .wb-captcha-input {
  background: #0d1117;
}

.wb-captcha-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

html[data-theme='dark'] .wb-captcha-input:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

.wb-captcha-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
}

.wb-alert {
  color: #f85149;
  font-size: 0.875rem;
}

html[data-theme='dark'] .wb-alert {
  color: #ff7b72;
}

/* 以下类若其它入口仍引用，与内页变量一致 */
.wb-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.wb-brand {
  font-weight: 700;
}

.wb-user {
  color: var(--muted);
  font-size: 0.9rem;
}

.wb-inline {
  margin-left: auto;
}

.wb-inline button {
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

.wb-layout {
  display: flex;
  min-height: calc(100vh - 52px);
}

.wb-sidebar-host {
  width: 240px;
  padding: 1rem;
  border-right: 1px solid var(--border);
  background: var(--bg);
}

.wb-sidebar {
  font-size: 0.9rem;
}

.wb-sidebar .muted {
  color: var(--muted);
  margin-top: 0.5rem;
}

.wb-main {
  flex: 1;
  padding: 1.25rem;
}

.muted {
  color: var(--muted);
}

.wb-json {
  background: var(--bg);
  padding: 1rem;
  border-radius: 4px;
  overflow: auto;
  font-size: 0.8rem;
  border: 1px solid var(--border);
}
