/* ============================================================
   亿美互联（1M.NET）· IDC 用户控制台 — 登录 / 注册 共用样式
   设计语言：橙红品牌渐变 + 大白卡片 + 毛玻璃顶栏，简洁大气
   ============================================================ */

:root {
  --primary: #E8481F;
  --primary-600: #CF3A12;
  --primary-50: #FEF4F0;
  --primary-100: #FCE4DA;
  --grad: linear-gradient(135deg, #FF9430 0%, #F0551F 55%, #E8281A 100%);
  --text-1: #1F2329;
  --text-2: #4E5969;
  --text-3: #86909C;
  --border: #E5E6EB;
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --wechat: #07C160;
  --wechat-bg: #EAFBF1;
  --qq: #12B7F5;
  --qq-bg: #E9F7FE;
  --ok: #00B42A;
  --warn: #FF7D00;
  --err: #F53F3F;
  --radius-lg: 18px;
  --radius-md: 10px;
  --shadow-card: 0 10px 48px rgba(31, 35, 41, .10);
  --shadow-btn: 0 6px 18px rgba(232, 72, 31, .28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-600); }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
ul { list-style: none; }
::selection { background: rgba(232, 72, 31, .18); }

/* ---------- 页面装饰背景 ---------- */
.page-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.page-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(720px 480px at 88% -8%, rgba(255, 148, 48, .16), transparent 62%),
    radial-gradient(640px 520px at -8% 108%, rgba(232, 40, 26, .12), transparent 60%);
}
.page-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(31, 35, 41, .06) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent 72%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent 72%);
}

/* ---------- 顶部导航 ---------- */
/* .site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 230, 235, .8);
} */
.header-inner {
  /* max-width: 1200px;  */
  margin: 0 auto; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 34px; width: auto; }
.logo-tag { 
  display:none;
  font-size: 12px; color: var(--text-3); border-left: 1px solid var(--border); padding-left: 12px; line-height: 1.35; }
.logo-tag b { display: block; color: var(--text-1); font-size: 13px; font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  position: relative; padding: 8px 14px; font-size: 14px;
  color: var(--text-2); border-radius: 8px; transition: .2s;
}
.site-nav a:hover { color: var(--primary); background: var(--primary-50); }
.site-nav a.active { color: var(--text-1); font-weight: 600; }
.site-nav a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--grad);
}

/* ---------- 主体与卡片 ---------- */
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 24px 40px; }
.auth-card {
  width: 100%; max-width: 980px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: grid; grid-template-columns: 400px 1fr;
  overflow: hidden;
  animation: cardIn .55s cubic-bezier(.22, .68, .36, 1) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- 左侧品牌区 ---------- */
.brand-panel {
  position: relative; background: var(--grad); color: #fff;
  padding: 48px 44px; display: flex; flex-direction: column; overflow: hidden;
}
.brand-panel::before {
  content: ""; position: absolute; right: -110px; top: -110px;
  width: 320px; height: 320px; border-radius: 50%;
  border: 42px solid rgba(255, 255, 255, .10);
}
.brand-panel::after {
  content: ""; position: absolute; left: -70px; bottom: -90px;
  width: 230px; height: 230px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.brand-panel > * { position: relative; z-index: 1; }
.brand-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .12em;
  padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px; width: max-content;
  animation: fadeUp .6s .05s both;
}
.brand-title {
  margin-top: 28px; font-size: 30px; line-height: 1.32; font-weight: 700;
  animation: fadeUp .6s .13s both;
}
.brand-desc { margin-top: 12px; font-size: 14px; color: rgba(255, 255, 255, .85); animation: fadeUp .6s .21s both; }
.brand-list { margin-top: 32px; display: grid; gap: 14px; animation: fadeUp .6s .29s both; }
.brand-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: rgba(255, 255, 255, .92); }
.brand-list .ck {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255, 255, 255, .22); display: grid; place-items: center; margin-top: 3px;
}
.brand-list .ck svg { width: 10px; height: 10px; }
.brand-foot {
  margin-top: auto; padding-top: 36px; font-size: 12px; color: rgba(255, 255, 255, .75);
  display: flex; align-items: center; gap: 8px; animation: fadeUp .6s .37s both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 图标（外部 svg + mask） ---------- */
/*
 * 图标本体在 public/static/home/icons/*.svg，页面里只留 <i class="ico ico-xxx">。
 * 用 mask 把 svg 当「形状」，再用 background-color: currentColor 上色，
 * 这样 hover / 聚焦 / 勾选态的变色行为与原内联 <svg fill="currentColor"> 完全一致。
 *
 * ★ 路径相对本 CSS 文件（/idc-console/css/ → /static/home/icons/）。
 * ★ 不要直接改 .ico 的 width/height：各处的尺寸由使用方覆盖
 *   （.lead-ico / .pwd-toggle / .ck .box / .social-btn 等）。
 */
.ico {
  display: inline-block; flex: none; width: 16px; height: 16px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.ico-user {
  -webkit-mask-image: url('../../static/home/icons/user.svg');
  mask-image: url('../../static/home/icons/user.svg');
}
.ico-lock {
  -webkit-mask-image: url('../../static/home/icons/lock.svg');
  mask-image: url('../../static/home/icons/lock.svg');
}
.ico-eye {
  -webkit-mask-image: url('../../static/home/icons/eye.svg');
  mask-image: url('../../static/home/icons/eye.svg');
}
.ico-eye-off {
  -webkit-mask-image: url('../../static/home/icons/eye-off.svg');
  mask-image: url('../../static/home/icons/eye-off.svg');
}
.ico-check {
  -webkit-mask-image: url('../../static/home/icons/check.svg');
  mask-image: url('../../static/home/icons/check.svg');
}
.ico-phone-call {
  -webkit-mask-image: url('../../static/home/icons/phone-call.svg');
  mask-image: url('../../static/home/icons/phone-call.svg');
}
.ico-shield-check {
  -webkit-mask-image: url('../../static/home/icons/shield-check.svg');
  mask-image: url('../../static/home/icons/shield-check.svg');
}
.ico-arrow-left {
  -webkit-mask-image: url('../../static/home/icons/arrow-left.svg');
  mask-image: url('../../static/home/icons/arrow-left.svg');
}
.ico-wechat {
  -webkit-mask-image: url('../../static/home/icons/wechat.svg');
  mask-image: url('../../static/home/icons/wechat.svg');
}
.ico-qq {
  -webkit-mask-image: url('../../static/home/icons/qq.svg');
  mask-image: url('../../static/home/icons/qq.svg');
}
.ico-mobile-device {
  -webkit-mask-image: url('../../static/home/icons/mobile-device.svg');
  mask-image: url('../../static/home/icons/mobile-device.svg');
}

/* ---------- 右侧表单区 ---------- */
.form-panel { padding: 44px 52px 40px; display: flex; flex-direction: column; }
.form-title { font-size: 24px; font-weight: 700; }
.form-sub { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.form-body { margin-top: 28px; display: grid; gap: 18px; }

/* 表单字段 */
.field label.fl { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 8px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .lead-ico {
  position: absolute; left: 13px; width: 18px; height: 18px;
  color: var(--text-3); pointer-events: none; transition: color .2s;
}
.input-wrap input {
  width: 100%; height: 46px; padding: 0 14px 0 40px;
  font-size: 14px; color: var(--text-1); background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.input-wrap input::placeholder { color: #B6BCC4; }
.input-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232, 72, 31, .12); }
.input-wrap:focus-within .lead-ico { color: var(--primary); }

/* 密码显隐 */
.pwd-toggle {
  position: absolute; right: 8px; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: 8px; color: var(--text-3); transition: .2s;
}
.pwd-toggle:hover { color: var(--primary); background: var(--primary-50); }
.pwd-toggle svg, .pwd-toggle .ico { width: 18px; height: 18px; }
.pwd-toggle .ico-eye-off { display: none; }
.pwd-toggle.active .ico-eye { display: none; }
.pwd-toggle.active .ico-eye-off { display: block; }

/* 校验错误态 */
.field-err { display: none; font-size: 12px; color: var(--err); margin-top: 6px; }
.field.invalid .input-wrap input { border-color: var(--err); }
.field.invalid .input-wrap input:focus { box-shadow: 0 0 0 3px rgba(245, 63, 63, .12); }
.field.invalid .field-err { display: block; animation: errIn .25s ease; }
@keyframes errIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* 行内布局 */
.form-row { display: flex; align-items: center; justify-content: space-between; }
.form-row a { font-size: 13px; color: var(--text-2); }
.form-row a:hover { color: var(--primary); }

/* 复选框 */
.ck { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; position: relative; }
.ck input { position: absolute; opacity: 0; width: 0; height: 0; }
.ck .box {
  flex: none; width: 16px; height: 16px; border: 1px solid var(--border);
  border-radius: 4px; display: grid; place-items: center; transition: .18s; background: #fff;
}
.ck .box svg, .ck .box .ico { width: 10px; height: 10px; color: #fff; opacity: 0; transform: scale(.5); transition: .18s; }
.ck input:checked + .box { background: var(--primary); border-color: var(--primary); }
.ck input:checked + .box svg, .ck input:checked + .box .ico { opacity: 1; transform: scale(1); }
.ck input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(232, 72, 31, .15); }
.ck.agree { align-items: flex-start; line-height: 1.5; }
.ck.agree .box { margin-top: 2px; }

/* 主按钮 */
.btn-primary {
  position: relative; width: 100%; height: 46px;
  border-radius: var(--radius-md); background: var(--grad); color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: .08em;
  box-shadow: var(--shadow-btn);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(232, 72, 31, .34); filter: saturate(1.06); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .75; cursor: not-allowed; transform: none; }
.btn-primary .spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite; display: none;
}
.btn-primary.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 分割线 */
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--text-3); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* 三方登录按钮 */
.social-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 13.5px; color: var(--text-2); background: #fff; transition: .2s;
}
.social-btn svg, .social-btn .ico { width: 19px; height: 19px; flex: none; }
.social-btn.wechat:hover { border-color: var(--wechat); color: var(--wechat); background: var(--wechat-bg); }
.social-btn.qq:hover { border-color: var(--qq); color: var(--qq); background: var(--qq-bg); }
.social-btn.phone:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

/* 表单底部 */
.form-foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-3); }
.modal-demo {
  margin: 14px auto 0; display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-3);
  border: 1px dashed var(--border); border-radius: 999px; padding: 6px 14px; transition: .2s;
}
.modal-demo:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-50); }

/* 手机号 + 验证码 */
.code-field { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.btn-code {
  height: 46px; padding: 0 16px; border: 1px solid var(--border);
  border-radius: var(--radius-md); font-size: 13px; color: var(--primary);
  background: var(--primary-50); white-space: nowrap; transition: .2s;
}
.btn-code:hover:not(:disabled) { border-color: var(--primary); }
.btn-code:disabled { color: var(--text-3); background: #F2F3F5; border-color: var(--border); cursor: not-allowed; }

/* 密码强度 */
.strength { display: flex; align-items: center; gap: 8px; margin-top: 8px; visibility: hidden; }
.strength.show { visibility: visible; }
.strength .bars { display: flex; gap: 5px; flex: 1; }
.strength .bar { height: 4px; flex: 1; border-radius: 2px; background: var(--border); transition: background .25s; }
.strength .txt { font-size: 12px; color: var(--text-3); width: 28px; text-align: right; }
.strength.lv1 .bar:nth-child(-n+1) { background: var(--err); }
.strength.lv2 .bar:nth-child(-n+2) { background: var(--warn); }
.strength.lv3 .bar { background: var(--ok); }
.strength.lv1 .txt { color: var(--err); }
.strength.lv2 .txt { color: var(--warn); }
.strength.lv3 .txt { color: var(--ok); }

/* 登录方式切换面板 */
.pane { display: none; }
.pane.active { display: grid; gap: 18px; animation: paneIn .3s ease; }
@keyframes paneIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.pane-tip { font-size: 12px; color: var(--text-3); text-align: center; }
.back-link {
  justify-self: center; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-3); transition: .2s;
}
.back-link:hover { color: var(--primary); }
.back-link .ico { width: 14px; height: 14px; }

/* ---------- 弹出登录层 ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(23, 26, 32, .45);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .28s, visibility .28s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-card {
  position: relative; width: 100%; max-width: 380px;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
  padding: 34px 34px 26px;
  transform: translateY(14px) scale(.96); opacity: 0;
  transition: transform .3s cubic-bezier(.22, .68, .36, 1), opacity .3s;
}
.modal-overlay.open .modal-card { transform: none; opacity: 1; }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px;
  border-radius: 8px; display: grid; place-items: center; color: var(--text-3); transition: .2s;
}
.modal-close:hover { background: #F2F3F5; color: var(--text-1); }
.modal-close svg { width: 16px; height: 16px; }
.modal-title { font-size: 20px; font-weight: 700; text-align: center; }
.modal-sub { text-align: center; font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.modal-card .form-body { margin-top: 22px; }
.modal-card .divider { margin: 20px 0 16px; }
.modal-social { display: flex; justify-content: center; gap: 30px; }
.ms-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text-2); transition: color .2s;
}
.ms-item .bubble { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: transform .22s; }
.ms-item svg { width: 22px; height: 22px; }
.ms-item.wechat .bubble { background: var(--wechat-bg); color: var(--wechat); }
.ms-item.qq .bubble { background: var(--qq-bg); color: var(--qq); }
.ms-item.phone .bubble { background: var(--primary-50); color: var(--primary); }
.ms-item:hover .bubble { transform: translateY(-3px); }
.ms-item.wechat:hover { color: var(--wechat); }
.ms-item.qq:hover { color: var(--qq); }
.ms-item.phone:hover { color: var(--primary); }
.modal-foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-3); }

/* ---------- 底部版权 ---------- */
.site-footer { padding: 26px 24px 30px; text-align: center; color: var(--text-3); font-size: 12px; line-height: 2; }
.site-footer .ft-links a { color: var(--text-3); margin: 0 10px; }
.site-footer .ft-links a:hover { color: var(--primary); }
.site-footer .ft-sep { color: var(--border); }

/* ---------- Toast 轻提示 ---------- */
.toast-box {
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: grid; gap: 10px; justify-items: center; pointer-events: none;
}
.toast {
  background: rgba(31, 35, 41, .88); color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  opacity: 0; transform: translateY(-10px); transition: .3s;
  display: flex; align-items: center; gap: 8px; max-width: 82vw;
}
.toast.show { opacity: 1; transform: none; }
.toast .dot { width: 6px; height: 6px; border-radius: 50%; background: #FF9430; flex: none; }
.toast-success .dot { background: #00B42A; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .auth-card { grid-template-columns: 1fr; max-width: 540px; }
  .brand-panel { padding: 28px 32px; }
  .brand-panel .brand-list, .brand-panel .brand-foot { display: none; }
  .brand-title { font-size: 24px; margin-top: 16px; }
  .brand-desc { margin-top: 8px; }
  .form-panel { padding: 32px 32px 30px; }
}
@media (max-width: 640px) {
  .auth-main { padding: 24px 14px 28px; }
  .header-inner { padding: 0 16px; }
  .logo img { height: 28px; }
  .logo-tag { display: none; }
  .site-nav a { padding: 8px 9px; font-size: 13px; }
  .form-panel { padding: 26px 20px 24px; }
  .brand-panel { padding: 22px; }
  .brand-title { font-size: 20px; }
  .form-title { font-size: 21px; }
  .input-wrap input { font-size: 16px; } /* 防止 iOS 聚焦自动放大 */
  .social-btn { font-size: 12px; gap: 5px; }
  .social-btn svg, .social-btn .ico { width: 17px; height: 17px; }
  .modal-card { padding: 28px 22px 22px; }
  .modal-social { gap: 20px; }
  .toast-box { top: 76px; }
}

/* 无障碍：减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
