/* ========== 通用弹窗样式 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    width: 420px;
    min-width: 320px;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    background-color: var(--theme-color);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.modal-header .close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.modal-header .close-btn:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-lg .modal-content {
    width: 550px;
    max-width: 95%;
}

.modal-content .modal-body {
    max-height: 60vh;
}


/* ========== 通用按钮样式 ========== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--theme-color);
    color: #fff;
    box-shadow: var(--theme-shadow);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-cancel {
    background-color: #9e9e9e;
    color: #fff;
}

.btn-cancel:hover {
    background-color: #757575;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--theme-color);
    color: var(--theme-color);
}

.btn-outline:hover {
    background-color: var(--theme-color);
    color: #fff;
}

.btn-block {
    display: block;
    width: 100%;
    height: 48px;
    font-size: 16px;
    font-weight: 500;
}


/* ========== 表单元素样式 ========== */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(211, 91, 126, 0.1);
}


/* ========== 卡片样式 ========== */
.card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.card-body {
    padding: 20px;
}


/* ========== 空状态提示 ========== */
.empty-tip {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}


/* ========== 响应式 ========== */
@media (max-width: 480px) {
    .modal-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .modal-content {
        max-width: 80%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .modal-content {
        max-width: 600px;
    }
}

@media (min-width: 1025px) {
    .modal-content {
        max-width: 700px;
    }
}
