/* Dream 隽穆 —— 全局样式。配色集中在下面 :root 的变量里，换主色调只改 --gold / --bg 那几个 */

:root {
  /* 品牌金 */
  --gold:        #c8a96a;
  --gold-light:  #e8ce94;
  --gold-deep:   #b08f4e;
  --gold-ink:    #1a1206;

  /* 深色底 */
  --bg:          #070b14;
  --bg-2:        #0d1424;
  --surface:     rgba(255, 255, 255, 0.045);
  --surface-2:   rgba(255, 255, 255, 0.07);

  /* 文字 */
  --text:        #e8ecf4;
  --text-muted:  #8a94a8;
  --text-dim:    #5d6779;

  --line:        rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.16);

  --danger:      #ff6b6b;

  --radius:      12px;
  --radius-lg:   20px;

  --ease:        cubic-bezier(0.22, 0.61, 0.36, 1);

  /* 告诉浏览器「本页是深色」：滚动条、日期图标、<select> 浮层都是浏览器画的，
     只认这个开关。挂 :root 就是全站生效，别在组件里再写一次。 */
  color-scheme: dark;
}

/* ---- 滚动条 ----
   ⚠️ **不能**写 scrollbar-color / scrollbar-width：Chrome 121 起只要看见这两个标准属性，
   就整个忽略下面这套 ::-webkit-scrollbar（圆角和悬停一起失效，还悄无声息）。
   也不加选择器前缀（不写 body::-webkit-scrollbar）：裸着写才覆盖**每一个**滚动容器，
   逐个列选择器一定会漏。 */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--gold);
}

::-webkit-scrollbar-corner { background: transparent; }

/* Firefox 兜底。用 @supports 判掉，否则会在 Chrome 里盖掉上面那套 */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) rgba(255, 255, 255, 0.04);
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
               -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }


/* ==========================================================================
   背景：深色渐变 + 两团缓慢漂移的金色/靛蓝辉光 + 细网格
   ========================================================================== */

.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 620px at 12% 6%,  rgba(200, 169, 106, 0.17), transparent 62%),
    radial-gradient(1000px 560px at 88% 94%, rgba(72, 106, 232, 0.20),  transparent 62%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 52%, var(--bg) 100%);
}

.bg-stage::before {
  content: "";
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
}

.bg-stage::after {
  content: "";
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  top: -22vmax;
  left: -14vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 169, 106, 0.10), transparent 66%);
  filter: blur(30px);
  animation: drift 26s var(--ease) infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0)        scale(1);    }
  to   { transform: translate3d(8vmax, 5vmax, 0) scale(1.14); }
}


/* ==========================================================================
   登录页布局：左侧品牌区 + 右侧表单区
   ========================================================================== */

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  /* 用 minmax(0, …) 而不是裸 fr：裸 fr 的 auto 最小值会被内容撑破，窄屏整页横向溢出 */
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 100vh;
}

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

.brand-pane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;                 /* 同上：解除 grid 子项的 min-width:auto 约束 */
  padding: clamp(32px, 5vw, 72px);
  border-right: 1px solid var(--line);
  animation: rise 0.7s var(--ease) backwards;
}

.brand-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* 方形金色徽标，里面放"隽"字 */
.brand-mark {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid rgba(200, 169, 106, 0.45);
  background: linear-gradient(150deg, rgba(200, 169, 106, 0.22), rgba(200, 169, 106, 0.04));
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-light);
  box-shadow: 0 8px 26px -12px rgba(200, 169, 106, 0.7),
              inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.brand-eyebrow {
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.brand-tagline {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  margin-top: 3px;
}

/* 主角：超大的"隽穆"两字 */
.brand-main { margin: auto 0; padding: 8vh 0; }

.brand-title {
  margin: 0;
  font-size: clamp(64px, 9vw, 132px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  background: linear-gradient(150deg, #fff 0%, var(--gold-light) 42%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 20px 60px rgba(200, 169, 106, 0.18);
}

.brand-latin {
  margin: 18px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2.4vw, 30px);
  font-style: italic;
  letter-spacing: 0.30em;
  color: var(--text-muted);
}

.brand-rule {
  width: 68px;
  height: 2px;
  margin: 30px 0;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ⚠️ 当前**没有用户**：那段说明 2026-09-12 删了。规则留着 —— 左栏本来就靠它配重，
   日后要放真的必要的话（比如维护公告）形状还是这个。 */
.brand-desc {
  max-width: 30em;
  margin: 0;
  font-size: 14px;
  line-height: 2;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.brand-foot {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.brand-foot .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

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

.form-pane {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(24px, 5vw, 64px);
  animation: rise 0.7s 0.12s var(--ease) backwards;
}

.login-card {
  width: 100%;
  max-width: 430px;
  padding: clamp(32px, 4vw, 46px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 34px 90px -24px rgba(0, 0, 0, 0.82),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card-title {
  margin: 0 0 6px;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ⚠️ 当前**没有用户**：那句说明 2026-09-12 删了。下面那条 `0 0 32px` 里的 32px
   原是「标题底 → 第一个输入框」的间距，现只剩 .card-title 的 6px 撑。要拉开就改
   .card-title 的下边距，别再塞一段占位的 .card-sub 回来。 */
.card-sub {
  margin: 0 0 32px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.field { margin-bottom: 20px; }

.field label {
  display: block;
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: 15px;
  color: var(--text);
  background: rgba(7, 11, 20, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field input::placeholder { color: var(--text-dim); }

.field input:focus {
  outline: none;
  background: rgba(7, 11, 20, 0.86);
  border-color: rgba(200, 169, 106, 0.62);
  box-shadow: 0 0 0 4px rgba(200, 169, 106, 0.13);
}

/* 密码框：右侧放一个"显示/隐藏"按钮 */
.field-password { position: relative; }

.field-password input { padding-right: 62px; }

.toggle-pw {
  position: absolute;
  right: 6px;
  bottom: 6px;
  height: 40px;
  padding: 0 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.toggle-pw:hover {
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.05);
}

/* 错误提示条 */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 13px 15px;
  font-size: 13.5px;
  border-radius: var(--radius);
  color: #ffd9d9;
  background: rgba(255, 107, 107, 0.10);
  border: 1px solid rgba(255, 107, 107, 0.28);
  animation: shake 0.4s var(--ease);
}

.alert::before {
  content: "!";
  flex: none;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.5);
}

@keyframes shake {
  0%, 100% { transform: translateX(0);    }
  25%      { transform: translateX(-5px); }
  75%      { transform: translateX(5px);  }
}

/* 主按钮 */
.btn-login {
  width: 100%;
  height: 54px;
  margin-top: 8px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-indent: 0.22em;          /* 抵消字间距带来的视觉偏移 */
  color: var(--gold-ink);
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 52%, var(--gold-deep) 100%);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 14px 34px -12px rgba(200, 169, 106, 0.62);
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-login:hover:not(:disabled) {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 20px 42px -14px rgba(200, 169, 106, 0.75);
}

.btn-login:active:not(:disabled) { transform: translateY(0); }

.btn-login:disabled {
  cursor: progress;
  filter: saturate(0.5) brightness(0.85);
}

.card-foot {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  text-align: center;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}


/* ==========================================================================
   欢迎页
   ========================================================================== */

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(20px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}

.topbar .brand-top { gap: 12px; }

.topbar .brand-mark {
  width: 38px;
  height: 38px;
  font-size: 18px;
  border-radius: 11px;
}

.topbar .brand-eyebrow { font-size: 11px; letter-spacing: 0.28em; }

.btn-ghost {
  padding: 9px 20px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.btn-ghost:hover {
  color: var(--gold-light);
  border-color: rgba(200, 169, 106, 0.55);
  background: rgba(200, 169, 106, 0.07);
}

.main-pane {
  flex: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: clamp(28px, 6vw, 72px);
}

.welcome-card {
  width: 100%;
  max-width: 760px;
  padding: clamp(32px, 5vw, 56px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow:
    0 34px 90px -24px rgba(0, 0, 0, 0.82),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: rise 0.6s var(--ease) backwards;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 7px 15px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold-light);
  border: 1px solid rgba(200, 169, 106, 0.36);
  background: rgba(200, 169, 106, 0.09);
  border-radius: 999px;
}

.welcome-badge .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 9px #4ade80;
}

.welcome-title {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.welcome-title .accent {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.welcome-sub {
  margin: 0 0 38px;
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));  /* 固定 2×2，比 auto-fit 的 3+1 更整齐 */
  gap: 14px;
}

.info-item {
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.5);
}

.info-item dt {
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}

.info-item dd {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.03em;
  word-break: break-all;
}

/* 认证信息底注 */
.auth-note {
  margin: 34px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.9;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}


/* ==========================================================================
   错误页
   ========================================================================== */

.error-pane {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.error-card {
  width: min(440px, 100%);
  padding: 44px 40px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.error-card h1 {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 600;
}

.error-card p {
  margin: 0 0 26px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-muted);
}


/* ==========================================================================
   动画
   ========================================================================== */

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none;             }
}


/* ==========================================================================
   响应式：窄屏改为上下堆叠，品牌区收窄
   ========================================================================== */

@media (max-width: 980px) {
  .login-shell { grid-template-columns: minmax(0, 1fr); }

  .brand-pane {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 30px 26px;
    gap: 26px;
  }

  .brand-main { padding: 0; }

  .brand-title { font-size: clamp(48px, 15vw, 78px); }

  .brand-desc { display: none; }   /* 手机上别让文字挤掉登录框 */

  .form-pane { padding: 30px 20px 54px; }
}

@media (max-width: 420px) {
  .login-card { padding: 28px 22px; }
  .brand-latin { letter-spacing: 0.2em; }
  .info-grid { grid-template-columns: 1fr; }
}

/* 尊重系统的"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
