/* ===== 数校云 · 全站公共头部用户区样式 =====
   容器（.site-menu-user / .user-area）的显示与隐藏由各页面原有 CSS 按断点控制：
   桌面显示 .user-area、移动端抽屉内显示 .site-menu-user。
   这里用 :where() 保持最低优先级，绝不覆盖页面原有的 display 规则，
   避免同一导航里同时出现两份登录信息。 */
:where(.site-menu-user, .user-area) { align-items:center; gap:8px; list-style:none; }
:where(.site-nav, .nav, .nav-menu) > :where(.site-menu-user, .user-area) { margin-left:4px; }

:where(.site-menu-user, .user-area) .user-name { font-size:13px; font-weight:500; color:inherit; opacity:.9; white-space:nowrap; max-width:120px; overflow:hidden; text-overflow:ellipsis; }

.nu-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  height:32px; padding:0 14px; border:1px solid currentColor; border-radius:8px;
  background:transparent; color:inherit; font-size:13px; font-family:inherit;
  line-height:1; text-decoration:none; cursor:pointer; opacity:.85;
  white-space:nowrap; transition:opacity .2s, background .2s;
}
.nu-btn:hover { opacity:1; background:rgba(148,163,184,.18); }
.nu-btn-name { font-weight:600; opacity:1; }
.nu-btn-login { border-color:transparent; background:linear-gradient(135deg,#0ea5e9,#6366f1); color:#fff; font-weight:600; opacity:1; }
.nu-btn-login:hover { background:linear-gradient(135deg,#0284c7,#4f46e5); opacity:1; }

.nu-toast-wrap { position:fixed; right:20px; bottom:24px; z-index:10000; display:flex; flex-direction:column; gap:10px; }
.nu-toast-wrap .toast { background:#0d1b30; border:1px solid rgba(148,163,184,.3); color:#e8edf5; padding:11px 18px; border-radius:10px; font-size:14px; box-shadow:0 8px 24px rgba(0,0,0,.35); }
.nu-toast-wrap .toast.success { border-color:rgba(34,197,94,.45); color:#4ade80; }
.nu-toast-wrap .toast.error { border-color:rgba(239,68,68,.45); color:#f87171; }

/* ---------- 公共登录弹窗（页面无 #authModal 时由脚本创建） ---------- */
.nu-mask { position:fixed; inset:0; z-index:9999; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(2,6,18,.72); }
.nu-mask.hidden { display:none; }
.nu-modal { position:relative; width:100%; max-width:400px; background:#0d1526; border:1px solid rgba(148,163,184,.25); border-radius:14px; padding:22px 22px 24px; box-shadow:0 20px 50px rgba(0,0,0,.45); }
.nu-modal h3 { margin:0 0 16px; font-size:18px; color:#e8edf5; }
.nu-close { position:absolute; top:12px; right:14px; border:none; background:transparent; color:#94a3b8; font-size:22px; line-height:1; cursor:pointer; }
.nu-tabs { display:flex; gap:8px; margin-bottom:16px; }
.nu-tabs button { flex:1; height:34px; border:1px solid rgba(148,163,184,.3); border-radius:8px; background:transparent; color:#94a3b8; font-size:14px; cursor:pointer; }
.nu-tabs button.active { border-color:#0ea5e9; color:#7dd3fc; background:rgba(14,165,233,.12); }
.nu-item { margin-bottom:12px; }
.nu-item label { display:block; margin-bottom:6px; font-size:13px; color:#94a3b8; }
.nu-input { width:100%; height:40px; padding:0 12px; border:1px solid rgba(148,163,184,.3); border-radius:8px; background:rgba(148,163,184,.08); color:#e8edf5; font-size:14px; box-sizing:border-box; }
.nu-input:focus { outline:none; border-color:#0ea5e9; }
.nu-submit { width:100%; height:42px; margin-top:6px; border:none; border-radius:8px; background:linear-gradient(135deg,#0ea5e9,#6366f1); color:#fff; font-size:15px; font-weight:600; cursor:pointer; }
.nu-hint { margin-top:12px; text-align:center; font-size:12px; color:#64748b; }
@media (max-width:900px) {
  :where(.site-menu-user, .user-area) { gap:6px; }
  .nu-btn { height:30px; padding:0 10px; font-size:12px; }
}
