/* ============ [hidden] 修复 ============
 * .uc-form 的 display:flex 会覆盖浏览器对 hidden 属性的默认隐藏,
 * 导致登录/注册/找回密码三个表单同时显示、tab 点击切换失效。
 * 此处用 !important 恢复 hidden 语义, JS 切换 el.hidden 属性后即时生效。
 * ===================================== */
[hidden]{display:none!important}

/* ============================================================
 * 迪妙网络空间安全学院 · 用户中心专属样式
 * 文件: user.css  (全局导航/页脚沿用 style.css, 此处仅补充用户中心组件)
 * ============================================================ */
.uc-hero{
  padding:150px 0 48px;
  background:linear-gradient(135deg,#0f2027 0%,#203a43 50%,#2c5364 100%);
  color:#fff;
  text-align:center
}
.uc-hero h1{
  font-size:clamp(26px,5vw,40px);
  letter-spacing:2px;
  margin-bottom:12px
}
.uc-hero p{
  font-size:14px;
  opacity:.8;
  padding:0 16px
}
.uc-main{
  padding:40px 16px 80px;
  min-height:60vh
}
@media(min-width:1200px){
  .uc-main{max-width:1100px}
}

/* ---------- 认证面板 ---------- */
.uc-auth{
  max-width:480px;
  margin:0 auto;
  background:#fff;
  border:1px solid var(--border,#e5e7eb);
  border-radius:16px;
  box-shadow:0 10px 40px rgba(15,32,39,.08);
  overflow:hidden
}
.uc-auth-tabs{
  display:flex;
  border-bottom:1px solid var(--border,#e5e7eb)
}
.uc-tab{
  flex:1;
  padding:16px 0;
  background:#f8fafc;
  border:none;
  font-size:15px;
  font-weight:700;
  color:#64748b;
  cursor:pointer;
  transition:.2s;
  border-bottom:2px solid transparent
}
.uc-tab.active{
  background:#fff;
  color:#0f2027;
  border-bottom-color:#2c5364
}
.uc-form{
  padding:24px 28px 28px;
  display:flex;
  flex-direction:column
}
.uc-label{
  font-size:13px;
  font-weight:700;
  color:#334155;
  margin:12px 0 6px
}
.uc-label small{
  font-weight:400;
  color:#94a3b8
}
.uc-input{
  padding:11px 14px;
  border:1.5px solid #e2e8f0;
  border-radius:10px;
  font-size:14px;
  font-family:inherit;
  outline:none;
  transition:.2s;
  width:100%;
  box-sizing:border-box;
  background:#fff
}
.uc-input:focus{
  border-color:#2c5364;
  box-shadow:0 0 0 3px rgba(44,83,100,.12)
}
textarea.uc-input{resize:vertical}
.uc-btn{
  display:inline-block;
  padding:12px 24px;
  border-radius:10px;
  font-size:14px;
  font-weight:700;
  border:none;
  cursor:pointer;
  transition:.2s;
  text-decoration:none;
  text-align:center;
  font-family:inherit
}
.uc-btn-primary{
  background:linear-gradient(135deg,#203a43,#2c5364);
  color:#fff;
  margin-top:20px
}
.uc-btn-primary:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 18px rgba(32,58,67,.3)
}
.uc-btn-ghost{
  background:#fff;
  color:#334155;
  border:1.5px solid #e2e8f0
}
.uc-btn-ghost:hover{border-color:#2c5364;color:#2c5364}
.uc-btn-danger{
  background:#fff1f2;
  color:#e11d48;
  border:1.5px solid #fecdd3
}
.uc-btn-danger:hover{background:#ffe4e6}
.uc-btn[disabled]{opacity:.6;cursor:not-allowed;transform:none!important}
.uc-tip{
  font-size:12.5px;
  color:#94a3b8;
  margin-top:14px;
  line-height:1.7
}
.uc-tip a{color:#2c5364}
.uc-tip-top{margin:0 0 6px;color:#b45309;background:#fffbeb;border:1px solid #fde68a;border-radius:8px;padding:10px 12px}

/* ---------- 工作台 ---------- */
.uc-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  flex-wrap:wrap;
  gap:16px;
  margin-bottom:20px
}
.uc-head h2{font-size:24px}
.uc-sub{font-size:13px;color:#94a3b8;margin-top:4px}
.uc-head-actions{display:flex;gap:10px;flex-wrap:wrap}
.uc-head-actions .uc-btn{margin-top:0}
.uc-menu{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  border-bottom:2px solid #e2e8f0;
  margin-bottom:24px
}
.uc-mtab{
  padding:10px 18px;
  background:none;
  border:none;
  font-size:14px;
  font-weight:700;
  color:#64748b;
  cursor:pointer;
  border-bottom:2px solid transparent;
  margin-bottom:-2px;
  transition:.2s;
  font-family:inherit
}
.uc-mtab.active{color:#2c5364;border-bottom-color:#2c5364}
.uc-view{animation:ucFade .3s}
@keyframes ucFade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.uc-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  margin-bottom:20px
}
.uc-card{
  background:#fff;
  border:1px solid var(--border,#e5e7eb);
  border-radius:14px;
  padding:24px;
  box-shadow:0 4px 20px rgba(15,32,39,.04)
}
.uc-card h3{
  font-size:16px;
  margin-bottom:14px;
  padding-bottom:10px;
  border-bottom:1px solid #f1f5f9
}
.uc-test-card{
  background:linear-gradient(135deg,#0f2027,#2c5364);
  color:#fff;
  border:none
}
.uc-test-card h3{border-bottom-color:rgba(255,255,255,.15)}
.uc-test-score{
  font-size:44px;
  font-weight:800;
  line-height:1.1
}
.uc-test-cert{
  font-family:Consolas,monospace;
  font-size:13px;
  background:rgba(255,255,255,.12);
  border-radius:8px;
  padding:8px 12px;
  margin-top:10px;
  word-break:break-all
}
.uc-test-empty{font-size:14px;opacity:.85;line-height:1.8}
.uc-test-empty a{color:#7dd3fc}
.uc-sec-list{list-style:none}
.uc-sec-list li{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 0;
  border-bottom:1px dashed #f1f5f9;
  font-size:14px
}
.uc-badge{
  font-size:12px;
  padding:3px 12px;
  border-radius:99px;
  font-weight:700
}
.uc-badge.on{background:#ecfdf5;color:#059669}
.uc-badge.off{background:#f1f5f9;color:#94a3b8}
.uc-rec-group{margin-bottom:18px}
.uc-rec-group h4{font-size:14px;margin-bottom:8px;color:#334155}
.uc-rec-item{
  font-size:13px;
  color:#64748b;
  padding:8px 12px;
  background:#f8fafc;
  border-radius:8px;
  margin-bottom:6px;
  line-height:1.6
}
.uc-rec-item b{color:#0f2027}
.uc-rec-none{font-size:13px;color:#cbd5e1}

/* ---------- 列表(活动/问卷) ---------- */
.uc-list{display:flex;flex-direction:column;gap:14px}
.uc-item{
  background:#fff;
  border:1px solid var(--border,#e5e7eb);
  border-radius:14px;
  padding:20px 22px;
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  flex-wrap:wrap;
  transition:.2s
}
.uc-item:hover{box-shadow:0 6px 24px rgba(15,32,39,.08)}
.uc-item h4{font-size:16px;margin-bottom:6px}
.uc-item-meta{font-size:13px;color:#64748b;line-height:1.8}
.uc-tag{
  display:inline-block;
  font-size:12px;
  padding:2px 10px;
  border-radius:99px;
  background:#eef2ff;
  color:#4f46e5;
  margin-right:6px;
  font-weight:700
}
.uc-tag.green{background:#ecfdf5;color:#059669}
.uc-tag.gray{background:#f1f5f9;color:#64748b}
.uc-item-actions{display:flex;gap:8px;align-items:center}
.uc-btn-sm{padding:8px 18px;font-size:13px;margin-top:0;border-radius:8px}
.uc-quota{font-size:12.5px;color:#94a3b8;margin-top:6px}

/* ---------- 问卷作答 ---------- */
.uc-q-item{margin-bottom:18px}
.uc-q-title{font-size:14px;font-weight:700;margin-bottom:8px;line-height:1.6}
.uc-q-opt{
  display:block;
  font-size:13.5px;
  padding:9px 12px;
  border:1.5px solid #e2e8f0;
  border-radius:8px;
  margin-bottom:6px;
  cursor:pointer;
  transition:.15s
}
.uc-q-opt:hover{border-color:#2c5364}
.uc-q-opt input{margin-right:8px}

/* ---------- TOTP / 邮箱 ---------- */
.totp-qr{
  text-align:center;
  padding:14px;
  background:#f8fafc;
  border-radius:12px;
  margin:12px 0
}
.totp-qr img,.totp-qr canvas{border-radius:8px}
.totp-secret{
  font-family:Consolas,monospace;
  font-size:13px;
  text-align:center;
  word-break:break-all;
  background:#fff;
  border:1px dashed #cbd5e1;
  border-radius:8px;
  padding:10px;
  margin-bottom:12px;
  user-select:all
}
.email-now{
  font-size:14px;
  padding:10px 12px;
  background:#f8fafc;
  border-radius:8px;
  margin-bottom:12px
}
.email-row{display:flex;gap:8px}
.email-row .uc-input{flex:1}

/* ---------- Toast ---------- */
.uc-toast{
  position:fixed;
  left:50%;
  bottom:40px;
  transform:translateX(-50%);
  background:#0f2027;
  color:#fff;
  padding:13px 26px;
  border-radius:99px;
  font-size:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  z-index:999;
  max-width:88vw;
  text-align:center
}
.uc-toast.err{background:#be123c}

/* ---------- 移动端适配(与官网断点规则一致) ---------- */
@media(max-width:1024px){
  .footer-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:768px){
  .nav-links{
    display:none;
    position:absolute;
    top:72px;
    left:0;
    right:0;
    background:#fff;
    flex-direction:column;
    padding:16px 24px;
    box-shadow:0 8px 24px rgba(0,0,0,.08);
    gap:4px;
    border-bottom:1px solid var(--border,#e5e7eb)
  }
  .nav-links.active{display:flex}
  .mobile-toggle{display:flex}
  .uc-hero{padding-top:110px;padding-bottom:32px}
  .uc-grid{grid-template-columns:1fr}
  .uc-form{padding:18px}
  .uc-card{padding:18px}
  .uc-item{flex-direction:column}
  .uc-head-actions{width:100%}
  .uc-head-actions .uc-btn{flex:1}
  .email-row{flex-direction:column}
  .uc-menu{overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch}
  .uc-mtab{white-space:nowrap}
}
@media(max-width:520px){
  .footer-grid{grid-template-columns:1fr}
}
