/* ============================================================
   金药方 · 登录页专属样式（深空金主题）
   ============================================================ */
.login {
  height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  z-index: 1;
}
.login-scroll { width: 100%; max-height: 100vh; overflow-y: auto; display: flex; align-items: center; justify-content: center; padding: 44px 18px 64px; }

.login-card {
  width: 560px; max-width: 94vw;
  background: var(--panel);
  border: 1px solid var(--line-strong); border-radius: 26px;
  box-shadow: var(--shadow-2), 0 0 80px rgba(240, 194, 100, .06);
  padding: 42px 44px 34px;
  position: relative; z-index: 2;
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  animation: view-in .7s var(--ease) both;
}
.login-card::before { content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, rgba(240, 194, 100, .6), transparent); }

.login-brand { text-align: center; margin-bottom: 30px; }
.login-brand .lb-mark {
  width: 66px; height: 66px; margin: 0 auto 16px;
  border-radius: 19px;
  display: grid; place-items: center;
  box-shadow: 0 12px 40px rgba(240, 194, 100, .4), inset 0 1px 0 rgba(255, 255, 255, .4);
  animation: floaty 5s ease-in-out infinite;
}
.login-brand .lb-title { font-size: 27px; font-weight: 700; letter-spacing: .12em; background: linear-gradient(100deg, var(--gold) 10%, #ffe9bd 50%, var(--gold-2) 90%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html[data-theme="light"] .login-brand .lb-title { background: linear-gradient(100deg, #c98a1e, #8f5e0e); -webkit-background-clip: text; background-clip: text; }
.login-brand .lb-sub { font-size: 11.5px; color: var(--text-3); margin-top: 8px; letter-spacing: .18em; }

.login-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.role-card {
  padding: 10px 6px 9px; text-align: center;
  background: var(--panel-2); border: 1.5px solid var(--line); border-radius: 12px;
  cursor: pointer; transition: all .25s var(--ease);
  position: relative; overflow: hidden;
}
.role-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(240, 194, 100, .1)); opacity: 0; transition: opacity .25s; }
.role-card:hover { transform: translateY(-3px); border-color: rgba(240, 194, 100, .5); box-shadow: 0 10px 30px rgba(240, 194, 100, .12); }
.role-card:hover::after { opacity: 1; }
.role-card.active {
  border-color: rgba(240, 194, 100, .65);
  background: linear-gradient(180deg, var(--gold-soft), transparent);
  box-shadow: 0 0 0 3px rgba(240, 194, 100, .15), 0 10px 30px rgba(240, 194, 100, .15);
  animation: roleFlash .3s var(--ease);
}
@keyframes roleFlash { 0% { transform: scale(1); } 45% { transform: scale(1.05); } 100% { transform: scale(1); } }
.role-card .rc-icon { font-size: 19px; margin-bottom: 4px; display: block; }
.role-card .rc-name { font-size: 11.5px; color: var(--text-1); font-weight: 650; }
.role-card .rc-desc { font-size: 9px; color: var(--text-3); margin-top: 2px; }
.role-card.active .rc-name { color: var(--gold); }
.role-card.rm .rc-icon { filter: drop-shadow(0 0 8px rgba(240, 194, 100, .5)); }
.role-card.ent .rc-icon { filter: drop-shadow(0 0 8px rgba(69, 214, 255, .5)); }
.role-card.admin .rc-icon { filter: drop-shadow(0 0 8px rgba(183, 139, 255, .5)); }
.role-card.risk .rc-icon { filter: drop-shadow(0 0 8px rgba(255, 107, 129, .5)); }
.role-card.comp .rc-icon { filter: drop-shadow(0 0 8px rgba(61, 220, 151, .5)); }
.role-card.mgmt .rc-icon { filter: drop-shadow(0 0 8px rgba(107, 154, 255, .5)); }

.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 7px; font-weight: 600; letter-spacing: .05em; }
.login-field .lf-wrap { position: relative; }
.login-field .lf-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 14px; }
.login-field .input { padding-left: 40px; }

.login-btn {
  width: 100%; padding: 13px; margin-top: 6px;
  background: linear-gradient(135deg, #f6cd6e, #e89b3c);
  color: #201503; font-size: 15px; font-weight: 700; letter-spacing: .2em;
  border-radius: 13px; border: none; cursor: pointer; transition: all .35s var(--ease);
  box-shadow: 0 10px 30px rgba(232, 155, 60, .4), inset 0 1px 0 rgba(255, 255, 255, .5);
  position: relative; overflow: hidden;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(232, 155, 60, .55), inset 0 1px 0 rgba(255, 255, 255, .5); }
.login-btn:active { transform: translateY(0) scale(.98); }
.login-btn::after { content: ""; position: absolute; top: 0; left: -80%; width: 45%; height: 100%; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); transition: left .7s var(--ease); }
.login-btn:hover::after { left: 130%; }

.login-hint { text-align: center; margin-top: 17px; font-size: 12px; color: var(--text-3); display: flex; align-items: center; justify-content: center; gap: 7px; }
.login-hint .lh-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); margin-right: 2px; box-shadow: 0 0 8px var(--gold); animation: pulse 2.2s ease-in-out infinite; }

.login-foot { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 10.5px; color: var(--text-3); opacity: .65; z-index: 2; letter-spacing: .04em; }

/* 主题切换（登录页角落） */
.login-theme { position: absolute; top: 20px; right: 22px; z-index: 3; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel); color: var(--text-2); border-radius: 11px; transition: all .3s var(--ease); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.icon-btn:hover { color: var(--gold); border-color: rgba(240, 194, 100, .4); box-shadow: 0 0 0 3px var(--gold-soft); transform: translateY(-1px); }
html[data-theme="dark"] .ico-sun { display: none; }
html[data-theme="light"] .ico-moon { display: none; }

/* ============================================================
   登录加载动画（全屏 + 呼吸徽标 + 进度 + 步进文字）
   ============================================================ */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg-0) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: fade-in .3s ease;
}
.loading-screen.fade-out { animation: lsFadeOut .4s ease forwards; }
@keyframes lsFadeOut { to { opacity: 0; } }

.ls-mark {
  width: 78px; height: 78px; border-radius: 22px;
  display: grid; place-items: center;
  box-shadow: 0 16px 50px rgba(240, 194, 100, .5);
  animation: lsBreathe 1.4s ease-in-out infinite;
}
@keyframes lsBreathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 34px -6px rgba(240, 194, 100, .45); }
  50% { transform: scale(1.08); box-shadow: 0 0 56px -2px rgba(240, 194, 100, .75); }
}
.ls-title { margin-top: 22px; font-size: 21px; font-weight: 700; color: var(--text-1); letter-spacing: .2em; background: linear-gradient(100deg, var(--gold), #ffe9bd, var(--gold-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.ls-sub { margin-top: 9px; font-size: 13px; color: var(--text-2); letter-spacing: .04em; height: 22px; overflow: hidden; }
.ls-sub-text { display: block; animation: lsTextSlide .5s var(--ease); font-family: var(--mono); }
@keyframes lsTextSlide { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.ls-progress-wrap { width: 300px; margin-top: 30px; }
.ls-progress { height: 4px; border-radius: 3px; overflow: hidden; background: var(--line); }
.ls-progress > div { height: 100%; border-radius: 3px; width: 0%; background: linear-gradient(90deg, var(--gold), var(--cyan)); transition: width .12s linear; box-shadow: 0 0 14px rgba(240, 194, 100, .7); }
.ls-percent { margin-top: 10px; font-size: 11.5px; color: var(--text-3); font-family: var(--mono); text-align: right; }

@media (max-width: 720px) {
  .login-card { padding: 32px 24px 26px; }
  .login-roles { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   v2.1 · 登录页打磨
   ============================================================ */
.login-card { transition: transform .5s var(--ease), box-shadow .5s var(--ease); transform-style: preserve-3d; }
.login-scroll { perspective: 1100px; }

.login-brand .lb-mark { position: relative; }
.login-brand .lb-mark::after {
  content: ""; position: absolute; inset: -9px; border-radius: 27px;
  border: 1.5px solid rgba(240, 194, 100, .45); pointer-events: none;
  animation: halo 3.2s var(--ease) infinite;
}
@keyframes halo {
  0% { transform: scale(.92); opacity: .85; }
  70% { transform: scale(1.28); opacity: 0; }
  100% { transform: scale(1.28); opacity: 0; }
}

.login-brand .lb-sub { font-family: var(--mono); font-size: 10.5px; letter-spacing: .22em; }

.role-card .rc-icon { transition: transform .35s var(--ease); }
.role-card:hover .rc-icon { transform: translateY(-3px) scale(1.12); }
.role-card.active .rc-icon { transform: translateY(-2px) scale(1.1); }

/* 加载页 · 引擎点阵波 */
.ls-pipe { display: flex; gap: 9px; margin-top: 26px; align-items: center; }
.ls-pipe i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); animation: lsdot 1.15s var(--ease-io) infinite; }
.ls-pipe i:nth-child(1) { animation-delay: 0s; }
.ls-pipe i:nth-child(2) { animation-delay: .1s; }
.ls-pipe i:nth-child(3) { animation-delay: .2s; }
.ls-pipe i:nth-child(4) { animation-delay: .3s; }
.ls-pipe i:nth-child(5) { animation-delay: .4s; }
.ls-pipe i:nth-child(6) { animation-delay: .5s; }
@keyframes lsdot {
  0%, 62%, 100% { background: var(--line-strong); box-shadow: none; transform: scale(1); }
  28% { background: var(--gold); box-shadow: 0 0 14px rgba(240, 194, 100, .9); transform: scale(1.4); }
}
