/* 按钮样式修复 CSS */

/* 统一表格内所有按钮的高度 */
table button,
table .btn,
td button,
td .btn,
th button,
th .btn,
.table-action-btn {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 10px !important;
    line-height: 1 !important;
    font-size: 14px !important;
    margin-right: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}

/* 确保所有按钮在同一行的Y轴高度一致 */
tr td .btn,
tr td button {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    box-sizing: border-box !important;
}

/* 针对通用按钮样式 */
.btn-primary,
.btn-danger,
.btn-info,
.btn-secondary {
    height: 36px !important;
}

/* 页面内的表格按钮样式 */
table .btn-primary,
table .btn-danger,
table .btn-info,
table .btn-secondary,
td .btn-primary,
td .btn-danger,
td .btn-info,
td .btn-secondary {
    height: 30px !important;
}

/* 特定页面按钮强制样式 */
/* quick_pricing 页面 */
[href*="quick_pricing"] table button,
[href*="quick_pricing"] td button,
[href*="quick_pricing"] .btn {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
}

/* audit_review 页面 */
[href*="audit_review"] table button,
[href*="audit_review"] td button,
[href*="audit_review"] .btn {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
}

/* incubation 页面 */
[href*="incubation"] table button,
[href*="incubation"] td button,
[href*="incubation"] .btn {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
}

/* 页脚按钮样式 */
.modal-footer .btn,
.card-footer .btn,
footer .btn {
    height: 36px !important;
}

/* 特定页面的特定按钮 - 直接指定 */
/* audit_review/result 页面的生成报告按钮 */
a[href*="/audit_review/report"],
button[onclick*="/audit_review/report"],
a:contains("生成报告"),
button:contains("生成报告") {
    background-color: #86868b !important;
    color: white !important;
    border-color: #86868b !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* audit_review/report 页面的导出报告按钮 */
a[href*="/audit_review/export"],
button[onclick*="/audit_review/export"],
a:contains("导出报告"),
button:contains("导出报告") {
    background-color: #86868b !important;
    color: white !important;
    border-color: #86868b !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* incubation/module_selection 页面的返回列表按钮 */
[href*="incubation/module_selection"] a:contains("返回列表"),
[href*="incubation/module_selection"] button:contains("返回列表") {
    background-color: #86868b !important;
    color: white !important;
    border-color: #86868b !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 具体针对截图中显示的按钮 */
a.btn[href*="step4"] + a.btn[contains="导出报告"],
button.btn[contains="导出报告"] {
    background-color: #86868b !important;
    color: white !important;
    border-color: #86868b !important;
}

a.btn[href*="result"] + a.btn[contains="生成报告"],
button.btn[contains="生成报告"] {
    background-color: #86868b !important;
    color: white !important;
    border-color: #86868b !important;
}

a.btn[href*="module_selection"] + a.btn[contains="返回列表"],
button.btn[contains="返回列表"] {
    background-color: #86868b !important;
    color: white !important;
    border-color: #86868b !important;
}

/* 强制按钮颜色样式 */
button:contains("下一步"),
a:contains("下一步"),
button.btn-next,
a.btn-next,
button[value="下一步"],
a[value="下一步"] {
    background-color: #86868b !important;
    color: white !important;
    border-color: #86868b !important;
}

button:contains("上一步"),
a:contains("上一步"),
button.btn-prev,
a.btn-prev,
button[value="上一步"],
a[value="上一步"] {
    background-color: #86868b !important;
    color: white !important;
    border-color: #86868b !important;
}

button:contains("生成"),
a:contains("生成"),
button.btn-generate,
a.btn-generate,
button[value="生成"],
a[value="生成"] {
    background-color: #86868b !important;
    color: white !important;
    border-color: #86868b !important;
}

button:contains("保存并校审"),
a:contains("保存并校审"),
button.btn-save-audit,
a.btn-save-audit,
button[value="保存并校审"],
a[value="保存并校审"] {
    background-color: #86868b !important;
    color: white !important;
    border-color: #86868b !important;
}

/* 特殊页面按钮处理 */
.生成报告,
.导出报告,
.返回列表,
.上一步,
.下一步,
button[value="生成报告"],
a[value="生成报告"],
button[value="导出报告"],
a[value="导出报告"],
button[value="返回列表"],
a[value="返回列表"] {
    background-color: #86868b !important;
    color: white !important;
    border-color: #86868b !important;
}

/* 强制优先级覆盖 */
.btn-primary {
    background-color: #0071e3 !important;
    color: white !important;
    border-color: #0071e3 !important;
}

.btn-danger {
    background-color: #ff3b30 !important;
    color: white !important;
    border-color: #ff3b30 !important;
}

.btn-info {
    background-color: #00b8d4 !important;
    color: white !important;
    border-color: #00b8d4 !important;
}

.btn-secondary {
    background-color: #86868b !important;
    color: white !important;
    border-color: #86868b !important;
} 