.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    width: 300px;
    text-align: center;
}

.modal-buttons {
    margin-top: 15px;
}

.modal-buttons button {
    margin: 0 10px;
    padding: 5px 15px;
}

/* 备注编辑样式 */
.remark-display {
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    min-height: 20px;
    display: inline-block;
    min-width: 80px;
}

.remark-display:hover {
    color: #007bff;
}

.remark-input {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 120px;
    transition: border-color 0.2s;
}

.remark-input:focus {
    outline: none;
    border-color: #007bff;
}

/* 模态框基础样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 15vh auto;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
    font-weight: 600;
}

.modal-content p {
    margin: 15px 0;
    color: #666;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.modal-buttons button {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-buttons button:first-child {
    background-color: #4CAF50;
    color: white;
}

.modal-buttons button:last-child {
    background-color: #f5f5f5;
    color: #333;
}

.modal-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 验证码模态框特殊样式 */
#captchaModal .modal-content {
    text-align: center;
}

#captchaImage {
    margin: 15px 0;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#captchaInput {
    width: 200px;
    padding: 8px 12px;
    margin: 15px 0;
    border: 2px solid #eee;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    transition: border-color 0.2s ease;
}

#captchaInput:focus {
    outline: none;
    border-color: #4CAF50;
}

/* 结果显示样式 */
#updatedCount {
    font-weight: bold;
    color: #4CAF50;
}

#resultMessage {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}


.dispatch_filter_group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    gap: 10px;
}

.dispatch_search_form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    max-width: 1000px;
    width: 100%;
}

.dispatch_action_group {
    display: flex;
    gap: 10px;
}
.dispatch_action_bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.dispatch_btn {
    min-width: 100px;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.dispatch_btn_primary {
    background-color: #007bff;
    color: white;
}

.dispatch_btn_primary:hover {
    background-color: #5677fc;
}

.dispatch_btn_secondary_qx {
    background-color: #607d8b;
    color: white;
}

.dispatch_btn_secondary_qx:hover {
    background-color: #b0bec5;
}

.dispatch_btn_secondary_fx {
    background-color: #9e9e9e;
    color: white;
}

.dispatch_btn_secondary_fx:hover {
    background-color: #e0e0e0;
}

.dispatch_btn_secondary_bj {
    background-color: #ff5722;
    color: white;
}

.dispatch_btn_secondary_bj:hover {
    background-color: #ff8a65;
}

.dispatch_btn_secondary_sxt {
    background-color: #259b24;
    color: white;
}

.dispatch_btn_secondary_sxt:hover {
    background-color: #72d572;
}

.dispatch_filter {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.dispatch_search {
    flex: 1;
    min-width: 150px;
    max-width: 250px;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}


.dispatch_btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}



.dispatch_btn_secondary {
    background: #6c757d;
    color: white;
    margin-left: 10px;
}

.dispatch_btn_secondary:hover {
    background: #545b62;
}

.dispatch_table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative; 
    z-index: 1;
}

.dispatch_table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.dispatch_table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    color: #495057;
}

.dispatch_table tr:hover {
    background-color: #f5f5f5;
}

.dispatch_checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.dispatch_pagination {
    margin-top: 10px;
    text-align: center;
    clear: both;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}


/* 移动端适配 */
@media (max-width: 991.98px) {

    .dispatch_search_form {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .dispatch_action_group {
        width: 100%;
    }

    .dispatch_search_form .dispatch_btn,
    .dispatch_action_group .dispatch_btn {
        flex: 1;
    }

    .dispatch_search {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .dispatch_filter {
        position: static;  /* 移除固定定位 */
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .dispatch_filter form {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .dispatch_filter_group {
        flex-direction: column;
        gap: 15px;
    }

    .dispatch_search {
        width: 100%;
        margin: 0;
    }

    .dispatch_action_bar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        width: 100%;
    }

    .dispatch_btn {
        min-width: unset;
        width: 100%;
        padding: 12px 15px;
        font-size: 14px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dispatch_btn_primary {
        grid-column: 1 / -1;
    }

    .dispatch_table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .dispatch_table th,
    .dispatch_table td {
        min-width: 120px;
        padding: 8px;
    }

    .dispatch_table th:first-child,
    .dispatch_table td:first-child {
        position: sticky;
        left: 0;
        background: white;
        z-index: 1;
        min-width: 60px;
    }

    .dispatch_checkbox {
        width: 20px;
        height: 20px;
    }

    .dispatch_pagination {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
        flex-wrap: nowrap;
        margin-top: 15px;
    }

    .dispatch_page_link {
        white-space: nowrap; 
        padding: 8px 15px;
        margin: 0;
    }

    .dispatch_page_info {
        width: 100%;
        text-align: center;
        margin: 10px 0;
    }

}

