/* ==========================================================================
   可染科技统一身份认证 - 样式表
   --------------------------------------------------------------------------
   设计语言
     · 品牌色：墨黑 #111111 / 正红 #c8102e（呼应 logo 的黑字红点）
     · 风格：克制、干净、有编辑感。无渐变、无玻璃拟态、无花哨动效
     · 布局：左品牌区（深色）+ 右表单区（白色），移动端上下堆叠
     · 字体：系统字体栈，中英混排友好
   ========================================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", sans-serif;
  background: #f7f7f8;
  color: #111;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: #c8102e; text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: "SF Mono", Consolas, Menlo, monospace;
  font-size: 0.92em;
  background: #f2f2f3;
  padding: 1px 5px;
  border-radius: 3px;
  color: #333;
}

/* ==========================================================================
   主布局
   ========================================================================== */

.layout { display: flex; min-height: 100vh; }

/* ---------- 左侧品牌区 ---------- */

.brand {
  width: 44%;
  max-width: 560px;
  background: #111;
  color: #fff;
  padding: 56px 56px 48px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.brand-logo { margin-bottom: auto; }
.brand-logo img { width: 172px; height: auto; display: block; }
.brand-logo .brand-wordmark {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
}
.brand-logo .brand-wordmark small {
  display: block;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 2.4px;
  color: #7a7a7a;
  margin-top: 4px;
  text-transform: uppercase;
}

.brand-mid { margin: 64px 0 auto; }

.brand-title {
  font-size: 30px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin: 0 0 18px;
  color: #fff;
}

.brand-desc {
  font-size: 14px;
  line-height: 1.85;
  color: #9a9a9a;
  margin: 0;
  max-width: 340px;
}

.brand-foot {
  font-size: 12px;
  color: #6b6b6b;
  line-height: 1.8;
  margin-top: 64px;
}
.brand-foot a { color: #8a8a8a; border-bottom: 1px solid #333; text-decoration: none; }
.brand-foot a:hover { color: #ccc; border-color: #666; }

/* 右侧极细分隔线 */
.brand::after {
  content: "";
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 1px;
  background: #222;
}

/* ---------- 右侧表单区 ---------- */

.form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: #fff;
}

.form-box { width: 100%; max-width: 380px; }

.form-head { margin-bottom: 32px; }

.form-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin: 0 0 8px;
  color: #111;
}

.form-sub {
  font-size: 13.5px;
  color: #777;
  margin: 0;
  line-height: 1.7;
}

/* ==========================================================================
   表单元素
   ========================================================================== */

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  margin-bottom: 7px;
}

.field label .opt {
  font-weight: 400;
  color: #999;
  font-size: 12px;
}

.input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  font-size: 14px;
  font-family: inherit;
  color: #111;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  transition: border-color .15s, box-shadow .15s;
}

.input::placeholder { color: #aaa; }

.input:hover { border-color: #bbb; }

.input:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17,17,17,.06);
}

.input.is-error {
  border-color: #c8102e;
  box-shadow: 0 0 0 3px rgba(200,16,46,.06);
}

/* 带按钮的输入组（验证码） */
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

.btn-code {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 14px;
  font-size: 13px;
  font-family: inherit;
  color: #c8102e;
  background: #fff;
  border: 1px solid #e0c9ce;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn-code:hover:not(:disabled) { background: #fdf5f6; border-color: #c8102e; }
.btn-code:disabled { color: #aaa; border-color: #e4e4e4; cursor: not-allowed; background: #fafafa; }

/* 密码显隐 */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 4px; top: 4px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: #999;
  border-radius: 4px;
}
.pw-toggle:hover { color: #444; background: #f4f4f4; }
.pw-toggle svg { width: 17px; height: 17px; }

/* 提示文字 */
.hint { font-size: 12px; color: #999; margin-top: 6px; line-height: 1.6; }
.hint.is-error { color: #c8102e; }
.hint.is-ok { color: #1a7f4b; }

/* ==========================================================================
   按钮
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  text-decoration: none;
}

.btn-primary {
  background: #111;
  color: #fff;
  border-color: #111;
}
.btn-primary:hover:not(:disabled) { background: #000; text-decoration: none; }
.btn-primary:disabled { background: #9a9a9a; border-color: #9a9a9a; cursor: not-allowed; }

.btn-ghost {
  background: #fff;
  color: #333;
  border-color: #d8d8d8;
}
.btn-ghost:hover { background: #f7f7f7; border-color: #bbb; text-decoration: none; }

.btn-danger {
  background: #fff;
  color: #c8102e;
  border-color: #e0c9ce;
}
.btn-danger:hover { background: #fdf5f6; border-color: #c8102e; text-decoration: none; }

.btn-block { width: 100%; }

.btn-lg { height: 46px; font-size: 14.5px; }

.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 5px; }

/* ==========================================================================
   提示条
   ========================================================================== */

.alert {
  padding: 11px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 18px;
  display: none;
}
.alert.is-show { display: block; }
.alert.is-error  { background: #fdf5f6; border: 1px solid #f0d5da; color: #a00d26; }
.alert.is-ok     { background: #f2f9f5; border: 1px solid #cfe8da; color: #12643a; }
.alert.is-info   { background: #f5f7fa; border: 1px solid #dde3ea; color: #3d4d5e; }

/* ==========================================================================
   表单底部链接区
   ========================================================================== */

.form-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-size: 13px;
}
.form-links a { color: #666; text-decoration: none; }
.form-links a:hover { color: #c8102e; text-decoration: underline; }

.form-divider {
  height: 1px;
  background: #eee;
  margin: 26px 0 20px;
}

/* 法律条款 */
.form-legal {
  font-size: 12px;
  color: #999;
  line-height: 1.75;
  margin-top: 18px;
}
.form-legal a { color: #777; border-bottom: 1px solid #ddd; }

/* ==========================================================================
   已接入服务展示
   ========================================================================== */

.clients { margin-top: 36px; }

.clients-title {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 1.2px;
  color: #999;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.clients-list { display: flex; flex-wrap: wrap; gap: 8px; }

.client-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid #eaeaea;
  border-radius: 20px;
  font-size: 12.5px;
  color: #555;
  background: #fcfcfc;
  text-decoration: none;
}
.client-chip:hover { border-color: #d0d0d0; background: #f7f7f7; text-decoration: none; }
.client-chip img { width: 16px; height: 16px; border-radius: 3px; object-fit: cover; }
.client-chip .chip-dot {
  width: 16px; height: 16px; border-radius: 3px;
  background: #111; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 600;
}

/* ==========================================================================
   账号中心
   ========================================================================== */

.account-wrap {
  min-height: 100vh;
  background: #f7f7f8;
  padding: 40px 20px 64px;
}

.account-box { max-width: 640px; margin: 0 auto; }

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.account-brand { display: flex; align-items: center; gap: 10px; }
.account-brand img { width: 140px; height: auto; }
.account-brand .brand-wordmark { font-size: 16px; font-weight: 600; color: #111; }
.account-brand .brand-wordmark small {
  display: block; font-size: 9.5px; font-weight: 400;
  letter-spacing: 2px; color: #aaa; text-transform: uppercase;
}

.account-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 28px 30px;
  margin-bottom: 16px;
}

.account-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin: 0 0 4px;
}

.account-card-desc {
  font-size: 13px;
  color: #888;
  margin: 0 0 20px;
  line-height: 1.7;
}

/* 用户信息行 */
.info-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid #f2f2f2;
  font-size: 13.5px;
}
.info-row:last-child { border-bottom: none; }
.info-row .k { flex: 0 0 120px; color: #888; }
.info-row .v { flex: 1; color: #222; word-break: break-all; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11.5px;
  border-radius: 3px;
  background: #f0f0f0;
  color: #555;
}
.badge.is-admin { background: #111; color: #fff; }
.badge.is-ok { background: #f2f9f5; color: #12643a; border: 1px solid #cfe8da; }

/* 已授权应用列表 */
.app-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f2f2f2;
}
.app-row:last-child { border-bottom: none; }
.app-row-logo {
  width: 38px; height: 38px; border-radius: 8px;
  background: #f2f2f2; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: #666;
  overflow: hidden;
}
.app-row-logo img { width: 100%; height: 100%; object-fit: cover; }
.app-row-meta { flex: 1; min-width: 0; }
.app-row-name { font-size: 13.5px; font-weight: 500; color: #111; }
.app-row-desc { font-size: 12px; color: #999; margin-top: 2px; }

/* ==========================================================================
   简单页面（授权 / 错误 / 登录跳转）
   ========================================================================== */

.page-simple { background: #f7f7f8; }

.simple-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.simple-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 32px 30px;
}

.simple-brand {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}
.simple-brand .dot {
  width: 7px; height: 7px;
  background: #c8102e;
  border-radius: 50%;
  margin-right: 9px;
  flex: 0 0 auto;
}
.simple-brand em {
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1.8px;
  color: #b0b0b0;
  margin-left: 8px;
  text-transform: uppercase;
}

.simple-title {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 10px;
  color: #111;
}

.simple-text {
  font-size: 13.5px;
  color: #666;
  line-height: 1.8;
  margin: 0 0 20px;
}

.simple-foot {
  font-size: 12px;
  color: #999;
  margin: 18px 0 0;
  line-height: 1.7;
  text-align: center;
}

/* 授权页应用信息 */
.auth-app {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 18px;
}

.app-logo {
  width: 46px; height: 46px;
  border-radius: 9px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid #eee;
}
.app-logo-fallback {
  display: flex; align-items: center; justify-content: center;
  background: #111; color: #fff;
  font-size: 19px; font-weight: 600;
}

.auth-app-name { font-size: 15px; font-weight: 600; color: #111; }
.auth-app-desc { font-size: 12.5px; color: #888; margin-top: 3px; line-height: 1.6; }

.auth-scopes {
  padding: 14px 16px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 16px;
}
.auth-scopes-title { font-size: 12.5px; color: #888; margin-bottom: 8px; }
.auth-scopes ul { margin: 0; padding-left: 18px; }
.auth-scopes li { font-size: 13px; color: #444; line-height: 1.9; }

.auth-user {
  font-size: 12.5px;
  color: #888;
  padding: 11px 14px;
  background: #fafafa;
  border-radius: 6px;
  margin-bottom: 20px;
}
.auth-user strong { color: #111; font-weight: 500; }
.auth-user-mail { color: #aaa; margin-left: 6px; }

.auth-form { display: flex; flex-direction: column; gap: 10px; }

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 860px) {
  .layout { flex-direction: column; }

  .brand {
    width: 100%;
    max-width: none;
    padding: 36px 28px 32px;
  }
  .brand::after { display: none; }
  .brand-mid { margin: 32px 0 0; }
  .brand-title { font-size: 23px; }
  .brand-desc { max-width: none; font-size: 13.5px; }
  .brand-foot { margin-top: 28px; }
  .brand-logo img { width: 140px; }

  .form-side { padding: 36px 24px 56px; }
  .form-box { max-width: none; }
}

@media (max-width: 480px) {
  .account-card { padding: 22px 20px; }
  .simple-card { padding: 26px 22px; }
  .info-row { flex-direction: column; padding: 10px 0; }
  .info-row .k { flex: none; margin-bottom: 3px; }
  .form-links { flex-direction: column; gap: 10px; align-items: flex-start; }
}
