.tender-page {
    background: #fafafa;
    padding-top: calc(var(--header-height) + 80px);
}

.tender-hero {
    background: linear-gradient(135deg, #fff 0%, #f7f7f7 100%);
    border-bottom: 1px solid #eee;
}

.tender-hero .container {
    padding: 48px 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.tender-hero-left { flex: 1; min-width: 0; }
.tender-hero-actions { flex: 0 0 auto; }

.tender-title {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    margin: 0 0 8px;
}

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

.tender-hero .tender-hero-actions { margin-top: 0; }
.tender-hero .tender-hero-actions .btn {
    padding: 10px 16px;
    font-weight: 600;
}

.tender-filters .container {
    padding: 16px 0;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.tabs {
    display: inline-flex;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 999px;
    padding: 4px;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 999px;
    cursor: pointer;
    color: #666;
}

.tab-btn.active {
    background: #ff6d31;
    color: #fff;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #666;
}

.filter-btn:hover {
    border-color: #ff6d31;
    color: #ff6d31;
}

/* 筛选弹窗样式 */
.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.filter-modal.show {
    opacity: 1;
    visibility: visible;
}

.filter-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.filter-content {
    position: absolute;
    top: 50%;
    left: 50%;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: min(720px, 92vw);
    max-height: 80vh;
    overflow-y: auto;
    transform: translate(-50%, -50%) scale(0.96);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.filter-modal.show .filter-content {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.filter-section {
    margin-bottom: 24px;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.filter-arrow {
    color: #999;
    transition: transform 0.3s ease;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-option {
    padding: 8px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.filter-option:hover {
    border-color: #ff6d31;
    color: #ff6d31;
}

.filter-option.active {
    background: #ff6d31;
    border-color: #ff6d31;
    color: #fff;
}

.filter-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
}

.filter-actions .btn {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e5e5e5;
}

.btn-secondary:hover {
    background: #e5e5e5;
}

.btn-primary {
    background: #ff6d31;
    color: #fff;
    border: 1px solid #ff6d31;
}

.btn-primary:hover {
    background: #e55a2b;
}

.tender-list-section .container {
    padding: 8px 0 48px;
}

.tender-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tender-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px 16px;
}

.tender-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
}

.tender-card-meta .tag {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    color: #666;
    border: 1px solid #eee;
    border-radius: 999px;
    margin-right: 8px;
}

.tender-card-bids {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.tender-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.tender-card-type {
    color: #ff6d31;
    font-weight: 600;
    font-size: 13px;
}

.btn-view {
    padding: 2px 5px;
    background: #ff6d31;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 52px;
    line-height: 1.15;
}

.btn-view:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

.list-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

#btnLoadMore {
    padding: 12px 32px;
    background: #ff6d31;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

#btnLoadMore:hover:not(:disabled) {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 109, 49, 0.3);
}

#btnLoadMore:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#btnLoadMore.error {
    background: #ff4757;
    animation: shake 0.5s ease-in-out;
}

#btnLoadMore.error:hover {
    background: #ff3742;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.empty {
    text-align: center;
    color: #999;
    padding: 32px 0;
}

/* 发布弹窗 */
.publish-modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; z-index: 9000; padding-top: calc(var(--header-height, 80px) + 120px); padding-bottom: 20px; overflow: auto; }
.publish-modal.show { display: flex; align-items: flex-start; justify-content: center; }
.publish-overlay { position: absolute; inset: 0; background: transparent; }
.publish-content { position: relative; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); width: min(860px,92vw); max-height: calc(100vh - var(--header-height, 80px) - 140px); display: flex; flex-direction: column; overflow: hidden; }
.publish-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eee; position: sticky; top: 0; background: #fff; z-index: 1; }
.publish-header h3 { margin: 0; font-size: 18px; }
.publish-close { border: none; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; }
.publish-body { padding: 16px 20px; overflow: auto; }
.publish-content .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.publish-content .form-group { display: flex; flex-direction: column; margin-bottom: 0; }
.publish-content .form-group-full { grid-column: 1 / -1; }
.publish-modal .publish-content .form-group label,
#publishModal .publish-content .form-group label,
#profilePublishModal .publish-content .form-group label { 
    margin-bottom: 8px !important; 
    color: #333 !important; 
    font-weight: 600 !important; 
    display: block !important; 
    white-space: normal !important; 
    text-align: left !important; 
}
.publish-content .form-group input, 
.publish-content .form-group select, 
.publish-content .form-group textarea { border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; font-size: 14px; width: 100%; box-sizing: border-box; }
.publish-content .form-group textarea { resize: vertical; }
.publish-content .form-group input:focus,
.publish-content .form-group select:focus,
.publish-content .form-group textarea:focus { outline: none; border-color: #ff6d31; box-shadow: 0 0 0 3px rgba(255, 109, 49, 0.1); }
.publish-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 12px 20px; border-top: 1px solid #eee; }
.publish-footer .btn { padding: 10px 20px; font-size: 14px; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; border: none; font-weight: 600; }
.publish-footer .btn-secondary { background: #f5f5f5; color: #666; border: 1px solid #e5e5e5; }
.publish-footer .btn-secondary:hover { background: #e5e5e5; }
.publish-footer .btn-primary { background: #ff6d31; color: #fff; border: 1px solid #ff6d31; }
.publish-footer .btn-primary:hover { background: #e55a2b; }

/* 城市选择器 */
.publish-content .city-picker { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; }
.publish-content .city-picker .btn { flex-shrink: 0; }
.publish-content .uploader,
.publish-content .uploader-grid { justify-content: flex-start; }
.publish-content .city-name { color: #666; font-size: 14px; }

/* 图片上传器 */
.uploader { display: flex; gap: 12px; align-items: flex-start; }
.uploader-add { width: 84px; height: 84px; border: 1px dashed #bbb; border-radius: 8px; background: #fafafa; cursor: pointer; font-size: 28px; display: flex; align-items: center; justify-content: center; }
.uploader-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.uploader-item { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; }
.uploader-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uploader-remove { position: absolute; top: 4px; right: 4px; border: none; background: rgba(0,0,0,.55); color: #fff; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; }

/* 开通招标功能弹窗（复用招聘弹窗视觉） */
.enable-recruit-modal{ position:fixed; inset:0; background:rgba(0,0,0,.45); display:none; z-index:9000; padding-top: calc(var(--header-height, 80px) + 120px); padding-bottom:20px; overflow:auto }
.enable-recruit-modal.show{ display:flex; align-items:flex-start; justify-content:center }
.enable-recruit-content{ position:relative; background:#fff; border-radius:14px; box-shadow:0 20px 40px rgba(0,0,0,.18); width:min(680px,92vw); max-height: calc(100vh - var(--header-height, 80px) - 140px); display:flex; flex-direction:column; overflow:hidden }
.enable-recruit-header{ display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid #f0f0f0; position:sticky; top:0; background:#fff; z-index:1 }
.enable-recruit-close{ background:transparent; border:0; font-size:20px; cursor:pointer; line-height:1; padding:4px 8px }
.enable-recruit-body{ padding:20px; overflow:auto; display:flex; flex-direction:column; gap:16px }
.enable-recruit-tip{ margin:0; color:#666; line-height:1.6 }
.enable-recruit-plans{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px }
.enable-recruit-plan{ border:1px solid #eee; border-radius:10px; padding:14px 16px; display:flex; flex-direction:column; gap:6px; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease }
.enable-recruit-plan:hover{ border-color: var(--primary-color); box-shadow: 0 6px 18px rgba(0,0,0,.06) }
.enable-recruit-plan.selected{ border-color: var(--primary-color); background: rgba(255,109,49,.06) }
.enable-recruit-plan .plan-title{ font-weight:600 }
.enable-recruit-plan .plan-price{ color:var(--primary-color) }
/* 弹窗底部按钮区域 */
.enable-recruit-body .form-actions{ display:flex; justify-content:flex-end; gap:12px; padding-top:8px }
@media (max-width: 768px){
  .publish-modal{ padding-top: calc(var(--header-height, 80px) + 100px) }
  .publish-content{ width:94vw; max-height: calc(100vh - var(--header-height, 80px) - 120px) }
  .enable-recruit-modal{ padding-top: calc(var(--header-height, 80px) + 100px) }
  .enable-recruit-content{ width:94vw; max-height: calc(100vh - var(--header-height, 80px) - 120px) }
  .enable-recruit-plans{ grid-template-columns: 1fr }
}

/* 招标详情弹窗 */
.tender-detail-modal{ position:fixed; inset:0; background:rgba(0,0,0,.45); display:none; z-index:9000; padding-top: calc(var(--header-height, 80px) + 120px); padding-bottom: 20px; overflow:auto }
.tender-detail-modal.show{ display:flex; align-items:flex-start; justify-content:center }
.tender-detail-content{ background:#fff; border-radius:14px; box-shadow:0 20px 40px rgba(0,0,0,.18); width:min(1000px,96vw); /* 进一步增加最大宽度 */ max-height: calc(100vh - var(--header-height, 80px) - 140px); display:flex; flex-direction:column; overflow:hidden }
.tender-detail-header{ position:sticky; top:0; background:#fff; z-index:1; padding:16px 20px; border-bottom:1px solid #f0f0f0; display:flex; align-items:center; justify-content:space-between }
.tender-detail-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; width:100%; flex-wrap:wrap }
.tender-detail-headleft h3{ margin:0; font-size:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100% }
.tender-detail-meta{ margin-top:6px; color:var(--text-secondary); display:flex; gap:8px; font-size:12px; flex-wrap:wrap }
.tender-detail-close{ background:transparent; border:0; font-size:20px; cursor:pointer; padding:4px 8px; flex-shrink:0 }
.tender-detail-body{ padding:20px; overflow:auto; -webkit-overflow-scrolling: touch }
.tender-detail-section{ display:grid; grid-template-columns:150px 1fr; /* 增加标签列宽度 */ gap:8px 20px; /* 增加列间距 */ padding:14px 0; /* 增加行间距 */ border-bottom:1px solid #f7f7f7; align-items:flex-start; /* 顶部对齐 */ word-break:break-word; /* 防止文字溢出 */ }
.tender-detail-label{ color:var(--text-secondary); font-weight:500; white-space:nowrap; min-height:1.4em; /* 确保对齐 */ }
.tender-detail-images{ display:grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap:10px; margin-top:16px }
.tender-detail-images img{ width:100%; height:auto; border-radius:8px; object-fit:cover }
.tender-image-viewer{ position:fixed; inset:0; background:rgba(0,0,0,.85); display:none; align-items:center; justify-content:center; z-index:10000; padding:20px; gap:12px }
.tender-image-viewer.show{ display:flex }
.tender-image-viewer-content{ position:relative; max-width:90vw; max-height:90vh; display:flex; align-items:center; justify-content:center; outline:none }
.tender-image-viewer-content img{ max-width:90vw; max-height:90vh; width:auto; height:auto; object-fit:contain; border-radius:12px; box-shadow:0 10px 40px rgba(0,0,0,.5); background:#000 }
.tender-image-viewer-close{ position:absolute; top:-16px; right:-16px; background:rgba(0,0,0,.7); color:#fff; border:none; border-radius:50%; width:36px; height:36px; font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center }
.tender-image-viewer-close:hover{ background:rgba(0,0,0,.9) }
.tender-image-viewer-nav{ background:rgba(0,0,0,.6); color:#fff; border:none; border-radius:50%; width:48px; height:48px; font-size:28px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background .2s }
.tender-image-viewer-nav:hover{ background:rgba(0,0,0,.8) }
.tender-image-viewer-nav.disabled{ opacity:.3; cursor:not-allowed }
.tender-image-viewer-nav.disabled:hover{ background:rgba(0,0,0,.6) }
.tender-detail-footer{ display:flex; justify-content:flex-end; gap:12px; padding:16px 20px; border-top:1px solid #f0f0f0; flex-wrap:wrap }
.tender-detail-footer button{ white-space:nowrap; min-width:120px; /* 确保按钮有足够宽度 */ }

/* 为英文语言添加特定样式 */
html[lang="en"] .tender-detail-content{ width:min(1050px,96vw); /* 英文时弹窗更宽 */ }

html[lang="en"] .tender-detail-section{ grid-template-columns:210px 1fr; /* 英文标签更宽，适配长文本如Design/Construction */ gap:8px 24px; /* 英文时间距更大 */ padding:16px 0; /* 英文时间距更大 */ }

html[lang="en"] .tender-detail-label{ font-weight:600; /* 英文标签加粗 */ }

html[lang="en"] .tender-detail-footer button{ min-width:140px; /* 英文按钮更宽 */ }

@media (max-width: 768px){
  .tender-detail-modal{ padding-top: calc(var(--header-height, 80px) + 100px) }
  .tender-detail-content{ width:94vw; max-height: calc(100vh - var(--header-height, 80px) - 120px) }
  .tender-detail-section{ grid-template-columns: 100%; /* 移动端单列布局 */ gap:8px 0; }
  .tender-detail-label{ width:100%; margin-bottom:4px; }
}

@media (max-width: 768px) {
    .tender-page {
        padding-top: calc(var(--header-height, 64px) + 48px);
    }

    .tender-hero .container {
        padding: 24px 0 16px;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    .tender-hero-left { flex: 1; min-width: 0; }
    .tender-hero-actions {
        width: auto;
        margin-left: auto;
    }
    /* 手机端“发布我的招标”按钮缩小约一半 */
    .tender-hero-actions .btn {
        width: auto;
        min-width: 100px;
        text-align: center;
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    .tender-title {
        font-size: 22px;
        line-height: 1.2;
    }
    
    .tender-subtitle {
        font-size: 13px;
        line-height: 1.5;
        color: #555;
    }

    .filter-bar { 
        flex-direction: column; 
        align-items: stretch; 
        gap: 10px;
    }
    
    .tabs {
        width: 100%;
        gap: 6px;
    }
    .tab-btn {
        flex: 1;
        text-align: center;
        padding: 8px 9px;
        font-size: 12.5px;
    }
    
    .filter-btn {
        width: auto;
        align-self: flex-start;
        justify-content: center;
        font-size: 12.5px;
        padding: 7px 10px;
    }
    
    .filter-content {
        padding: 18px;
        max-height: 85vh;
        width: 94vw;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-actions .btn {
        width: 100%;
        padding: 9px 12px;
        font-size: 13px;
    }

    .tender-list-section .container {
        padding: 8px 0 36px;
    }
    
    .tender-list {
        gap: 10px;
    }

    .tender-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
    }
    .tender-card-left { flex: 1; min-width: 0; }
    .tender-card-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    .tender-card-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 4px;
    }
    .tender-card-meta .tag {
        margin-right: 0;
        padding: 4px 10px;
        font-size: 12px;
    }
    .tender-card-bids {
        font-size: 12px;
        color: #777;
    }
    
    .tender-card-right {
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        gap: 6px;
        width: auto;
        align-self: center;
        margin-top: 0;
        flex-shrink: 0;
    }
    
    .tender-card-type {
        font-size: 12.5px;
    }
    
    .btn-view {
        padding: 1px 4px !important;
        font-size: 11px !important;
        min-width: 48px !important;
        line-height: 1.15 !important;
        border-radius: 6px !important;
    }
    
    #btnLoadMore {
        padding: 10px 16px;
        font-size: 13px;
        width: auto;
        max-width: 200px;
        align-self: center;
    }
}

@media (max-width: 480px) {
    .tender-title { font-size: 20px; }
    .tender-subtitle { font-size: 12px; }
    .tender-card { padding: 12px; }
    .tab-btn { font-size: 12px; padding: 7px 9px; }
    .filter-btn { font-size: 12px; padding: 6.5px 9px; }
}


