/**
 * 证书列表页面样式
 */

/* 页面容器 */
.layout-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

/* 证书容器 */
.certificate-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 16px 100px;
}

/* 页面头部 */
.page-header {
  background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  color: white;
  text-align: center;
}

.page-header-certificate {
  /* 继承 page-header 样式 */
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 14px;
  opacity: 0.9;
}

/* 搜索框容器 */
.certificate-search-wrapper {
  padding: 0 20px;
  background: #F5F5F7;
}

.certificate-search-wrapper .container-max {
  max-width: 800px;
  margin: 0 auto;
}

.search-section-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.search-input-box {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: #2E7D32;
}

.search-btn {
  padding: 11px 18px;
  background: #2E7D32;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.search-btn:hover {
  background: #1B5E20;
}

.search-results-info {
  font-size: 14px;
  color: #6E6E73;
  text-align: center;
}

/* 证书列表容器 */
.certificate-list-wrapper {
  background: #F5F5F7;
  flex: 1;
}

.certificate-list-wrapper .container-max {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* 证书卡片 */
.certificate-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.certificate-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}

.certificate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.certificate-number {
  font-size: 13px;
  color: #6E6E73;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.certificate-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.status-valid {
  background: #E8F5E9;
  color: #2E7D32;
}

.status-expired {
  background: #F5F5F5;
  color: #9E9E9E;
}

.status-pending {
  background: #FFF3E0;
  color: #FF9800;
}

.certificate-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1D1D1F;
}

.certificate-product {
  font-size: 14px;
  color: #6E6E73;
  margin-bottom: 12px;
}

.certificate-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #F5F5F7;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 12px;
  color: #6E6E73;
  margin-bottom: 2px;
}

.info-value {
  font-size: 14px;
  font-weight: 500;
  color: #1D1D1F;
  word-break: break-word;
}

.card-footer {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #F5F5F7;
}

.card-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary {
  background: #2E7D32;
  color: white;
}

.btn-primary:hover {
  background: #1B5E20;
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background: #F5F5F7;
  color: #1D1D1F;
}

.btn-secondary:hover {
  background: #E8E8ED;
  color: #1D1D1F;
  text-decoration: none;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #6E6E73;
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1D1D1F;
}

.empty-text {
  font-size: 14px;
  color: #6E6E73;
}

/* 隐藏卡片（搜索时） */
.certificate-card.hidden {
  display: none;
}

/* 底部页脚 */
/* 响应式 */
@media (min-width: 768px) {
  .page-header-certificate {
    padding: 60px 20px 40px;
  }

  .certificate-info {
    grid-template-columns: repeat(4, 1fr);
  }

  .certificate-list-wrapper .container-max {
    padding: 40px;
  }
}

@media (max-width: 600px) {
  .page-header-certificate {
    padding: 24px 16px 20px;
  }

  .certificate-search-wrapper {
    padding: 16px;
  }

  .certificate-list-wrapper .container-max {
    padding: 16px;
  }

  .certificate-card {
    padding: 16px;
  }

  .certificate-info {
    grid-template-columns: 1fr;
  }

  .card-footer {
    flex-direction: column;
  }

  .card-btn {
    width: 100%;
  }

  .site-footer {
    padding-bottom: 70px; /* 为底部导航留出空间 */
  }
}
