/* 深色模式：登录 / 注册 / 找回密码（AuthLayout）配色覆盖
 * 背景：AuthLayout 构建产物中的 .dark 规则丢失了后代选择器（编译为裸 .dark{}），
 * 深色样式实际作用到了 <html> 上，导致右侧面板仍是白底、输入框却是深底。
 * 这里用更高优先级显式补齐，且仅在 html.dark 下生效，不影响浅色模式与其他页面。
 * 色值沿用应用调色板：950 #0a0a09 / 900 #151513 / 800 #232321 / 700 #383834
 * 400 #a1a19c / 300 #d0d0cb，强调色 #6366f1 / #818cf8。
 */

/* 页面底色（并抵消泄漏到 html 的深色规则） */
html.dark {
  background: #0a0a09;
  border-color: #232321;
  box-shadow: none;
}

html.dark .auth-shell {
  background: #0a0a09;
  color-scheme: dark;
}

/* 左侧品牌栏：与右侧面板拉开层次，文字对比度按小字号提高 */
html.dark .auth-shell .auth-aside {
  background: #0b0b0b;
  border-right: 1px solid #1c1c1a;
  color: #f5f5f4;
}

html.dark .auth-shell .auth-aside .auth-mark {
  background: #f5f5f4;
}

html.dark .auth-shell .auth-aside .auth-brand-name {
  color: #f5f5f4;
}

html.dark .auth-shell .auth-aside .auth-kicker {
  color: #8f8f89;
}

html.dark .auth-shell .auth-aside .auth-copy {
  color: #a8a8a2;
}

html.dark .auth-shell .auth-aside .auth-points li {
  color: #c2c2bc;
}

html.dark .auth-shell .auth-aside .tick {
  background: #ffffff73;
}

html.dark .auth-shell .auth-aside .auth-foot {
  border-top-color: #232321;
  color: #8a8a83;
}

/* 右侧表单区 */
html.dark .auth-shell .auth-main {
  background: #0a0a09;
}

html.dark .auth-shell .auth-panel {
  background: #141413;
  border-color: #262624;
  color: #c9c9c3;
  box-shadow: 0 24px 60px -36px #000000e6;
}

html.dark .auth-shell .auth-panel .auth-links {
  color: #8a8a83;
}

html.dark .auth-shell .auth-panel .auth-links a {
  color: #e9e9e4;
  border-bottom-color: #383834;
}

html.dark .auth-shell .auth-panel .auth-links a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

html.dark .auth-shell .auth-panel .auth-copyright {
  border-top-color: #232321;
  color: #8a8a83;
}

/* 输入框 */
html.dark .auth-shell .auth-panel .input {
  background: #1b1b19;
  border-color: #3a3a37;
  color: #f5f5f4;
}

html.dark .auth-shell .auth-panel .input::placeholder {
  color: #8a8a83;
}

html.dark .auth-shell .auth-panel .input:hover:not(:disabled):not(:focus) {
  border-color: #4c4c48;
}

html.dark .auth-shell .auth-panel .input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 1px #6366f1;
}

html.dark .auth-shell .auth-panel .input:disabled {
  background: #151513;
  border-color: #2b2b29;
  color: #8a8a83;
}

html.dark .auth-shell .auth-panel .input-label {
  color: #d0d0cb;
}

html.dark .auth-shell .auth-panel .input-hint {
  color: #8a8a83;
}

/* 错误态与危险色在深底上保持可辨识 */
html.dark .auth-shell .auth-panel .input-error {
  border-color: #ef4444;
}

html.dark .auth-shell .auth-panel .input-error:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px #ef4444;
}

html.dark .auth-shell .auth-panel .input-error-text {
  color: #f87171;
}

/* 浏览器自动填充：去掉偏白的黄底 */
html.dark .auth-shell .auth-panel .input:-webkit-autofill,
html.dark .auth-shell .auth-panel .input:-webkit-autofill:hover,
html.dark .auth-shell .auth-panel .input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f5f5f4;
  -webkit-box-shadow: 0 0 0 1000px #1b1b19 inset;
  caret-color: #f5f5f4;
  transition: background-color 9999s ease-out 0s;
}

/* 按钮：主按钮反白，次按钮描边透明，与首页深色态一致 */
html.dark .auth-shell .auth-panel .btn-primary {
  background: #f5f5f4;
  border-color: #f5f5f4;
  color: #0b0b0b;
  background-image: none;
  box-shadow: none;
}

html.dark .auth-shell .auth-panel .btn-primary:hover:not(:disabled) {
  background: #e6e6e2;
  border-color: #e6e6e2;
  color: #0b0b0b;
}

html.dark .auth-shell .auth-panel .btn-primary:disabled {
  background: #232321;
  border-color: #333330;
  color: #8a8a83;
  opacity: 1;
}

html.dark .auth-shell .auth-panel .btn-secondary {
  background: transparent;
  border-color: #3a3a37;
  color: #e6e6e2;
  box-shadow: none;
}

html.dark .auth-shell .auth-panel .btn-secondary:hover:not(:disabled) {
  background: #232321;
  border-color: #4c4c48;
  color: #fff;
}

html.dark .auth-shell .auth-panel input[type="checkbox"] {
  accent-color: #818cf8;
}
