/* ============================================================
   楚湘建工 · PC 登录页（2026.9 美化版）
   整页深色氛围 + 左侧品牌渐变面板 + 右侧精致登录卡
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

:root {
  --primary: #2f6bff;
  --primary-deep: #1643b8;
  --primary-dark: #0d2f86;
  --navy-1: #081a40;
  --navy-2: #0c2a63;
  --navy-3: #11388c;
  --ink: #16233c;
  --ink-2: #45536b;
  --muted: #8a94a6;
  --line: #e4e9f2;
  --bg-soft: #f6f8fc;
  --danger: #d92d20;
  --danger-bg: #fef3f2;
  --warn: #a35a05;
  --warn-bg: #fff8e6;
  --info: #1d4ed8;
  --info-bg: #eef4ff;
  --success: #047857;
  --success-bg: #ecfdf5;
  --gold: #f0a500;
  --gold-soft: #ffd76a;
  --radius-lg: 22px;
  --radius-md: 12px;
  --shadow-card: 0 30px 90px rgba(4, 16, 42, .5);
}

html, body { height: 100%; }

body {
  font-family: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- 整页背景（深色遮罩 + 模糊层，底图只留朦胧光影，杜绝文字穿帮） ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(1100px 620px at 84% -8%, rgba(240, 165, 0, .13), transparent 58%),
    radial-gradient(900px 600px at -6% 108%, rgba(47, 107, 255, .16), transparent 55%),
    linear-gradient(118deg, rgba(5, 16, 40, .92) 0%, rgba(8, 30, 66, .86) 38%, rgba(9, 36, 78, .8) 62%, rgba(5, 16, 40, .92) 100%),
    url('../img/login-bg.jpg') center / cover no-repeat fixed;
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  pointer-events: none;
}

/* ---------- 主卡片 ---------- */
.split-card {
  position: relative;
  z-index: 1;
  display: flex;
  width: 1160px;
  max-width: 97vw;
  height: 664px;
  max-height: 93vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, .28);
  animation: card-in .55s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* ============ 左侧品牌区（深蓝渐变 + 光效装饰，盖掉底图文字） ============ */
.visual {
  position: relative;
  flex: 0 0 56%;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(560px 420px at 88% 112%, rgba(240, 165, 0, .16), transparent 58%),
    radial-gradient(760px 520px at -8% -12%, rgba(64, 130, 255, .38), transparent 62%),
    linear-gradient(152deg, #0a2154 0%, var(--navy-2) 48%, #0a1f4d 100%);
}

/* 细网格纹理 */
.visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 88px);
  -webkit-mask-image: radial-gradient(720px 560px at 30% 40%, #000 20%, transparent 78%);
          mask-image: radial-gradient(720px 560px at 30% 40%, #000 20%, transparent 78%);
  pointer-events: none;
}

/* 右上角装饰圆环 */
.visual::after {
  content: "";
  position: absolute;
  right: -110px;
  top: -110px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 215, 106, .3);
  box-shadow: inset 0 0 0 34px rgba(255, 255, 255, .035);
  pointer-events: none;
}

.visual-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 60px 72px 48px;
  display: flex;
  flex-direction: column;
}

/* 品牌 */
.brand { display: flex; align-items: center; gap: 18px; }

.brand-logo {
  flex: 0 0 auto;
  width: 54px; height: 54px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, var(--gold) 0%, #ffc84a 100%);
  box-shadow: 0 10px 26px rgba(240, 165, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.brand-company {
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, .74);
}

.brand-name {
  margin-top: 5px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 7px;
  text-indent: 7px;
  line-height: 1.1;
  background: linear-gradient(92deg, #ffffff 55%, #ffe9b0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-slogan {
  margin-top: 24px;
  font-size: 15px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, .62);
  font-weight: 300;
}

/* 分隔金线 */
.visual-content::before {
  content: "";
  width: 52px;
  height: 3px;
  border-radius: 2px;
  margin: 30px 0 0;
  background: linear-gradient(90deg, var(--gold), rgba(240, 165, 0, 0));
}

/* 愿景 / 使命 */
.vision { margin-top: 28px; display: flex; flex-direction: column; gap: 24px; }

.vision-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold-soft);
  padding: 3px 10px 3px 0;
  border-bottom: 1px solid rgba(255, 215, 106, .5);
}

.vision-text {
  margin-top: 10px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.6;
}

.vision-item + .vision-item .vision-text {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, .92);
  max-width: 520px;
}

/* 底部特性标签 */
.feature-chips {
  margin-top: auto;
  padding-top: 34px;
  display: flex;
  gap: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  font-size: 12.5px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, .85);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.chip svg { color: var(--gold-soft); flex: 0 0 auto; }

/* 左侧文字入场（自上而下错峰浮现） */
.visual-content > * { animation: rise .6s cubic-bezier(.22, 1, .36, 1) both; }
.visual-content > .brand         { animation-delay: .12s; }
.visual-content > .brand-slogan  { animation-delay: .2s; }
.visual-content > .vision        { animation-delay: .3s; }
.visual-content > .feature-chips { animation-delay: .42s; }

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

/* ============ 右侧登录区 ============ */
.form-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 52px 56px 24px;
  background: rgba(255, 255, 255, .97);
}

/* 头部 */
.login-head { position: relative; margin-bottom: 26px; padding-left: 16px; }

.login-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--gold) 100%);
}

.login-head h2 {
  font-size: 27px;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: 1px;
}
.login-head p {
  margin-top: 9px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .5px;
}

/* 提示条 */
.msg {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid transparent;
  animation: msg-in .18s ease;
}
.msg b { font-weight: 700; }
.msg.error { background: var(--danger-bg); border-color: #f6c8c4; color: var(--danger); }
.msg.warn  { background: var(--warn-bg);  border-color: #f2ddad; color: var(--warn); }
.msg.info  { background: var(--info-bg);  border-color: #c9dcff; color: var(--info); }
.msg.success { background: var(--success-bg); border-color: #b7e6d3; color: var(--success); }
@keyframes msg-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* 表单 */
#loginForm { margin-top: 2px; }

.field { margin-bottom: 20px; }

.field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 9px;
}

/* 输入框容器（图标 + 输入） */
.input { position: relative; }

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa6b8;
  pointer-events: none;
  transition: color .18s;
}

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  height: 48px;
  padding: 0 44px;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s, transform .18s;
}

.field input:hover { border-color: #c9d3e3; }

.field input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(47, 107, 255, .14);
}

.field .input:focus-within .input-icon { color: var(--primary); }

.field input::placeholder { color: #b3bccb; }
.field input:disabled { background: #f0f2f6; color: #9aa3b2; cursor: not-allowed; }

/* 自动填充背景修正 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-in-out 0s;
}

/* 密码可见切换 */
.pwd-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 9px;
  color: #98a2b3;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.pwd-eye:hover { color: var(--primary); background: rgba(47, 107, 255, .07); }
.pwd-eye svg { width: 18px; height: 18px; }
.pwd-eye .eye-off { display: none; }
.pwd-eye.showing .eye-open { display: none; }
.pwd-eye.showing .eye-off { display: block; }

/* 验证码 */
.captcha-line { display: flex; gap: 12px; align-items: stretch; }
.captcha-line .captcha-input { flex: 1; min-width: 0; }
.captcha-line .captcha-input input { padding-right: 16px; }
.captcha-box {
  flex: 0 0 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.captcha-box:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .1);
}
#captchaImg {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  user-select: none;
}

.refresh-link {
  display: block;
  margin: 8px 0 0;
  padding: 0 2px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 12px;
  color: #6b7a94;
  transition: color .15s;
}
.refresh-link:hover { color: var(--primary); }
.refresh-link:disabled { color: #b6bec9; cursor: not-allowed; }

/* 登录按钮 */
.login-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 50px;
  margin-top: 10px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 10px;
  text-indent: 10px;
  color: #fff;
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-deep) 55%, var(--primary-dark) 100%);
  box-shadow: 0 12px 26px rgba(22, 67, 184, .32), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s, box-shadow .2s, filter .2s, opacity .2s;
}

/* 高光扫过动效 */
.login-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-20deg);
  transition: left .5s ease;
  pointer-events: none;
}
.login-btn:hover:not(:disabled)::after { left: 130%; }

.login-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 16px 32px rgba(22, 67, 184, .4), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.login-btn:active:not(:disabled) { transform: translateY(0); }
.login-btn:disabled { cursor: not-allowed; opacity: .6; box-shadow: none; }

.btn-text { transition: opacity .15s; }
.login-btn.busy .btn-text { visibility: hidden; }
.btn-loading {
  position: absolute;
  left: 50%; top: 50%;
  width: 19px; height: 19px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 底部版权 */
.copyright {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  color: #a6aebb;
}
.copyright::before,
.copyright::after {
  content: "";
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #dde3ec);
}
.copyright::after { background: linear-gradient(90deg, #dde3ec, transparent); }

/* ---------- 窄屏：单栏 ---------- */
@media (max-width: 1080px) {
  .login-page { padding: 20px; }
  .visual { display: none; }
  .split-card { height: auto; max-width: 480px; }
  .form-panel { padding: 46px 40px 24px; }
}
