/* ============================================================================
 * 会员服务·在线应用组件样式（v2.90）
 * 复用主题 :root 设计变量（--c-primary / --c-accent 等），视觉与全站统一。
 * ============================================================================ */

/* 通用卡片 */
.hnbmxh-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 0 0 24px;
  box-shadow: var(--shadow);
  scroll-margin-top: 90px;
}
.hnbmxh-card-title {
  font-size: 20px;
  color: var(--c-primary-dark);
  margin: 0 0 8px;
  padding-left: 12px;
  border-left: 4px solid var(--c-accent);
}
.hnbmxh-card-tip {
  color: var(--c-text-soft);
  font-size: 14px;
  margin: 0 0 18px;
  line-height: 1.7;
}

/* 应用中心卡片网格 */
.hnbmxh-apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 8px 0 28px;
}
.hnbmxh-app-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: linear-gradient(135deg, var(--c-primary-light), #fff);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--c-text);
  transition: .2s;
}
.hnbmxh-app-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--c-primary-bright);
}
.hnbmxh-app-ico { font-size: 30px; line-height: 1; }
.hnbmxh-app-title { font-weight: 700; font-size: 17px; color: var(--c-primary-dark); }
.hnbmxh-app-desc { font-size: 13px; color: var(--c-text-soft); }

/* 表单 */
.hnbmxh-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}
.hnbmxh-field { display: flex; flex-direction: column; gap: 4px; }
.hnbmxh-field-full { grid-column: 1 / -1; }
.hnbmxh-field label { font-size: 14px; font-weight: 600; color: var(--c-text); }
.hnbmxh-field small { color: var(--c-text-mute); font-size: 12px; }
.hnbmxh-field input,
.hnbmxh-field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--c-text);
  background: #fff;
}
.hnbmxh-field input:focus,
.hnbmxh-field textarea:focus {
  border-color: var(--c-primary);
  outline: 2px solid rgba(14, 77, 164, .15);
  outline-offset: 0;
}
.hnbmxh-field input:disabled { background: var(--c-bg); color: var(--c-text-soft); }
.hnbmxh-form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}
.hnbmxh-form-msg { font-size: 14px; }
.hnbmxh-form-msg.hnbmxh-ok { color: #177245; }
.hnbmxh-form-msg.hnbmxh-err { color: #b32d2e; }

/* 按钮 */
.hnbmxh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}
.hnbmxh-btn:hover { background: var(--c-primary-bright); }
.hnbmxh-btn-sm { padding: 7px 16px; font-size: 14px; }

/* ========== 会员登录页：卡片内分屏（v4.2 提亮背景 + 内容居中） ========== */
.hnbmxh-login-split {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(200, 210, 230, .45);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(10, 53, 115, .10), 0 2px 8px rgba(10, 53, 115, .04);
}
.hnbmxh-login-split-brand {
  flex: 0 0 50%;              /* 左右各半，对称 */
  position: relative; overflow: hidden;
  /* 提亮为中等蓝色渐变，稍加深一档，与 wp-login 统一 */
  background:
    linear-gradient(145deg, #134a94 0%, #0c50b8 45%, #1f6cd0 100%);
  color: #fff;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;          /* 内容水平居中 */
  justify-content: center;
  text-align: center;           /* 文字居中 */
}
/* 右上柔光增加层次感 */
.hnbmxh-login-split-brand::before {
  content: "";
  position: absolute; top: -14%; right: -18%;
  width: 50%; height: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.15) 0%, transparent 65%);
  pointer-events: none;
}
/* 底部微提亮，不用压暗了 */
.hnbmxh-login-split-brand::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(255,255,255,.04) 100%);
  pointer-events: none;
}
.hnbmxh-login-split-brand > * { position: relative; z-index: 2; }
.hnbmxh-login-split-brand .brand-logo { margin-bottom: 22px; }
.hnbmxh-login-split-brand .brand-logo img {
  width: 110px; height: auto; display: block; margin: 0 auto;
  filter: brightness(0) invert(1)
         drop-shadow(0 0 16px rgba(255,255,255,.40))
         drop-shadow(0 3px 10px rgba(0,0,0,.22));
}
.hnbmxh-login-split-brand .brand-name {
  font-size: 26px; font-weight: 800; letter-spacing: 4px; line-height: 1.35; margin: 0;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .22);
}
.hnbmxh-login-split-brand .brand-en {
  font-size: 10.5px; letter-spacing: 3px; text-transform: uppercase;
  opacity: .58; margin: 8px 0 0; font-weight: 400; color: #fff;
}
.hnbmxh-login-split-brand .brand-divider {
  width: 46px; height: 3px; border-radius: 2px; margin: 18px auto;
  background: linear-gradient(90deg, #d42a3a, #e85a55, #c8161d);
  box-shadow: 0 1px 8px rgba(212, 42, 58, .35);
}
.hnbmxh-login-split-brand .brand-slogan {
  font-size: 14.5px; letter-spacing: 2px; line-height: 1.9; opacity: .92; margin: 0; font-weight: 400; color: #fff;
}
.hnbmxh-login-split-form {
  flex: 1 1 auto;
  padding: 38px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;            /* 内容居中收拢，避免框太大 */
}
/* 表单内容限定宽度，整体更精致 */
.hnbmxh-login-split-form > * {
  width: 100%;
  max-width: 330px;
}
.split-form-title { font-size: 19px; font-weight: 700; color: #0b2a5c; margin: 0 0 4px; letter-spacing: 1px; }
.split-form-tip { font-size: 12.5px; color: #6b7a94; margin: 0 0 18px; line-height: 1.65; }
.split-form-foot { margin: 16px 0 0; font-size: 11px; color: #9aa5b8; letter-spacing: .3px; text-align: center; }

/* 表单（复用 wp_login_form 默认结构，升级为门户式观感） */
.hnbmxh-login-wrap #loginform { background: transparent; border: none; padding: 0; margin: 0; }
.hnbmxh-login-wrap #loginform p { margin: 0 0 13px; }
.hnbmxh-login-wrap #loginform label { display: block; font-size: 13px; font-weight: 600; color: #2c3a52; margin-bottom: 5px; letter-spacing: .3px; }
.hnbmxh-login-wrap #loginform input[type=text],
.hnbmxh-login-wrap #loginform input[type=password] {
  width: 100%; padding: 11px 13px;
  border: 1.5px solid #d8e0ee; border-radius: 8px;
  font: inherit; font-size: 14px; background: #fafbfd; box-sizing: border-box;
  transition: border-color .25s, box-shadow .25s, background .25s; color: #1a2332;
}
.hnbmxh-login-wrap #loginform input[type=text]:focus,
.hnbmxh-login-wrap #loginform input[type=password]:focus {
  border-color: #0e4da4; box-shadow: 0 0 0 3px rgba(14, 77, 164, .12);
  outline: none; background: #fff;
}
.hnbmxh-login-wrap #loginform input::placeholder { color: #a0aab8; }
.hnbmxh-login-wrap #loginform .login-remember { font-size: 13px; color: #6b7a94; }
.hnbmxh-login-wrap #loginform .login-remember input { vertical-align: middle; }
.hnbmxh-login-wrap #loginform .login-submit { margin-bottom: 0; }
.hnbmxh-login-wrap #loginform .login-submit input {
  width: 100%;
  background: linear-gradient(135deg, #0c3a87 0%, #0e4da4 50%, #1680d8 100%);
  color: #fff; border: 0; border-radius: 8px; padding: 12px 18px;
  font: inherit; font-size: 14.5px; font-weight: 600; letter-spacing: 3px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(14, 77, 164, .25);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.hnbmxh-login-wrap #loginform .login-submit input:hover {
  filter: brightness(1.05); transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 77, 164, .32);
}

/* 登录错误 / 状态提示 —— 与卡片风格统一，不再用 WP 原生红边框 */
.hnbmxh-login-wrap #login_error,
.hnbmxh-login-wrap .message {
  width: 100%;
  max-width: 330px;
  margin: 0 0 16px !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  background: #fef2f2 !important;            /* 极淡红底 */
  border-left: 4px solid #e5484d !important; /* 柔和红条，不刺眼 */
  color: #991b1b !important;                /* 深红字，可读性好 */
  font-size: 13px !important;
  line-height: 1.6 !important;
  box-shadow: 0 1px 4px rgba(231, 72, 77, .08) !important;
}
/* 成功 / 信息提示（如「已退出」等） */
.hnbmxh-login-wrap .message {
  background: #f0f7ff !important;           /* 极淡蓝底 */
  border-left-color: #3b82f6 !important;    /* 蓝色条 */
  color: #1a365d !important;
  box-shadow: 0 1px 4px rgba(59, 130, 246, .08) !important;
}
/* 去掉 WP 原生的 padding/margin/border 干扰 */
.hnbmxh-login-wrap #login_error a,
.hnbmxh-login-wrap .message a {
  color: inherit;
  text-decoration: underline;
}

/* 响应式：窄屏改为上下堆叠，表单占满 */
@media (max-width: 860px) {
  .hnbmxh-login-split { flex-direction: column; }
  .hnbmxh-login-split-brand { flex: none; padding: 28px 22px; text-align: center; align-items: center; }
  .hnbmxh-login-split-brand .brand-logo { margin-bottom: 14px; }
  .hnbmxh-login-split-brand .brand-logo img { margin: 0 auto; }
  .hnbmxh-login-split-brand .brand-divider { margin: 14px auto; }
  .hnbmxh-login-split-form { padding: 28px 22px; align-items: stretch; }
  .hnbmxh-login-split-form > * { max-width: 100%; }
}

/* 证书查询结果间距 */
.hnbmxh-certs-result { margin-top: 14px; }
.hnbmxh-certs-result .cert-table { width: 100%; max-width: 520px; }

/* 下载专区 */
.hnbmxh-dl-cat { font-size: 16px; color: var(--c-primary-dark); margin: 18px 0 8px; }
.hnbmxh-dl-list { display: flex; flex-direction: column; gap: 10px; }
.hnbmxh-dl-item {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.hnbmxh-dl-info { min-width: 0; }
.hnbmxh-dl-name { font-weight: 600; color: var(--c-text); }
.hnbmxh-dl-note {
  display: inline-block;
  font-size: 12px;
  color: var(--c-primary);
  background: var(--c-primary-light);
  border-radius: var(--radius-pill);
  padding: 1px 10px;
  margin-left: 8px;
  vertical-align: middle;
}
.hnbmxh-dl-desc { font-size: 13px; color: var(--c-text-soft); margin: 4px 0 0; }
.hnbmxh-dl-missing { font-size: 13px; color: var(--c-text-mute); }
.hnbmxh-empty { color: var(--c-text-soft); }

/* 移动端自适应 */
@media (max-width: 768px) {
  .hnbmxh-apps-grid { grid-template-columns: 1fr; }
  .hnbmxh-form { grid-template-columns: 1fr; }
  .hnbmxh-dl-item { flex-direction: column; align-items: stretch; gap: 10px; }
  .hnbmxh-dl-item .hnbmxh-btn { align-self: flex-start; }
}

/* 在 .prose 容器内（会员服务页默认外层白卡）时，内层卡片扁平化为分节，避免双层卡片 */
.prose .hnbmxh-card {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--c-border);
  border-radius: 0;
  box-shadow: none;
  padding: 0 0 24px;
  margin: 0 0 28px;
}
.prose .hnbmxh-card-title { margin: 0 0 8px; color: var(--c-primary-dark); }
.prose .hnbmxh-card:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

/* ============ 登录两步验证（TOTP） ============ */
.hnbmxh-2fa-settings { max-width: 720px; }
.hnbmxh-2fa-h3 { font-size: 19px; color: var(--c-primary-dark); margin: 0 0 8px; }
.hnbmxh-2fa-intro { color: var(--c-text-soft); margin: 0 0 16px; }
.hnbmxh-2fa-qrwrap { margin: 8px 0 12px; }
.hnbmxh-2fa-secret {
  display: inline-block;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 15px; letter-spacing: 1px; color: var(--c-text);
  background: var(--c-bg); border: 1px dashed var(--c-border);
  padding: 4px 10px; border-radius: var(--radius-sm); word-break: break-all;
}
.hnbmxh-2fa-recovery {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.9; color: var(--c-text);
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); padding: 12px 16px; white-space: pre-wrap;
}
.hnbmxh-2fa-ok { color: var(--c-primary); font-weight: 600; }
.hnbmxh-input {
  max-width: 240px; padding: 8px 10px; border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); font-size: 15px; letter-spacing: 2px;
}
.hnbmxh-btn { display: inline-block; padding: 9px 18px; border: 1px solid var(--c-border);
  background: #fff; color: var(--c-text); border-radius: var(--radius-sm); cursor: pointer;
  font-size: 14px; transition: .15s; }
.hnbmxh-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.hnbmxh-btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.hnbmxh-btn-primary:hover { background: var(--c-primary-dark); color: #fff; }
.hnbmxh-btn-danger { color: var(--c-red); border-color: var(--c-red); }
.hnbmxh-btn-danger:hover { background: var(--c-red); color: #fff; }
.hnbmxh-btn-sm { padding: 4px 10px; font-size: 12px; margin-left: 6px; }

/* 登录页二次验证表单 */
.hnbmxh-2fa-form { background: #fff; border: 1px solid var(--c-border);
  border-radius: 8px; padding: 22px 24px; box-shadow: var(--shadow); }
.hnbmxh-2fa-form .hnbmxh-2fa-title { font-size: 18px; font-weight: 600; color: var(--c-text); margin: 0 0 6px; }
.hnbmxh-2fa-form .hnbmxh-2fa-desc { color: var(--c-text-soft); margin: 0 0 14px; font-size: 13px; }
.hnbmxh-2fa-form label { display: block; font-size: 13px; color: var(--c-text-soft); margin-bottom: 6px; }
.hnbmxh-2fa-form input.input { width: 100%; padding: 10px 12px; border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); font-size: 18px; letter-spacing: 4px; text-align: center; }
.hnbmxh-2fa-form .submit { margin-top: 14px; }
.hnbmxh-2fa-form .button-primary { width: 100%; }
.hnbmxh-2fa-hint { font-size: 12px; color: var(--c-text-mute); margin: 12px 0 0; }

/* 移动端自适应 */
@media (max-width: 768px) {
  .hnbmxh-apps-grid { grid-template-columns: 1fr; }
  .hnbmxh-form { grid-template-columns: 1fr; }
  .hnbmxh-dl-item { flex-direction: column; align-items: stretch; gap: 10px; }
  .hnbmxh-dl-item .hnbmxh-btn { align-self: flex-start; }
  .hnbmxh-2fa-form { box-shadow: none; }
}
