/* ============================================================
   授权中心 · 登录页（管理员 / 代理商共用）
   ============================================================ */

:root {
  --theme: #16b777;
  --ink: #1f2733;
  --ink-2: #4a5566;
  --muted: #8a94a6;
  --line: #e9edf5;
  --radius: 20px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
body.login-body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #0e1620;
}

/* 背景层：默认主题渐变；设置了自定义背景图则叠加暗色遮罩 */
.login-bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(1000px 600px at 12% 18%, color-mix(in srgb, var(--theme) 42%, transparent), transparent 60%),
    radial-gradient(900px 600px at 88% 82%, color-mix(in srgb, var(--theme) 22%, transparent), transparent 62%),
    linear-gradient(135deg, #101a26 0%, #16222f 60%, #101a26 100%);
}
.login-bg.has-image {
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.login-bg.has-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 16, 24, .55), rgba(10, 16, 24, .72));
}
/* 细网格纹理 */
.login-bg::before {
  content: ''; position: absolute; inset: 0; opacity: .16;
  background-image: linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 78%);
}

.login-wrap {
  position: relative; z-index: 1; flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px 20px;
}

.login-shell {
  width: 880px; max-width: 100%; min-height: 468px;
  display: grid; grid-template-columns: 1.02fr .98fr;
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 30px 80px rgba(4, 12, 24, .45), 0 2px 0 rgba(255, 255, 255, .06) inset;
}

/* ---------- 左：品牌 ---------- */
.login-brand {
  position: relative; padding: 40px 38px 32px; color: #fff;
  display: flex; flex-direction: column;
  background: linear-gradient(150deg, color-mix(in srgb, var(--theme) 92%, #000) 0%, color-mix(in srgb, var(--theme) 55%, #0f1a26) 62%, #16222f 100%);
  overflow: hidden;
}
.login-brand::after {
  content: ''; position: absolute; right: -70px; top: -60px; width: 260px; height: 260px;
  border-radius: 50%; background: rgba(255, 255, 255, .10); filter: blur(2px);
}
.login-brand::before {
  content: ''; position: absolute; left: -50px; bottom: -90px; width: 220px; height: 220px;
  border-radius: 50%; background: rgba(255, 255, 255, .07);
}
.brand-top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center; font-size: 19px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}
.brand-mark-ico {
  display: block; line-height: 1;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  filter: brightness(0) invert(1);
}
.brand-name b { display: block; font-size: 16px; font-weight: 650; letter-spacing: .3px; }
.brand-name span { display: block; margin-top: 3px; font-size: 10.5px; letter-spacing: 2px; color: rgba(255, 255, 255, .62); }

.brand-tag { position: relative; z-index: 1; margin-top: 44px; }
.brand-tag h2 { margin: 0; font-size: 24px; font-weight: 650; line-height: 1.45; letter-spacing: .4px; }
.brand-tag p { margin: 12px 0 0; font-size: 12.5px; line-height: 1.8; color: rgba(255, 255, 255, .74); }

.brand-list { position: relative; z-index: 1; margin: 26px 0 0; padding: 0; list-style: none; }
.brand-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: rgba(255, 255, 255, .82); line-height: 1.7; margin-bottom: 11px; }
.brand-list .dot {
  flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 6px;
  display: grid; place-items: center; font-size: 10px;
  background: rgba(255, 255, 255, .16); color: #fff;
}
.brand-foot { margin-top: auto; padding-top: 26px; font-size: 11px; color: rgba(255, 255, 255, .5); line-height: 1.7; }
.brand-foot a { color: rgba(255, 255, 255, .62); text-decoration: none; }
.brand-foot a:hover { color: #fff; }

/* ---------- 右：表单 ---------- */
.login-card { padding: 44px 44px 36px; display: flex; flex-direction: column; justify-content: center; }
.login-card h1 { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: .3px; color: var(--ink); }
.login-card .sub { margin: 8px 0 22px; font-size: 12.5px; color: var(--muted); }

.login-card .layui-form-item { margin-bottom: 13px; }
.login-card .layui-input {
  height: 44px; line-height: 42px; padding: 0 14px; font-size: 13.5px;
  border-radius: 11px; border: 1px solid #e3e9f3; background: #fafbfd; color: var(--ink);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.login-card .layui-input:hover { border-color: #cfd7e6; }
.login-card .layui-input:focus {
  border-color: var(--theme); background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme) 16%, transparent);
}
.captcha-row { display: flex; gap: 9px; }
.captcha-row img {
  height: 44px; width: 116px; flex: none; border-radius: 11px; cursor: pointer;
  border: 1px solid #e3e9f3; background: #fafbfd; object-fit: cover;
}
.login-btn {
  width: 100%; height: 46px; margin-top: 6px; border: none; border-radius: 11px;
  background: var(--theme); color: #fff; font-size: 14.5px; letter-spacing: 4px; font-weight: 500;
  cursor: pointer; transition: filter .15s, box-shadow .15s, transform .15s;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--theme) 40%, transparent);
  font-family: inherit;
}
.login-btn:hover { filter: brightness(1.05); box-shadow: 0 11px 28px color-mix(in srgb, var(--theme) 50%, transparent); transform: translateY(-1px); }
.login-btn:active { transform: none; }

.login-alert {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 12px;
  border-radius: 10px; font-size: 12.5px;
  background: color-mix(in srgb, #e5484d 8%, #fff); color: #b42318;
  border: 1px solid color-mix(in srgb, #e5484d 18%, #fff);
}

.login-switch { margin-top: 18px; text-align: center; font-size: 12px; color: var(--muted); }
.login-switch a { color: var(--ink-2); text-decoration: none; border-bottom: 1px dashed #d5dce8; padding-bottom: 1px; }
.login-switch a:hover { color: var(--theme); border-color: color-mix(in srgb, var(--theme) 50%, #fff); }

.login-foot {
  position: relative; z-index: 1; text-align: center; padding: 10px 20px 22px;
  font-size: 11.5px; color: rgba(255, 255, 255, .55); text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.login-foot a { color: rgba(255, 255, 255, .68); text-decoration: none; }
.login-foot a:hover { color: #fff; }

@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; width: 440px; min-height: 0; }
  .login-brand { display: none; }
  .login-card { padding: 34px 30px 30px; }
  .login-wrap { padding: 26px 16px 12px; }
}
