/* ============================================================
 * 建筑资质智能报价系统 - 样式文件
 * 版本：v1.0（2026年湖南版）
 * ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; font-family: "微软雅黑","Microsoft YaHei",sans-serif; }
body { background: #f8f8f8; color: #333; line-height: 1.8; -webkit-text-size-adjust: 100%; }

.header { background: linear-gradient(135deg, #168DFF, #0066cc); color: #fff; text-align: center; padding: 30px 15px; box-shadow: 0 3px 15px rgba(0,0,0,0.1); position: relative; }
.header h1 { margin-bottom: 10px; font-size: 28px; }
.header-links { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }
.header-link {
    display: inline-block; color: #fff; text-decoration: none;
    padding: 8px 16px; border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 6px; font-size: 14px; font-weight: 500;
    transition: all 0.2s; background: rgba(255,255,255,0.1);
}
.header-link:hover { background: #fff; color: #168DFF; border-color: #fff; }
@media (max-width: 640px) {
    .header-links { position: static; transform: none; margin-top: 12px; }
    .header h1 { font-size: 22px; }
}

.container { max-width: 1400px; margin: 30px auto; padding: 0 20px; }
.card { background: #fff; border-radius: 12px; padding: 30px; margin-bottom: 30px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.card h2 { color: #168DFF; border-left: 6px solid #168DFF; padding-left: 15px; margin-bottom: 25px; font-size: 22px; }
.card h3 { color: #333; margin: 20px 0 12px; font-size: 16px; border-bottom: 1px dashed #eee; padding-bottom: 6px; }

/* 选择框 */
.select-group { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 25px; align-items: center; }
.select-item label { font-weight: 500; margin-right: 8px; font-size: 14px; }
.select-item select, .select-item input { padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; min-width: 200px; }

/* 模块切换按钮 */
.type-select { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 25px; }
.type-btn { padding: 10px 20px; border: 2px solid #168DFF; background: #fff; color: #168DFF; border-radius: 8px; font-size: 15px; cursor: pointer; transition: all 0.3s; font-weight: 500; }
.type-btn.active, .type-btn:hover { background: #168DFF; color: #fff; }

/* 表格 */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0; }
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; table-layout: auto; }
table th, table td { border: 1px solid #eee; padding: 6px 6px; text-align: center; vertical-align: middle; word-break: keep-all; white-space: nowrap; }
table th { background: #f0f8ff; color: #168DFF; font-weight: bold; font-size: 13px; }
table td:first-child { text-align: center; white-space: nowrap; }
table td input {
    width: 80px !important;
    padding: 3px 2px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    -moz-appearance: textfield;
}
table td input::-webkit-outer-spin-button,
table td input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
table td:nth-child(3) div.price-input-box { display: inline-block; width: auto; position: relative; }
table td:nth-child(3) div.price-input-box input { width: 80px !important; padding-right: 12px; }

/* 价格输入框 */
.price-input-box { position: relative; display: inline-block; }
.price-input-box input { border: 1px solid #ddd; border-radius: 4px; text-align: center; }
.price-mark { position: absolute; top: 0; right: 2px; color: #FF5252; font-size: 9px; font-weight: bold; }

/* 按钮 */
.add-btn { background: #00C853; color: #fff; border: none; padding: 8px 18px; border-radius: 6px; font-size: 14px; cursor: pointer; margin: 8px 0; transition: all 0.3s; }
.add-btn:hover { background: #00A843; }
.del-btn { background: #FF5252; color: #fff; border: none; width: 22px; height: 22px; border-radius: 4px; cursor: pointer; font-size: 14px; line-height: 22px; padding: 0; text-align: center; }

/* 小计/总价 */
.subtotal-box { background: #f5f9ff; padding: 10px 18px; border-radius: 8px; text-align: right; font-size: 15px; font-weight: bold; margin: 10px 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.total-box { background: #f8fff9; padding: 18px; border-radius: 8px; text-align: right; font-size: 18px; font-weight: bold; margin-top: 18px; }
.price-red { color: #FF5252; font-size: 20px; margin-left: 8px; }
.time-tag { color: #666; font-size: 12px; font-weight: normal; }
.hint-tag { color: #8a5a00; font-size: 12px; font-weight: normal; background: #fff5d6; padding: 2px 8px; border-radius: 4px; }

/* 提示框 */
.tip-box { border-radius: 0 8px 8px 0; padding: 10px 18px; margin: 16px 0; font-size: 13px; line-height: 1.7; }
.tip-box h4 { margin-bottom: 0; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.tip-box h4::after { content: "+"; font-size: 16px; font-weight: bold; transition: transform 0.2s; }
.tip-box.active h4::after { content: "−"; }
.tip-content { display: none; margin-top: 6px; }
.tip-box.active .tip-content { display: block; }
.tip-box ul { padding-left: 22px; margin: 6px 0; }
.tip-box li { margin: 4px 0; }
.tip-qual { background: #e8f4ff; border-left: 4px solid #168DFF; color: #0050b3; }
.tip-anxu { background: #e8fff1; border-left: 4px solid #00B42A; color: #087a22; }
.tip-warn { background: #fff7e6; border-left: 4px solid #FF7D00; color: #ad5500; }
.tip-easy { background: #f9f5ff; border-left: 4px solid #9254DE; color: #722ED1; }

/* 模块显示 */
.module { display: none; }
.module.active { display: block; }

/* 建造师动态行 */
.major-box { display: flex; gap: 3px; }
.major-box select { font-size: 11px; padding: 1px 3px; min-width: 0; width: auto; max-width: 100px; }
.hide { display: none !important; }

/* 动态表格紧凑 */
#jzsTable th, #jzsTable td { padding: 5px 5px; white-space: nowrap; }
#jzsTable select { font-size: 11px; padding: 1px 3px; }
#jzsTable input { font-size: 12px; padding: 3px 2px; width: 80px !important; }
#jzsTable .price-input-box { position: relative; display: inline-block; }
#jzsTable .price-input-box input { width: 80px !important; padding-right: 12px; }
#jzsTable .del-btn { width: 20px; height: 20px; font-size: 12px; line-height: 20px; }

/* 概述框 */
.summary-box { background: #f0faff; border: 1px solid #b6d4fe; border-radius: 8px; padding: 12px 18px; margin: 14px 0; color: #004085; font-size: 13px; line-height: 1.8; }
.summary-box strong { color: #004085; }

/* 政策折叠 */
.policy-fold { margin-top: 6px; border-top: 1px dashed #b6d4fe; padding-top: 6px; }
.policy-fold .policy-trigger { color: #168DFF; cursor: pointer; font-size: 12px; user-select: none; }
.policy-fold .policy-trigger:hover { text-decoration: underline; }
.policy-fold .policy-body { display: none; font-size: 12px; color: #555; padding: 6px 0 3px; line-height: 1.7; }

/* 服务费行（readonly 样式保留，但不再强制只读） */
.service-price-input { background: #f5f5f5; }

/* 服务费全局配置 */
.service-fee-config {
    background: #fffbf0;
    border: 1px solid #f0d060;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 13px;
}
.service-fee-config .fee-label {
    font-weight: bold;
    color: #333;
    white-space: nowrap;
}
.service-fee-config label {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.service-fee-config input[type="text"] {
    width: 80px;
    padding: 3px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    background: #fff;
}
.service-fee-config .fee-tip {
    color: #888;
    font-size: 12px;
}

/* 页脚 */
.footer { text-align: center; padding: 20px; background: #168DFF; color: #fff; margin-top: 30px; }

/* 响应式 */
@media (max-width: 768px) {
    .card { padding: 18px; }
    table th, table td { padding: 4px 4px; font-size: 11px; }
    .select-group { gap: 8px; }
}
