/* ============================================================
   管理中心登录页（v3）· 暗色玻璃卡
   ------------------------------------------------------------
   底子：展示端侧边栏 + 首页同一张雪山 + 同一层黑渐变
   左：MISSION / WISHES / VALUES 三段（管理端文案）
   右：一整块暗色玻璃卡（没有色块分界，雪山从卡后透出来）
      账号 / 密码 / 品牌 → 记住登录状态 → 登录
   按钮：侧边栏同色 #003f9e
   ============================================================ */

:root {
  --ink: #101418;
  --ink-muted: #596368;
  --blue: #003f9e;          /* 与侧边栏同色 */
  --blue-hover: #004a9e;
  --red: #ffb4ae;
  --ff: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --ff-en: "Optima", "Helvetica Neue", "Noto Sans SC", Arial, sans-serif;

  /* 侧边栏要用的展示端变量（登录页没加载 stage.js） */
  --rail-w: 96px;
  --rail-zoom: 1;
  --stage-h: 100vh;
  --u: 1;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body.login-page {
  margin: 0;
  min-height: 100vh;
  padding-left: calc(var(--rail-w) * var(--rail-zoom));
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background: #0d0d0b;
  color: #fff;
  font-family: var(--ff);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(77, 147, 255, .35); color: #fff; }

/* ---------- 侧边栏（复用展示端 .m-aside） ---------- */
.m-aside .logo { text-decoration: none; }

/* ---------- 背景：雪山 + 渐变 ---------- */
.login-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
  filter: grayscale(1) contrast(1.06) brightness(.86);
  z-index: 0;
  transition: opacity .3s ease;
}
.login-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity .3s ease;
  background:
    linear-gradient(180deg, rgba(10,10,9,.72) 0%, rgba(10,10,9,.12) 34%, rgba(10,10,9,.55) 72%, rgba(10,10,9,.93) 100%),
    linear-gradient(90deg, rgba(10,10,9,.62) 0%, rgba(10,10,9,0) 62%);
}


/* ---------- 老版背景：管理端蓝色海报（默认隐藏） ---------- */
.login-bg-blue {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: none;
  opacity: 1;
  pointer-events: none;
  transform: scale(1.06);
  background: url("../img/login-bg-blue.jpg") 50% 18% / cover no-repeat, #005ee2;
  filter: blur(14px) saturate(1.05);
}
@keyframes loginBgIn { from { opacity: 0; } to { opacity: 1; } }
.login-bg-blue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 30, 80, .18), rgba(0, 30, 80, .45));
}

/* ---------- 版心 ---------- */
.login-inner {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 96px 64px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

/* ---------- 左：三段品牌文案 ---------- */
.brand-main {
  min-width: 0;
  position: relative;
  isolation: isolate;
}
/* 新版：浅光晕 */
.brand-main::before {
  content: "";
  position: absolute;
  left: -8%;
  top: -10%;
  width: 118%;
  height: 120%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58% 52% at 30% 34%, rgba(255, 255, 255, .20), rgba(255, 255, 255, 0) 72%),
    radial-gradient(55% 58% at 72% 70%, rgba(110, 165, 255, .22), rgba(110, 165, 255, 0) 74%);
  filter: blur(52px);
  opacity: .95;
}

/* 老版蓝底：再放大一圈 */
.login-old .brand-main::before {
  left: -28%;
  top: -24%;
  width: 160%;
  height: 162%;
  background:
    radial-gradient(62% 56% at 28% 32%, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0) 74%),
    radial-gradient(60% 62% at 72% 70%, rgba(110, 165, 255, .34), rgba(110, 165, 255, 0) 76%),
    radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 72%);
  filter: blur(72px);
  opacity: 1;
}
.brand-value + .brand-value { margin-top: clamp(26px, 4.4vh, 50px); }
.brand-value-title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: clamp(28px, 2.9vw, 46px);
  font-weight: 760;
  line-height: 1.14;
  letter-spacing: .01em;
  color: #fff;
}
.brand-value-title b { font-weight: 760; }
.brand-value-title i {
  font-style: normal;
  font-size: .9em;
  font-weight: 680;
  color: rgba(255, 255, 255, .82);
}
.brand-value-desc {
  margin: 10px 0 0;
  max-width: 30em;
  font-size: clamp(13.5px, 1.08vw, 17px);
  line-height: 1.75;
  color: rgba(255, 255, 255, .74);
}

/* ---------- 右：一整块暗色玻璃卡 ---------- */
.login-panel { min-width: 0; transform: translateX(-26px); }
.login-card {
  position: relative;
  width: 100%;
  padding: 26px 28px 26px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  /* 光从右上角来：右上薄白 → 左下压黑，模拟被太阳照到的磨砂玻璃 */
  /* 右上受光 → 左下压黑的灰玻璃（回滚版） */
  border-top-color: rgba(255, 255, 255, .22);
  border-right-color: rgba(255, 255, 255, .16);
  background:
    radial-gradient(360px 240px at 100% 0%, rgba(255, 255, 255, .16), transparent 65%),
    linear-gradient(225deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, .05) 30%, rgba(8, 12, 18, .55) 70%, rgba(0, 0, 0, .62) 100%),
    rgba(22, 28, 38, .78);
  -webkit-backdrop-filter: blur(24px) saturate(1.05);
  backdrop-filter: blur(24px) saturate(1.05);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, .60),
    0 10px 26px rgba(0, 0, 0, .38),
    inset 0 1px 0 rgba(255, 255, 255, .08);
  color: #fff;
}

.login-card-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.login-card-logo {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}
.login-card-head-txt { min-width: 0; padding-top: 1px; }
.login-card-title {
  margin: 0;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -.02em;
  color: #fff;
  line-height: 1.15;
}
.login-app-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  vertical-align: 3px;
}
.login-card-sub {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .58);
}

/* ---------- 表单 ---------- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 0;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label {
  font-size: 11.5px;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .58);
}

.input-shell { display: block; position: relative; }
.input-icon {
  position: absolute;
  left: 13px; top: 50%;
  width: 17px; height: 17px;
  transform: translateY(-50%);
  color: #6f7a88;
  pointer-events: none;
}
.input-shell input {
  width: 100%;
  height: 46px;
  padding: 0 12px 0 40px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  background: rgba(244, 246, 250, .94);
  color: #101418;
  caret-color: #003f9e;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.input-shell input::placeholder { color: #59636b; }
.input-shell input:focus {
  border-color: #7fb0ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(127, 176, 255, .25);
}

/* 品牌下拉：和输入框同一套暗色，右侧一个小箭头 */
.login-tenant-select {
  width: 100%;
  height: 46px;
  padding: 0 36px 0 40px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  background: rgba(244, 246, 250, .94);
  color: #101418;
  font-family: inherit;
  font-size: 13.5px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.login-tenant-select:invalid { color: #59636b; }
.login-tenant-select:focus {
  border-color: #7fb0ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(127, 176, 255, .25);
}
.login-tenant-shell::after {
  content: "";
  position: absolute;
  right: 15px; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.5px solid #6f7a88;
  border-bottom: 1.5px solid #6f7a88;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.login-options { display: flex; align-items: center; justify-content: space-between; }
.login-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .58);
  cursor: pointer;
  user-select: none;
}
.login-checkbox input { width: 15px; height: 15px; accent-color: #4d93ff; cursor: pointer; }

.login-error {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 90, 80, .12);
  color: var(--red);
  font-size: 12.5px;
  line-height: 1.6;
}

.login-submit {
  height: 48px;
  margin-top: 2px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);        /* 侧边栏同色 #003f9e */
  box-shadow: 0 10px 24px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .12);
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
}
.login-submit:hover {
  background: var(--blue-hover);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.login-submit:active { transform: translateY(1px); }
.login-submit:focus-visible { outline: 2px solid rgba(127, 176, 255, .9); outline-offset: 3px; }


/* ---------- 右上角：太阳 / 月亮，切换老版 / 新版 ---------- */
.theme-toggle {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.tt-btn {
  width: 26px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.tt-btn svg { width: 14px; height: 14px; display: block; }
.tt-btn:hover { color: #fff; }
.tt-btn.is-active { background: rgba(255, 255, 255, .16); color: #fff; }
.tt-btn:focus-visible { outline: 2px solid rgba(127, 176, 255, .9); outline-offset: 2px; }

/* ---------- 老版：管理端蓝色背景 + 白色玻璃卡 ---------- */
.login-old body.login-page { background: #005ee2; }
.login-old .login-bg { opacity: 0; }
.login-old .login-veil { opacity: 0; }
.login-old .login-bg-blue { display: block; animation: loginBgIn .3s ease; }

.login-old .login-card {
  background: rgba(255, 255, 255, .85);
  border-color: rgba(255, 255, 255, .6);
  border-top-color: rgba(255, 255, 255, .7);
  border-right-color: rgba(255, 255, 255, .65);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  backdrop-filter: blur(26px) saturate(1.3);
  color: #101418;
}
.login-old .login-card-head { border-bottom-color: rgba(11, 27, 51, .08); }
.login-old .login-card-title { color: #101418; }
.login-old .login-card-sub { color: #596368; }
.login-old .login-app-tag { border-color: rgba(10, 99, 196, .2); background: rgba(10, 99, 196, .08); color: #0a63c4; }
.login-old .field-label { color: #596368; }
.login-old .input-shell input { background: #fff; border-color: rgba(46, 58, 62, .12); color: #101418; }
.login-old .input-shell input::placeholder { color: #59636b; }
.login-old .input-shell input:focus { border-color: #0a63c4; box-shadow: 0 0 0 3px rgba(10, 99, 196, .15); }
.login-old .input-icon { color: #7e888c; }
.login-old .login-tenant-select { background: #fff; border-color: rgba(46, 58, 62, .12); color: #101418; }
.login-old .login-tenant-select:invalid { color: #59636b; }
.login-old .login-tenant-select:focus { border-color: #0a63c4; box-shadow: 0 0 0 3px rgba(10, 99, 196, .15); }
.login-old .login-tenant-shell::after { border-color: #7e888c; }
.login-old .login-checkbox { color: #596368; }
.login-old .login-error { background: rgba(224, 68, 59, .08); color: #e0443b; }
.login-old .login-submit { background: #0a63c4; box-shadow: 0 10px 24px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .18); }
.login-old .login-submit:hover { background: #08509f; }
.login-old .theme-toggle { background: rgba(11, 27, 51, .06); border-color: rgba(11, 27, 51, .12); }
.login-old .tt-btn { color: rgba(11, 27, 51, .55); }
.login-old .tt-btn:hover { color: #101418; }
.login-old .tt-btn.is-active { background: rgba(11, 27, 51, .1); color: #101418; }

/* ---------- 底部字标：与首页数据条分割线同一高度 ---------- */
.brand-foot {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 64px 140px;
}
.brand-foot-rule { height: 1px; background: rgba(255, 255, 255, .22); }
.brand-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
}
.brand-foot-brand { display: flex; align-items: center; gap: 17px; margin: 0; }
.brand-logo { display: block; width: 264px; height: auto; }
.brand-name { font-size: 19.2px; font-weight: 700; letter-spacing: .14em; color: rgba(255, 255, 255, .92); }
.brand-foot-since { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: .02em; color: rgba(255, 255, 255, .92); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 矮屏 / 手机 ---------- */
@media (max-height: 760px) and (orientation: landscape) {
  .brand-value-desc { display: none; }
  .brand-value + .brand-value { margin-top: 18px; }
  .login-inner { padding-top: 64px; }
  .brand-foot { padding-bottom: 96px; }
}

@media (max-width: 1000px) {
  :root { --rail-w: 54px; --rail-zoom: 1; }
  body.login-page { padding-left: calc(var(--rail-w) * var(--rail-zoom)); }
  .m-aside { width: var(--rail-w); }
  .m-aside .logo { height: 54px; }
  .m-aside .logo img { width: 30px; height: 30px; border-radius: 7px; }
  .m-aside .nav-item { gap: 3px; }
  .m-aside .nav-item .nl { display: block; font-size: 8px; letter-spacing: .04em; }
  .m-aside .nav-item .si { width: 15px; height: 15px; }
  
  .login-inner {
    grid-template-columns: 1fr;
    padding: 64px 16px 20px;
    max-width: 460px;
  }
  .brand-main { display: none; }
  .login-panel { transform: none; }
  .login-card { padding: 22px 20px 22px; }
  .login-card-title { font-size: 22px; }
  .login-card-logo { width: 38px; height: 38px; }
  .brand-foot { padding: 0 16px 40px; max-width: 460px; }
  .brand-logo { width: 180px; }
  .brand-name { font-size: 15.6px; }
  .brand-foot-since { font-size: 20px; }
}
