/* 全局样式重置和基础设置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f7fa;
    background-image: linear-gradient(120deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* 容器样式 */
.container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 40px;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}
.container:hover { transform: translateY(-5px); }

/* 标题样式 */
h1, h2, h3 { color: #2c3e50; }
h1 {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid #D82028;
    padding-bottom: 15px;
    font-weight: 600;
}

/* 联系信息样式 */
.contact-info {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.contact-info h2 {
    color: #D82028;
    margin-bottom: 20px;
    font-weight: 600;
}
.contact-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}
.contact-item {
    margin-bottom: 10px;
    font-size: 18px;
    display: flex;
    align-items: center;
    background-color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}
.contact-item:hover {
    background-color: #f8f9fa;
}
.contact-combined {
    justify-content: center;
    flex-wrap: wrap;
}
.separator {
    margin: 0 15px;
    color: #999;
}
.phone-link {
    display: inline-flex;
    align-items: center;
    color: #D82028;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(216, 32, 40, 0.05);
    transition: all 0.3s ease;
    margin: 0 5px;
}
.phone-link:hover {
    background-color: rgba(216, 32, 40, 0.15);
}
.phone-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23D82028'%3E%3Cpath d='M20 15.5c-1.2 0-2.4-.2-3.6-.6-.3-.1-.7 0-1 .2l-2.2 2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c.3-.3.4-.7.2-1-.3-1.1-.5-2.3-.5-3.5 0-.6-.4-1-1-1H4c-.6 0-1 .4-1 1 0 9.4 7.6 17 17 17 .6 0 1-.4 1-1v-3.5c0-.6-.4-1-1-1zM18 1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}
.phone-separator {
    color: #ccc;
    margin: 0 5px;
}
.contact-item.with-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    max-width: 300px;
    margin: 0 auto 15px;
    text-align: center;
}
.inspector-photo {
    width: 100px;
    height: 140px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 3px solid #f0f0f0;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}
.inspector-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.no-photo {
    width: 100%;
    height: 100%;
    background-color: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}
.inspector-details {
    width: 100%;
}
.inspector-name,
.inspector-id,
.inspector-phone {
    margin-bottom: 8px;
    font-size: 16px;
    display: block;
}
.inspector-name {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 12px;
}
.inspector-phone .phone-link {
    margin: 0;
    padding: 0;
    background: none;
    width: auto;
}
.contact-item strong {
    color: #2c3e50;
    margin-right: 10px;
    min-width: 100px;
    text-align: right;
}
.form-group {
    margin-bottom: 25px;
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}
.radio-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
}
.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
    white-space: nowrap;
}
.radio-group input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}
input, select, textarea {
    color: #555;
    width: 100%;
    height: auto;
    min-height: 48px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

/* 响应式设计 - 手机端适配 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .scan-button img {
        width: 20px;
        height: 20px;
    }
    
    /* 手机端卡片样式 */
    .qr-mapping-card {
        background-color: white;
        border-radius: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        padding: 20px;
        margin-bottom: 20px;
    }
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #D82028;
    box-shadow: 0 0 0 3px rgba(216, 32, 40, 0.1);
}
textarea {
    height: 180px;
    resize: vertical;
}
button {
    background-color: #D82028;
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: block;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
    transition: background-color 0.3s ease;
}
button:hover {
    background-color: #b61a22;
}
button:active {
    background-color: #a0171f;
}

/* 扫描按钮专用样式 - 完全参考绑定按钮样式 */
.scan-button {
    display: block !important;
    background-color: #D82028;
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 220px;
    margin: 10px 0 !important;
}

.scan-button:hover {
    background-color: #b61a22;
}

.scan-button:active {
    background-color: #a0171f;
}

/* 确保扫描按钮在移动设备上与绑定按钮样式一致 */
@media (max-width: 768px) {
    .scan-button {
        display: block !important;
        padding: 12px 20px;
        font-size: 16px;
        width: 100%;
        max-width: 100%;
    }
}

/* 在非移动设备上隐藏扫描按钮 */
.scan-button.hide-on-desktop {
    display: none !important;
}

/* 文件上传样式 */
input[type="file"] {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}
input[type="file"]:hover { border-color: #D82028; background-color: #e9ecef; }
input[type="file"]:focus { 
    outline: none;
    border-color: #D82028;
    box-shadow: 0 0 0 3px rgba(216, 32, 40, 0.1);
}

/* 辅助文字样式 */
small { display: block; margin-top: 8px; color: #6c757d; font-size: 14px; }

/* 表单布局样式 */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}
.form-group.large {
    flex: 2;
}
.form-group.small {
    flex: 1;
}

/* 表单组样式 */
.qr-mapping-card {
    transition: all 0.3s ease;
}

/* 扫码按钮样式 */
.scan-button {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.scan-button img {
    width: 16px;
    height: 16px;
}

/* 消息提示样式 */
.success-message, .error-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease;
}
.success-message { background-color: #d4edda; color: #155724; }
.error-message { background-color: #f8d7da; color: #721c24; }

/* 二维码和页脚样式 */
.wechat-qr { margin-top: 20px; text-align: center; }
.qr-code {
    max-width: 220px;
    height: auto;
    border: 5px solid white;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.qr-code:hover { transform: scale(1.05); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.wechat-id { margin-top: 15px; font-size: 16px; color: #555; font-weight: 500; }
footer { text-align: center; margin-top: 50px; color: #7f8c8d; font-size: 14px; padding: 20px 0; }

/* 动画效果 */
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
/* 响应式设计 */
@media (max-width: 768px) {
    body { padding: 10px; font-size: 14px; }
    .container { padding: 20px; margin-bottom: 20px; }
    h1 { font-size: 24px; margin-bottom: 20px; padding-bottom: 10px; }
    h2 { font-size: 20px; margin-bottom: 15px; }
    
    /* 表单响应式调整 */
    .form-group { margin-bottom: 15px; }
    .form-group label { font-size: 14px; }
    .form-group input,
    .form-group select,
    .form-group textarea { font-size: 14px; padding: 10px; }
    button { padding: 12px; font-size: 16px; }
    
    /* 联系信息响应式调整 */
    .contact-container { flex-direction: column; align-items: center; gap: 15px; }
    .contact-item {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        text-align: center;
        padding: 15px;
        font-size: 16px;
    }
    .contact-item.with-photo { max-width: 100%; padding: 15px; }
    .inspector-photo { width: 120px; height: 168px; margin-bottom: 15px; }
    .inspector-details { width: 100%; }
    .inspector-name,
    .inspector-id,
    .inspector-phone { font-size: 16px; margin-bottom: 10px; }
    .inspector-name { font-size: 20px; }
    .contact-combined { flex-direction: column; align-items: center; }
    .separator {
        display: none;
    }
    .phone-link {
        margin: 5px 0;
        width: 100%;
        justify-content: center;
        font-size: 16px;
    }
    .phone-separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    h1 {
        font-size: 22px;
    }
    h2 {
        font-size: 18px;
    }
    .repair-button {
        padding: 12px 20px;
        font-size: 16px;
    }
    .inspector-photo {
        width: 100px;
        height: 140px;
    }
}

/* 顶部在线报修按钮样式 */
.top-repair-button {
    text-align: center;
    margin: 20px 0;
}

.repair-button {
    background-color: #D82028;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.repair-button:hover {
    background-color: #b61a22;
}

.repair-button:active {
    background-color: #a0171f;
}

/* 管理入口链接样式 */
.admin-link {
    color: #D82028;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.admin-link:hover {
    color: #b61a22;
    text-decoration: underline;
}

/* 复选框样式单选按钮 */
.checkbox-style-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.checkbox-style-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 30px;
    margin-right: 20px;
    font-weight: normal;
    user-select: none;
}

.checkbox-style-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: white;
    border: 2px solid #ccc;
    border-radius: 4px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.checkbox-style-radio:hover input ~ .checkmark {
    border-color: #D82028;
}

.checkbox-style-radio input:checked ~ .checkmark {
    background-color: #D82028;
    border-color: #D82028;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-style-radio input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-style-radio .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* 扫描按钮样式 */
.scan-button {
    background-color: #D82028;
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    margin-top: 10px !important;
    transition: background-color 0.3s ease;
}

.scan-button:hover {
    background-color: #b61a22;
}

.scan-button:active {
    background-color: #a0171f;
}

/* 客服微信样式 */
.customer-service {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.customer-service h3 {
    margin: 10px 0 15px 0;
    color: #333;
    font-size: 18px;
}

.qr-code-container {
    display: inline-block;
    text-align: center;
}

.qr-code {
    width: 150px;
    height: 150px;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: white;
}

.qr-code-container p {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

/* 二维码响应式样式 */
.qr-table {
    display: none;
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

@media (min-width: 768px) {
    .qr-cards-container {
        display: block;
    }
    
    .qr-table {
        display: table;
    }
    
    .qr-table th,
    .qr-table td {
        padding: 12px 15px;
        text-align: left;
        border-bottom: 1px solid #ddd;
    }
    
    .qr-table th {
        background-color: #f2f2f2;
        font-weight: bold;
    }
    
    .qr-table tr:hover {
        background-color: #f5f5f5;
    }
    
    .qr-card {
        display: none;
    }
}