* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Arial", sans-serif;
  }

  @media (max-width: 600px) {
    .header-left, .header-right {
      text-align: center;
    }
  
    .filter-bar {
      flex-wrap: wrap;
    }
  
    .filter-bar a {
      flex: 1;
    }
  }
  
  body {
    background-color: #f4f4f4;
    color: #363853;
  }
  
  .header {
    display: flex;
    height:46px;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 0 16px;
  }
  
  .header-left .iconfont{
    font-size:24px;
    color: #363853;
    cursor: pointer;
  }
  
  .header-right {
    display: flex;
    gap: 10px;
    flex:1;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: #363853;
  }
  
  
  .search-bar {
    display: flex;
    gap:10px;
    align-items: center;
    padding:0 16px;
    height:46px;
    background-color: #fff;
  }

  .search-bar .search-bar-content {
    display: flex;
    align-items: center;
    background: #F5F5F7;
    height:32px;
    border-radius: 24px;
    padding: 0 10px;
    flex:1;
  }
  
  .search-bar .search-bar-content .iconfont {
    font-size: 16px;
    color: #363853;
    
  }

  .search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: inherit; /* 继承父元素的背景颜色 */
    margin-left: 5px;
    border-radius: 20px; /* 圆角 */
  }
  
  .search-bar button {
    height:32px;
    width:60px;
    border: 1px solid rgba(54, 56, 83, 0.50);
    color: rgba(54, 56, 83, 0.50);
    border-radius: 20px;
    cursor: pointer;
    background-color: #fff;
    font-size:14px;
  }
  
  .filter-bar {
    display: flex;
    gap: 4px;
    padding: 8px 8px;
    background-color: #fff;
  }
  
  .filter-bar a {
    flex:1;
    display: flex;
    justify-content: center;
    align-items: center;
    height:40px;
    text-decoration: none;
    color: #363853;
  }
  
  .filter-bar a.active {
    background-color: #ffcccc;
    border-radius: 5px;
  }
  
  .contracts {
    padding: 10px 20px;
  }
  
  .contract-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    padding: 10px;
  }
  
  .card-header {
    display: flex;
    justify-items: space-between;
    align-items: center;
    
  }
  
  .card-header .card-title {
    width:100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap:16px;
  }

  .card-header .card-title-text {
    flex:1;
    font-size: 18px;
    font-weight: bold;
    
  }
  
  
  .contract-card .card-status.in-progress {
    color: #FF7D00; /* 进行中 - 黄色 */
  }
  
  .contract-card .card-status.pending {
    color: #14C9C9; /* 待签订 - 青色 */
  }
  
  .contract-card .card-status.completed {
    color: #165DFF; /* 已完成 - 蓝色 */
  }
  
  .contract-card .card-status.cancelled {
    color: #5E5E5E; /* 已取消 - 灰色 */
  }
  
  .contract-card .card-status {
    font-size:14px;
  }
  
  
  .card-details {
    list-style: none;
    padding: 10px 0;
    color: #363853;
  }
  
  .card-details li {
    display: flex;
    margin-bottom: 5px;
    color: #363853;
    font-size: 14px;
  }
  
  .card-details span {
    margin-right: 10px;
    color: rgba(54, 56, 83, 0.50);
    width: 100px;
  }
  
  .card-actions {
    display: flex;
    justify-content: flex-end;
    gap:10px;
  }
  
  .card-actions a {
    display: flex;
    justify-content: center;
    align-items: center;
    width:88px;
    height:32px;
    font-size: 14px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #363853;
    cursor: pointer;
    border-radius: 20px;
    text-decoration: none;
  }
  
  .card-actions a.action-btn {
    background-color: #ff6b6b;
    color: #fff;
    margin-left: 10px;
    border:none;
  }
  
  .card-actions .sign-btn {
    background-color: #ff6b6b;
    color: #fff;
    margin-left: 10px;
    border:none;
  }

.actions a {
    display: flex;
    height: 40px;
    padding: 5px 16px;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex: 1 0 0;
    background-color: #FF6B6B;
    color: #fff;
    border: none;
    border-radius: 100px;
}

/* 合同流程 */
.detail-content {
  padding:20px 20px;
  border-radius: 8px;
  
}
.contract-steps {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  background-color: #fff;
  border-radius: 8px 8px 0 0;
  position: relative;
  overflow: hidden; /* 隐藏溢出的步骤 */
}
/* 步骤连接线 */
.contract-steps::before {
  content: '';
  position: absolute;
  height: 2px;
  background-color: #e0e0e0;
  transform: translateY(-50%);
  z-index: 1;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  font-size: 12px;
  flex: 1; /* 每个步骤平分宽度 */
  min-width: 0; /* 防止内容溢出 */
  transition: all 0.3s ease; /* 平滑过渡效果 */
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 60%;
  width: 80%;
  height: 2px;
  background-color: #e0e0e0;
  transform: translateY(-50%);
  z-index: 1;
}

.step.active:not(:last-child)::after,
.step.completed:not(:last-child)::after {
  background-color: #FF6B6B;
}

.step-number {
  width: 24px;
  height: 24px;
  line-height: 24px;
  border-radius: 50%;
  background-color: #e0e0e0;
  color: #fff;
  position: relative;
  z-index: 2;
  margin-bottom: 8px;
}

.step-content {
  margin-top:8px;
  display: flex;
  gap:4px;
  align-items: center;
}

.separator-line {
  color:rgba(0, 0, 0, 0.3);
}

.step.active .step-number,
.step.completed .step-number {
  background-color: #FF6B6B;
}

.step-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 5px;
}

.step-title {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.step-status {
  font-size: 12px;
  color: #909090;
}

.step.active .step-status,
.step.completed .step-status {
  color: #FF6B6B;
}

/* 添加完成图标的样式 */
.step-number .iconfont.icon-ok {
  font-size: 18px; /* 调整图标大小 */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* 调整步骤数字容器的样式 */
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease; /* 添加过渡效果 */
}

/* 合同详情 */
.contract-info {
  background-color: #fff;
  padding: 20px;
  border-radius: 0 0 8px 8px;
}

.detail-title {
  font-size: 24px;
  margin-bottom: 8px;
  font-weight:bold;
}

.contract-no {
  font-size: 14px;
  color: #909090;
  margin-bottom: 20px;
}

.info-title {
  margin:16px 0;
  line-height:24px;
  padding-left:4px;
  font-size:16px;
  border-left:6px solid #FF6B6B;
  font-weight: bold;
}

.tabs {
  display: flex;
  margin-bottom: 10px;
  justify-content: flex-start;
  border-bottom:1px solid #E7E7E7;
}

.tab {
  padding: 5px 10px;
  font-size: 14px;
  color: #181919;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  position: relative;
}

.tab.active {
  padding-bottom:8px;
  font-weight: bold;
  color: #FF6B6B;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 34%;
  width: 16%; /* 确保下划线横跨整个tab */
  height: 2px; /* 下划线高度 */
  background-color: #FF6B6B; /* 下划线颜色 */
  border-radius:2px;
}


.detail-list {
  list-style: none;
  padding: 0;
}

.detail-list li {
  display: flex;
  height:38px;
  align-items: center;
  padding: 0 10px;
  font-size: 14px;
  gap:10px;
}

.detail-list span {
  color: #363853;
}

.detail-list span:first-child {
  color: rgba(54, 56, 83, 0.5);
  width: 80px;
}

.img-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 90px;
  height: 120px;
  border-radius:8px;
  background-color: rgba(54, 56, 83, 0.05);
}
.contract-preview {
  object-fit: cover;
  padding:20px;
}

.actions {
  display: flex;
  justify-content: space-between;
  margin: 20px;
  gap:10px;
}

#cancel-btn {
  flex:1;
  height:40px;
  border: none;
  border-radius: 20px;
  background-color: #fff;
  color: #333;
  font-size: 14px;
  cursor: pointer;
}

#sign-btn {
  flex:1;
  height:40px;
  border: none;
  border-radius: 20px;
  background-color: #ff6757;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

/* 签署历史部分样式 */
.sign-history-list {
  list-style: none;
  padding-left: 0;
  position: relative;
}

.sign-history-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  line-height: 22px;
  gap: 4px;
  font-size:14px;
  color:rgba(54, 56, 83, 0.5)
}

.sign-history-list li .sign-history-status {
  font-weight: bold;
  color:#363853;
}

.sign-history-date {
  display: flex;
  align-items: center;
  gap:4px;
}
/* 空心圆样式 */
.sign-history-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border: 2px solid rgba(54, 56, 83, 0.5);
  border-radius: 50%;
  background: white;
  z-index: 2;
}

/* 虚线连接线 */
.sign-history-list::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-left: 2px dashed #999;
  z-index: 1;
}

/* 最后一项不需要连接线 */
.sign-history-list li:last-child {
  margin-bottom: 0;
}


.sign-history-list li .iconfont {
  font-size: 24px;
  color: rgba(54, 56, 83, 0.5);
}



/* 缴费信息样式 */
.payment-info {
  margin: 20px 0;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 8px;
}

/* 缴费按钮样式 */
#pay-btn {
  display: flex;
  height: 40px;
  padding: 8px 16px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex: 1 0 0;
  background-color: #FF6B6B;
  color: #fff;
  border: none;
  border-radius: 100px;
}

/* 已缴费标识样式 */
.payment-badge {
  position: absolute;
  right: 15px;
  top: 30%;
  transform: translateY(-50%);
  color: #1677FF;;
  padding: 3px 8px;
  display: flex;
  align-items: center;
}

.payment-badge .iconfont {
  margin-right: 3px;
  font-size: 70px;
}

/* 人脸识别 */


.face-content {
    text-align: center;
}

.face-box {
    font-size: 20px;
    margin-bottom: 10px;
    margin-top:40px;
    font-weight: 500;
}

.face-tips {
    font-size: 14px;
    margin-bottom: 20px;
}

.shield-icon {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 42px;
}

.shield-icon img {
    width: 200px;
    height: auto;
}

.instructions-box {
    display: flex;
    justify-content: center;
}
.instructions {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.instructions li {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: #666;
}

.instructions li span {
    width: 20px;
    height: 20px;
    background-color: #ff6b6b;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    line-height: 20px;
    border-radius: 50%;
    margin-right: 10px;
}

.security-box {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.security-info {
    display: flex;
    align-items: center;
    font-size: 12px;
    margin: 20px 0;
}

.security-info .iconfont {
    font-size: 16px;
    color:#FF6B6B;
}

.verification-box {
    display: flex;
    justify-content: center;
    
    padding:20px;
}


.start-verification {
    flex:1;
    height:40px;
    padding: 10px;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.start-verification:hover {
    background-color: #ff5555;
}

/* 手绘签名 */
.signature-container {
  display: flex;
  justify-content: center;
}

#signature-canvas {
  border-radius: 5px;
  width: 100vw;
  height:calc(100vh - 160px)
}

.signature-info {
  height:114px;
  display: flex;
  justify-content: center;
  padding:20px;
  flex-direction: column;
  background-color: #ffffff;
  position: absolute;
  bottom:0;
  left:0;
  right:0;
  z-index: 1000;
}

.instructions {
  display: flex;
  align-items:flex-start;
  justify-content: flex-start;
  font-size: 12px;
  color: #363853;
}

.instructions .iconfont {
  font-size: 26px;
  color: #e65100;
  margin-right:10px;
}

.warning-text {
  font-size: 14px;
  color: #363853;
}

.action-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  gap: 10px;
}

.action-buttons button {
  width: 100px;
  height: 32px;
  padding: 8px 16px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border-radius: 100px;
  cursor: pointer;
  display: flex;
}

#redo-button {
  border: 1px solid rgba(54, 56, 83, 0.10);
}

#complete-button {
  border:none;
  color:#ffffff;
  background:  #FF6B6B;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding-left:10%;
  padding-top:40%;
}
 .popup-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;  
    text-align: center;  
  }

  .popup-text {
    font-size: 16px;
    color: rgba(54, 56, 83, 0.5);
    text-align: left;
    margin-bottom: 10px; 
  }     



.popup-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 90%;
  position: relative;
}

.popup-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  gap: 12px;
}

.popup-buttons button {
  display: flex;
  padding: 8px 16px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex: 1 0 0;
  border:none;
  border-radius: 6px;
  cursor: pointer;
}

.popup-buttons button:first-child {
  background-color: rgba(54, 56, 83, 0.10);
}

.popup-buttons button:last-child {
  background-color: #FF6B6B;
  color: #fff;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  
}
 .popup-close .iconfont {
    font-size: 26px;
    color: #363853;
    cursor: pointer;
  }
/* 确保签名预览容器有适当尺寸 */
#signature-preview {
  max-width: 100%;
  max-height: 200px;
  background: #fff;
  text-align: center;
  margin: 10px 0;
}


/* 合同签署完成 */


.success-message {
  text-align: center;
  margin-top: 50px;
}

.success-icon .iconfont {
  font-size: 80px;
  color: #2ecc71;
}

.success-text {
  margin-top: 20px;
  font-size: 16px;
}

.actions {
  display: flex;
  justify-content: space-around;
  margin-top: 30px;
}



#view-contract-btn {
  display: flex;
  padding: 8px 16px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex: 1 0 0;
  
  border-radius: 100px;
  border: 1px solid rgba(54, 56, 83, 0.10);
}

#back-to-list-btn {
    display: flex;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex: 1 0 0;
    border-radius: 100px;
    border: none;
    background-color: #e74c3c;
    color: #fff;
    font-size: 14px;
}



/* 查看合同 */
/* Contract Viewer Modal */
.contract-viewer-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.contract-viewer-content {
  width: 90%;
  max-width: 800px;
  position: relative;
  margin-left:5%;
  margin-top:20%;
}

.contract-slides {
  width: 100%;
  overflow: hidden;
}

.contract-slide {
  width: 100%;
  display: none;
  text-align: center;
}

.page-indicator {
  position: absolute;
  top: -30px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  font-size: 16px;
  z-index: 10;
}

.contract-image-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: white;
  padding: 40px 20px 20px;
  box-sizing: border-box;
  margin-top: 20px;
}

.contract-image-container img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  margin: 0 auto;
}

/* Signature overlay */
.signature-overlay {
  position: absolute;
  bottom: 20px;
  right: 30px;
  width: 150px;
  height: 80px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 10;
}

.contract-slide-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.contract-slide-controls button {
  background: rgba(255, 255, 255, 0.3);
  border: none;
  color: white;
  padding: 15px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  pointer-events: auto;
  margin: 0 20px;
  
}

.contract-slide-controls button:hover {
  background: rgba(255, 255, 255, 0.5);
}

.contract-slide-controls button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* 缴款详情*/
.pay-detail-box {
  /*margin:10px 20px;*/
  padding: 10px 16px;
  background-color: #fff;
  border-radius: 8px;
}
.pay-detail-box .tab {
  flex:1;
}

.section {
  margin-bottom: 20px;
  text-align: center;
}

h2 {
  font-size: 20px;
  margin-bottom: 5px;
}

.subtitle {
  font-size: 14px;
  color: #666;
}

.info {
  font-size: 14px;
  margin-top: 5px;
}

.qrcode {
  width: 100%;
  max-width: 200px;
  margin: 20px auto;
  display: block;
}

.note {
  font-size:14px;
  margin-top:20px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}


.note i {
  font-size: 22px;
  margin-right: 5px;
  color: #FF6B6B;
}

/* 内容区域 */
.section-detail .content {
  margin-top: 16px;
}

/* 每行样式 */
.row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* 每个项目的样式 */
.item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex:1;
  text-align: center;
  gap:4px;
}



/* 数字部分样式 */
.number {
  font-size: 18px;
  color: #363853;
}

/* 单位部分样式 */
.unit {
  font-size: 14px;
  color: #363853;
  margin-top: 2px;
  padding-left:2px;
}

/* 描述部分样式 */
.description {
  font-size: 16px;
  color: #363853;
  margin-top: 2px;
}

.list-item .number {
  font-size: 16px;
  width:140px;
  display: flex;
  justify-content: flex-end;
}

.list-item {
  display: flex;
    height: 24px;
    align-items: center;
    padding: 0 10px;
    font-size: 14px;
    gap: 10px;
}
.list-item .pay-type {
  font-size: 16px;
  color: #363853;
}

.tab-content-commission {
    display: none;
}

.pay-detail-box .tab.active::after {
    left: 40%;
}

/* 合同实例 */


/* 滚动区域 */
.scroll-content {
  flex: 1; /* 自适应高度 */
  overflow-y: auto; /* 垂直滚动 */
  padding: 16px 16px 60px; /* 底部保留空间给按钮 */
  background-color: #f9f9f9; /* 背景颜色 */
  box-sizing: border-box; /* 包含 padding 的宽高计算 */
  margin-bottom:20px;
}

/* 图片容器 */
.image-container {
  display: flex;
  flex-direction: column;
  gap: 16px; /* 图片间的间距 */
}

/* 每张图片的容器 */
.image-item {
  display: flex;
  justify-content: center; /* 水平居中 */
  align-items: center; /* 垂直居中 */
  height: 100%; /* 确保图片容器占满屏幕 */
}

/* 图片样式 */
.image-item img {
  max-width: 100%;
  height: auto;
}

/* 底部悬浮按钮 */
.bottom-button {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #ffffff;
  text-align: center;
  
  z-index: 999; /* 确保按钮在最上层 */
  padding-left:20px;
  padding-right:20px;
  display: flex;
  align-items: center;
}
.bottom-sign-btn {
  display:flex;
  flex:1;
  justify-content: center;
  align-items: center;
  gap: 10px;
  height: 36px;
  background-color: #FF6B6B;
  color: #fff;
  border: none;
  border-radius: 100px;
  cursor: pointer; 
  font-size: 14px;
}

.bottom-sign-btn .iconfont {
  font-size: 24px;
}
.bottom-sign-btn:hover {
  background-color: #ff5555;
}


.input-group {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  border: 1px solid rgba(54, 56, 83, 0.10);
  border-radius: 6px;
  padding: 4px;
}

.input-group input {
  flex: 1;
  padding: 8px 16px;
  border:none;
  border-radius: 6px;
}

.input-group button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background-color: #FF6B6B;
  color: #fff;
  cursor: pointer;
}
/* 移除所有浏览器默认的 focus-visible 轮廓 */
.input-group input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* 删除按钮样式 */
.clear-input {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translateY(-50%);
  color: #999;
  cursor: pointer;
  display: none;
}

/* 当有内容时显示删除按钮 */
.input-group input:not(:placeholder-shown) + .clear-input {
  display: block;
}