/* ============================================================
   墨流火官网 · 登录注册（顶部入口 + 弹窗）
   ============================================================ */

/* ---------- 导航右侧入口 ---------- */
.mlh-auth { display: inline-flex; align-items: center; gap: 8px; }

.mlh-auth .mlh-btn-login {
  height: 38px; padding: 0 18px; font-size: 14px; font-weight: 600;
  border-radius: var(--radius-sm); border: 1.5px solid rgba(10, 37, 64, .22);
  background: transparent; color: var(--navy); transition: all .22s ease; white-space: nowrap;
}
.mlh-auth .mlh-btn-login:hover { border-color: var(--navy); background: rgba(10, 37, 64, .04); }

.mlh-auth .mlh-btn-reg {
  height: 38px; padding: 0 18px; font-size: 14px; font-weight: 600;
  border-radius: var(--radius-sm); border: none; background: var(--orange); color: #fff;
  box-shadow: 0 6px 18px rgba(255, 106, 0, .28); transition: all .22s ease; white-space: nowrap;
}
.mlh-auth .mlh-btn-reg:hover { background: var(--orange-dark); transform: translateY(-1px); }

.mlh-user { position: relative; }
.mlh-user-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 6px;
  border-radius: 999px; border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--navy); transition: all .2s ease;
}
.mlh-user-btn:hover { border-color: var(--navy); }
.mlh-user-btn .mlh-avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--bg-soft);
}
.mlh-user-btn .mlh-avatar-fallback {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-size: 12px; font-weight: 700;
}
.mlh-user-btn .mlh-caret { width: 0; height: 0; border: 4px solid transparent; border-top-color: var(--ink-3); margin-top: 3px; }

.mlh-drop {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 176px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px; display: none; z-index: 120;
}
.mlh-user.open .mlh-drop { display: block; }
.mlh-drop .mlh-drop-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.mlh-drop .mlh-drop-head b { display: block; font-size: 14px; color: var(--ink); }
.mlh-drop .mlh-drop-head span { font-size: 12px; color: var(--ink-3); }
.mlh-drop a, .mlh-drop button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px;
  font-size: 14px; color: var(--ink-2); background: transparent; transition: background .18s ease;
}
.mlh-drop a:hover, .mlh-drop button:hover { background: var(--bg-soft); color: var(--navy); }

/* ---------- 弹窗 ---------- */
.mlh-mask {
  position: fixed; inset: 0; background: rgba(10, 25, 40, .55); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; transition: opacity .2s ease;
}
.mlh-mask.show { opacity: 1; }

.mlh-modal {
  position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 48px); overflow-y: auto;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 30px 32px 28px;
  transform: translateY(12px); transition: transform .22s ease;
}
.mlh-mask.show .mlh-modal { transform: translateY(0); }

.mlh-close {
  position: absolute; right: 16px; top: 14px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-soft); color: var(--ink-3); font-size: 20px; line-height: 1;
}
.mlh-close:hover { background: var(--line-2); color: var(--ink); }

.mlh-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.mlh-tabs button {
  position: relative; padding: 8px 0 12px; font-size: 17px; font-weight: 700; color: var(--ink-3); background: transparent;
}
.mlh-tabs button.active { color: var(--navy); }
.mlh-tabs button.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--orange);
}

.mlh-subtabs { display: flex; gap: 8px; margin-bottom: 16px; }
.mlh-subtabs button {
  flex: 1; height: 34px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--bg-soft); color: var(--ink-2);
}
.mlh-subtabs button.active { background: var(--navy); color: #fff; }

.mlh-field { margin-bottom: 14px; }
.mlh-field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.mlh-field input[type=text], .mlh-field input[type=password], .mlh-field input[type=email] {
  width: 100%; height: 44px; padding: 0 14px; font-size: 15px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .18s ease; font-family: inherit;
}
.mlh-field input:focus { outline: none; border-color: var(--navy-600); }

.mlh-row { display: flex; gap: 10px; }
.mlh-row .mlh-field { flex: 1; }

.mlh-code-btn {
  height: 44px; padding: 0 14px; border-radius: var(--radius-sm); white-space: nowrap;
  background: var(--navy); color: #fff; font-size: 13px; font-weight: 600; margin-top: 25px;
}
.mlh-code-btn:disabled { background: var(--line); color: var(--ink-3); cursor: not-allowed; }

.mlh-captcha-img {
  height: 44px; width: 108px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; object-fit: cover; margin-top: 25px; background: var(--bg-soft);
}

.mlh-tip { font-size: 12px; color: var(--ink-3); margin-top: -6px; margin-bottom: 14px; }

.mlh-agree { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-2); margin: 4px 0 16px; }
.mlh-agree input { margin-top: 3px; width: 15px; height: 15px; accent-color: var(--orange); }
.mlh-agree a { color: var(--orange); text-decoration: underline; }

.mlh-submit {
  width: 100%; height: 46px; border-radius: var(--radius-sm); background: var(--orange); color: #fff;
  font-size: 16px; font-weight: 700; box-shadow: 0 6px 18px rgba(255, 106, 0, .24); transition: all .2s ease;
}
.mlh-submit:hover { background: var(--orange-dark); }
.mlh-submit:disabled { background: #FFB37A; cursor: not-allowed; box-shadow: none; }

.mlh-err {
  display: none; margin-bottom: 14px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: #FFF1F0; border: 1px solid #FFCCC7; color: #CF1322; font-size: 13px;
}
.mlh-err.show { display: block; }

.mlh-foot { margin-top: 16px; text-align: center; font-size: 13px; color: var(--ink-3); }
.mlh-foot button { color: var(--orange); font-weight: 600; background: transparent; font-size: 13px; }

@media (max-width: 1080px) {
  .mlh-auth { margin: 0 16px 12px; width: 100%; }
  .mlh-auth .mlh-btn-login, .mlh-auth .mlh-btn-reg { flex: 1; justify-content: center; }
  .nav-actions { flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .mlh-modal { padding: 24px 20px 22px; }
  .mlh-tabs { gap: 18px; }
}
