/* ==========================================================================
   前台站点样式（PC + H5）
   ========================================================================== */

body.site {
  background: var(--bg);
  padding-bottom: 0;
}

/* 登录 / 注册整屏模式 */
body.auth-mode .site-header,
body.auth-mode .site-footer,
body.auth-mode .mobile-nav,
body.auth-mode .back-top {
  display: none !important;
}
body.auth-mode {
  padding-bottom: 0;
}

/* ============================ 顶部导航 ============================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(59, 110, 246, 0.3);
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.brand-name {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.brand-sub {
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.site-nav a {
  height: 34px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  border-radius: 9px;
  font-size: 14px;
  color: var(--text-2);
  transition: all 0.14s;
  white-space: nowrap;
}
.site-nav a:hover {
  background: var(--surface-3);
  color: var(--text);
}
.site-nav a.active {
  color: var(--brand);
  background: var(--brand-light);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-search {
  position: relative;
  width: 220px;
}
.header-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 13px;
  outline: none;
  transition: all 0.16s;
}
.header-search input:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(59, 110, 246, 0.12);
}
.header-search .s-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 13px;
  pointer-events: none;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px 0 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.14s;
  position: relative;
}
.user-chip:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.user-chip .u-name {
  font-size: 13.5px;
  font-weight: 500;
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 176px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.16s;
  z-index: 120;
}
.dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.dropdown a,
.dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
}
.dropdown a:hover,
.dropdown button:hover {
  background: var(--surface-3);
  color: var(--text);
}
.dropdown .danger {
  color: var(--danger);
}
.dropdown-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

/* ============================ 首页 Hero ============================ */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 44px;
  background:
    radial-gradient(900px 380px at 12% -10%, rgba(59, 110, 246, 0.16), transparent 62%),
    radial-gradient(700px 320px at 88% 0%, rgba(124, 92, 255, 0.14), transparent 60%),
    var(--surface);
  border-bottom: 1px solid var(--border);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.35;
  mask-image: linear-gradient(to bottom, transparent, #000 70%, transparent);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-color: color-mix(in srgb, var(--brand) 22%, transparent);
}

.hero h1 {
  font-size: 38px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  max-width: 720px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: 15px;
  color: var(--text-2);
  max-width: 640px;
}

.hero-search {
  display: flex;
  gap: 10px;
  margin-top: 26px;
  max-width: 720px;
}

.hero-search .h-input {
  position: relative;
  flex: 1;
}
.hero-search input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 44px;
  border-radius: 13px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 15px;
  outline: none;
  box-shadow: var(--shadow-xs);
  transition: all 0.16s;
}
.hero-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(59, 110, 246, 0.12);
}
.hero-search .h-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 16px;
}
.hero-search .btn {
  height: 50px;
  padding: 0 28px;
  border-radius: 13px;
  font-size: 15px;
}

.hot-words {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-3);
}
.hot-words .tag-click {
  background: transparent;
  border: 1px dashed var(--border-strong);
}

/* ============================ 统计条 ============================ */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-xs);
}

.stat-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex: none;
}

.stat-val {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 12.5px;
  color: var(--text-3);
}

/* ============================ 区块标题 ============================ */

.section {
  padding: 40px 0;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-title {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.2px;
}
.section-desc {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 4px;
}
.section-more {
  font-size: 13.5px;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.section-more:hover {
  text-decoration: underline;
}

/* ============================ 分类卡片 ============================ */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.cat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}

.cat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cat-color, var(--brand));
  opacity: 0;
  transition: opacity 0.18s;
}

.cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  border-color: color-mix(in srgb, var(--cat-color, var(--brand)) 45%, var(--border));
  box-shadow: var(--shadow-sm);
}
.cat-card:hover::before {
  opacity: 1;
}

.cat-ico {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  flex: none;
  background: var(--surface-3);
  background: color-mix(in srgb, var(--cat-color, var(--brand)) 12%, var(--surface));
}

.cat-name {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 2px;
}
.cat-count {
  font-size: 12.5px;
  color: var(--text-3);
}

/* ============================ 证书卡片 ============================ */

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}

.cert-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--cat-color, var(--brand));
  opacity: 0.85;
}

.cert-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.cert-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cert-card-name {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cert-card-no {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--mono);
  margin-top: 5px;
}

.cert-card-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: var(--text-2);
}

.cert-meta-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.cert-meta-row .k {
  color: var(--text-3);
  width: 56px;
  flex: none;
  font-size: 12.5px;
}
.cert-meta-row .v {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cert-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  margin-top: auto;
}

.cert-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* 列表视图 */
.cert-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cert-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.16s;
}
.cert-row:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.cert-row-main {
  flex: 1;
  min-width: 0;
}
.cert-row-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.cert-row-title h3 {
  font-size: 15px;
  font-weight: 600;
}
.cert-row-sub {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-3);
}
.cert-row-side {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

/* ============================ 筛选区 ============================ */

.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.filter-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: wrap;
}
.filter-line + .filter-line {
  border-top: 1px dashed var(--border);
}

.filter-label {
  font-size: 13px;
  color: var(--text-3);
  width: 62px;
  flex: none;
}

.filter-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.filter-selects {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-selects .select {
  width: auto;
  min-width: 132px;
  height: 34px;
  font-size: 13px;
}

.active-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 18px;
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
  margin: -18px 0 18px;
  border: 1px solid var(--border);
  border-top: none;
  font-size: 12.5px;
}

.filter-toggle {
  display: none;
}

/* 结果工具条 */
.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.result-count {
  font-size: 13.5px;
  color: var(--text-2);
}
.result-count b {
  color: var(--brand);
  font-weight: 700;
}

mark.hl {
  background: rgba(255, 196, 0, 0.28);
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}
[data-theme="dark"] mark.hl {
  background: rgba(255, 196, 0, 0.22);
}

/* ============================ 详情页 ============================ */

.detail-wrap {
  padding: 24px 0 60px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.breadcrumb a:hover {
  color: var(--brand);
}
.breadcrumb .sep {
  opacity: 0.6;
}

.detail-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.detail-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cat-color, var(--brand)), var(--brand-2));
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.detail-title {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.35;
  margin-bottom: 10px;
}

.detail-subline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-3);
}

.cert-no-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-2);
}
.cert-no-box button {
  border: none;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex: none;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 22px;
}

.info-cell {
  background: var(--surface);
  padding: 14px 16px;
}
.info-cell .k {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 5px;
}
.info-cell .v {
  font-size: 14px;
  font-weight: 500;
  word-break: break-all;
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.content-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.content-block + .content-block {
  margin-top: 16px;
}

.content-block h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-block h3::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}

.rich-text {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.kv-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 20px;
}
.kv-item {
  display: flex;
  gap: 8px;
  font-size: 13.5px;
  align-items: baseline;
}
.kv-item .k {
  color: var(--text-3);
  flex: none;
}
.kv-item .v {
  color: var(--text);
  font-weight: 500;
  word-break: break-all;
}

.attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: all 0.14s;
}
.attach-item:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}
.attach-ico {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-light);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex: none;
}

.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.side-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

.side-item {
  display: block;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.side-item:last-child {
  border-bottom: none;
}
.side-item:hover .side-item-name {
  color: var(--brand);
}
.side-item-name {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  transition: color 0.14s;
}
.side-item-meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

/* ============================ 我的 / 表单页 ============================ */

.page-wrap {
  padding: 28px 0 60px;
  min-height: calc(100vh - var(--header-h) - 200px);
}

.page-head {
  margin-bottom: 20px;
}
.page-head h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.page-head p {
  font-size: 13.5px;
  color: var(--text-3);
  margin-top: 4px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  align-items: start;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.profile-name {
  font-size: 16px;
  font-weight: 600;
  margin-top: 12px;
}
.profile-role {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.profile-nav {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}
.profile-nav button {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 12px;
  border: none;
  background: transparent;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 13.5px;
  cursor: pointer;
  text-align: left;
}
.profile-nav button:hover {
  background: var(--surface-3);
  color: var(--text);
}
.profile-nav button.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 500;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.form-grid .span-2 {
  grid-column: span 2;
}

/* ============================ 登录 / 注册 ============================ */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--bg);
}

.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 54px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(150deg, #1b3a8f 0%, #2f5ae0 42%, #6b4ee6 100%);
  color: #fff;
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.55;
}

.auth-visual::after {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  right: -220px;
  bottom: -240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
}

.auth-visual > * {
  position: relative;
  z-index: 1;
}

.auth-visual .brand-name,
.auth-visual .brand-sub {
  color: #fff;
}
.auth-visual .brand-sub {
  opacity: 0.7;
}
.auth-visual .brand-logo {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  backdrop-filter: blur(4px);
}

.auth-visual h2 {
  font-size: 34px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 16px;
}
.auth-visual p {
  font-size: 14.5px;
  line-height: 1.8;
  opacity: 0.82;
  max-width: 440px;
}

.auth-points {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 30px;
}
.auth-point {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 13.5px;
  opacity: 0.92;
}
.auth-point .dot {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex: none;
  margin-top: 1px;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}

.auth-box {
  width: 100%;
  max-width: 380px;
}

.auth-box h1 {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}
.auth-box .sub {
  font-size: 13.5px;
  color: var(--text-3);
  margin-bottom: 26px;
}

.auth-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.auth-tabs button {
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 14.5px;
  cursor: pointer;
  position: relative;
  padding: 0;
}
.auth-tabs button.active {
  color: var(--text);
  font-weight: 600;
}
.auth-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.auth-form .input {
  height: 44px;
}

.demo-hint {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.75;
}
.demo-hint b {
  color: var(--text-2);
}
.demo-hint code {
  font-family: var(--mono);
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--brand);
}

/* ============================ 底部 ============================ */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 34px 0 26px;
  margin-top: 20px;
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.footer-desc {
  font-size: 13px;
  color: var(--text-3);
  max-width: 420px;
  line-height: 1.8;
  margin-top: 12px;
}
.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.footer-col a {
  display: block;
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 2;
}
.footer-col a:hover {
  color: var(--brand);
}

.footer-bottom {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-3);
}

/* ============================ 移动端底栏 ============================ */

.mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  z-index: 200;
}

.mobile-nav-inner {
  display: flex;
  height: 56px;
}
.mobile-nav a,
.mobile-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 10.5px;
  cursor: pointer;
}
.mobile-nav .mn-ico {
  font-size: 18px;
  line-height: 1;
}
.mobile-nav .active {
  color: var(--brand);
}

/* ============================ 返回顶部 ============================ */

.back-top {
  position: fixed;
  right: 22px;
  bottom: 84px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 150;
}
.back-top.show {
  display: flex;
}

/* ============================ 响应式 ============================ */

@media (max-width: 1080px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-body { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .header-search { display: none; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-grid > * { min-width: 0; }
  .profile-nav { flex-direction: row; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .profile-nav button { white-space: nowrap; }
  .site-nav { display: none; }
  .hero h1 { font-size: 30px; }
  .hero { padding: 38px 0 32px; }
}

@media (max-width: 720px) {
  body.site { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .mobile-nav { display: block; }
  .brand-sub { display: none; }
  .site-header { height: 58px; }
  .site-header .container { gap: 8px; }
  .brand { flex: 0 1 auto; min-width: 0; overflow: hidden; }
  .brand-logo { width: 30px; height: 30px; font-size: 14px; border-radius: 9px; }
  .brand-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
  .header-actions { flex: none; gap: 4px; }
  .header-actions .btn-icon { width: 30px; height: 30px; }
  .user-chip { height: 32px; padding: 0 6px 0 2px; gap: 6px; }
  .user-chip .avatar { width: 26px; height: 26px; font-size: 11px; }
  .user-chip .u-name { max-width: 52px; font-size: 12.5px; }
  :root { --header-h: 58px; }
  .container { padding: 0 14px; }
  .hero h1 { font-size: 25px; }
  .hero p.lead { font-size: 13.5px; }
  .hero-search { flex-direction: column; gap: 10px; }
  .hero-search .btn { width: 100%; }
  .hero-search input { height: 46px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-item { padding: 12px 13px; gap: 10px; }
  .stat-ico { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
  .stat-val { font-size: 18px; }
  .stat-label { font-size: 11.5px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-card { padding: 12px; gap: 10px; }
  .cat-ico { width: 36px; height: 36px; font-size: 17px; border-radius: 10px; }
  .cat-name { font-size: 13.5px; }
  .cert-grid { grid-template-columns: 1fr; gap: 12px; }
  .section { padding: 26px 0; }
  .section-title { font-size: 17px; }
  .filter-bar { padding: 12px 14px; }
  .filter-label { width: 100%; }
  .filter-selects { width: 100%; }
  .filter-selects .select { flex: 1 1 45%; min-width: 0; }
  .detail-hero { padding: 20px 16px; }
  .detail-title { font-size: 19px; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .kv-list { grid-template-columns: 1fr; }
  .detail-actions { width: 100%; }
  .detail-actions .btn { flex: 1; height: 42px; }
  .detail-actions .btn-icon { flex: 0 0 42px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .cert-row { padding: 13px 14px; gap: 12px; }
  .cert-row-sub { gap: 10px; }
  .cert-row-side { width: 100%; justify-content: space-between; }
  .pager { justify-content: center; }
  .pager-info { width: 100%; text-align: center; }
  .back-top { bottom: 72px; right: 14px; }
  .content-block { padding: 16px; }
  .footer-grid { flex-direction: column; gap: 20px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
}

@media (max-width: 380px) {
  .cat-grid { grid-template-columns: 1fr; }
}
