/*
 * Unbound 统一登录 · 自建 Experience 页面样式
 * 品牌：沿用 SSO 现有紫色 #6139F6；素材走同源 /branding/*
 * 文件名带 -unb1 以避开 Cloudflare 对旧 URL 的 7 天缓存（改内容需换文件名）。
 */

:root {
  --brand: #6139f6;
  --brand-hover: #4f2bd4;
  --brand-ring: rgba(97, 57, 246, 0.16);
  --brand-soft: rgba(97, 57, 246, 0.06);
  --text: #1d1d1f;
  --dim: #6e6e73;
  --bg: #f5f5f7;
  --line: #e5e5ea;
  --danger: #d70015;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 卡片后方的品牌色光晕 */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(97, 57, 246, 0.14), rgba(97, 57, 246, 0) 70%),
    radial-gradient(40% 40% at 85% 100%, rgba(97, 57, 246, 0.08), rgba(97, 57, 246, 0) 70%);
  z-index: 0;
}

/* ------------------------------ 页头 ------------------------------ */

.hdr {
  position: relative;
  z-index: 1;
  height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  height: 28px;
  display: block;
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  color: var(--dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease;
}

.nav a:hover {
  color: var(--text);
}

/* ------------------------------ 主体 ------------------------------ */

.auth {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card-head {
  margin-bottom: 20px;
}

.card-head h1 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
}

.card-head .sub {
  margin: 0;
  font-size: 13px;
  color: var(--dim);
  line-height: 1.5;
  word-break: break-all;
}

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

.fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fld {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fld-label {
  font-size: 13px;
  color: var(--dim);
}

.fld-input {
  height: 46px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fld-input::placeholder {
  color: #a1a1a6;
}

.fld-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}

.btn-primary {
  height: 46px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

/* 提示条：默认错误样式，--ok 为信息样式 */
.notice {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  background: #fff2f2;
  border: 1px solid #ffd6d6;
  color: var(--danger);
}

.notice--ok {
  background: var(--brand-soft);
  border-color: var(--brand-ring);
  color: var(--brand-hover);
}

/* ------------------------------ 卡片底部 ------------------------------ */

.card-foot {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  flex-wrap: wrap;
}

.card-foot a {
  color: var(--brand);
  text-decoration: none;
}

.card-foot a:hover {
  text-decoration: underline;
}

.card-foot .muted,
.card-foot .dot {
  color: var(--dim);
}

/* ------------------------------ 页脚 ------------------------------ */

.ftr {
  position: relative;
  z-index: 1;
  flex: none;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 24px;
  color: var(--dim);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

.ftr a {
  color: var(--dim);
  text-decoration: none;
}

.ftr a:hover {
  color: var(--text);
}

.ftr .sep {
  opacity: 0.5;
}

.noscript {
  position: relative;
  z-index: 1;
  margin: 0 auto 24px;
  padding: 12px 16px;
  max-width: 420px;
  border-radius: 12px;
  background: #fff2f2;
  color: var(--danger);
  font-size: 13px;
  text-align: center;
}

/* ------------------------------ 响应式 ------------------------------ */

@media (max-width: 560px) {
  .hdr {
    padding: 0 16px;
  }

  .nav {
    gap: 16px;
  }

  .auth {
    padding: 24px 16px;
  }

  .card {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .card-head h1 {
    font-size: 20px;
  }

  .ftr {
    gap: 12px;
  }
}
