
:root {
    --primary-color: #3a62c8;
    --primary-hover: #2d4fa8;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --border-radius: 8px;
    --box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f5f7fa;
    overflow-x: hidden; /* 防止水平滚动 */
    width: 100%;
    max-width: 100%;
}

.preview-img {
    cursor: pointer;
    transition: transform 0.3s;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.preview-img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#imagePreview {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1050;
    text-align: center;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

#previewImage {
    max-width: 90%;
    max-height: 90%;
    margin-top: 2%;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.25);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.close-preview {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-preview:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

/* 容器样式 */
.container {
    max-width: 1140px;
    padding: 20px;
    width: 100%;
}

.zc-main {
    padding-top: 30px;
    position: relative;
    z-index: 1;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 25px;
    background-color: #fff;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
}

.card-header h5 {
    margin: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 25px;
}

.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
    height: auto;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(58, 98, 200, 0.25);
}

.form-check-input {
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    padding-left: 5px;
}

.col-form-label {
    font-weight: 500;
}

.required-field::after {
    content: "*";
    color: var(--danger-color);
    margin-left: 4px;
}

/* 按钮样式 */
.btn {
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-outline-secondary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* 上传容器样式 - 调整为更小的尺寸 */
.upload-container {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    margin-bottom: 15px;
    transition: var(--transition);
    background-color: #fcfcfc;
    max-width: 90%;
    margin: 0 auto 15px;
}

.upload-container:hover {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}

.upload-example {
    position: relative;
    margin-bottom: 10px;
}

.upload-example img {
    max-height: 150px;
    width: auto;
    max-width: 100%;
}

.mask {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0,0,0,0.6);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
}

.pic.ztpic {
    margin: 10px 0;
    text-align: center;
}

.pic.ztpic img {
    max-width: 100%;
    max-height: 140px;
    height: auto;
    border: 1px solid #eee;
    padding: 3px;
    border-radius: 4px;
}

/* 上传按钮样式 - 调整为更小的尺寸 */
#zz_upload_btn, #cert_upload_btn, #power_template_btn, #legal_declaration_btn, #business_license_btn {
    display: inline-block !important;
    cursor: pointer;
    padding: 8px 12px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 13px;
    text-align: center;
    border: none;
    transition: var(--transition);
}

#zz_upload_btn:hover, #cert_upload_btn:hover, #power_template_btn:hover, #legal_declaration_btn:hover, #business_license_btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 查看样例按钮样式 */
.btn-sm.btn-outline-secondary {
    padding: 3px 8px;
    font-size: 12px;
}

/* 提示文本容器样式 */
.form-text-container {
    margin-top: 20px;
    clear: both;
}

.form-text-container .alert {
    padding: 15px 20px;
    margin-bottom: 0;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background-color: #f8f9fa;
}

.form-text-container h6 {
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}

.form-text-container ol {
    padding-left: 20px;
    margin-bottom: 0;
}

.form-text-container li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.form-text-container .text-danger {
    color: var(--danger-color) !important;
    font-weight: 500;
}

/* 页面标题样式 */
.add_sqr_tit {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.add_sqr_tit:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* 警告提示样式 */
.alert-info {
    background-color: #e8f4fd;
    border-color: #bee5eb;
    color: #0c5460;
    border-radius: 6px;
    padding: 15px 20px;
}

/* 响应式样式 */
@media (max-width: 767.98px) {
    html, body {
        overflow-x: hidden;
    width: 100%;
        max-width: 100%;
}

    .container {
        padding: 10px 5px;
        max-width: 100%;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .container-fluid {
        padding-right: 0;
        padding-left: 0;
    }
    
    .card {
        border-radius: 0;
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px 10px;
    }
    
    .row {
        margin-right: -5px;
        margin-left: -5px;
    }
    
    .col, .col-1, .col-10, .col-11, .col-12, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, 
    .col-auto, .col-lg, .col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, 
    .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-auto, .col-md, .col-md-1, .col-md-10, 
    .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, 
    .col-md-9, .col-md-auto, .col-sm, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, 
    .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-auto, .col-xl, .col-xl-1, 
    .col-xl-10, .col-xl-11, .col-xl-12, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, 
    .col-xl-8, .col-xl-9, .col-xl-auto {
        padding-right: 5px;
        padding-left: 5px;
    }
    
    /* 调整表单布局 */
    .form-group.row {
        margin-bottom: 15px;
    }
    
    .col-form-label {
        padding-bottom: 5px;
        text-align: left;
    }
    
    .col-sm-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .col-sm-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .add_sqr_tit {
        font-size: 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .col-form-label {
    margin-bottom: 8px;
}

    .btn {
        width: 100%;
    }
    
    .zc-main {
        padding-top: 20px;
    }
    
    body {
        padding-bottom: 60px;
    }
    
    .form-text-container .alert {
        padding: 12px 15px;
    }
    
    .form-text-container li {
        font-size: 13px;
    }
}

/* 超小屏幕设备 */
@media (max-width: 575.98px) {
    .container-fluid {
        padding: 0;
    }
    
    .card-header {
        padding: 10px 15px;
    }
    
    .card-body {
        padding: 10px;
    }
    
    .form-check-inline {
        margin-right: 10px;
        padding: 6px 12px;
    }
    
    .upload-container {
        padding: 15px 10px;
    }
    
    .btn {
    padding: 8px 15px;
    }
}

/* 动画效果 */
.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

/* 自定义单选框样式 */
.form-check-input {
    width: 18px;
    height: 18px;
}

.form-check-inline {
    margin-right: 20px;
}

/* 覆盖默认的layui样式 */
.layui-form-label {
    width: auto;
    padding: 9px 15px 9px 0;
    font-weight: 500;
}

.layui-input-inline {
    width: 100%;
}

.layui-form-item {
    margin-bottom: 20px;
}

/* 修复图片预览层的z-index */
#imagePreview {
    z-index: 9999 !important;
}

/* 提示文本样式 */
.form-text {
    margin-top: 15px;
    clear: both;
    display: block;
    color: #6c757d;
    font-size: 14px;
}

/* 单选框美化 */
.custom-control-group {
    display: flex;
    flex-wrap: wrap;
}

/* 表单样式优化 */
.form-check-inline {
    margin-right: 20px;
}

/* 自定义图标样式 */
.radio-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 5px;
    color: var(--primary-color);
}

/* 表单样式美化 */
.form-check-inline {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 16px;
    margin-right: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.form-check-inline:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.form-check-input:checked + .form-check-label {
    color: var(--primary-color);
    font-weight: 500;
}

/* 输入框图标美化 */
.input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: var(--primary-color);
}

.input-group-prepend .layui-icon {
        font-size: 16px;
    }

/* 提交按钮效果 */
.btn-primary.shadow {
    box-shadow: 0 4px 10px rgba(58, 98, 200, 0.3) !important;
    transition: all 0.3s ease;
}

.btn-primary.shadow:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(58, 98, 200, 0.4) !important;
}

/* 进度条美化 */
.progress {
    border-radius: 4px;
    overflow: hidden;
    background-color: #e9ecef;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, #5a7fdb 100%);
    transition: width 0.6s ease;
}

/* 文档图标美化 */
.document-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

/* 修复单选按钮样式 */
.form-check-input[type="radio"] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    margin-right: 6px;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    cursor: pointer;
    z-index: 99;
}

.form-check-label {
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
}

/* 修复单选按钮点击区域 */
.form-check-inline {
    position: relative;
    cursor: pointer;
    padding: 10px 16px;
    transition: all 0.3s ease;
}

/* 确保Layui不会隐藏原始输入框 */
.layui-unselect, .layui-form-radio {
    display: none !important;
}

/* 增强选中状态的视觉效果 */
.form-check-input[type="radio"]:checked + .form-check-label {
    color: var(--primary-color);
    font-weight: bold;
}

.form-check-input[type="radio"]:checked ~ .form-check-label .radio-icon {
    color: var(--primary-color);
}

/* 选中项的容器样式 */
input[type="radio"]:checked ~ label {
    color: white;
}

input[type="radio"]:checked {
    accent-color: #3a62c8;
}

.form-check-inline.selected {
    background-color: #3a62c8;
    color: white;
    border-color: #3a62c8;
    box-shadow: 0 2px 8px rgba(58, 98, 200, 0.3);
}

.form-check-inline.selected .form-check-label,
.form-check-inline.selected .radio-icon {
    color: white !important;
}

/* 确保复选框可以正常点击和显示 */
input[type="checkbox"].form-check-input {
    opacity: 1 !important;
    position: static !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: inline-block !important;
    width: 18px;
    height: 18px;
    z-index: 100;
    margin-right: 8px;
    vertical-align: middle;
}

/* 隐藏Layui生成的复选框元素 */
.layui-form-checkbox {
    display: none !important;
}
