* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    background-color: #f5f6f8;
    padding: 16px;
    font-size: 15px;
    color: #333;
}
.page-container {
    max-width: 750px;
    margin: 0 auto;
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
}
h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 6px;
}
.page-tip {
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}
.section-title {
    font-size: 17px;
    font-weight: bold;
    margin: 24px 0 12px 0;
    border-left: 4px solid #e53935;
    padding-left: 8px;
}
.form-item {
    margin-bottom: 14px;
}
.label-txt {
    display: block;
    margin-bottom: 5px;
}
.form-input,
.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    background-color: #fff;
}
.form-input[readonly] {
    background-color: #f5f6f8;
    cursor: not-allowed;
}
.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #e53935;
}
.required {
    color: #f5222d;
    margin-right: 4px;
}
.notice-text {
    display: flex;
    gap:6px;
    align-items: flex-start;
    font-size: 13px;
    color: #666;
    margin: 4px 0 12px 0;
    line-height: 1.5;
}
.add-btn {
    width: 100%;
    padding:6px 12px;
    margin: 8px 0 24px 0;
    border:1px solid #ddd;
    border-radius:4px;
    color: #e53935;
    background:#f5f5f5;
    cursor: pointer;
    font-size:15px;
}
.add-btn:hover {
    background-color: #fff2f2;
}
.submit-btn {
    width: 100%;
    padding: 13px;
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 20px;
    cursor: pointer;
}
.submit-btn:hover {
    background-color: #d32f2f;
}

/* ==========美化后的文件上传组件========== */
.file-wrap {
    padding: 8px 0;
    margin-bottom:18px;
}
.file-input-box {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
}
.real-file {
    display: none;
}
.file-btn {
    padding: 10px 18px;
    background: #e53935;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.file-btn:hover{
    background:#d32f2f;
}
.file-name {
    display:none;
    padding: 0 14px;
    font-size: 14px;
    color: #555;
    flex:1;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.tip {
    font-size: 13px;
    color: #888;
    margin-top: 6px;
}

@media(max-width:576px){
    body{
        padding:8px;
    }
    .page-container{
        padding:16px;
    }
    .file-input-box{
        flex-wrap:wrap;
    }
    .file-name{
        width:100%;
        padding:6px 12px;
    }
}

.edu-block,.work-block,.family-block{
    margin-bottom:16px;
    padding-bottom:12px;
    border-bottom:1px solid #eee;
}
.del-wrap{
    margin-top:8px;
}
.del-btn{
    padding:4px 10px;
    background:#fff2f2;
    color:#e53935;
    border:1px solid #ffcccc;
    border-radius:4px;
}

/* 图片预览弹窗 合并去重 */
.img-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 99999;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
}
.img-modal img {
    max-width:95%;
    max-height:95vh;
    object-fit:contain;
}
.img-modal-close {
    position:absolute;
    top:16px;
    right:20px;
    color:#fff;
    font-size:36px;
    cursor:pointer;
}

.outer-file-wrap{
    margin-top:32px;
}

.preview-wrap {
    display: flex;
    flex-wrap: wrap;
    gap:10px;
    margin-top:10px;
    justify-content: center;
    align-items: flex-start;
}
.preview-item{
    position:relative;
    width:80px;
    height:80px;
    display:inline-block;
    margin:8px;
}
.preview-item img{
    width:100%;
    height:100%;
    object-fit:cover;
    border:1px solid #eee;
    border-radius:4px;
    cursor:pointer;
}
.preview-del{
    position:absolute;
    right:-6px;
    top:-6px;
    width:22px;
    height:22px;
    background:#f44336;
    color:#fff;
    border:none;
    border-radius:50%;
    cursor:pointer;
    font-size:14px;
    line-height:1;
    padding:0;
    text-align:center;
    line-height:20px;
}
.pdf-preview{
    padding:10px 14px;
    border:1px solid #ccc;
}

.file-preview-item {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 120px;
    margin: 0 10px 10px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.file-preview-name {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 22px;
    line-height: 22px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-del {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 24px;
    height: 24px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
    text-decoration: none;
}

.file-preview-del:hover {
    background: #c82333;
}

/* 手机端修复add-btn误触，控制垂直间距，不要空隙过大 */
@media (max-width: 576px) {
    .add-btn {
        width: auto;
        display: inline-block;
        min-width: 140px;
        margin: 12px 0 16px 0; /* 减小下边距，收紧和下一块区域距离 */
    }
    .edu-block,.work-block,.family-block,.emergency-block{
        margin-bottom:16px; /* 恢复原来间距，不要放大 */
    }
}