    /* ==========================================
       统一弹窗组件样式 - 基于材料预算页面设计
       ========================================== */

    /* 基础弹窗容器 */
    .unified-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 10001;
        justify-content: center;
        align-items: center;
        animation: fadeIn 0.2s ease-out;
    }

    .unified-modal.show {
        display: flex;
    }

    /* 弹窗内容容器 */
    .unified-modal .modal-content {
        background: #ffffff;
        border-radius: 8px;
        width: 90%;
        max-width: 900px;
        max-height: 85vh;
        overflow: hidden;
        box-shadow: 0 10px 40px rgba(0,0,0,0.2);
        animation: slideUp 0.3s ease-out;
        display: flex;
        flex-direction: column;
    }

    /* 中小尺寸弹窗 */
    .unified-modal.small .modal-content {
        max-width: 500px;
    }

    .unified-modal.medium .modal-content {
        max-width: 700px;
    }

    .unified-modal.large .modal-content {
        max-width: 1100px;
    }

    /* 弹窗头部 */
    .unified-modal .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        border-bottom: 1px solid #eee;
        background: #f8f9fa;
        flex-shrink: 0;
    }

    .unified-modal .modal-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        color: #333;
    }

    .unified-modal .modal-header .close-btn {
        background: none;
        border: none;
        font-size: 24px;
        color: #999;
        cursor: pointer;
        padding: 0;
        line-height: 1;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        transition: all 0.2s;
    }

    .unified-modal .modal-header .close-btn:hover {
        color: #333;
        background: rgba(0,0,0,0.05);
    }

    /* 弹窗主体 */
    .unified-modal .modal-body {
        padding: 20px;
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        background: #ffffff;
    }

    /* 弹窗底部 */
    .unified-modal .modal-footer {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        padding: 16px 20px;
        border-top: 1px solid #eee;
        background: #f8f9fa;
        flex-shrink: 0;
    }

    /* 弹窗按钮样式 */
    .unified-modal .modal-footer button {
        padding: 8px 24px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        border: none;
        transition: all 0.2s;
    }

    .unified-modal .modal-footer .btn-cancel {
        border: 1px solid #ddd;
        background: #fff;
        color: #666;
    }

    .unified-modal .modal-footer .btn-cancel:hover {
        background: #f5f5f5;
        border-color: #ccc;
    }

    .unified-modal .modal-footer .btn-confirm {
        border: none;
        background: #00B5A4;
        color: white;
    }

    .unified-modal .modal-footer .btn-confirm:hover {
        background: #009688;
    }

    .unified-modal .modal-footer .btn-confirm:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

    .unified-modal .modal-footer .btn-danger {
        background: #dc3545;
        color: white;
    }

    .unified-modal .modal-footer .btn-danger:hover {
        background: #c82333;
    }

    .unified-modal .modal-footer .btn-primary {
        background: #04cbcf;
        color: white;
    }

    .unified-modal .modal-footer .btn-primary:hover {
        background: #1976D2;
    }

    /* 表单字段样式 */
    .unified-modal .form-field {
        display: flex;
        flex-direction: column;
        margin-bottom: 16px;
    }

    .unified-modal .form-field label {
        margin-bottom: 8px;
        font-weight: 500;
        font-size: 14px;
        color: #333;
    }

    .unified-modal .form-field select,
    .unified-modal .form-field input,
    .unified-modal .form-field textarea {
        width: 100%;
        padding: 10px;
        height: 42px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
        box-sizing: border-box;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .unified-modal .form-field select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
        background-repeat: no-repeat;
        background-position: right 10px center;
        padding-right: 32px;
        cursor: pointer;
    }

    .unified-modal .form-field textarea {
        height: auto;
    }

    .unified-modal .form-field select:focus,
    .unified-modal .form-field input:focus,
    .unified-modal .form-field textarea:focus {
        outline: none;
        border-color: #00B5A4;
        box-shadow: 0 0 0 2px rgba(0, 181, 164, 0.1);
    }

    .unified-modal .form-field textarea {
        min-height: 100px;
        resize: vertical;
    }

    .unified-modal .form-field .custom-file {
        position: relative;
        width: 100%;
        height: 72px;
        border: 2px dashed #d9e2ec;
        border-radius: 8px;
        background: #f7fafc;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
        overflow: hidden;
    }

    .unified-modal .form-field .custom-file:hover {
        border-color: #00B5A4;
        background: #f0fbf9;
    }

    .unified-modal .form-field .custom-file.has-file {
        border-color: #00B5A4;
        background: #f0fbf9;
    }

    .unified-modal .form-field .custom-file.has-file .custom-file-label {
        color: #00B5A4;
    }

    .unified-modal .form-field .custom-file.has-file .custom-file-label::before {
        background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%2300B5A4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/contain no-repeat;
    }

    .unified-modal .form-field .custom-file input[type="file"] {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 0;
        border: none;
        background: transparent;
        opacity: 0;
        cursor: pointer;
        z-index: 2;
    }

    .unified-modal .form-field .custom-file .custom-file-label {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font-size: 14px;
        color: #6c757d;
        cursor: pointer;
        pointer-events: none;
    }

    .unified-modal .form-field .custom-file .custom-file-label::before {
        content: "";
        width: 36px;
        height: 36px;
        background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='%2300B5A4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/><polyline points='17 8 12 3 7 8'/><line x1='12' y1='3' x2='12' y2='15'/></svg>") center/contain no-repeat;
    }

    .unified-modal .form-field .custom-file:hover .custom-file-label {
        color: #00B5A4;
    }

    .unified-modal .form-field .form-text.text-muted {
        font-size: 12px;
        color: #868e96;
        margin-top: 8px;
        display: block;
    }

    .unified-modal .form-field [id$="_image_preview"],
    .unified-modal .form-field [id$="_current_image_container"] {
        margin-top: 10px;
    }

    .unified-modal .form-field [id$="_image_preview"] img,
    .unified-modal .form-field [id$="_current_image_container"] img {
        max-width: 120px;
        max-height: 120px;
        object-fit: cover;
        border-radius: 8px;
        border: 1px solid #e9ecef;
        box-shadow: 0 2px 6px rgba(0,0,0,0.06);
        display: block;
    }

    .unified-modal .form-field [id$="_image_progress"] {
        margin-top: 8px;
    }

    .unified-modal .form-field [id$="_image_progress"] .progress-bar,
    .unified-modal .form-field [id$="_image_progress"] > div {
        display: block;
        height: 6px;
        background: #e9ecef;
        border-radius: 3px;
        overflow: hidden;
    }

    .unified-modal .form-field [id$="_image_progress"] .progress-bar::after,
    .unified-modal .form-field [id$="_image_progress"] > div::after {
        content: "";
        display: block;
        height: 100%;
        background: linear-gradient(90deg, #00B5A4, #00d4bf);
        border-radius: 3px;
        width: var(--p, 0%);
        transition: width 0.3s;
    }

    /* 搜索框样式 */
    .unified-modal .search-box {
        margin-bottom: 16px;
    }

    .unified-modal .search-box input {
        width: 100%;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
        box-sizing: border-box;
    }

    /* 表格容器 */
    .unified-modal .table-container {
        max-height: 350px;
        overflow-y: auto;
        border: 1px solid #eee;
        border-radius: 4px;
    }

    /* 空状态提示 */
    .unified-modal .no-data {
        text-align: center;
        color: #666;
        padding: 40px;
    }

    /* 确认对话框特殊样式 */
    .unified-modal.confirm .modal-content {
        max-width: 420px;
    }
    
    .unified-modal.confirm .modal-body {
        text-align: center;
        padding: 30px 20px;
    }

    .unified-modal.confirm .confirm-icon {
        font-size: 24px;
        margin-bottom: 12px;
        color: #00B5A4;
    }

    .unified-modal.confirm .confirm-message {
        font-size: 15px;
        color: #333;
        margin-bottom: 8px;
    }

    .unified-modal.confirm .confirm-details {
        font-size: 13px;
        color: #666;
    }

    /* 响应式适配 */
    @media (max-width: 768px) {
        .unified-modal .modal-content {
            width: 95%;
            max-height: 90vh;
        }

        .unified-modal .modal-header,
        .unified-modal .modal-body,
        .unified-modal .modal-footer {
            padding: 12px 16px;
        }

        .unified-modal .modal-header h3 {
            font-size: 15px;
        }

        .unified-modal .modal-footer button {
            padding: 10px 20px;
            flex: 1;
        }

        .unified-modal .modal-footer {
            gap: 8px;
        }
    }

    @media (max-width: 480px) {
        .unified-modal .modal-content {
            width: 100%;
            height: 100%;
            max-height: 100%;
            border-radius: 0;
        }
    }

    /* 表单行布局 */
    .unified-modal .form-row {
        display: flex;
        gap: 12px;
    }

    .unified-modal .form-row .form-field {
        flex: 1;
    }

    /* 帮助文本 */
    .unified-modal .help-text {
        font-size: 12px;
        color: #666;
        margin-top: 4px;
    }

    /* 错误状态 */
    .unified-modal .form-field.error input,
    .unified-modal .form-field.error select,
    .unified-modal .form-field.error textarea {
        border-color: #dc3545;
    }

    .unified-modal .form-field .error-message {
        font-size: 12px;
        color: #dc3545;
        margin-top: 4px;
    }

    /* 加载状态 */
    .unified-modal .loading {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 40px;
        color: #666;
    }

    .unified-modal .loading::after {
        content: '';
        width: 24px;
        height: 24px;
        border: 2px solid #ddd;
        border-top-color: #00B5A4;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin-left: 10px;
    }
    
    /* 统一图片上传UI样式 */
    .current-image-container {
        position: relative;
        display: inline-block;
        margin-bottom: 10px;
    }
    .delete-image-btn {
        position: absolute;
        top: -3px;
        right: -3px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background-color: #ff4d4f;
        color: white;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        line-height: 1;
        transition: background-color 0.3s;
        padding: 0;
    }
    .delete-image-btn:hover {
        background-color: #ff7875;
    }
    .delete-icon {
        margin-top: -2px;
    }
    .product-image {
        max-width: 150px;
        max-height: 150px;
        border-radius: 4px;
    }
    .image-delete-success {
        color: #52c41a;
        margin-top: 5px;
        font-size: 14px;
    }

    /* ==========================================
       AJAX加载状态样式 - 统一管理
       ========================================== */
    
    /* 加载覆盖层 */
    .data-loading-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.7);
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 加载内容容器 */
    .loading-content {
        background: rgba(255, 255, 255, 0.9);
        padding: 20px 30px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    /* 加载动画容器 */
    .loading-spinner-wrapper {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    /* 加载旋转动画 */
    .loading-spinner {
        width: 20px;
        height: 20px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid #00B5A4;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    /* 加载文字 */
    .loading-text {
        font-size: 14px;
        color: #333;
    }
    
    /* 旋转动画关键帧 */
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    /* ==========================================
       表格单元格样式 - 统一管理
       ========================================== */
    
    /* 可复制单元格 */
    .copyable-cell {
        cursor: pointer;
        position: relative;
        transition: color 0.3s ease;
    }
    
    .copyable-cell:hover {
        color: #0066cc;
    }
    
    /* 可复制提示 */
    .copy-hint {
        position: fixed;
        top: -20px;
        left: 0;
        background-color: #00B5A4;
        color: white;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 12px;
        opacity: 0;
        transition: opacity 0.3s;
        pointer-events: none;
        z-index: 1000;
    }

    /* ==========================================
       链接样式 - 统一管理
       ========================================== */
    
    /* 外部链接 */
    .external-link {
        color: #0d6efd;
        text-decoration: underline;
        cursor: pointer;
    }
    
    .external-link:hover {
        color: #0a58ca;
    }

    /* ==========================================
       辅助样式 - 统一管理
       ========================================== */
    
    /* 隐藏元素 */
    .invisible {
        visibility: hidden;
    }
    
    /* 无图片占位文字 */
    .no-image-text {
        color: #999;
        font-size: 13px;
    }
    
    /* 暂无数据提示 */
    .empty-data-text {
        color: #999;
        font-size: 13px;
    }

/* ==========================================
   自定义下拉选择器
   ========================================== */

.unified-modal .form-field .custom-dropdown {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.unified-modal .form-field .custom-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 42px;
    padding: 0 32px 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
}

.unified-modal .form-field .custom-dropdown-trigger:hover {
    border-color: #ccc;
}

.unified-modal .form-field .custom-dropdown.open .custom-dropdown-trigger {
    border-color: #00B5A4;
    box-shadow: 0 0 0 2px rgba(0, 181, 164, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.unified-modal .form-field .custom-dropdown-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unified-modal .form-field .custom-dropdown-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #999;
    transition: transform 0.2s;
    pointer-events: none;
}

.unified-modal .form-field .custom-dropdown.open .custom-dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
    border-top-color: #00B5A4;
}

.unified-modal .form-field .custom-dropdown-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #00B5A4;
    border-top: none;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    max-height: 240px;
    overflow-y: auto;
}

.unified-modal .form-field .custom-dropdown.open .custom-dropdown-panel {
    display: block;
}

.unified-modal .form-field .custom-dropdown.flip-up .custom-dropdown-panel {
    top: auto;
    bottom: 100%;
    border-top: 1px solid #00B5A4;
    border-bottom: none;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.unified-modal .form-field .custom-dropdown-option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    gap: 8px;
}

.unified-modal .form-field .custom-dropdown-option:hover {
    background: #f0faf8;
    color: #00B5A4;
}

.unified-modal .form-field .custom-dropdown-option.selected {
    background: #e6f7f4;
    color: #00B5A4;
    font-weight: 500;
}

.unified-modal .form-field .custom-dropdown-check {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.unified-modal .form-field .custom-dropdown-option:not(.selected) .custom-dropdown-check {
    opacity: 0;
}

.unified-modal .form-field .custom-dropdown-option.selected .custom-dropdown-check::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #00B5A4;
    border-radius: 2px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 7px 7px;
}

.unified-modal .form-field .custom-dropdown-panel::-webkit-scrollbar {
    width: 6px;
}

.unified-modal .form-field .custom-dropdown-panel::-webkit-scrollbar-track {
    background: transparent;
}

.unified-modal .form-field .custom-dropdown-panel::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.unified-modal .form-field .custom-dropdown-panel::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}
