/* ==========================================================================
   绵阳市文化市场综合执法数字化平台 · 登录页
   配色：政务蓝 —— 深蓝 #082A57 / 主蓝 #154E96 / 亮蓝 #1D68B8 / 高亮 #3F97E0
   ========================================================================== */
:root {
  --gov-navy:    #1e3a8a;
  --gov-deep:    #1e40af;
  --gov-blue:    #2563eb;
  --gov-bright:  #3b82f6;
  --gov-light:   #60a5fa;
  --gov-glow:    #93c5fd;
  --gov-page-bg: linear-gradient(150deg, #1e3a8a 0%, #1e40af 42%, #2563eb 74%, #3b82f6 100%);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #12213a; overflow: hidden;
  background: var(--gov-page-bg);
}
/* 政务蓝铺满整页，登录框以悬浮卡片叠加其上 */
.login-wrap {
  --brand-w: 55%;
  display: flex; min-height: 100vh; position: relative; overflow: hidden;
  background: var(--gov-page-bg);
}

/* ===================== 大数据动态背景层 ===================== */
.data-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

/* 数据流动线：pathLength 归一化后虚线周期一致，dashoffset 循环即无缝流动 */
.fx-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-line {
  fill: none; stroke: url(#fxGrad); stroke-width: 1.6; stroke-linecap: round;
  stroke-dasharray: 130 870; opacity: .8;
  animation: fxFlow 7s linear infinite;
}
.fx-line-b { animation-duration: 9.5s; animation-delay: -2.4s; }
.fx-line-c { animation-duration: 8.2s; animation-delay: -4.6s; }
.fx-line-d { animation-duration: 11s; animation-delay: -6.1s; }
@keyframes fxFlow { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }

/* 数据节点：呼吸脉冲 + 向外扩散的环 */
.fx-nodes { position: absolute; inset: 0; }
.fx-node {
  position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: rgba(168,218,255,.95);
  box-shadow: 0 0 16px 2px rgba(124,192,255,.55);
  animation: fxPulse 4s ease-in-out infinite; animation-delay: calc(var(--i) * -.62s);
}
.fx-node::after {
  content: ''; position: absolute; inset: -9px; border-radius: 50%;
  border: 1px solid rgba(124,192,255,.55);
  animation: fxRing 4s ease-out infinite; animation-delay: calc(var(--i) * -.62s);
}
@keyframes fxPulse { 0%,100% { transform: scale(.75); opacity: .45; } 50% { transform: scale(1.3); opacity: 1; } }
@keyframes fxRing { 0% { transform: scale(.45); opacity: .85; } 100% { transform: scale(2); opacity: 0; } }

/* 上升数据粒子：由下向上飘移并淡出 */
.fx-particles { position: absolute; inset: 0; }
.fx-dot {
  position: absolute; bottom: -12px; left: calc(3% + var(--i) * 4.05%);
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--gov-glow);
  box-shadow: 0 0 8px 1px rgba(124,192,255,.85);
  opacity: 0; will-change: transform, opacity;
  animation: fxRise calc(10s + var(--i) * .55s) linear infinite;
  animation-delay: calc(var(--i) * -1.7s);
}
@keyframes fxRise {
  0%   { transform: translate3d(0,0,0) scale(.5); opacity: 0; }
  10%  { opacity: .95; }
  70%  { opacity: .6; }
  100% { transform: translate3d(22px,-96vh,0) scale(1); opacity: 0; }
}

/* ===================== 左侧：系统名称与标识区 ===================== */
.brand-side {
  flex: 0 0 var(--brand-w); position: relative; overflow: hidden; z-index: 1;
  background: none;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.brand-glow { position: fixed; border-radius: 50%; pointer-events: none; filter: blur(72px); }
.brand-glow-1 { width: 540px; height: 540px; top: -190px; left: -130px; background: radial-gradient(circle, rgba(63,151,224,.42) 0%, transparent 66%); animation: float1 18s ease-in-out infinite; }
.brand-glow-2 { width: 480px; height: 480px; bottom: -170px; right: -110px; background: radial-gradient(circle, rgba(29,104,184,.45) 0%, transparent 66%); animation: float2 20s ease-in-out infinite; }
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(34px,34px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-26px,-26px); } }

.brand-content { position: relative; z-index: 2; max-width: 620px; padding: 40px 54px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.brand-emblem {
  width: 140px; height: 140px; margin-bottom: 26px; padding: 12px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(147,197,253,.22), rgba(147,197,253,.06));
  border: 1px solid rgba(147,197,253,.4);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(4,24,52,.4), inset 0 1px 0 rgba(255,255,255,.16);
}
.brand-logo-img { width: 100%; height: 100%; object-fit: contain; }
.brand-title {
  font-size: 30px; font-weight: 800; letter-spacing: 1.5px; line-height: 1.3; margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #bcd9ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-divider { position: relative; width: 92px; height: 3px; background: rgba(160,200,240,.28); border-radius: 2px; margin-bottom: 18px; overflow: hidden; }
.brand-divider i { position: absolute; top: 0; left: 0; width: 40px; height: 3px; background: var(--gov-glow); box-shadow: 0 0 12px rgba(124,192,255,.9); border-radius: 2px; animation: slide 3.4s ease-in-out infinite; }
@keyframes slide { 0% { left: -40px; } 100% { left: 92px; } }
.brand-byline { font-size: 14px; letter-spacing: 4px; color: rgba(198,222,252,.88); margin-bottom: 34px; font-weight: 300; }
.brand-features { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.brand-features li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: rgba(198,222,252,.82); line-height: 1.6; }
.brand-features li::before { content: ''; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--gov-glow); box-shadow: 0 0 8px rgba(124,192,255,.9); }

/* ===================== 右侧：登录表单区（悬浮卡片） ===================== */
.form-side {
  flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: transparent; position: relative; overflow: visible; z-index: 2;
}
/* 右下角氛围光晕：统一蓝色系，避免灰白渐变污染底色 */
.form-bg-wave { position: absolute; left: -18%; right: -12%; pointer-events: none; border-radius: 50%; filter: blur(70px); }
.form-bg-wave-1 { bottom: -30%; height: 58%; background: radial-gradient(ellipse at 55% 100%, rgba(63,151,224,.42) 0%, transparent 64%); animation: wave1 14s ease-in-out infinite alternate; }
.form-bg-wave-2 { bottom: -40%; height: 68%; background: radial-gradient(ellipse at 72% 100%, rgba(8,42,87,.55) 0%, transparent 68%); animation: wave2 16s ease-in-out infinite alternate; }
@keyframes wave1 { 0% { opacity: .55; } 100% { opacity: .9; } }
@keyframes wave2 { 0% { opacity: .5; } 100% { opacity: .85; } }

.form-content { position: relative; z-index: 2; width: 100%; max-width: 440px; padding: 0 44px; }
.login-card {
  width: 100%; background: #ffffff; overflow: hidden;
  border: 1px solid rgba(255,255,255,.9); border-radius: 18px;
  padding: 40px 34px 30px;
  box-shadow: 0 34px 68px -22px rgba(3,20,44,.6), 0 14px 34px -14px rgba(3,20,44,.38);
  transition: transform .35s cubic-bezier(.4,0,.2,1), box-shadow .35s;
  position: relative;
}
.login-card:hover { transform: translateY(-6px); box-shadow: 0 50px 92px -24px rgba(3,20,44,.66), 0 20px 46px -14px rgba(3,20,44,.46); }
/* 卡片顶部政务蓝饰条 */
.login-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--gov-blue), var(--gov-light), var(--gov-blue));
}
.login-card h2 { position: relative; font-size: 23px; color: #10233f; font-weight: 700; letter-spacing: 1px; padding-left: 14px; }
.login-card h2::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 19px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gov-bright), var(--gov-blue));
}
.form-sub { font-size: 12.5px; color: #8a94a6; margin: 8px 0 24px; letter-spacing: .5px; padding-left: 14px; }

.form-error { background: #fff1f0; color: #c62828; border: 1px solid #ffccc7; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; line-height: 1.6; }

.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: 12.5px; font-weight: 600; color: #24334d; margin-bottom: 6px; }
.form-field label .opt { font-weight: 400; color: #9aa7b8; font-size: 11.5px; }
.form-field input, .form-field select {
  width: 100%; height: 42px; border: 1px solid #dbe3f0; border-radius: 9px;
  padding: 0 13px; font-size: 14px; outline: none; background: #f8fafd; color: #12213a;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-field select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%237a8aa0' stroke-width='1.5'/></svg>"); background-repeat: no-repeat; background-position: right 13px center; }
.form-field input:focus, .form-field select:focus { border-color: var(--gov-bright); background: #fff; box-shadow: 0 0 0 3px rgba(29,104,184,.15); }
.unit-hint { font-size: 11.5px; color: #8a94a6; margin-top: 6px; }

.captcha-row { display: flex; gap: 10px; }
.captcha-row input { flex: 1; }
.captcha-img { flex: 0 0 120px; height: 42px; border-radius: 9px; overflow: hidden; border: 1px solid #dbe3f0; display: block; background: #f8fafd; }
.captcha-img img { width: 100%; height: 100%; display: block; object-fit: cover; }

.btn-login {
  width: 100%; height: 44px; border: none; border-radius: 9px; margin-top: 6px;
  font-size: 14px; letter-spacing: 8px; text-indent: 4px; color: #fff; cursor: pointer; font-weight: 600;
  background: linear-gradient(135deg, var(--gov-blue) 0%, var(--gov-bright) 100%);
  box-shadow: 0 10px 22px rgba(21,78,150,.34);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.btn-login:hover { transform: translateY(-1px); filter: brightness(1.1); box-shadow: 0 14px 30px rgba(21,78,150,.46); }
.btn-login:disabled { opacity: .7; cursor: not-allowed; transform: none; filter: none; }

.login-tip { margin-top: 14px; padding: 8px 12px; border-radius: 6px; background: #f2f7fd; border: 1px dashed #b9d4ee; font-size: 11.5px; color: #5f7690; text-align: center; line-height: 1.6; }

/* 底部双行落款：整页底部水平居中 */
.form-bottom {
  position: absolute; left: 0; right: 0; bottom: 20px; z-index: 5;
  text-align: center; font-size: 12px; color: rgba(226,238,252,.8); letter-spacing: 2px; line-height: 1.7;
  pointer-events: none;
}
.form-bottom .fb-line2 { font-size: 11.5px; color: rgba(192,216,246,.6); letter-spacing: 1px; }

@media (max-width: 980px) {
  body { overflow: auto; }
  .login-wrap { flex-direction: column; }
  .brand-side { flex: 0 0 auto; min-height: 240px; padding: 20px 0 6px; }
  .brand-content { padding: 14px 26px 0; }
  .brand-title { font-size: 22px; }
  .brand-byline { margin-bottom: 14px; font-size: 12px; letter-spacing: 3px; }
  .brand-features { display: none; }
  .form-content { padding: 26px 18px 30px; }
  .login-card { padding: 32px 22px 24px; }
  .form-bottom { position: static; margin: 0 0 16px; }
  /* 窄屏减弱动效，避免与叠放后的登录卡抢视觉 */
  .fx-nodes { display: none; }
  .data-fx { opacity: .5; }
}

/* 尊重系统"减少动态效果"偏好 */
@media (prefers-reduced-motion: reduce) {
  .fx-line, .fx-dot, .fx-node, .fx-node::after,
  .brand-glow, .brand-divider i, .form-bg-wave { animation: none; }
  .fx-dot { opacity: .4; }
}
