/* ==================== 数字版权授权凭证页面样式 ==================== */

.cert-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

/* 凭证卡片 */
.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 640px) {
  .cert-card {
    padding: 32px 20px;
  }
}

/* 装饰角花 */
.cert-corner {
  position: absolute;
  width: 80px;
  height: 80px;
  opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80' fill='none'%3E%3Cpath d='M0 0C0 0 20 10 40 10C60 10 80 0 80 0C80 0 70 20 70 40C70 60 80 80 80 80C80 80 60 70 40 70C20 70 0 80 0 80C0 80 10 60 10 40C10 20 0 0 0 0Z' fill='%23B8860B'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}
.cert-corner-tl { top: 12px; left: 12px; }
.cert-corner-tr { top: 12px; right: 12px; transform: rotate(90deg); }
.cert-corner-bl { bottom: 12px; left: 12px; transform: rotate(-90deg); }
.cert-corner-br { bottom: 12px; right: 12px; transform: rotate(180deg); }

/* 顶部装饰 */
.cert-header-decor {
  text-align: center;
  margin-bottom: 16px;
}

/* 凭证标题 */
.cert-title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 32px;
  letter-spacing: 2px;
}

@media (max-width: 640px) {
  .cert-title {
    font-size: 22px;
    margin-bottom: 24px;
  }
}

/* 章节标题 */
.cert-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

/* 授权结论 */
.cert-section {
  margin-bottom: 32px;
}

.cert-conclusion {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
}

.cert-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.cert-status.status-valid {
  color: #059669;
}

.cert-status.status-expired {
  color: var(--danger);
}

.cert-conclusion-text {
  font-size: 14px;
  color: var(--text-muted);
}

.cert-desc {
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
  margin: 0 0 24px;
}

/* 信息四宫格 */
.cert-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .cert-info-grid {
    grid-template-columns: 1fr;
  }
}

.cert-info-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.cert-info-item:nth-child(odd) {
  padding-right: 24px;
}

.cert-info-item:nth-child(even) {
  padding-left: 24px;
  border-left: 1px solid var(--border);
}

@media (max-width: 640px) {
  .cert-info-item:nth-child(odd) {
    padding-right: 0;
  }
  .cert-info-item:nth-child(even) {
    padding-left: 0;
    border-left: none;
  }
}

.cert-info-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.cert-info-value {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 分隔线 */
.cert-divider {
  border: none;
  border-top: 2px dashed var(--border);
  margin: 0 0 32px;
}

/* 授权编号区块 */
.cert-auth-block {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

@media (max-width: 640px) {
  .cert-auth-block {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 16px;
  }
}

.cert-qr-placeholder {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
  border: none;
  padding: 0;
  background: var(--primary-50);
}

.cert-auth-info {
  flex: 1;
}

.cert-auth-label {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.cert-auth-code {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
}

.cert-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all .2s ease;
}

.cert-copy-btn:hover {
  background: var(--primary-50);
  color: var(--primary);
}

.cert-auth-time {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

/* ==================== 备案明细区 ==================== */
.cert-detail-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  margin-top: 24px;
}

@media (max-width: 640px) {
  .cert-detail-section {
    padding: 24px 20px;
  }
}

/* 书籍信息卡片 */
.cert-book-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.cert-book-cover {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.cert-book-info {
  flex: 1;
  min-width: 0;
}

.cert-book-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cert-book-author {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cert-book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 明细网格 */
.cert-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 24px;
}

@media (max-width: 768px) {
  .cert-detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .cert-detail-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.cert-detail-item {
  min-width: 0;
}

.cert-detail-label {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.cert-detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

.cert-detail-value.cert-filing-number {
  font-size: 14px;
}

/* 起点书籍页链接样式 */
.cert-book-title-link {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}
.cert-book-title-link:hover {
  color: var(--primary);
}
