﻿.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */

    width: 100%;
    height: 100%;
    z-index: 20050;
    background-color: rgba(0, 0, 0, 0.45);
}

.modal-content {
    background: white;
    border-radius: 8px;
    min-width: 400px;
    max-width: 70%;
    max-height: 90%;
    overflow: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

/* Admin modal：避免与其他页面 class 重名 */
.admin-modal-overlay {
    position: fixed;
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */

    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
}

.admin-modal-content {
    background: white;
    border-radius: 8px;
    min-width: 400px;
    max-width: 70%;
    max-height: calc(100vh - 80px);
    overflow: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
}

    .admin-modal-header h5 {
        margin: 0;
        font-size: 18px;
    }

.admin-modal-body {
    padding: 10px 12px;
}

.admin-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 12px;
    border-top: 1px solid #e0e0e0;
}

/* 弹窗内表格容器默认 margin 太大，压缩留白 */
.admin-modal-body .table-container {
    margin: 6px auto;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

    .modal-header h5 {
        margin: 0;
        font-size: 18px;
    }

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
}
